mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
start: fix passing comptime-only value to inline asm
Also fix fmt directive typo.
This commit is contained in:
parent
da8fbcc2a9
commit
5d080e25d5
@ -328,7 +328,7 @@ fn _start() callconv(.Naked) noreturn {
|
|||||||
\\ andi sp, sp, -16
|
\\ andi sp, sp, -16
|
||||||
\\ tail %[posixCallMainAndExit]@plt
|
\\ tail %[posixCallMainAndExit]@plt
|
||||||
,
|
,
|
||||||
// zig fmt: off
|
// zig fmt: on
|
||||||
.m68k =>
|
.m68k =>
|
||||||
// Note that the - 8 is needed because pc in the jsr instruction points into the middle
|
// Note that the - 8 is needed because pc in the jsr instruction points into the middle
|
||||||
// of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.)
|
// of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.)
|
||||||
@ -426,7 +426,7 @@ fn _start() callconv(.Naked) noreturn {
|
|||||||
else => @compileError("unsupported arch"),
|
else => @compileError("unsupported arch"),
|
||||||
}
|
}
|
||||||
:
|
:
|
||||||
: [_start] "X" (_start),
|
: [_start] "X" (&_start),
|
||||||
[posixCallMainAndExit] "X" (&posixCallMainAndExit),
|
[posixCallMainAndExit] "X" (&posixCallMainAndExit),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user