[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/14] target-mips: pass 0 instead of -1 as rs in mic
From: |
Leon Alrae |
Subject: |
[Qemu-devel] [PULL 13/14] target-mips: pass 0 instead of -1 as rs in microMIPS LUI instruction |
Date: |
Fri, 13 Feb 2015 10:02:11 +0000 |
Using rs = -1 in gen_logic_imm() for microMIPS LUI instruction is dangerous
and may bite us when implementing microMIPS R6 because in R6 AUI and LUI
are distinguished by rs value. Therefore use 0 for safety.
Reported-by: Paolo Bonzini <address@hidden>
Signed-off-by: Leon Alrae <address@hidden>
---
target-mips/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-mips/translate.c b/target-mips/translate.c
index 6ab3763..35e6cfe 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -13653,7 +13653,7 @@ static void decode_micromips32_opc (CPUMIPSState *env,
DisasContext *ctx,
target. */
break;
case LUI:
- gen_logic_imm(ctx, OPC_LUI, rs, -1, imm);
+ gen_logic_imm(ctx, OPC_LUI, rs, 0, imm);
break;
case SYNCI:
/* Break the TB to be able to sync copied instructions
--
2.1.0
- [Qemu-devel] [PULL 00/14] target-mips queue, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 04/14] mips: remove isa_mem_base usage, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 05/14] piix4: use PCI address space instead of system memory, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 03/14] jazz: remove usage of isa_mem_base, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 13/14] target-mips: pass 0 instead of -1 as rs in microMIPS LUI instruction,
Leon Alrae <=
- [Qemu-devel] [PULL 07/14] isa: remove isa_mem_base variable, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 02/14] jazz: do not explode QEMUMachineInitArgs structure, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 06/14] gt64xxx: remove isa_mem_base usage, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 01/14] isa: add memory space parameter to isa_bus_new, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 11/14] target-mips: use CP0EnLo_XI instead of magic number, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 12/14] target-mips: fix broken snapshotting, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 08/14] target-mips: Make CP0.Status.CU1 read-only for the 5Kc and 5KEc processors, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 10/14] target-mips: ll and lld cause AdEL exception for unaligned address, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 14/14] linux-user: correct stat structure in MIPS N32, Leon Alrae, 2015/02/13
- [Qemu-devel] [PULL 09/14] target-mips: fix detection of the end of the page during translation, Leon Alrae, 2015/02/13