Correct more asm! usages

This commit is contained in:
Jeremy Soller
2020-08-02 13:38:29 -06:00
parent 12777ba774
commit 5d45042d5d
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -9,7 +9,7 @@
#[naked]
pub unsafe extern "C" fn _start() {
#[cfg(target_arch = "x86_64")]
asm!("mov rdi, rsp
llvm_asm!("mov rdi, rsp
and rsp, 0xFFFFFFFFFFFFFFF0
call relibc_start"
:
@@ -18,7 +18,7 @@ pub unsafe extern "C" fn _start() {
: "intel", "volatile"
);
#[cfg(target_arch = "aarch64")]
asm!("mov x0, sp
llvm_asm!("mov x0, sp
bl relibc_start"
:
:
+2 -2
View File
@@ -7,7 +7,7 @@
#[no_mangle]
pub unsafe extern "C" fn _start() {
#[cfg(target_arch = "x86_64")]
asm!("
llvm_asm!("
# rsi = _start + 5
call next
next: pop rsi
@@ -41,7 +41,7 @@ next: pop rsi
: "intel", "volatile"
);
#[cfg(target_arch = "aarch64")]
asm!("
llvm_asm!("
mov x0, sp
bl ld_so_start
TODO
+1 -1
View File
@@ -766,7 +766,7 @@ impl Pal for Sys {
| syscall::CLONE_SIGHAND
| syscall::CLONE_STACK;
let pid;
asm!("
llvm_asm!("
# Call clone syscall
syscall