OLD | NEW |
1 #if defined(__i386__) | 1 #if defined(__i386__) |
2 .file "crypto/cpu-x86-asm.S" | 2 .file "crypto/cpu-x86-asm.S" |
3 .text | 3 .text |
4 .globl _OPENSSL_ia32_cpuid | 4 .globl _OPENSSL_ia32_cpuid |
| 5 .private_extern _OPENSSL_ia32_cpuid |
5 .align 4 | 6 .align 4 |
6 _OPENSSL_ia32_cpuid: | 7 _OPENSSL_ia32_cpuid: |
7 L_OPENSSL_ia32_cpuid_begin: | 8 L_OPENSSL_ia32_cpuid_begin: |
8 pushl %ebp | 9 pushl %ebp |
9 pushl %ebx | 10 pushl %ebx |
10 pushl %esi | 11 pushl %esi |
11 pushl %edi | 12 pushl %edi |
12 xorl %edx,%edx | 13 xorl %edx,%edx |
13 pushfl | 14 pushfl |
14 popl %eax | 15 popl %eax |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 L007done: | 139 L007done: |
139 movl %esi,%eax | 140 movl %esi,%eax |
140 movl %ebp,%edx | 141 movl %ebp,%edx |
141 L000nocpuid: | 142 L000nocpuid: |
142 popl %edi | 143 popl %edi |
143 popl %esi | 144 popl %esi |
144 popl %ebx | 145 popl %ebx |
145 popl %ebp | 146 popl %ebp |
146 ret | 147 ret |
147 .globl _OPENSSL_rdtsc | 148 .globl _OPENSSL_rdtsc |
| 149 .private_extern _OPENSSL_rdtsc |
148 .align 4 | 150 .align 4 |
149 _OPENSSL_rdtsc: | 151 _OPENSSL_rdtsc: |
150 L_OPENSSL_rdtsc_begin: | 152 L_OPENSSL_rdtsc_begin: |
151 xorl %eax,%eax | 153 xorl %eax,%eax |
152 xorl %edx,%edx | 154 xorl %edx,%edx |
153 call L009PIC_me_up | 155 call L009PIC_me_up |
154 L009PIC_me_up: | 156 L009PIC_me_up: |
155 popl %ecx | 157 popl %ecx |
156 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L009PIC_me_up(%ecx),%ecx | 158 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L009PIC_me_up(%ecx),%ecx |
157 btl $4,(%ecx) | 159 btl $4,(%ecx) |
158 jnc L010notsc | 160 jnc L010notsc |
159 .byte 0x0f,0x31 | 161 .byte 0x0f,0x31 |
160 L010notsc: | 162 L010notsc: |
161 ret | 163 ret |
162 .globl _OPENSSL_instrument_halt | 164 .globl _OPENSSL_instrument_halt |
| 165 .private_extern _OPENSSL_instrument_halt |
163 .align 4 | 166 .align 4 |
164 _OPENSSL_instrument_halt: | 167 _OPENSSL_instrument_halt: |
165 L_OPENSSL_instrument_halt_begin: | 168 L_OPENSSL_instrument_halt_begin: |
166 call L011PIC_me_up | 169 call L011PIC_me_up |
167 L011PIC_me_up: | 170 L011PIC_me_up: |
168 popl %ecx | 171 popl %ecx |
169 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L011PIC_me_up(%ecx),%ecx | 172 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L011PIC_me_up(%ecx),%ecx |
170 btl $4,(%ecx) | 173 btl $4,(%ecx) |
171 jnc L012nohalt | 174 jnc L012nohalt |
172 .long 2421723150 | 175 .long 2421723150 |
(...skipping 10 matching lines...) Expand all Loading... |
183 .byte 0x0f,0x31 | 186 .byte 0x0f,0x31 |
184 subl (%esp),%eax | 187 subl (%esp),%eax |
185 sbbl 4(%esp),%edx | 188 sbbl 4(%esp),%edx |
186 addl $8,%esp | 189 addl $8,%esp |
187 ret | 190 ret |
188 L012nohalt: | 191 L012nohalt: |
189 xorl %eax,%eax | 192 xorl %eax,%eax |
190 xorl %edx,%edx | 193 xorl %edx,%edx |
191 ret | 194 ret |
192 .globl _OPENSSL_far_spin | 195 .globl _OPENSSL_far_spin |
| 196 .private_extern _OPENSSL_far_spin |
193 .align 4 | 197 .align 4 |
194 _OPENSSL_far_spin: | 198 _OPENSSL_far_spin: |
195 L_OPENSSL_far_spin_begin: | 199 L_OPENSSL_far_spin_begin: |
196 pushfl | 200 pushfl |
197 popl %eax | 201 popl %eax |
198 btl $9,%eax | 202 btl $9,%eax |
199 jnc L013nospin | 203 jnc L013nospin |
200 movl 4(%esp),%eax | 204 movl 4(%esp),%eax |
201 movl 8(%esp),%ecx | 205 movl 8(%esp),%ecx |
202 .long 2430111262 | 206 .long 2430111262 |
203 xorl %eax,%eax | 207 xorl %eax,%eax |
204 movl (%ecx),%edx | 208 movl (%ecx),%edx |
205 jmp L014spin | 209 jmp L014spin |
206 .align 4,0x90 | 210 .align 4,0x90 |
207 L014spin: | 211 L014spin: |
208 incl %eax | 212 incl %eax |
209 cmpl (%ecx),%edx | 213 cmpl (%ecx),%edx |
210 je L014spin | 214 je L014spin |
211 .long 529567888 | 215 .long 529567888 |
212 ret | 216 ret |
213 L013nospin: | 217 L013nospin: |
214 xorl %eax,%eax | 218 xorl %eax,%eax |
215 xorl %edx,%edx | 219 xorl %edx,%edx |
216 ret | 220 ret |
217 .globl _OPENSSL_wipe_cpu | 221 .globl _OPENSSL_wipe_cpu |
| 222 .private_extern _OPENSSL_wipe_cpu |
218 .align 4 | 223 .align 4 |
219 _OPENSSL_wipe_cpu: | 224 _OPENSSL_wipe_cpu: |
220 L_OPENSSL_wipe_cpu_begin: | 225 L_OPENSSL_wipe_cpu_begin: |
221 xorl %eax,%eax | 226 xorl %eax,%eax |
222 xorl %edx,%edx | 227 xorl %edx,%edx |
223 call L015PIC_me_up | 228 call L015PIC_me_up |
224 L015PIC_me_up: | 229 L015PIC_me_up: |
225 popl %ecx | 230 popl %ecx |
226 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L015PIC_me_up(%ecx),%ecx | 231 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L015PIC_me_up(%ecx),%ecx |
227 movl (%ecx),%ecx | 232 movl (%ecx),%ecx |
228 btl $1,(%ecx) | 233 btl $1,(%ecx) |
229 jnc L016no_x87 | 234 jnc L016no_x87 |
230 .long 4007259865,4007259865,4007259865,4007259865,2430851995 | 235 .long 4007259865,4007259865,4007259865,4007259865,2430851995 |
231 L016no_x87: | 236 L016no_x87: |
232 leal 4(%esp),%eax | 237 leal 4(%esp),%eax |
233 ret | 238 ret |
234 .globl _OPENSSL_atomic_add | 239 .globl _OPENSSL_atomic_add |
| 240 .private_extern _OPENSSL_atomic_add |
235 .align 4 | 241 .align 4 |
236 _OPENSSL_atomic_add: | 242 _OPENSSL_atomic_add: |
237 L_OPENSSL_atomic_add_begin: | 243 L_OPENSSL_atomic_add_begin: |
238 movl 4(%esp),%edx | 244 movl 4(%esp),%edx |
239 movl 8(%esp),%ecx | 245 movl 8(%esp),%ecx |
240 pushl %ebx | 246 pushl %ebx |
241 nop | 247 nop |
242 movl (%edx),%eax | 248 movl (%edx),%eax |
243 L017spin: | 249 L017spin: |
244 leal (%eax,%ecx,1),%ebx | 250 leal (%eax,%ecx,1),%ebx |
245 nop | 251 nop |
246 .long 447811568 | 252 .long 447811568 |
247 jne L017spin | 253 jne L017spin |
248 movl %ebx,%eax | 254 movl %ebx,%eax |
249 popl %ebx | 255 popl %ebx |
250 ret | 256 ret |
251 .globl _OPENSSL_indirect_call | 257 .globl _OPENSSL_indirect_call |
| 258 .private_extern _OPENSSL_indirect_call |
252 .align 4 | 259 .align 4 |
253 _OPENSSL_indirect_call: | 260 _OPENSSL_indirect_call: |
254 L_OPENSSL_indirect_call_begin: | 261 L_OPENSSL_indirect_call_begin: |
255 pushl %ebp | 262 pushl %ebp |
256 movl %esp,%ebp | 263 movl %esp,%ebp |
257 subl $28,%esp | 264 subl $28,%esp |
258 movl 12(%ebp),%ecx | 265 movl 12(%ebp),%ecx |
259 movl %ecx,(%esp) | 266 movl %ecx,(%esp) |
260 movl 16(%ebp),%edx | 267 movl 16(%ebp),%edx |
261 movl %edx,4(%esp) | 268 movl %edx,4(%esp) |
262 movl 20(%ebp),%eax | 269 movl 20(%ebp),%eax |
263 movl %eax,8(%esp) | 270 movl %eax,8(%esp) |
264 movl 24(%ebp),%eax | 271 movl 24(%ebp),%eax |
265 movl %eax,12(%esp) | 272 movl %eax,12(%esp) |
266 movl 28(%ebp),%eax | 273 movl 28(%ebp),%eax |
267 movl %eax,16(%esp) | 274 movl %eax,16(%esp) |
268 movl 32(%ebp),%eax | 275 movl 32(%ebp),%eax |
269 movl %eax,20(%esp) | 276 movl %eax,20(%esp) |
270 movl 36(%ebp),%eax | 277 movl 36(%ebp),%eax |
271 movl %eax,24(%esp) | 278 movl %eax,24(%esp) |
272 call *8(%ebp) | 279 call *8(%ebp) |
273 movl %ebp,%esp | 280 movl %ebp,%esp |
274 popl %ebp | 281 popl %ebp |
275 ret | 282 ret |
276 .globl _OPENSSL_cleanse | |
277 .align 4 | |
278 _OPENSSL_cleanse: | |
279 L_OPENSSL_cleanse_begin: | |
280 movl 4(%esp),%edx | |
281 movl 8(%esp),%ecx | |
282 xorl %eax,%eax | |
283 cmpl $7,%ecx | |
284 jae L018lot | |
285 cmpl $0,%ecx | |
286 je L019ret | |
287 L020little: | |
288 movb %al,(%edx) | |
289 subl $1,%ecx | |
290 leal 1(%edx),%edx | |
291 jnz L020little | |
292 L019ret: | |
293 ret | |
294 .align 4,0x90 | |
295 L018lot: | |
296 testl $3,%edx | |
297 jz L021aligned | |
298 movb %al,(%edx) | |
299 leal -1(%ecx),%ecx | |
300 leal 1(%edx),%edx | |
301 jmp L018lot | |
302 L021aligned: | |
303 movl %eax,(%edx) | |
304 leal -4(%ecx),%ecx | |
305 testl $-4,%ecx | |
306 leal 4(%edx),%edx | |
307 jnz L021aligned | |
308 cmpl $0,%ecx | |
309 jne L020little | |
310 ret | |
311 .globl _OPENSSL_ia32_rdrand | 283 .globl _OPENSSL_ia32_rdrand |
| 284 .private_extern _OPENSSL_ia32_rdrand |
312 .align 4 | 285 .align 4 |
313 _OPENSSL_ia32_rdrand: | 286 _OPENSSL_ia32_rdrand: |
314 L_OPENSSL_ia32_rdrand_begin: | 287 L_OPENSSL_ia32_rdrand_begin: |
315 movl $8,%ecx | 288 movl $8,%ecx |
316 L022loop: | 289 L018loop: |
317 .byte 15,199,240 | 290 .byte 15,199,240 |
318 » jc» L023break | 291 » jc» L019break |
319 » loop» L022loop | 292 » loop» L018loop |
320 L023break: | 293 L019break: |
321 cmpl $0,%eax | 294 cmpl $0,%eax |
322 cmovel %ecx,%eax | 295 cmovel %ecx,%eax |
323 ret | 296 ret |
324 .section __IMPORT,__pointers,non_lazy_symbol_pointers | 297 .section __IMPORT,__pointers,non_lazy_symbol_pointers |
325 L_OPENSSL_ia32cap_P$non_lazy_ptr: | 298 L_OPENSSL_ia32cap_P$non_lazy_ptr: |
326 .indirect_symbol _OPENSSL_ia32cap_P | 299 .indirect_symbol _OPENSSL_ia32cap_P |
327 .long 0 | 300 .long 0 |
328 #endif | 301 #endif |
OLD | NEW |