Commit ab19b0ecfddf94ae2053b973cea5a58c8dac0363
1 parent
9277bc72
ARMv7-M interrupt stack alignment fix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4823 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
target-arm/helper.c
| @@ -674,7 +674,7 @@ void do_interrupt_v7m(CPUARMState *env) | @@ -674,7 +674,7 @@ void do_interrupt_v7m(CPUARMState *env) | ||
| 674 | /* ??? Should only do this if Configuration Control Register | 674 | /* ??? Should only do this if Configuration Control Register |
| 675 | STACKALIGN bit is set. */ | 675 | STACKALIGN bit is set. */ |
| 676 | if (env->regs[13] & 4) { | 676 | if (env->regs[13] & 4) { |
| 677 | - env->regs[13] += 4; | 677 | + env->regs[13] -= 4; |
| 678 | xpsr |= 0x200; | 678 | xpsr |= 0x200; |
| 679 | } | 679 | } |
| 680 | /* Switch to the handler mode. */ | 680 | /* Switch to the handler mode. */ |