Fix aarch64 switch_to_inner functino definition

This commit is contained in:
Jeremy Soller
2022-08-20 09:15:26 -06:00
parent 157dbc7b4d
commit c7e5466bd7

View File

@@ -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);