summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/psim
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2009-11-11 14:29:08 +0000
committerTill Straumann <strauman@slac.stanford.edu>2009-11-11 14:29:08 +0000
commit00d6017bdff7e5b38f3c5e4feafb091d22610310 (patch)
treed0708b1ef038249a6d8259e80abe8b0dfb3ebd94 /c/src/lib/libbsp/powerpc/psim
parent2009-11-11 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-00d6017bdff7e5b38f3c5e4feafb091d22610310.tar.bz2
2009-11-11 Till Straumann <strauman@slac.stanford.edu>
* start/start.S: Ensure that initial stack is aligned to CPU_STACK_ALIGNMENT.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/psim')
-rw-r--r--c/src/lib/libbsp/powerpc/psim/start/start.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/powerpc/psim/start/start.S b/c/src/lib/libbsp/powerpc/psim/start/start.S
index 2e32543fb7..f28afd5cff 100644
--- a/c/src/lib/libbsp/powerpc/psim/start/start.S
+++ b/c/src/lib/libbsp/powerpc/psim/start/start.S
@@ -100,9 +100,12 @@ _start:
.Lnostack:
/* set up initial stack frame */
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
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)
/* Let her rip */