summaryrefslogtreecommitdiff
path: root/kernel/include
diff options
context:
space:
mode:
authorAleksa Vuckovic <aleksa@vuckovic.cc>2023-02-26 06:54:25 +0100
committerAleksa Vuckovic <aleksa@vuckovic.cc>2023-02-26 06:54:25 +0100
commit40eecaecc552945f72a2b90f4122bf929960671c (patch)
treef8b500c024eda02672bb66ccde7a6124a2abfa40 /kernel/include
parentb2f41efabf95f85dd6d24e460cf15f8c9ac17978 (diff)
using one isr_stub for everything
Diffstat (limited to 'kernel/include')
-rw-r--r--kernel/include/x86_64_regs.S19
1 files changed, 13 insertions, 6 deletions
diff --git a/kernel/include/x86_64_regs.S b/kernel/include/x86_64_regs.S
index 7b72d76..4b20539 100644
--- a/kernel/include/x86_64_regs.S
+++ b/kernel/include/x86_64_regs.S
@@ -8,6 +8,13 @@
* else use push/pop_callee_saved with push/pop_caller_saved
*/
+.set ERROR_OFF, 0x80
+.set RIP_OFF, 0x88
+.set CS_OFF, 0x90
+.set RFLAGS_OFF, 0x98
+.set RSP_OFF, 0x100
+.set SS_OFF, 0x108
+
/* push 0x30 bytes to stack */
.macro push_callee_saved
push %rbx
@@ -20,12 +27,12 @@
/* pop 0x30 bytes from stack */
.macro pop_callee_saved
- push %rbx
- push %rbp
- push %r12
- push %r13
- push %r14
- push %r15
+ pop %r15
+ pop %r14
+ pop %r13
+ pop %r12
+ pop %rbp
+ pop %rbx
.endm
/* push 0x50 bytes to stack */