ARMv7-M interrupt stack alignment fix.
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 2 Jul 2008 16:44:09 +0000 (16:44 +0000)
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 2 Jul 2008 16:44:09 +0000 (16:44 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4823 c046a42c-6fe2-441c-8c8c-71466251a162

target-arm/helper.c

index 8e85435..32c2c2e 100644 (file)
@@ -674,7 +674,7 @@ void do_interrupt_v7m(CPUARMState *env)
     /* ??? Should only do this if Configuration Control Register
        STACKALIGN bit is set.  */
     if (env->regs[13] & 4) {
-        env->regs[13] += 4;
+        env->regs[13] -= 4;
         xpsr |= 0x200;
     }
     /* Switch to the handler mode.  */