Implement pte_clone_ret for x86
This commit is contained in:
@@ -91,8 +91,22 @@ core::arch::global_asm!("
|
||||
.type __relibc_internal_pte_clone_ret, @function
|
||||
.p2align 6
|
||||
__relibc_internal_pte_clone_ret:
|
||||
ud2
|
||||
# Load registers
|
||||
pop eax
|
||||
|
||||
sub esp, 8
|
||||
|
||||
mov DWORD PTR [esp], 0x00001F80
|
||||
# TODO: ldmxcsr [esp]
|
||||
mov WORD PTR [esp], 0x031F
|
||||
fldcw [esp]
|
||||
|
||||
add esp, 8
|
||||
|
||||
# Call entry point
|
||||
call eax
|
||||
|
||||
ret
|
||||
.size __relibc_internal_pte_clone_ret, . - __relibc_internal_pte_clone_ret
|
||||
");
|
||||
|
||||
|
||||
@@ -728,19 +728,6 @@ impl Pal for Sys {
|
||||
res as c_int
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
unsafe fn pte_clone(stack: *mut usize) -> pid_t {
|
||||
//TODO: aarch64
|
||||
unimplemented!("pte_clone not implemented on aarch64");
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
unsafe fn pte_clone(stack: *mut usize) -> pid_t {
|
||||
//TODO: x86
|
||||
unimplemented!("pte_clone not implemented on x86");
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
unsafe fn pte_clone(stack: *mut usize) -> pid_t {
|
||||
e(clone::pte_clone_impl(stack)) as pid_t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user