Skip to content

Commit f17f73b

Browse files
authored
Merge pull request #20869 from alexrp/linux-syscalls
`std.os.linux`: Add syscall enums for all remaining architectures
2 parents 91163b4 + 876383c commit f17f73b

File tree

3 files changed

+4409
-1127
lines changed

3 files changed

+4409
-1127
lines changed

lib/std/os/linux.zig

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,24 @@ pub const SYS = switch (@import("builtin").cpu.arch) {
105105
.x86 => syscalls.X86,
106106
.x86_64 => syscalls.X64,
107107
.aarch64, .aarch64_be => syscalls.Arm64,
108+
.arc => syscalls.Arc,
108109
.arm, .armeb, .thumb, .thumbeb => syscalls.Arm,
110+
.csky => syscalls.CSky,
111+
.hexagon => syscalls.Hexagon,
109112
.riscv32 => syscalls.RiscV32,
110113
.riscv64 => syscalls.RiscV64,
114+
.sparc, .sparcel => syscalls.Sparc,
111115
.sparc64 => syscalls.Sparc64,
112-
.mips, .mipsel => syscalls.Mips,
113-
.mips64, .mips64el => syscalls.Mips64,
116+
.m68k => syscalls.M68k,
117+
.mips, .mipsel => syscalls.MipsO32,
118+
.mips64, .mips64el => if (builtin.abi == .gnuabin32)
119+
syscalls.MipsN32
120+
else
121+
syscalls.MipsN64,
114122
.powerpc, .powerpcle => syscalls.PowerPC,
115123
.powerpc64, .powerpc64le => syscalls.PowerPC64,
124+
.s390x => syscalls.S390x,
125+
.xtensa => syscalls.Xtensa,
116126
else => @compileError("The Zig Standard Library is missing syscall definitions for the target CPU architecture"),
117127
};
118128

0 commit comments

Comments
 (0)