summaryrefslogtreecommitdiff
path: root/src/setjmp/__longjmp.x86-64.s
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-11 20:54:30 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-11 20:54:30 -0400
commit4f50d3e580761fd3c44fe8ed0db57858c5295f25 (patch)
treeef8934a96d428ccd899de156108adc6c56d3d6c9 /src/setjmp/__longjmp.x86-64.s
parentffe55c6c457e3ea5f0559c3a92cedecc2c44a776 (diff)
split __setjmp and __longjmp into separate assembly files under src/setjmp
Diffstat (limited to 'src/setjmp/__longjmp.x86-64.s')
-rw-r--r--src/setjmp/__longjmp.x86-64.s26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/setjmp/__longjmp.x86-64.s b/src/setjmp/__longjmp.x86-64.s
new file mode 100644
index 00000000..de666dce
--- /dev/null
+++ b/src/setjmp/__longjmp.x86-64.s
@@ -0,0 +1,26 @@
+.global __longjmp
+__longjmp:
+ mov %rdi, %rax
+ mov 0x08(%rax), %rbx
+ mov 0x18(%rax), %rdx
+ mov 0x20(%rax), %rsp
+ mov 0x28(%rax), %rbp
+ mov 0x30(%rax), %rsi
+ mov 0x38(%rax), %rdi
+ mov 0x40(%rax), %r8
+ mov 0x48(%rax), %r9
+ mov 0x50(%rax), %r10
+ mov 0x58(%rax), %r11
+ mov 0x60(%rax), %r12
+ mov 0x68(%rax), %r13
+ mov 0x70(%rax), %r14
+ mov 0x78(%rax), %r15
+ mov 0x80(%rax), %rcx
+ mov %rcx, 0x00(%rbp)
+ mov 0x88(%rax), %rcx
+ mov %rcx, 0x08(%rbp)
+ mov 0x90(%rax), %rcx
+ mov %rcx, 0x00(%rsp)
+ mov 0x10(%rax), %rcx
+ mov 0x00(%rax), %rax
+ ret