clarify the purpose of this project
[nyanglibc.git] / stdlib / makecontext.shared.s
blobf6f5708d287e8aaa39caf81c215393cdb1800464
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __makecontext
9 .type __makecontext, @function
10 __makecontext:
11 pushq %rbx
12 movq $-8, %rax
13 movq %rcx, -24(%rsp)
14 movq 32(%rdi), %rcx
15 addq 16(%rdi), %rcx
16 cmpl $6, %edx
17 movq %r8, -16(%rsp)
18 movq %r9, -8(%rsp)
19 jle .L2
20 leal -6(%rdx), %r8d
21 movslq %r8d, %r8
22 salq $3, %r8
23 subq %r8, %rax
24 .L2:
25 addq %rax, %rcx
26 movl $6, %eax
27 movq %rsi, 168(%rdi)
28 andq $-16, %rcx
29 cmpl $6, %edx
30 movq 8(%rdi), %rsi
31 cmovge %edx, %eax
32 leaq -8(%rcx), %r8
33 leaq __start_context(%rip), %rbx
34 subl $5, %eax
35 testl %edx, %edx
36 movl $24, -72(%rsp)
37 cltq
38 movq %r8, 160(%rdi)
39 leaq (%r8,%rax,8), %rax
40 movq %rax, 128(%rdi)
41 movq %rbx, -8(%rcx)
42 movq %rsi, (%rax)
43 leaq 16(%rsp), %rax
44 movq %rax, -64(%rsp)
45 leaq -48(%rsp), %rax
46 movq %rax, -56(%rsp)
47 jle .L1
48 leal -1(%rdx), %r8d
49 leaq 16(%rsp), %rbx
50 leaq .L6(%rip), %rsi
51 movq %rax, %r11
52 movl $24, %r9d
53 xorl %eax, %eax
54 addq $1, %r8
55 subq $48, %rcx
56 .p2align 4,,10
57 .p2align 3
58 .L27:
59 cmpl $5, %eax
60 ja .L4
61 movl %eax, %edx
62 movslq (%rsi,%rdx,4), %rdx
63 addq %rsi, %rdx
64 cmpl $47, %r9d
65 jmp *%rdx
66 .section .rodata
67 .align 4
68 .align 4
69 .L6:
70 .long .L5-.L6
71 .long .L7-.L6
72 .long .L8-.L6
73 .long .L9-.L6
74 .long .L10-.L6
75 .long .L11-.L6
76 .text
77 .p2align 4,,10
78 .p2align 3
79 .L4:
80 cmpl $47, %r9d
81 leaq (%rcx,%rax,8), %rdx
82 ja .L25
83 movl %r9d, %r10d
84 addl $8, %r9d
85 addq %r11, %r10
86 .L26:
87 movq (%r10), %r10
88 movq %r10, (%rdx)
89 .p2align 4,,10
90 .p2align 3
91 .L14:
92 addq $1, %rax
93 cmpq %rax, %r8
94 jne .L27
95 .L1:
96 popq %rbx
97 ret
98 .L10:
99 ja .L21
100 movl %r9d, %edx
101 addl $8, %r9d
102 addq %r11, %rdx
103 .L22:
104 movq (%rdx), %rdx
105 movq %rdx, 40(%rdi)
106 jmp .L14
107 .L9:
108 ja .L19
109 movl %r9d, %edx
110 addl $8, %r9d
111 addq %r11, %rdx
112 .L20:
113 movq (%rdx), %rdx
114 movq %rdx, 152(%rdi)
115 jmp .L14
116 .L8:
117 ja .L17
118 movl %r9d, %edx
119 addl $8, %r9d
120 addq %r11, %rdx
121 .L18:
122 movq (%rdx), %rdx
123 movq %rdx, 136(%rdi)
124 jmp .L14
125 .L5:
126 ja .L12
127 movl %r9d, %edx
128 addl $8, %r9d
129 addq %r11, %rdx
130 .L13:
131 movq (%rdx), %rdx
132 movq %rdx, 104(%rdi)
133 jmp .L14
134 .L7:
135 ja .L15
136 movl %r9d, %edx
137 addl $8, %r9d
138 addq %r11, %rdx
139 .L16:
140 movq (%rdx), %rdx
141 movq %rdx, 112(%rdi)
142 jmp .L14
143 .L11:
144 ja .L23
145 movl %r9d, %edx
146 addl $8, %r9d
147 addq %r11, %rdx
148 .L24:
149 movq (%rdx), %rdx
150 movq %rdx, 48(%rdi)
151 jmp .L14
152 .L25:
153 movq %rbx, %r10
154 addq $8, %rbx
155 jmp .L26
156 .L21:
157 movq %rbx, %rdx
158 addq $8, %rbx
159 jmp .L22
160 .L23:
161 movq %rbx, %rdx
162 addq $8, %rbx
163 jmp .L24
164 .L19:
165 movq %rbx, %rdx
166 addq $8, %rbx
167 jmp .L20
168 .L12:
169 movq %rbx, %rdx
170 addq $8, %rbx
171 jmp .L13
172 .L17:
173 movq %rbx, %rdx
174 addq $8, %rbx
175 jmp .L18
176 .L15:
177 movq %rbx, %rdx
178 addq $8, %rbx
179 jmp .L16
180 .size __makecontext, .-__makecontext
181 .weak makecontext
182 .set makecontext,__makecontext
183 .hidden __start_context