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:
@@ -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"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user