diff --git a/kernel/src/arch/x86_64/CPU.asm b/kernel/src/arch/x86_64/CPU.asm index 2ecc7f73..59f4d68a 100644 --- a/kernel/src/arch/x86_64/CPU.asm +++ b/kernel/src/arch/x86_64/CPU.asm @@ -69,21 +69,16 @@ kernel_yield: push rax ; CS push rdi ; RIP - ; ISR and error code - push 0 - push 0 + sub rsp, 24 - push 0 ; RAX push rbx ; Preserve RBX - push 0 ; RCX - push 0 ; RDX - push 0 ; RSI - push 0 ; RDI + + sub rsp, 32 + push rbp ; Preserve RBP - push 0 ; R8 - push 0 ; R9 - push 0 ; R10 - push 0 ; R11 + + sub rsp, 32 + push r12 ; Preserve R12 push r13 ; Preserve R13 push r14 ; Preserve R14