Initial support for x86 32-bit

This commit is contained in:
Jeremy Soller
2022-07-22 16:24:45 -06:00
parent 7f3f2fa105
commit 559387cc64
11 changed files with 314 additions and 14 deletions
+1
View File
@@ -53,6 +53,7 @@ extern "C" {
pub fn pte_clone_inner(stack: usize) -> usize;
}
#[cfg(target_arch = "x86_64")]
global_asm!("
.globl pte_clone_inner
.type pte_clone_inner, @function
+6
View File
@@ -850,6 +850,12 @@ impl Pal for Sys {
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(syscall::Error::demux(extra::pte_clone_inner(stack as usize))) as pid_t
+11
View File
@@ -110,6 +110,17 @@ fn inner_ptrace(
unimplemented!("inner_ptrace not implemented on aarch64");
}
#[cfg(target_arch = "x86")]
fn inner_ptrace(
request: c_int,
pid: pid_t,
addr: *mut c_void,
data: *mut c_void,
) -> io::Result<c_int> {
//TODO: x86
unimplemented!("inner_ptrace not implemented on x86");
}
#[cfg(target_arch = "x86_64")]
fn inner_ptrace(
request: c_int,