Commit e22f8f39f3b0856c199ef29ff75749bb201b17bc

Authored by balrog
1 parent 5b340b51

Correctly restore pc after an exception occured in Thumb mode.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4211 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 6 deletions
target-arm/translate.c
... ... @@ -905,11 +905,6 @@ static inline void gen_set_pc_im(uint32_t val)
905 905 store_cpu_field(tmp, regs[15]);
906 906 }
907 907  
908   -static inline void gen_set_pc_T0(void)
909   -{
910   - tcg_gen_st_i32(cpu_T[0], cpu_env, offsetof(CPUState, regs[15]));
911   -}
912   -
913 908 static inline void gen_movl_reg_TN(DisasContext *s, int reg, int t)
914 909 {
915 910 TCGv tmp;
... ... @@ -3486,7 +3481,7 @@ static int gen_set_psr_T0(DisasContext *s, uint32_t mask, int spsr)
3486 3481 static void gen_exception_return(DisasContext *s)
3487 3482 {
3488 3483 TCGv tmp;
3489   - gen_set_pc_T0();
  3484 + gen_movl_reg_T0(s, 15);
3490 3485 tmp = load_cpu_field(spsr);
3491 3486 gen_set_cpsr(tmp, 0xffffffff);
3492 3487 dead_tmp(tmp);
... ...