diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-04-13 13:25:31 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-04-13 13:25:31 +0000 |
commit | 6a0d8a1d233120592abc547dcfd47005dac18396 (patch) | |
tree | 7c7f337c4e14e4270c2041df31e14edeac4d94e8 /target-arm/translate.c | |
parent | 2637a3beb9d9f7f9acad17dbb4e45bff2c017b8f (diff) |
Fix the offset in Thumb bl instruction.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4204 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm/translate.c')
-rw-r--r-- | target-arm/translate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c index bc53c0ae61..99b57cc18f 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -6912,7 +6912,7 @@ static int disas_thumb2_insn(CPUState *env, DisasContext *s, uint16_t insn_hw1) /* Second half of bl. */ offset = ((insn & 0x7ff) << 1) | 1; tmp = load_reg(s, 14); - tcg_gen_addi_i32(tmp, tmp, 14); + tcg_gen_addi_i32(tmp, tmp, offset); tmp2 = new_tmp(); tcg_gen_movi_i32(tmp2, s->pc | 1); @@ -8308,7 +8308,7 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s) tmp = load_reg(s, 13); val = (insn & 0x7f) * 4; if (insn & (1 << 7)) - val = -(int32_t)val; + val = -(int32_t)val; tcg_gen_addi_i32(tmp, tmp, val); store_reg(s, 13, tmp); break; @@ -8529,7 +8529,7 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s) case 15: if (disas_thumb2_insn(env, s, insn)) - goto undef32; + goto undef32; break; } return; |