Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Side by Side Diff: third_party/boringssl/linux-x86/crypto/cpu-x86-asm.S

Issue 401153002: Switch to BoringSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase across DEPS change Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 .type OPENSSL_ia32_cpuid,@function 5 .type OPENSSL_ia32_cpuid,@function
6 .align 16 6 .align 16
7 OPENSSL_ia32_cpuid: 7 OPENSSL_ia32_cpuid:
8 .L_OPENSSL_ia32_cpuid_begin: 8 .L_OPENSSL_ia32_cpuid_begin:
9 pushl %ebp 9 pushl %ebp
10 pushl %ebx 10 pushl %ebx
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 popl %ebp 146 popl %ebp
147 ret 147 ret
148 .size OPENSSL_ia32_cpuid,.-.L_OPENSSL_ia32_cpuid_begin 148 .size OPENSSL_ia32_cpuid,.-.L_OPENSSL_ia32_cpuid_begin
149 .globl OPENSSL_rdtsc 149 .globl OPENSSL_rdtsc
150 .type OPENSSL_rdtsc,@function 150 .type OPENSSL_rdtsc,@function
151 .align 16 151 .align 16
152 OPENSSL_rdtsc: 152 OPENSSL_rdtsc:
153 .L_OPENSSL_rdtsc_begin: 153 .L_OPENSSL_rdtsc_begin:
154 xorl %eax,%eax 154 xorl %eax,%eax
155 xorl %edx,%edx 155 xorl %edx,%edx
156 » leal» OPENSSL_ia32cap_P,%ecx 156 » call» .L009PIC_me_up
157 .L009PIC_me_up:
158 » popl» %ecx
159 » leal» OPENSSL_ia32cap_P-.L009PIC_me_up(%ecx),%ecx
157 btl $4,(%ecx) 160 btl $4,(%ecx)
158 » jnc» .L009notsc 161 » jnc» .L010notsc
159 .byte 0x0f,0x31 162 .byte 0x0f,0x31
160 .L009notsc: 163 .L010notsc:
161 ret 164 ret
162 .size OPENSSL_rdtsc,.-.L_OPENSSL_rdtsc_begin 165 .size OPENSSL_rdtsc,.-.L_OPENSSL_rdtsc_begin
163 .globl OPENSSL_instrument_halt 166 .globl OPENSSL_instrument_halt
164 .type OPENSSL_instrument_halt,@function 167 .type OPENSSL_instrument_halt,@function
165 .align 16 168 .align 16
166 OPENSSL_instrument_halt: 169 OPENSSL_instrument_halt:
167 .L_OPENSSL_instrument_halt_begin: 170 .L_OPENSSL_instrument_halt_begin:
168 » leal» OPENSSL_ia32cap_P,%ecx 171 » call» .L011PIC_me_up
172 .L011PIC_me_up:
173 » popl» %ecx
174 » leal» OPENSSL_ia32cap_P-.L011PIC_me_up(%ecx),%ecx
169 btl $4,(%ecx) 175 btl $4,(%ecx)
170 » jnc» .L010nohalt 176 » jnc» .L012nohalt
171 .long 2421723150 177 .long 2421723150
172 andl $3,%eax 178 andl $3,%eax
173 » jnz» .L010nohalt 179 » jnz» .L012nohalt
174 pushfl 180 pushfl
175 popl %eax 181 popl %eax
176 btl $9,%eax 182 btl $9,%eax
177 » jnc» .L010nohalt 183 » jnc» .L012nohalt
178 .byte 0x0f,0x31 184 .byte 0x0f,0x31
179 pushl %edx 185 pushl %edx
180 pushl %eax 186 pushl %eax
181 hlt 187 hlt
182 .byte 0x0f,0x31 188 .byte 0x0f,0x31
183 subl (%esp),%eax 189 subl (%esp),%eax
184 sbbl 4(%esp),%edx 190 sbbl 4(%esp),%edx
185 addl $8,%esp 191 addl $8,%esp
186 ret 192 ret
187 .L010nohalt: 193 .L012nohalt:
188 xorl %eax,%eax 194 xorl %eax,%eax
189 xorl %edx,%edx 195 xorl %edx,%edx
190 ret 196 ret
191 .size OPENSSL_instrument_halt,.-.L_OPENSSL_instrument_halt_begin 197 .size OPENSSL_instrument_halt,.-.L_OPENSSL_instrument_halt_begin
192 .globl OPENSSL_far_spin 198 .globl OPENSSL_far_spin
193 .type OPENSSL_far_spin,@function 199 .type OPENSSL_far_spin,@function
194 .align 16 200 .align 16
195 OPENSSL_far_spin: 201 OPENSSL_far_spin:
196 .L_OPENSSL_far_spin_begin: 202 .L_OPENSSL_far_spin_begin:
197 pushfl 203 pushfl
198 popl %eax 204 popl %eax
199 btl $9,%eax 205 btl $9,%eax
200 » jnc» .L011nospin 206 » jnc» .L013nospin
201 movl 4(%esp),%eax 207 movl 4(%esp),%eax
202 movl 8(%esp),%ecx 208 movl 8(%esp),%ecx
203 .long 2430111262 209 .long 2430111262
204 xorl %eax,%eax 210 xorl %eax,%eax
205 movl (%ecx),%edx 211 movl (%ecx),%edx
206 » jmp» .L012spin 212 » jmp» .L014spin
207 .align 16 213 .align 16
208 .L012spin: 214 .L014spin:
209 incl %eax 215 incl %eax
210 cmpl (%ecx),%edx 216 cmpl (%ecx),%edx
211 » je» .L012spin 217 » je» .L014spin
212 .long 529567888 218 .long 529567888
213 ret 219 ret
214 .L011nospin: 220 .L013nospin:
215 xorl %eax,%eax 221 xorl %eax,%eax
216 xorl %edx,%edx 222 xorl %edx,%edx
217 ret 223 ret
218 .size OPENSSL_far_spin,.-.L_OPENSSL_far_spin_begin 224 .size OPENSSL_far_spin,.-.L_OPENSSL_far_spin_begin
219 .globl OPENSSL_wipe_cpu 225 .globl OPENSSL_wipe_cpu
220 .type OPENSSL_wipe_cpu,@function 226 .type OPENSSL_wipe_cpu,@function
221 .align 16 227 .align 16
222 OPENSSL_wipe_cpu: 228 OPENSSL_wipe_cpu:
223 .L_OPENSSL_wipe_cpu_begin: 229 .L_OPENSSL_wipe_cpu_begin:
224 xorl %eax,%eax 230 xorl %eax,%eax
225 xorl %edx,%edx 231 xorl %edx,%edx
226 » leal» OPENSSL_ia32cap_P,%ecx 232 » call» .L015PIC_me_up
233 .L015PIC_me_up:
234 » popl» %ecx
235 » leal» OPENSSL_ia32cap_P-.L015PIC_me_up(%ecx),%ecx
227 movl (%ecx),%ecx 236 movl (%ecx),%ecx
228 btl $1,(%ecx) 237 btl $1,(%ecx)
229 » jnc» .L013no_x87 238 » jnc» .L016no_x87
230 .long 4007259865,4007259865,4007259865,4007259865,2430851995 239 .long 4007259865,4007259865,4007259865,4007259865,2430851995
231 .L013no_x87: 240 .L016no_x87:
232 leal 4(%esp),%eax 241 leal 4(%esp),%eax
233 ret 242 ret
234 .size OPENSSL_wipe_cpu,.-.L_OPENSSL_wipe_cpu_begin 243 .size OPENSSL_wipe_cpu,.-.L_OPENSSL_wipe_cpu_begin
235 .globl OPENSSL_atomic_add 244 .globl OPENSSL_atomic_add
236 .type OPENSSL_atomic_add,@function 245 .type OPENSSL_atomic_add,@function
237 .align 16 246 .align 16
238 OPENSSL_atomic_add: 247 OPENSSL_atomic_add:
239 .L_OPENSSL_atomic_add_begin: 248 .L_OPENSSL_atomic_add_begin:
240 movl 4(%esp),%edx 249 movl 4(%esp),%edx
241 movl 8(%esp),%ecx 250 movl 8(%esp),%ecx
242 pushl %ebx 251 pushl %ebx
243 nop 252 nop
244 movl (%edx),%eax 253 movl (%edx),%eax
245 .L014spin: 254 .L017spin:
246 leal (%eax,%ecx,1),%ebx 255 leal (%eax,%ecx,1),%ebx
247 nop 256 nop
248 .long 447811568 257 .long 447811568
249 » jne» .L014spin 258 » jne» .L017spin
250 movl %ebx,%eax 259 movl %ebx,%eax
251 popl %ebx 260 popl %ebx
252 ret 261 ret
253 .size OPENSSL_atomic_add,.-.L_OPENSSL_atomic_add_begin 262 .size OPENSSL_atomic_add,.-.L_OPENSSL_atomic_add_begin
254 .globl OPENSSL_indirect_call 263 .globl OPENSSL_indirect_call
255 .type OPENSSL_indirect_call,@function 264 .type OPENSSL_indirect_call,@function
256 .align 16 265 .align 16
257 OPENSSL_indirect_call: 266 OPENSSL_indirect_call:
258 .L_OPENSSL_indirect_call_begin: 267 .L_OPENSSL_indirect_call_begin:
259 pushl %ebp 268 pushl %ebp
(...skipping 20 matching lines...) Expand all
280 .size OPENSSL_indirect_call,.-.L_OPENSSL_indirect_call_begin 289 .size OPENSSL_indirect_call,.-.L_OPENSSL_indirect_call_begin
281 .globl OPENSSL_cleanse 290 .globl OPENSSL_cleanse
282 .type OPENSSL_cleanse,@function 291 .type OPENSSL_cleanse,@function
283 .align 16 292 .align 16
284 OPENSSL_cleanse: 293 OPENSSL_cleanse:
285 .L_OPENSSL_cleanse_begin: 294 .L_OPENSSL_cleanse_begin:
286 movl 4(%esp),%edx 295 movl 4(%esp),%edx
287 movl 8(%esp),%ecx 296 movl 8(%esp),%ecx
288 xorl %eax,%eax 297 xorl %eax,%eax
289 cmpl $7,%ecx 298 cmpl $7,%ecx
290 » jae» .L015lot 299 » jae» .L018lot
291 cmpl $0,%ecx 300 cmpl $0,%ecx
292 » je» .L016ret 301 » je» .L019ret
293 .L017little: 302 .L020little:
294 movb %al,(%edx) 303 movb %al,(%edx)
295 subl $1,%ecx 304 subl $1,%ecx
296 leal 1(%edx),%edx 305 leal 1(%edx),%edx
297 » jnz» .L017little 306 » jnz» .L020little
298 .L016ret: 307 .L019ret:
299 ret 308 ret
300 .align 16 309 .align 16
301 .L015lot: 310 .L018lot:
302 testl $3,%edx 311 testl $3,%edx
303 » jz» .L018aligned 312 » jz» .L021aligned
304 movb %al,(%edx) 313 movb %al,(%edx)
305 leal -1(%ecx),%ecx 314 leal -1(%ecx),%ecx
306 leal 1(%edx),%edx 315 leal 1(%edx),%edx
307 » jmp» .L015lot 316 » jmp» .L018lot
308 .L018aligned: 317 .L021aligned:
309 movl %eax,(%edx) 318 movl %eax,(%edx)
310 leal -4(%ecx),%ecx 319 leal -4(%ecx),%ecx
311 testl $-4,%ecx 320 testl $-4,%ecx
312 leal 4(%edx),%edx 321 leal 4(%edx),%edx
313 » jnz» .L018aligned 322 » jnz» .L021aligned
314 cmpl $0,%ecx 323 cmpl $0,%ecx
315 » jne» .L017little 324 » jne» .L020little
316 ret 325 ret
317 .size OPENSSL_cleanse,.-.L_OPENSSL_cleanse_begin 326 .size OPENSSL_cleanse,.-.L_OPENSSL_cleanse_begin
318 .globl OPENSSL_ia32_rdrand 327 .globl OPENSSL_ia32_rdrand
319 .type OPENSSL_ia32_rdrand,@function 328 .type OPENSSL_ia32_rdrand,@function
320 .align 16 329 .align 16
321 OPENSSL_ia32_rdrand: 330 OPENSSL_ia32_rdrand:
322 .L_OPENSSL_ia32_rdrand_begin: 331 .L_OPENSSL_ia32_rdrand_begin:
323 movl $8,%ecx 332 movl $8,%ecx
324 .L019loop: 333 .L022loop:
325 .byte 15,199,240 334 .byte 15,199,240
326 » jc» .L020break 335 » jc» .L023break
327 » loop» .L019loop 336 » loop» .L022loop
328 .L020break: 337 .L023break:
329 cmpl $0,%eax 338 cmpl $0,%eax
330 cmovel %ecx,%eax 339 cmovel %ecx,%eax
331 ret 340 ret
332 .size OPENSSL_ia32_rdrand,.-.L_OPENSSL_ia32_rdrand_begin 341 .size OPENSSL_ia32_rdrand,.-.L_OPENSSL_ia32_rdrand_begin
333 .hidden OPENSSL_ia32cap_P 342 .hidden OPENSSL_ia32cap_P
334 #endif 343 #endif
OLDNEW
« no previous file with comments | « third_party/boringssl/linux-x86/crypto/bn/x86-mont.S ('k') | third_party/boringssl/linux-x86/crypto/md5/md5-586.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698