mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
Linux/SPARCv9: use C calling convention for restore_rt
This is needed to prevent infinite loop when calling rt_sigreturn.
This commit is contained in:
parent
e3840817d7
commit
dd75302563
@ -169,7 +169,9 @@ pub extern fn clone(func: fn (arg: usize) callconv(.C) u8, stack: usize, flags:
|
|||||||
|
|
||||||
pub const restore = restore_rt;
|
pub const restore = restore_rt;
|
||||||
|
|
||||||
pub fn restore_rt() callconv(.Naked) void {
|
// Need to use C ABI here instead of naked
|
||||||
|
// to prevent an infinite loop when calling rt_sigreturn.
|
||||||
|
pub fn restore_rt() callconv(.C) void {
|
||||||
return asm volatile ("t 0x6d"
|
return asm volatile ("t 0x6d"
|
||||||
:
|
:
|
||||||
: [number] "{g1}" (@enumToInt(SYS.rt_sigreturn))
|
: [number] "{g1}" (@enumToInt(SYS.rt_sigreturn))
|
||||||
|
Loading…
Reference in New Issue
Block a user