ARM: Fix push/pop alignment on ARM platforms
This patch adjusts the way we are doing push/pop operations before making function calls inside of assembly routines. ARM requires 8 byte aligned stack operations across public interfaces. This means that we need to be sure to push multiples of 2 registers. Fixes #2108 Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
parent
4d2459e515
commit
a468c15eca
6 changed files with 67 additions and 54 deletions
|
@ -87,14 +87,13 @@ _EXIT_EXC:
|
|||
#endif /* CONFIG_PREEMPT_ENABLED */
|
||||
|
||||
#ifdef CONFIG_STACK_SENTINEL
|
||||
push {lr}
|
||||
push {r0, lr}
|
||||
bl _check_stack_sentinel
|
||||
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
|
||||
pop {r0}
|
||||
mov lr, r0
|
||||
pop {r0, r1}
|
||||
mov lr, r1
|
||||
#else
|
||||
pop {lr}
|
||||
pop {r0, lr}
|
||||
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
|
||||
#endif /* CONFIG_STACK_SENTINEL */
|
||||
|
||||
bx lr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue