summaryrefslogtreecommitdiff
path: root/src/user/lib/intr.s
diff options
context:
space:
mode:
authordzwdz2023-01-19 23:36:11 +0100
committerdzwdz2023-01-19 23:36:11 +0100
commita2f9ae9d4ab678fa66a2ec5d1072ea22a36a18a1 (patch)
treec048e9165b27d27075d2c17ab943ac52b46a6a40 /src/user/lib/intr.s
parentda546a0822b1995efe1832c9cc57aab62ccdcf65 (diff)
kernel: user interrupts
Diffstat (limited to 'src/user/lib/intr.s')
-rw-r--r--src/user/lib/intr.s20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/user/lib/intr.s b/src/user/lib/intr.s
new file mode 100644
index 0000000..008387d
--- /dev/null
+++ b/src/user/lib/intr.s
@@ -0,0 +1,20 @@
+.section .text
+.global intr_trampoline
+.type intr_trampoline, @function
+intr_trampoline:
+ push %rax
+ push %rdx
+ call *_intr(%rip)
+ pop %rdx
+ pop %rax
+ pop tmprip(%rip)
+ pop %rsp
+ jmp *tmprip(%rip)
+
+.section .bss
+tmprip:
+ .skip 8
+
+.global _intr
+_intr:
+ .skip 8