Remove unneeded push.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 3 Dec 2010 15:05:57 +0000 (15:05 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 3 Dec 2010 15:05:57 +0000 (15:05 +0000)
The push of xPSR when the kernel is cooperative is not needed and even dangerous.
The ARM EABI states that the stack at functions entry should be aligned to a 64bit
boundary.
Since the space reserved for xPSR was never popped out, the stack was misaligned!

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4612 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/frame.h

index 7420dddd1f2379eba43885b7f53cfc9fcf2fe5ad..63d341cf1db379d159d3f4b0d99e162ece2a9e5f 100644 (file)
                                CPU_PUSH_WORD(stack, IRQ_PRIO_DISABLED); \
                        } while (0)
 
-       #else /* !CONFIG_KERN_PREEMPT */
-               #define CPU_PUSH_CALL_FRAME(sp, func) \
-                       do { \
-                               CPU_PUSH_WORD((sp), 0x01000000);                /* xPSR    */   \
-                               CPU_PUSH_WORD((sp), (cpu_stack_t)(func));       /* pc      */   \
-                       } while (0);
        #endif /* CONFIG_KERN_PREEMPT */
 
 #elif CPU_AVR