| 1 |
.text |
| 2 |
.globl setjmp |
| 3 |
|
| 4 |
#ifndef __APPLE__ |
| 5 |
# ifndef __MINGW32__ |
| 6 |
.type setjmp, @function |
| 7 |
# else |
| 8 |
.def setjmp; .scl 2; .type 32; .endef |
| 9 |
# endif |
| 10 |
#endif |
| 11 |
|
| 12 |
setjmp: |
| 13 |
pop %rsi |
| 14 |
movq %rbx,0x00(%rdi) |
| 15 |
movq %rsp,0x08(%rdi) |
| 16 |
push %rsi |
| 17 |
movq %rbp,0x10(%rdi) |
| 18 |
movq %r12,0x18(%rdi) |
| 19 |
movq %r13,0x20(%rdi) |
| 20 |
movq %r14,0x28(%rdi) |
| 21 |
movq %r15,0x30(%rdi) |
| 22 |
movq %rsi,0x38(%rdi) |
| 23 |
xor %rax,%rax |
| 24 |
ret |
| 25 |
|
| 26 |
.globl longjmp |
| 27 |
#ifndef __APPLE__ |
| 28 |
# ifndef __MINGW32__ |
| 29 |
.type longjmp, @function |
| 30 |
# else |
| 31 |
.def longjmp; .scl 2; .type 32; .endef |
| 32 |
# endif |
| 33 |
#endif |
| 34 |
|
| 35 |
longjmp: |
| 36 |
movl %esi, %eax |
| 37 |
movq 0x00(%rdi), %rbx |
| 38 |
movq 0x08(%rdi), %rsp |
| 39 |
movq 0x10(%rdi), %rbp |
| 40 |
movq 0x18(%rdi), %r12 |
| 41 |
movq 0x20(%rdi), %r13 |
| 42 |
movq 0x28(%rdi), %r14 |
| 43 |
movq 0x30(%rdi), %r15 |
| 44 |
xor %rdx,%rdx |
| 45 |
mov $1,%rcx |
| 46 |
cmp %rax,%rdx |
| 47 |
cmove %rcx,%rax |
| 48 |
jmp *0x38(%rdi) |
| 49 |
.section .note.GNU-stack,"a" |