]> git.proxmox.com Git - qemu.git/commitdiff
tcg/mips: fix branch target change during code retranslation
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 6 Jan 2011 21:43:14 +0000 (22:43 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 8 Jan 2011 15:41:43 +0000 (16:41 +0100)
TCG on MIPS was trying to avoid changing the branch offset, but didn't
due to a stupid typo. Fix it.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/mips/tcg-target.c

index 2af7a2e818ad5265fc524805dd1546b31567a21f..4e92a50e6f537e8e6324b0d96bcd18e7339e8dac 100644 (file)
@@ -352,7 +352,7 @@ static inline void tcg_out_opc_imm(TCGContext *s, int opc, int rt, int rs, int i
 static inline void tcg_out_opc_br(TCGContext *s, int opc, int rt, int rs)
 {
     /* We need to keep the offset unchanged for retranslation */
-    uint16_t offset = (uint16_t)(*(uint32_t *) &s->code_ptr);
+    uint16_t offset = (uint16_t)(*(uint32_t *) s->code_ptr);
 
     tcg_out_opc_imm(s, opc, rt, rs, offset);
 }