mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.os.linux.x86: fix signal restore function
After handling any signal on x86, it would previously segfault.
This commit is contained in:
parent
030b630829
commit
1553c8eae7
1 changed files with 2 additions and 0 deletions
|
|
@ -159,12 +159,14 @@ pub fn clone() callconv(.naked) u32 {
|
|||
pub fn restore() callconv(.naked) noreturn {
|
||||
switch (builtin.zig_backend) {
|
||||
.stage2_c => asm volatile (
|
||||
\\ addl $4, %%esp
|
||||
\\ movl %[number], %%eax
|
||||
\\ int $0x80
|
||||
:
|
||||
: [number] "i" (@intFromEnum(SYS.sigreturn)),
|
||||
),
|
||||
else => asm volatile (
|
||||
\\ addl $4, %%esp
|
||||
\\ int $0x80
|
||||
:
|
||||
: [number] "{eax}" (@intFromEnum(SYS.sigreturn)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue