Skip to contentSkip to conversation

target-mips: Fix signedness of loads in MIPS16 RESTOREs

PATCH New Richard Sandiford 1 participant 1 message Jan 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-mips: Fix signedness of loads in MIPS16 RESTOREs

Make RESTORE use sign-extending rather than zero-extending loads.

---
 target-mips/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-mips/translate.c +1 -1
index 47528d7..623edd0 100644
@@ -9409,7 +9409,7 @@ static void gen_mips16_restore (DisasContext *ctx,
 
 #define DECR_AND_LOAD(reg) do {                   \
         tcg_gen_subi_tl(t0, t0, 4);               \
-        tcg_gen_qemu_ld32u(t1, t0, ctx->mem_idx); \
+        tcg_gen_qemu_ld32s(t1, t0, ctx->mem_idx); \
         gen_store_gpr(t1, reg);                   \
     } while (0)
 
Signature · 1 line
1.7.11.7