| author | |
| committer | |
| log | 375bb5f4a1ebfc1d002e252d97077da7e1db7e4d |
| tree | e216296d7a47dd4c53117a96abac506f844bba43 |
| parent | 67ee68fc9eb02b78d7a2c26c617a16f60f91012d |
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.1 files changed, 1 insertions(+), 1 deletions(-)
lib/std/start.zig+1-1| ... | ... | @@ -327,8 +327,8 @@ fn _start() callconv(.Naked) noreturn { |
| 327 | 327 | // argc is stored after a register window (16 registers) plus stack bias |
| 328 | 328 | \\ mov %%g0, %%i6 |
| 329 | 329 | \\ add %%o6, 2175, %%l0 |
| 330 | \\ stx %%l0, %[argc_argv_ptr] | |
| 331 | 330 | \\ ba %[posixCallMainAndExit] |
| 331 | \\ stx %%l0, %[argc_argv_ptr] | |
| 332 | 332 | , |
| 333 | 333 | else => @compileError("unsupported arch"), |
| 334 | 334 | } |