Skip to content

Commit af659a7

Browse files
committed
std: fix inline assembly in start.zig for m68k
1 parent da3f527 commit af659a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/start.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ fn _start() callconv(.naked) noreturn {
239239
.csky => ".cfi_undefined lr",
240240
.hexagon => ".cfi_undefined r31",
241241
.loongarch32, .loongarch64 => ".cfi_undefined 1",
242-
.m68k => ".cfi_undefined pc",
242+
.m68k => ".cfi_undefined %%pc",
243243
.mips, .mipsel, .mips64, .mips64el => ".cfi_undefined $ra",
244244
.powerpc, .powerpcle, .powerpc64, .powerpc64le => ".cfi_undefined lr",
245245
.riscv32, .riscv64 => if (builtin.zig_backend == .stage2_riscv64)
@@ -354,7 +354,7 @@ fn _start() callconv(.naked) noreturn {
354354
.m68k =>
355355
// Note that the - 8 is needed because pc in the jsr instruction points into the middle
356356
// of the jsr instruction. (The lea is 6 bytes, the jsr is 4 bytes.)
357-
\\ suba.l %%fp, %%fp
357+
\\ suba.l %%a6, %%a6 // fp
358358
\\ move.l %%sp, -(%%sp)
359359
\\ lea %[posixCallMainAndExit] - . - 8, %%a0
360360
\\ jsr (%%pc, %%a0)

0 commit comments

Comments
 (0)