clarify the purpose of this project
[nyanglibc.git] / nptl / unwind.s
blob9c71fa8f339cfc11f1c98c91076f7caab30d418d
1 .text
2 .p2align 4,,15
3 .type unwind_stop, @function
4 unwind_stop:
5 pushq %r15
6 pushq %r14
7 movq %r9, %r14
8 pushq %r13
9 pushq %r12
10 pushq %rbp
11 pushq %rbx
12 subq $24, %rsp
13 movq %fs:16, %rax
14 #APP
15 # 47 "unwind.c" 1
16 movq %fs:760,%r13
17 # 0 "" 2
18 #NO_APP
19 movl %esi, %ebx
20 movq 1688(%rax), %rbp
21 addq 1680(%rax), %rbp
22 andl $16, %ebx
23 movq %r13, %r12
24 je .L19
25 .L2:
26 testq %r13, %r13
27 je .L11
28 movq 80(%r14), %r15
29 movq %r8, %rdi
30 movl $1, %ebx
31 call _Unwind_GetCFA@PLT
32 cmpq %r15, %r13
33 je .L11
34 .L6:
35 subq %rbp, %rax
36 movq %rax, 8(%rsp)
37 jmp .L7
38 .p2align 4,,10
39 .p2align 3
40 .L8:
41 testl %ebx, %ebx
42 jne .L10
43 movq %r13, %rcx
44 movq %r13, %rdx
45 subq %rbp, %rcx
46 cmpq %rcx, 8(%rsp)
47 jb .L9
48 .L10:
49 movq %r13, %r12
50 .L7:
51 movq 24(%r12), %r13
52 movq 8(%r12), %rdi
53 call *(%r12)
54 cmpq %r13, %r15
55 jne .L8
56 movq %r15, %rdx
57 .L9:
58 #APP
59 # 90 "unwind.c" 1
60 movq %rdx,%fs:760
61 # 0 "" 2
62 #NO_APP
63 testl %ebx, %ebx
64 je .L16
65 .p2align 4,,10
66 .p2align 3
67 .L11:
68 movl $1, %esi
69 movq %r14, %rdi
70 call __libc_longjmp@PLT
71 .p2align 4,,10
72 .p2align 3
73 .L19:
74 movq %r8, %rdi
75 movq %r8, 8(%rsp)
76 call _Unwind_GetCFA@PLT
77 movq 48(%r14), %rdx
78 subq %rbp, %rax
79 movq 8(%rsp), %r8
80 #APP
81 # 40 "../sysdeps/x86_64/jmpbuf-unwind.h" 1
82 ror $2*8+1, %rdx
83 xor %fs:48, %rdx
84 # 0 "" 2
85 #NO_APP
86 subq %rbp, %rdx
87 cmpq %rdx, %rax
88 jnb .L2
89 testq %r13, %r13
90 jne .L13
91 .L16:
92 addq $24, %rsp
93 xorl %eax, %eax
94 popq %rbx
95 popq %rbp
96 popq %r12
97 popq %r13
98 popq %r14
99 popq %r15
101 .L13:
102 movq 80(%r14), %r15
103 movq %r8, %rdi
104 call _Unwind_GetCFA@PLT
105 cmpq %r15, %r12
106 je .L16
107 movq %rax, %rcx
108 movq %r12, %rdx
109 subq %rbp, %rcx
110 subq %rbp, %rdx
111 cmpq %rdx, %rcx
112 jnb .L6
113 jmp .L16
114 .size unwind_stop, .-unwind_stop
115 .section .rodata.str1.8,"aMS",@progbits,1
116 .align 8
117 .LC0:
118 .string "FATAL: exception not rethrown\n"
119 .text
120 .p2align 4,,15
121 .type unwind_cleanup, @function
122 unwind_cleanup:
123 leaq .LC0(%rip), %rdi
124 subq $8, %rsp
125 call __libc_fatal@PLT
126 .size unwind_cleanup, .-unwind_cleanup
127 .p2align 4,,15
128 .globl __pthread_unwind
129 .type __pthread_unwind, @function
130 __pthread_unwind:
131 subq $8, %rsp
132 movq %rdi, %rdx
133 #APP
134 # 128 "unwind.c" 1
135 movq $0,%fs:1648
136 # 0 "" 2
137 #NO_APP
138 leaq unwind_cleanup(%rip), %rax
139 #APP
140 # 129 "unwind.c" 1
141 movq %rax,%fs:1656
142 # 0 "" 2
143 #NO_APP
144 movq %fs:16, %rax
145 leaq unwind_stop(%rip), %rsi
146 leaq 1648(%rax), %rdi
147 call _Unwind_ForcedUnwind@PLT
148 call abort@PLT
149 .size __pthread_unwind, .-__pthread_unwind
150 .p2align 4,,15
151 .weak __pthread_unwind_next
152 .type __pthread_unwind_next, @function
153 __pthread_unwind_next:
154 subq $8, %rsp
155 movq 72(%rdi), %rdi
156 call __pthread_unwind
157 .size __pthread_unwind_next, .-__pthread_unwind_next