Эх сурвалжийг харах

fix(context): new version rustc says we should use naked_asm

greatbridf 3 долоо хоног өмнө
parent
commit
b8a282ecb6

+ 3 - 3
arch/src/x86_64/context.rs

@@ -1,4 +1,4 @@
-use core::arch::asm;
+use core::arch::naked_asm;
 
 #[repr(C)]
 #[derive(Debug, Default)]
@@ -48,7 +48,7 @@ impl TaskContext {
 
 #[naked]
 unsafe extern "C" fn _switch_to(current_context_sp: &mut u64, next_context_sp: &mut u64) {
-    asm!(
+    naked_asm!(
         "pushf",
         "push %rbp",
         "push %rbx",
@@ -66,6 +66,6 @@ unsafe extern "C" fn _switch_to(current_context_sp: &mut u64, next_context_sp: &
         "pop %rbp",
         "popf",
         "ret",
-        options(att_syntax, noreturn),
+        options(att_syntax),
     );
 }