summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-07 18:00:47 -0400
committerIan Moffett <ian@osmora.org>2025-06-07 18:00:47 -0400
commit3ba69c887bdde4795e52a88ff37964e55766d09c (patch)
treeaa6253b2f8f8267566aee8970162ef1052b59b9c
parentf71d200e8857e3a9d44df9d752b8c6e7f281de84 (diff)
kernel/amd64: Save %RCX before calling handler
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/arch/amd64/amd64/vector.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arch/amd64/amd64/vector.S b/sys/arch/amd64/amd64/vector.S
index d2a3d89..e348ff4 100644
--- a/sys/arch/amd64/amd64/vector.S
+++ b/sys/arch/amd64/amd64/vector.S
@@ -52,7 +52,9 @@ ioapic_common_func:
mov (%rdx), %rbx // intr_hand.func
xor %rdi, %rdi // No data
+ push %rcx // Save our counter
call *%rbx // Call the handler
+ pop %rcx // Restore our counter
or %rax, %rax // Was it theirs? (RET >= 1)
jnz done // Yes, we are done.
1: inc %rcx // Next