The attached patch fixes a bug in execution of "blx lr". Current behavior: lr <- pc branch lr
Expected behavior: temp <- lr lr <- pc branch temp Lauro
Index: target-arm/translate.c =================================================================== RCS file: /sources/qemu/qemu/target-arm/translate.c,v retrieving revision 1.51 diff -u -r1.51 translate.c --- target-arm/translate.c 1 May 2007 01:28:01 -0000 1.51 +++ target-arm/translate.c 8 Jun 2007 23:28:59 -0000 @@ -2325,9 +2325,9 @@ /* branch link/exchange thumb (blx) */ val = (uint32_t)s->pc; - gen_op_movl_T0_im(val); - gen_movl_reg_T0(s, 14); + gen_op_movl_T1_im(val); gen_movl_T0_reg(s, rm); + gen_movl_reg_T1(s, 14); gen_bx(s); break; case 0x5: /* saturating add/subtract */