diff --git a/openhcl/minimal_rt/src/arch/aarch64/intrinsics.rs b/openhcl/minimal_rt/src/arch/aarch64/intrinsics.rs index 9bd41b1038..1b89bd1619 100644 --- a/openhcl/minimal_rt/src/arch/aarch64/intrinsics.rs +++ b/openhcl/minimal_rt/src/arch/aarch64/intrinsics.rs @@ -10,7 +10,7 @@ // SAFETY: The minimal_rt_build crate ensures that when this code is compiled // there is no libc for this to conflict with. #[unsafe(no_mangle)] -unsafe extern "C" fn memcpy(mut dest: *mut u8, src: *const u8, len: usize) -> *mut u8 { +unsafe extern "C" fn memcpy(dest: *mut u8, src: *const u8, len: usize) -> *mut u8 { // SAFETY: the caller guarantees the pointers and length are correct. unsafe { core::arch::asm!(r#" @@ -25,7 +25,7 @@ unsafe extern "C" fn memcpy(mut dest: *mut u8, src: *const u8, len: usize) -> *m 2: add x0, x0, x2 "#, - inout("x0") dest, + inout("x0") dest => _, in("x1") src, in("x2") len, ); @@ -38,7 +38,7 @@ unsafe extern "C" fn memcpy(mut dest: *mut u8, src: *const u8, len: usize) -> *m // SAFETY: The minimal_rt_build crate ensures that when this code is compiled // there is no libc for this to conflict with. #[unsafe(no_mangle)] -unsafe extern "C" fn memset(mut ptr: *mut u8, val: i32, len: usize) -> *mut u8 { +unsafe extern "C" fn memset(ptr: *mut u8, val: i32, len: usize) -> *mut u8 { // SAFETY: the caller guarantees the pointer and length are correct. unsafe { core::arch::asm!(r#" @@ -52,7 +52,7 @@ unsafe extern "C" fn memset(mut ptr: *mut u8, val: i32, len: usize) -> *mut u8 { add x0, x0, x2 2: "#, - inout("x0") ptr, + inout("x0") ptr => _, in("x1") val, in("x2") len); } diff --git a/openhcl/minimal_rt/src/arch/x86_64/intrinsics.rs b/openhcl/minimal_rt/src/arch/x86_64/intrinsics.rs index 4e5ab1cfbf..298232ad54 100644 --- a/openhcl/minimal_rt/src/arch/x86_64/intrinsics.rs +++ b/openhcl/minimal_rt/src/arch/x86_64/intrinsics.rs @@ -10,7 +10,7 @@ // SAFETY: The minimal_rt_build crate ensures that when this code is compiled // there is no libc for this to conflict with. #[unsafe(no_mangle)] -unsafe extern "C" fn memset(mut ptr: *mut u8, val: i32, len: usize) -> *mut u8 { +unsafe extern "C" fn memset(ptr: *mut u8, val: i32, len: usize) -> *mut u8 { // SAFETY: The caller guarantees that the pointer and length are correct. unsafe { core::arch::asm!(r#" @@ -19,7 +19,7 @@ unsafe extern "C" fn memset(mut ptr: *mut u8, val: i32, len: usize) -> *mut u8 { "#, in("rax") val, in("rcx") len, - inout("rdi") ptr); + inout("rdi") ptr => _); } ptr } @@ -29,7 +29,7 @@ unsafe extern "C" fn memset(mut ptr: *mut u8, val: i32, len: usize) -> *mut u8 { // SAFETY: The minimal_rt_build crate ensures that when this code is compiled // there is no libc for this to conflict with. #[unsafe(no_mangle)] -unsafe extern "C" fn memcpy(mut dest: *mut u8, src: *const u8, len: usize) -> *mut u8 { +unsafe extern "C" fn memcpy(dest: *mut u8, src: *const u8, len: usize) -> *mut u8 { // SAFETY: The caller guarantees that the pointers and length are correct. unsafe { core::arch::asm!(r#" @@ -38,7 +38,7 @@ unsafe extern "C" fn memcpy(mut dest: *mut u8, src: *const u8, len: usize) -> *m "#, in("rsi") src, in("rcx") len, - inout("rdi") dest); + inout("rdi") dest => _); } dest }