From 3b2bad2a8fffa3d099b6d22f298e8e19a3e3809b Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 3 Dec 2010 15:05:57 +0000 Subject: [PATCH] Remove unneeded push. 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 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bertos/cpu/frame.h b/bertos/cpu/frame.h index 7420dddd..63d341cf 100644 --- a/bertos/cpu/frame.h +++ b/bertos/cpu/frame.h @@ -193,12 +193,6 @@ 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 -- 2.25.1