aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-07-22 01:23:04 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2024-07-22 01:23:04 +0200
commit81232f7c91ca8e0969e9d3f92cc11caeedc017d0 (patch)
tree64d8e02ccc59696d0b683d31ade3d89fd7251d69 /lib
parent7bc78967b400322a0fc5651f37a1b0428c37fb9d (diff)
downloadzig-81232f7c91ca8e0969e9d3f92cc11caeedc017d0.tar.gz
zig-81232f7c91ca8e0969e9d3f92cc11caeedc017d0.zip
start: Add clrrdi to align the stack pointer on powerpc64.
Diffstat (limited to 'lib')
-rw-r--r--lib/std/start.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig
index 28c77fa49e..e0f99b4762 100644
--- a/lib/std/start.zig
+++ b/lib/std/start.zig
@@ -340,10 +340,10 @@ fn _start() callconv(.Naked) noreturn {
,
.powerpc64, .powerpc64le =>
// Setup the initial stack frame and clear the back chain pointer.
- // TODO: Support powerpc64 (big endian) on ELFv2.
\\ addis 2, 12, .TOC. - _start@ha
\\ addi 2, 2, .TOC. - _start@l
\\ mr 3, 1
+ \\ clrrdi 1, 1, 4
\\ li 0, 0
\\ stdu 0, -32(1)
\\ mtlr 0