Skip to content

Commit f9fbb4f

Browse files
committed
std.start: add exit2 implementation for LoongArch64
1 parent 0e8d74f commit f9fbb4f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/std/start.zig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ fn exit2(code: usize) noreturn {
159159
: "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", "memory"
160160
);
161161
},
162+
.loongarch64 => {
163+
asm volatile ("syscall 0"
164+
:
165+
: [number] "{a7}" (93),
166+
[arg1] "{a0}" (code),
167+
: "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "memory"
168+
);
169+
},
162170
else => @compileError("TODO"),
163171
},
164172
// exits(0)

0 commit comments

Comments
 (0)