diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-07-31 15:34:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-31 15:34:32 -0700 |
| commit | e84cda0ebf8886346d42db78e8f3eb8d0bf515bd (patch) | |
| tree | 9e0ed316fd374bcc3f7a4f26ff70291a9d1ca9fb /lib/std/os/linux/mips.zig | |
| parent | 8f5c333ebe6631629be3b88d797a03b1d677d439 (diff) | |
| parent | 228c956377e4f33e45fad7e0ba5d9eb5073803a5 (diff) | |
| download | zig-e84cda0ebf8886346d42db78e8f3eb8d0bf515bd.tar.gz zig-e84cda0ebf8886346d42db78e8f3eb8d0bf515bd.zip | |
Merge pull request #16622 from jacobly0/cbe-asm-compat
CBE: fix regressions and get new targets passing behavior tests
Diffstat (limited to 'lib/std/os/linux/mips.zig')
| -rw-r--r-- | lib/std/os/linux/mips.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/std/os/linux/mips.zig b/lib/std/os/linux/mips.zig index 781003bedc..cfb2d73bfd 100644 --- a/lib/std/os/linux/mips.zig +++ b/lib/std/os/linux/mips.zig @@ -195,16 +195,18 @@ const CloneFn = *const fn (arg: usize) callconv(.C) u8; /// This matches the libc clone function. pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; -pub fn restore() callconv(.Naked) void { - return asm volatile ("syscall" +pub fn restore() callconv(.Naked) noreturn { + asm volatile ( + \\ syscall : : [number] "{$2}" (@intFromEnum(SYS.sigreturn)), : "$1", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25", "hi", "lo", "memory" ); } -pub fn restore_rt() callconv(.Naked) void { - return asm volatile ("syscall" +pub fn restore_rt() callconv(.Naked) noreturn { + asm volatile ( + \\ syscall : : [number] "{$2}" (@intFromEnum(SYS.rt_sigreturn)), : "$1", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25", "hi", "lo", "memory" |
