diff --git a/src/arch/or1k.rs b/src/arch/or1k.rs index c5af1c0..b706762 100644 --- a/src/arch/or1k.rs +++ b/src/arch/or1k.rs @@ -107,7 +107,7 @@ pub unsafe fn init(stack: &Stack, f: unsafe extern "C" fn(usize) -> !) -> StackP } #[inline(always)] -pub unsafe fn swap(arg: usize, old_sp: &mut StackPointer, new_sp: &StackPointer, +pub unsafe fn swap(arg: usize, old_sp: *mut StackPointer, new_sp: *const StackPointer, new_stack: &Stack) -> usize { // Address of the topmost CFA stack slot. let new_cfa = (new_stack.base() as *mut usize).offset(-1); diff --git a/src/arch/x86.rs b/src/arch/x86.rs index 69e86bf..22b03a5 100644 --- a/src/arch/x86.rs +++ b/src/arch/x86.rs @@ -106,7 +106,7 @@ pub unsafe fn init(stack: &Stack, f: unsafe extern "C" fn(usize) -> !) -> StackP } #[inline(always)] -pub unsafe fn swap(arg: usize, old_sp: &mut StackPointer, new_sp: &StackPointer, +pub unsafe fn swap(arg: usize, old_sp: *mut StackPointer, new_sp: *const StackPointer, new_stack: &Stack) -> usize { // Address of the topmost CFA stack slot. let new_cfa = (new_stack.base() as *mut usize).offset(-1); diff --git a/src/arch/x86_64.rs b/src/arch/x86_64.rs index efa057b..d6b46af 100644 --- a/src/arch/x86_64.rs +++ b/src/arch/x86_64.rs @@ -133,7 +133,7 @@ pub unsafe fn init(stack: &Stack, f: unsafe extern "C" fn(usize) -> !) -> StackP } #[inline(always)] -pub unsafe fn swap(arg: usize, old_sp: &mut StackPointer, new_sp: &StackPointer, +pub unsafe fn swap(arg: usize, old_sp: *mut StackPointer, new_sp: *const StackPointer, new_stack: &Stack) -> usize { // Address of the topmost CFA stack slot. let new_cfa = (new_stack.base() as *mut usize).offset(-1);