mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
start: Align the stack on s390x just in case.
The kernel does this as required, but we cannot trust dynamic linkers to do it.
This commit is contained in:
parent
52653ec82b
commit
ce81525f3f
1 changed files with 2 additions and 1 deletions
|
|
@ -373,8 +373,9 @@ fn _start() callconv(.Naked) noreturn {
|
|||
,
|
||||
.s390x =>
|
||||
// Set up the stack frame (register save area and cleared back-chain slot).
|
||||
// Note: Stack pointer is guaranteed by ABI to be 8-byte aligned as required.
|
||||
\\ lgr %r2, %r15
|
||||
\\ lghi %r0, -16
|
||||
\\ ngr %r15, %r0
|
||||
\\ aghi %r15, -160
|
||||
\\ lghi %r0, 0
|
||||
\\ stg %r0, 0(%r15)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue