Kernel: Don't read CR registers on every exception

This commit is contained in:
2026-06-26 01:39:57 +03:00
parent 59ec05c898
commit 2bb9b9b4b3
8 changed files with 94 additions and 33 deletions

View File

@@ -44,17 +44,12 @@
isr_stub:
intr_header 24
movq %cr0, %rax; pushq %rax
movq %cr2, %rax; pushq %rax
movq %cr3, %rax; pushq %rax
movq %cr4, %rax; pushq %rax
movq 152(%rsp), %rdi // isr number
movq 160(%rsp), %rsi // error code
leaq 168(%rsp), %rdx // interrupt stack ptr
movq %rsp, %rcx // register ptr
movq 120(%rsp), %rdi // isr number
movq 128(%rsp), %rsi // error code
leaq 136(%rsp), %rdx // interrupt stack ptr
movq %rsp, %rcx // register ptr
call cpp_isr_handler
addq $32, %rsp
intr_footer 24
addq $16, %rsp