mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
start: Align the stack on powerpc just in case.
The kernel does this as required, but we cannot trust dynamic linkers to do it.
This commit is contained in:
parent
714e743393
commit
52653ec82b
1 changed files with 3 additions and 2 deletions
|
|
@ -351,8 +351,9 @@ fn _start() callconv(.Naked) noreturn {
|
|||
\\ j %[posixCallMainAndExit]
|
||||
,
|
||||
.powerpc, .powerpcle =>
|
||||
// Setup the initial stack frame and clear the back chain pointer.
|
||||
// Set up the initial stack frame, and clear the back chain pointer.
|
||||
\\ mr 3, 1
|
||||
\\ clrrwi 1, 1, 4
|
||||
\\ li 0, 0
|
||||
\\ stwu 1, -16(1)
|
||||
\\ stw 0, 0(1)
|
||||
|
|
@ -360,7 +361,7 @@ fn _start() callconv(.Naked) noreturn {
|
|||
\\ b %[posixCallMainAndExit]
|
||||
,
|
||||
.powerpc64, .powerpc64le =>
|
||||
// Setup the initial stack frame and clear the back chain pointer.
|
||||
// Set up the ToC and initial stack frame, and clear the back chain pointer.
|
||||
\\ addis 2, 12, .TOC. - %[_start]@ha
|
||||
\\ addi 2, 2, .TOC. - %[_start]@l
|
||||
\\ mr 3, 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue