summaryrefslogtreecommitdiff
path: root/trapasm.S
diff options
context:
space:
mode:
Diffstat (limited to 'trapasm.S')
-rw-r--r--trapasm.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/trapasm.S b/trapasm.S
new file mode 100644
index 0000000..69649ff
--- /dev/null
+++ b/trapasm.S
@@ -0,0 +1,12 @@
+ .text
+ .globl trapret
+ /*
+ * a forked process RETs here
+ * expects ESP to point to a Trapframe
+ */
+trapret:
+ popal
+ popl %es
+ popl %ds
+ addl $0x8, %esp /* trapno and errcode */
+ iret