From 1ed51d11cb22f6eb31163c4d34c335e99299b554 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 23 Nov 2022 19:37:25 +0100 Subject: [PATCH] Do not push unused values --- kernel/src/arch/x86_64/CPU.asm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) 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