Skip to content
Snippets Groups Projects
Verified Commit 1a8af993 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix invalid inline ASM

parent 34edeaf0
No related branches found
No related tags found
No related merge requests found
// Needs to be defined in assembly because it can't have a function prologue
// rax is register, 15 is RT_SIGRETURN
#[cfg(target_arch = "x86_64")]
global_asm!(
"
.global __restore_rt
__restore_rt:
mov $15, %rax # <- rax is register, 15 is RT_SIGRETURN
mov $15, %rax
syscall
"
);
// x8 is register, 139 is RT_SIGRETURN
#[cfg(target_arch = "aarch64")]
global_asm!(
"
.global __restore_rt
__restore_rt:
mov x8, #139 # <- x8 is register, 139 is RT_SIGRETURN
mov x8, #139
svc 0
"
);
......
// Needs to be defined in assembly because it can't have a function prologue
// rax is register, 119 is SIGRETURN
#[cfg(target_arch = "x86_64")]
global_asm!(
"
.global __restore_rt
__restore_rt:
mov $119, %rax # <- rax is register, 119 is SIGRETURN
mov $119, %rax
int $0x80
"
);
// x8 is register, 119 is SIGRETURN
#[cfg(target_arch = "aarch64")]
global_asm!(
"
.global __restore_rt
__restore_rt:
mov x8, #119 # <- x8 is register, 119 is SIGRETURN
mov x8, #119
svc 0
"
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment