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