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

Add i386 __restore_rt

parent ece0bd09
No related branches found
No related tags found
No related merge requests found
use core::arch::global_asm; use core::arch::global_asm;
// x8 is register, 119 is SIGRETURN
#[cfg(target_arch = "aarch64")]
global_asm!(
"
.global __restore_rt
__restore_rt:
mov x8, #119
svc 0
"
);
// Needs to be defined in assembly because it can't have a function prologue // Needs to be defined in assembly because it can't have a function prologue
// rax is register, 119 is SIGRETURN // eax is register, 119 is SIGRETURN
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86")]
global_asm!( global_asm!(
" "
.global __restore_rt .global __restore_rt
__restore_rt: __restore_rt:
mov rax, 119 mov eax, 119
syscall int 0x80
" "
); );
// x8 is register, 119 is SIGRETURN // Needs to be defined in assembly because it can't have a function prologue
#[cfg(target_arch = "aarch64")] // rax is register, 119 is SIGRETURN
#[cfg(target_arch = "x86_64")]
global_asm!( global_asm!(
" "
.global __restore_rt .global __restore_rt
__restore_rt: __restore_rt:
mov x8, #119 mov rax, 119
svc 0 syscall
" "
); );
......
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