Skip to content

Commit 81232f7

Browse files
committed
start: Add clrrdi to align the stack pointer on powerpc64.
1 parent 7bc7896 commit 81232f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/start.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,10 @@ fn _start() callconv(.Naked) noreturn {
340340
,
341341
.powerpc64, .powerpc64le =>
342342
// Setup the initial stack frame and clear the back chain pointer.
343-
// TODO: Support powerpc64 (big endian) on ELFv2.
344343
\\ addis 2, 12, .TOC. - _start@ha
345344
\\ addi 2, 2, .TOC. - _start@l
346345
\\ mr 3, 1
346+
\\ clrrdi 1, 1, 4
347347
\\ li 0, 0
348348
\\ stdu 0, -32(1)
349349
\\ mtlr 0

0 commit comments

Comments
 (0)