| ... | @@ -125,36 +125,44 @@ pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: * | ... | @@ -125,36 +125,44 @@ pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: * |
| 125 | | 125 | |
| 126 | pub fn restore() callconv(.Naked) void { | 126 | pub fn restore() callconv(.Naked) void { |
| 127 | switch (@import("builtin").zig_backend) { | 127 | switch (@import("builtin").zig_backend) { |
| 128 | .stage2_c => return asm volatile ( | 128 | .stage2_c => asm volatile ( |
| 129 | \\ movl %[number], %%eax | 129 | \\ movl %[number], %%eax |
| 130 | \\ int $0x80 | 130 | \\ int $0x80 |
| | 131 | \\ ret |
| 131 | : | 132 | : |
| 132 | : [number] "i" (@enumToInt(SYS.sigreturn)), | 133 | : [number] "i" (@enumToInt(SYS.sigreturn)), |
| 133 | : "memory" | 134 | : "memory" |
| 134 | ), | 135 | ), |
| 135 | else => return asm volatile ("int $0x80" | 136 | else => asm volatile ( |
| | 137 | \\ int $0x80 |
| | 138 | \\ ret |
| 136 | : | 139 | : |
| 137 | : [number] "{eax}" (@enumToInt(SYS.sigreturn)), | 140 | : [number] "{eax}" (@enumToInt(SYS.sigreturn)), |
| 138 | : "memory" | 141 | : "memory" |
| 139 | ), | 142 | ), |
| 140 | } | 143 | } |
| | 144 | unreachable; |
| 141 | } | 145 | } |
| 142 | | 146 | |
| 143 | pub fn restore_rt() callconv(.Naked) void { | 147 | pub fn restore_rt() callconv(.Naked) void { |
| 144 | switch (@import("builtin").zig_backend) { | 148 | switch (@import("builtin").zig_backend) { |
| 145 | .stage2_c => return asm volatile ( | 149 | .stage2_c => asm volatile ( |
| 146 | \\ movl %[number], %%eax | 150 | \\ movl %[number], %%eax |
| 147 | \\ int $0x80 | 151 | \\ int $0x80 |
| | 152 | \\ ret |
| 148 | : | 153 | : |
| 149 | : [number] "i" (@enumToInt(SYS.rt_sigreturn)), | 154 | : [number] "i" (@enumToInt(SYS.rt_sigreturn)), |
| 150 | : "memory" | 155 | : "memory" |
| 151 | ), | 156 | ), |
| 152 | else => return asm volatile ("int $0x80" | 157 | else => asm volatile ( |
| | 158 | \\ int $0x80 |
| | 159 | \\ ret |
| 153 | : | 160 | : |
| 154 | : [number] "{eax}" (@enumToInt(SYS.rt_sigreturn)), | 161 | : [number] "{eax}" (@enumToInt(SYS.rt_sigreturn)), |
| 155 | : "memory" | 162 | : "memory" |
| 156 | ), | 163 | ), |
| 157 | } | 164 | } |
| | 165 | unreachable; |
| 158 | } | 166 | } |
| 159 | | 167 | |
| 160 | pub const O = struct { | 168 | pub const O = struct { |