mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
start: Add POSIX s390x startup code.
This commit is contained in:
parent
c53673276b
commit
8ffc41f747
@ -363,6 +363,15 @@ fn _start() callconv(.Naked) noreturn {
|
||||
\\ mtlr 0
|
||||
\\ b %[posixCallMainAndExit]
|
||||
,
|
||||
.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
|
||||
\\ aghi %r15, -160
|
||||
\\ lghi %r0, 0
|
||||
\\ stg %r0, 0(%r15)
|
||||
\\ jg %[posixCallMainAndExit]
|
||||
,
|
||||
.sparc64 =>
|
||||
// argc is stored after a register window (16 registers) plus stack bias
|
||||
\\ mov %%g0, %%i6
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user