summaryrefslogtreecommitdiff
path: root/swtch.S
diff options
context:
space:
mode:
Diffstat (limited to 'swtch.S')
-rw-r--r--swtch.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/swtch.S b/swtch.S
index 8751317..49efdf9 100644
--- a/swtch.S
+++ b/swtch.S
@@ -26,3 +26,11 @@ swtch:
popl %ebx
popl %ebp
ret
+
+# Jump on a new stack, fake C calling conventions
+.globl jstack
+jstack:
+ movl 4(%esp), %esp
+ subl $16, %esp # space for arguments
+ movl $0, %ebp # terminate functions that follow ebp's
+ call mainc # continue at mainc