diff --git a/src/context/arch/aarch64.rs b/src/context/arch/aarch64.rs index 882c40e..29a230f 100644 --- a/src/context/arch/aarch64.rs +++ b/src/context/arch/aarch64.rs @@ -304,7 +304,8 @@ pub unsafe fn switch_to(prev: &mut super::Context, next: &mut super::Context) { switch_to_inner(&mut prev.arch, &mut next.arch); } -unsafe fn switch_to_inner(prev: &mut Context, next: &mut Context) { +#[inline(never)] +unsafe extern "C" fn switch_to_inner(prev: &mut Context, next: &mut Context) { //TODO: use one asm block like x86 asm!("mov {0}, x8", out(reg) prev.x8); asm!("mov x8, {0}", in(reg) next.x8);