mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
start: Pass _start() into its own inline asm as an operand.
This commit is contained in:
parent
1fc42ed3e7
commit
142209444a
@ -340,8 +340,8 @@ fn _start() callconv(.Naked) noreturn {
|
||||
,
|
||||
.powerpc64, .powerpc64le =>
|
||||
// Setup the initial stack frame and clear the back chain pointer.
|
||||
\\ addis 2, 12, .TOC. - _start@ha
|
||||
\\ addi 2, 2, .TOC. - _start@l
|
||||
\\ addis 2, 12, .TOC. - %[_start]@ha
|
||||
\\ addi 2, 2, .TOC. - %[_start]@l
|
||||
\\ mr 3, 1
|
||||
\\ clrrdi 1, 1, 4
|
||||
\\ li 0, 0
|
||||
@ -359,7 +359,8 @@ fn _start() callconv(.Naked) noreturn {
|
||||
else => @compileError("unsupported arch"),
|
||||
}
|
||||
:
|
||||
: [posixCallMainAndExit] "X" (&posixCallMainAndExit),
|
||||
: [_start] "X" (_start),
|
||||
[posixCallMainAndExit] "X" (&posixCallMainAndExit),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user