diff options
| author | Jakob Kaivo <jkk@ung.org> | 2020-08-11 20:54:30 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2020-08-11 20:54:30 -0400 |
| commit | 4f50d3e580761fd3c44fe8ed0db57858c5295f25 (patch) | |
| tree | ef8934a96d428ccd899de156108adc6c56d3d6c9 /src/nonstd | |
| parent | ffe55c6c457e3ea5f0559c3a92cedecc2c44a776 (diff) | |
split __setjmp and __longjmp into separate assembly files under src/setjmp
Diffstat (limited to 'src/nonstd')
| -rw-r--r-- | src/nonstd/x86-64.s | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/nonstd/x86-64.s b/src/nonstd/x86-64.s index 5b13587c..87ff1637 100644 --- a/src/nonstd/x86-64.s +++ b/src/nonstd/x86-64.s @@ -10,60 +10,6 @@ __syscall: syscall ret -.global __setjmp -__setjmp: - /* setjmp() in C sets env[0] to 0 */ - mov %rbx, 0x08(%rdi) - mov %rcx, 0x10(%rdi) - mov %rdx, 0x18(%rdi) - mov %rsp, 0x20(%rdi) - mov %rbp, 0x28(%rdi) - mov %rsi, 0x30(%rdi) - mov %rdi, 0x38(%rdi) - mov %r8, 0x40(%rdi) - mov %r9, 0x48(%rdi) - mov %r10, 0x50(%rdi) - mov %r11, 0x58(%rdi) - mov %r12, 0x60(%rdi) - mov %r13, 0x68(%rdi) - mov %r14, 0x70(%rdi) - mov %r15, 0x78(%rdi) - mov 0x00(%rbp), %rax - mov %rax, 0x80(%rdi) - mov 0x08(%rbp), %rax - mov %rax, 0x88(%rdi) - mov 0x00(%rsp), %rax - mov %rax, 0x90(%rdi) - xor %rax, %rax - ret - -.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 - .global _start _start: popq %rdi |
