forked from Imagelibrary/rtems
2009-11-11 Till Straumann <strauman@slac.stanford.edu>
* start/start.S: Ensure that initial stack is aligned to CPU_STACK_ALIGNMENT.
This commit is contained in:
@@ -100,9 +100,12 @@ _start:
|
|||||||
.Lnostack:
|
.Lnostack:
|
||||||
/* set up initial stack frame */
|
/* set up initial stack frame */
|
||||||
addi sp,sp,-4 /* make sure we don't overwrite debug mem */
|
addi sp,sp,-4 /* make sure we don't overwrite debug mem */
|
||||||
|
/* align */
|
||||||
|
li r3, CPU_STACK_ALIGNMENT-1
|
||||||
|
andc sp, sp, r3
|
||||||
lis r0,0
|
lis r0,0
|
||||||
stw r0,0(sp) /* clear back chain */
|
stw r0,0(sp) /* clear back chain */
|
||||||
stwu sp,-56(sp) /* push another stack frame */
|
stwu sp,-CPU_STACK_ALIGNMENT(sp) /* push another stack frame */
|
||||||
bl FUNC_NAME(__eabi)
|
bl FUNC_NAME(__eabi)
|
||||||
|
|
||||||
/* Let her rip */
|
/* Let her rip */
|
||||||
|
|||||||
Reference in New Issue
Block a user