clarify the purpose of this project
[nyanglibc.git] / setjmp / longjmp.s
blob714940a20ce65af114c87d7f8b92d89127854e1d
1 .text
2 .p2align 4,,15
3 .globl __libc_siglongjmp
4 .type __libc_siglongjmp, @function
5 __libc_siglongjmp:
6 pushq %rbp
7 pushq %rbx
8 movq %rdi, %rbp
9 movl %esi, %ebx
10 subq $8, %rsp
11 call _longjmp_unwind@PLT
12 movl 64(%rbp), %eax
13 testl %eax, %eax
14 jne .L6
15 .L2:
16 testl %ebx, %ebx
17 movl $1, %eax
18 movq %rbp, %rdi
19 cmove %eax, %ebx
20 movl %ebx, %esi
21 call __longjmp
22 .L6:
23 leaq 72(%rbp), %rsi
24 xorl %edx, %edx
25 movl $2, %edi
26 call __sigprocmask
27 jmp .L2
28 .size __libc_siglongjmp, .-__libc_siglongjmp
29 .weak siglongjmp
30 .set siglongjmp,__libc_siglongjmp
31 .weak longjmp
32 .set longjmp,__libc_siglongjmp
33 .weak _longjmp
34 .set _longjmp,__libc_siglongjmp
35 .p2align 4,,15
36 .globl __libc_longjmp
37 .type __libc_longjmp, @function
38 __libc_longjmp:
39 pushq %rbp
40 pushq %rbx
41 movq %rdi, %rbp
42 movl %esi, %ebx
43 subq $8, %rsp
44 call _longjmp_unwind@PLT
45 movl 64(%rbp), %eax
46 testl %eax, %eax
47 jne .L11
48 .L8:
49 testl %ebx, %ebx
50 movl $1, %eax
51 movq %rbp, %rdi
52 cmove %eax, %ebx
53 movl %ebx, %esi
54 call __longjmp_cancel
55 .L11:
56 leaq 72(%rbp), %rsi
57 xorl %edx, %edx
58 movl $2, %edi
59 call __sigprocmask
60 jmp .L8
61 .size __libc_longjmp, .-__libc_longjmp
62 .hidden __longjmp_cancel
63 .hidden __sigprocmask
64 .hidden __longjmp