authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-08-14 23:31:05-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-08-15 04:42:04-04:00
log5d080e25d5b9b69fda4fd9d340cc9571fc0d0939
treeb467a435729daebaa2432dae9f6ce1fb67aac0b7
parentda8fbcc2a9134c52474060ecc240c06e4a7df3cd

start: fix passing comptime-only value to inline asm

Also fix fmt directive typo.

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/start.zig+2-2
...@@ -328,7 +328,7 @@ fn _start() callconv(.Naked) noreturn {...@@ -328,7 +328,7 @@ fn _start() callconv(.Naked) noreturn {
328 \\ andi sp, sp, -16328 \\ andi sp, sp, -16
329 \\ tail %[posixCallMainAndExit]@plt329 \\ tail %[posixCallMainAndExit]@plt
330 ,330 ,
331 // zig fmt: off331 // zig fmt: on
332 .m68k =>332 .m68k =>
333 // Note that the - 8 is needed because pc in the jsr instruction points into the middle333 // Note that the - 8 is needed because pc in the jsr instruction points into the middle
334 // of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.)334 // of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.)
...@@ -426,7 +426,7 @@ fn _start() callconv(.Naked) noreturn {...@@ -426,7 +426,7 @@ fn _start() callconv(.Naked) noreturn {
426 else => @compileError("unsupported arch"),426 else => @compileError("unsupported arch"),
427 }427 }
428 :428 :
429 : [_start] "X" (_start),429 : [_start] "X" (&_start),
430 [posixCallMainAndExit] "X" (&posixCallMainAndExit),430 [posixCallMainAndExit] "X" (&posixCallMainAndExit),
431 );431 );
432}432}