Skip to contentSkip to conversation

tcg/mips: fix branch target change during code retranslation

PATCH New Aurelien Jarno 1 participant 1 message Jan 6, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg/mips: fix branch target change during code retranslation

TCG on MIPS was trying to avoid changing the branch offset, but didn't due to a stupid typo. Fix it.

---
 tcg/mips/tcg-target.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tcg/mips/tcg-target.c +1 -1
index 2af7a2e..4e92a50 100644
@@ -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);
 }
Signature · 1 line
1.7.2.3