]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/GCC/ARM_CA9/portASM.S
Correct alignment issue in GCC and RVDS Cortex-A9 port that was preventing full float...
[freertos] / FreeRTOS / Source / portable / GCC / ARM_CA9 / portASM.S
index 46ff2cfcd03988030fa4b8fd55c86720bed99217..970bb0cac75bf8cd3fe935c90574e1abb58b3e78 100644 (file)
@@ -217,16 +217,17 @@ FreeRTOS_IRQ_Handler:
        LDR             r0, [r2]\r
 \r
        /* Ensure bit 2 of the stack pointer is clear.  r2 holds the bit 2 value for\r
-       future use. */\r
+       future use.  _RB_ Does this ever actually need to be done provided the start\r
+       of the stack is 8-byte aligned? */\r
        MOV             r2, sp\r
        AND             r2, r2, #4\r
        SUB             sp, sp, r2\r
 \r
-       /* Call the interrupt handler. */\r
-       PUSH    {r0-r3, lr}\r
+       /* Call the interrupt handler.  r4 pushed to maintain alignment. */\r
+       PUSH    {r0-r4, lr}\r
        LDR             r1, vApplicationIRQHandlerConst\r
        BLX             r1\r
-       POP             {r0-r3, lr}\r
+       POP             {r0-r4, lr}\r
        ADD             sp, sp, r2\r
 \r
        CPSID   i\r