diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-04-02 22:25:53 -0400 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2023-04-03 17:45:16 +0200 |
| commit | fde1ec5d0e57471b43bab226a78da2eb61e6bb66 (patch) | |
| tree | 463c6eff0089a919c6c004a9a83b2bac8b0c3770 /lib/std/os/linux/x86_64.zig | |
| parent | 1980f5479b2139112ff67de5d5f2e6af09fb215e (diff) | |
| download | zig-fde1ec5d0e57471b43bab226a78da2eb61e6bb66.tar.gz zig-fde1ec5d0e57471b43bab226a78da2eb61e6bb66.zip | |
x86_64: remove returns from naked functions
Diffstat (limited to 'lib/std/os/linux/x86_64.zig')
| -rw-r--r-- | lib/std/os/linux/x86_64.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/std/os/linux/x86_64.zig b/lib/std/os/linux/x86_64.zig index bc1bccf53f..09047bda83 100644 --- a/lib/std/os/linux/x86_64.zig +++ b/lib/std/os/linux/x86_64.zig @@ -109,7 +109,7 @@ pub const restore = restore_rt; pub fn restore_rt() callconv(.Naked) void { switch (@import("builtin").zig_backend) { - .stage2_c => return asm volatile ( + .stage2_c => asm volatile ( \\ movl %[number], %%eax \\ syscall \\ retq @@ -117,12 +117,15 @@ pub fn restore_rt() callconv(.Naked) void { : [number] "i" (@enumToInt(SYS.rt_sigreturn)), : "rcx", "r11", "memory" ), - else => return asm volatile ("syscall" + else => asm volatile ( + \\ syscall + \\ retq : : [number] "{rax}" (@enumToInt(SYS.rt_sigreturn)), : "rcx", "r11", "memory" ), } + unreachable; } pub const mode_t = usize; |
