mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
lib: Fix asm code in _start for SPARC
SPARCs have delayed branches, that is, it will unconditionally run the next instruction following a branch. Slightly reorder the _start code sequence to prevent it from accidentally executing stray instructions, which may result in odd program behavior.
This commit is contained in:
parent
67ee68fc9e
commit
375bb5f4a1
@ -327,8 +327,8 @@ fn _start() callconv(.Naked) noreturn {
|
||||
// argc is stored after a register window (16 registers) plus stack bias
|
||||
\\ mov %%g0, %%i6
|
||||
\\ add %%o6, 2175, %%l0
|
||||
\\ stx %%l0, %[argc_argv_ptr]
|
||||
\\ ba %[posixCallMainAndExit]
|
||||
\\ stx %%l0, %[argc_argv_ptr]
|
||||
,
|
||||
else => @compileError("unsupported arch"),
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user