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

Side by Side Diff: third_party/boringssl/linux-x86/crypto/rc4/rc4-586.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 "rc4-586.S" 2 .file "rc4-586.S"
3 .text 3 .text
4 .globl RC4 4 .globl RC4
5 .type RC4,@function 5 .type RC4,@function
6 .align 16 6 .align 16
7 RC4: 7 RC4:
8 .L_RC4_begin: 8 .L_RC4_begin:
9 pushl %ebp 9 pushl %ebp
10 pushl %ebx 10 pushl %ebx
(...skipping 15 matching lines...) Expand all
26 movl %ecx,24(%esp) 26 movl %ecx,24(%esp)
27 incb %al 27 incb %al
28 cmpl $-1,256(%edi) 28 cmpl $-1,256(%edi)
29 je .L001RC4_CHAR 29 je .L001RC4_CHAR
30 movl (%edi,%eax,4),%ecx 30 movl (%edi,%eax,4),%ecx
31 andl $-4,%edx 31 andl $-4,%edx
32 jz .L002loop1 32 jz .L002loop1
33 movl %ebp,32(%esp) 33 movl %ebp,32(%esp)
34 testl $-8,%edx 34 testl $-8,%edx
35 jz .L003go4loop4 35 jz .L003go4loop4
36 » leal» OPENSSL_ia32cap_P,%ebp 36 » call» .L004PIC_me_up
37 .L004PIC_me_up:
38 » popl» %ebp
39 » leal» OPENSSL_ia32cap_P-.L004PIC_me_up(%ebp),%ebp
37 btl $26,(%ebp) 40 btl $26,(%ebp)
38 jnc .L003go4loop4 41 jnc .L003go4loop4
39 movl 32(%esp),%ebp 42 movl 32(%esp),%ebp
40 andl $-8,%edx 43 andl $-8,%edx
41 leal -8(%esi,%edx,1),%edx 44 leal -8(%esi,%edx,1),%edx
42 movl %edx,-4(%edi) 45 movl %edx,-4(%edi)
43 addb %cl,%bl 46 addb %cl,%bl
44 movl (%edi,%ebx,4),%edx 47 movl (%edi,%ebx,4),%edx
45 movl %ecx,(%edi,%ebx,4) 48 movl %ecx,(%edi,%ebx,4)
46 movl %edx,(%edi,%eax,4) 49 movl %edx,(%edi,%eax,4)
47 incl %eax 50 incl %eax
48 addl %ecx,%edx 51 addl %ecx,%edx
49 movzbl %al,%eax 52 movzbl %al,%eax
50 movzbl %dl,%edx 53 movzbl %dl,%edx
51 movq (%esi),%mm0 54 movq (%esi),%mm0
52 movl (%edi,%eax,4),%ecx 55 movl (%edi,%eax,4),%ecx
53 movd (%edi,%edx,4),%mm2 56 movd (%edi,%edx,4),%mm2
54 » jmp» .L004loop_mmx_enter 57 » jmp» .L005loop_mmx_enter
55 .align 16 58 .align 16
56 .L005loop_mmx: 59 .L006loop_mmx:
57 addb %cl,%bl 60 addb %cl,%bl
58 psllq $56,%mm1 61 psllq $56,%mm1
59 movl (%edi,%ebx,4),%edx 62 movl (%edi,%ebx,4),%edx
60 movl %ecx,(%edi,%ebx,4) 63 movl %ecx,(%edi,%ebx,4)
61 movl %edx,(%edi,%eax,4) 64 movl %edx,(%edi,%eax,4)
62 incl %eax 65 incl %eax
63 addl %ecx,%edx 66 addl %ecx,%edx
64 movzbl %al,%eax 67 movzbl %al,%eax
65 movzbl %dl,%edx 68 movzbl %dl,%edx
66 pxor %mm1,%mm2 69 pxor %mm1,%mm2
67 movq (%esi),%mm0 70 movq (%esi),%mm0
68 movq %mm2,-8(%ebp,%esi,1) 71 movq %mm2,-8(%ebp,%esi,1)
69 movl (%edi,%eax,4),%ecx 72 movl (%edi,%eax,4),%ecx
70 movd (%edi,%edx,4),%mm2 73 movd (%edi,%edx,4),%mm2
71 .L004loop_mmx_enter: 74 .L005loop_mmx_enter:
72 addb %cl,%bl 75 addb %cl,%bl
73 movl (%edi,%ebx,4),%edx 76 movl (%edi,%ebx,4),%edx
74 movl %ecx,(%edi,%ebx,4) 77 movl %ecx,(%edi,%ebx,4)
75 movl %edx,(%edi,%eax,4) 78 movl %edx,(%edi,%eax,4)
76 incl %eax 79 incl %eax
77 addl %ecx,%edx 80 addl %ecx,%edx
78 movzbl %al,%eax 81 movzbl %al,%eax
79 movzbl %dl,%edx 82 movzbl %dl,%edx
80 pxor %mm0,%mm2 83 pxor %mm0,%mm2
81 movl (%edi,%eax,4),%ecx 84 movl (%edi,%eax,4),%ecx
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 movzbl %al,%eax 153 movzbl %al,%eax
151 movzbl %dl,%edx 154 movzbl %dl,%edx
152 pxor %mm1,%mm2 155 pxor %mm1,%mm2
153 movl (%edi,%eax,4),%ecx 156 movl (%edi,%eax,4),%ecx
154 movd (%edi,%edx,4),%mm1 157 movd (%edi,%edx,4),%mm1
155 movl %ebx,%edx 158 movl %ebx,%edx
156 xorl %ebx,%ebx 159 xorl %ebx,%ebx
157 movb %dl,%bl 160 movb %dl,%bl
158 cmpl -4(%edi),%esi 161 cmpl -4(%edi),%esi
159 leal 8(%esi),%esi 162 leal 8(%esi),%esi
160 » jb» .L005loop_mmx 163 » jb» .L006loop_mmx
161 psllq $56,%mm1 164 psllq $56,%mm1
162 pxor %mm1,%mm2 165 pxor %mm1,%mm2
163 movq %mm2,-8(%ebp,%esi,1) 166 movq %mm2,-8(%ebp,%esi,1)
164 emms 167 emms
165 cmpl 24(%esp),%esi 168 cmpl 24(%esp),%esi
166 » je» .L006done 169 » je» .L007done
167 jmp .L002loop1 170 jmp .L002loop1
168 .align 16 171 .align 16
169 .L003go4loop4: 172 .L003go4loop4:
170 leal -4(%esi,%edx,1),%edx 173 leal -4(%esi,%edx,1),%edx
171 movl %edx,28(%esp) 174 movl %edx,28(%esp)
172 .L007loop4: 175 .L008loop4:
173 addb %cl,%bl 176 addb %cl,%bl
174 movl (%edi,%ebx,4),%edx 177 movl (%edi,%ebx,4),%edx
175 movl %ecx,(%edi,%ebx,4) 178 movl %ecx,(%edi,%ebx,4)
176 movl %edx,(%edi,%eax,4) 179 movl %edx,(%edi,%eax,4)
177 addl %ecx,%edx 180 addl %ecx,%edx
178 incb %al 181 incb %al
179 andl $255,%edx 182 andl $255,%edx
180 movl (%edi,%eax,4),%ecx 183 movl (%edi,%eax,4),%ecx
181 movl (%edi,%edx,4),%ebp 184 movl (%edi,%edx,4),%ebp
182 addb %cl,%bl 185 addb %cl,%bl
(...skipping 25 matching lines...) Expand all
208 andl $255,%edx 211 andl $255,%edx
209 rorl $8,%ebp 212 rorl $8,%ebp
210 movl 32(%esp),%ecx 213 movl 32(%esp),%ecx
211 orl (%edi,%edx,4),%ebp 214 orl (%edi,%edx,4),%ebp
212 rorl $8,%ebp 215 rorl $8,%ebp
213 xorl (%esi),%ebp 216 xorl (%esi),%ebp
214 cmpl 28(%esp),%esi 217 cmpl 28(%esp),%esi
215 movl %ebp,(%ecx,%esi,1) 218 movl %ebp,(%ecx,%esi,1)
216 leal 4(%esi),%esi 219 leal 4(%esi),%esi
217 movl (%edi,%eax,4),%ecx 220 movl (%edi,%eax,4),%ecx
218 » jb» .L007loop4 221 » jb» .L008loop4
219 cmpl 24(%esp),%esi 222 cmpl 24(%esp),%esi
220 » je» .L006done 223 » je» .L007done
221 movl 32(%esp),%ebp 224 movl 32(%esp),%ebp
222 .align 16 225 .align 16
223 .L002loop1: 226 .L002loop1:
224 addb %cl,%bl 227 addb %cl,%bl
225 movl (%edi,%ebx,4),%edx 228 movl (%edi,%ebx,4),%edx
226 movl %ecx,(%edi,%ebx,4) 229 movl %ecx,(%edi,%ebx,4)
227 movl %edx,(%edi,%eax,4) 230 movl %edx,(%edi,%eax,4)
228 addl %ecx,%edx 231 addl %ecx,%edx
229 incb %al 232 incb %al
230 andl $255,%edx 233 andl $255,%edx
231 movl (%edi,%edx,4),%edx 234 movl (%edi,%edx,4),%edx
232 xorb (%esi),%dl 235 xorb (%esi),%dl
233 leal 1(%esi),%esi 236 leal 1(%esi),%esi
234 movl (%edi,%eax,4),%ecx 237 movl (%edi,%eax,4),%ecx
235 cmpl 24(%esp),%esi 238 cmpl 24(%esp),%esi
236 movb %dl,-1(%ebp,%esi,1) 239 movb %dl,-1(%ebp,%esi,1)
237 jb .L002loop1 240 jb .L002loop1
238 » jmp» .L006done 241 » jmp» .L007done
239 .align 16 242 .align 16
240 .L001RC4_CHAR: 243 .L001RC4_CHAR:
241 movzbl (%edi,%eax,1),%ecx 244 movzbl (%edi,%eax,1),%ecx
242 .L008cloop1: 245 .L009cloop1:
243 addb %cl,%bl 246 addb %cl,%bl
244 movzbl (%edi,%ebx,1),%edx 247 movzbl (%edi,%ebx,1),%edx
245 movb %cl,(%edi,%ebx,1) 248 movb %cl,(%edi,%ebx,1)
246 movb %dl,(%edi,%eax,1) 249 movb %dl,(%edi,%eax,1)
247 addb %cl,%dl 250 addb %cl,%dl
248 movzbl (%edi,%edx,1),%edx 251 movzbl (%edi,%edx,1),%edx
249 addb $1,%al 252 addb $1,%al
250 xorb (%esi),%dl 253 xorb (%esi),%dl
251 leal 1(%esi),%esi 254 leal 1(%esi),%esi
252 movzbl (%edi,%eax,1),%ecx 255 movzbl (%edi,%eax,1),%ecx
253 cmpl 24(%esp),%esi 256 cmpl 24(%esp),%esi
254 movb %dl,-1(%ebp,%esi,1) 257 movb %dl,-1(%ebp,%esi,1)
255 » jb» .L008cloop1 258 » jb» .L009cloop1
256 .L006done: 259 .L007done:
257 decb %al 260 decb %al
258 movl %ebx,-4(%edi) 261 movl %ebx,-4(%edi)
259 movb %al,-8(%edi) 262 movb %al,-8(%edi)
260 .L000abort: 263 .L000abort:
261 popl %edi 264 popl %edi
262 popl %esi 265 popl %esi
263 popl %ebx 266 popl %ebx
264 popl %ebp 267 popl %ebp
265 ret 268 ret
266 .size RC4,.-.L_RC4_begin 269 .size RC4,.-.L_RC4_begin
267 .globl RC4_set_key 270 .globl RC4_set_key
268 .type RC4_set_key,@function 271 .type RC4_set_key,@function
269 .align 16 272 .align 16
270 RC4_set_key: 273 RC4_set_key:
271 .L_RC4_set_key_begin: 274 .L_RC4_set_key_begin:
272 pushl %ebp 275 pushl %ebp
273 pushl %ebx 276 pushl %ebx
274 pushl %esi 277 pushl %esi
275 pushl %edi 278 pushl %edi
276 movl 20(%esp),%edi 279 movl 20(%esp),%edi
277 movl 24(%esp),%ebp 280 movl 24(%esp),%ebp
278 movl 28(%esp),%esi 281 movl 28(%esp),%esi
279 » leal» OPENSSL_ia32cap_P,%edx 282 » call» .L010PIC_me_up
283 .L010PIC_me_up:
284 » popl» %edx
285 » leal» OPENSSL_ia32cap_P-.L010PIC_me_up(%edx),%edx
280 leal 8(%edi),%edi 286 leal 8(%edi),%edi
281 leal (%esi,%ebp,1),%esi 287 leal (%esi,%ebp,1),%esi
282 negl %ebp 288 negl %ebp
283 xorl %eax,%eax 289 xorl %eax,%eax
284 movl %ebp,-4(%edi) 290 movl %ebp,-4(%edi)
285 btl $20,(%edx) 291 btl $20,(%edx)
286 » jc» .L009c1stloop 292 » jc» .L011c1stloop
287 .align 16 293 .align 16
288 .L010w1stloop: 294 .L012w1stloop:
289 movl %eax,(%edi,%eax,4) 295 movl %eax,(%edi,%eax,4)
290 addb $1,%al 296 addb $1,%al
291 » jnc» .L010w1stloop 297 » jnc» .L012w1stloop
292 xorl %ecx,%ecx 298 xorl %ecx,%ecx
293 xorl %edx,%edx 299 xorl %edx,%edx
294 .align 16 300 .align 16
295 .L011w2ndloop: 301 .L013w2ndloop:
296 movl (%edi,%ecx,4),%eax 302 movl (%edi,%ecx,4),%eax
297 addb (%esi,%ebp,1),%dl 303 addb (%esi,%ebp,1),%dl
298 addb %al,%dl 304 addb %al,%dl
299 addl $1,%ebp 305 addl $1,%ebp
300 movl (%edi,%edx,4),%ebx 306 movl (%edi,%edx,4),%ebx
301 » jnz» .L012wnowrap 307 » jnz» .L014wnowrap
302 movl -4(%edi),%ebp 308 movl -4(%edi),%ebp
303 .L012wnowrap: 309 .L014wnowrap:
304 movl %eax,(%edi,%edx,4) 310 movl %eax,(%edi,%edx,4)
305 movl %ebx,(%edi,%ecx,4) 311 movl %ebx,(%edi,%ecx,4)
306 addb $1,%cl 312 addb $1,%cl
307 » jnc» .L011w2ndloop 313 » jnc» .L013w2ndloop
308 » jmp» .L013exit 314 » jmp» .L015exit
309 .align 16 315 .align 16
310 .L009c1stloop: 316 .L011c1stloop:
311 movb %al,(%edi,%eax,1) 317 movb %al,(%edi,%eax,1)
312 addb $1,%al 318 addb $1,%al
313 » jnc» .L009c1stloop 319 » jnc» .L011c1stloop
314 xorl %ecx,%ecx 320 xorl %ecx,%ecx
315 xorl %edx,%edx 321 xorl %edx,%edx
316 xorl %ebx,%ebx 322 xorl %ebx,%ebx
317 .align 16 323 .align 16
318 .L014c2ndloop: 324 .L016c2ndloop:
319 movb (%edi,%ecx,1),%al 325 movb (%edi,%ecx,1),%al
320 addb (%esi,%ebp,1),%dl 326 addb (%esi,%ebp,1),%dl
321 addb %al,%dl 327 addb %al,%dl
322 addl $1,%ebp 328 addl $1,%ebp
323 movb (%edi,%edx,1),%bl 329 movb (%edi,%edx,1),%bl
324 » jnz» .L015cnowrap 330 » jnz» .L017cnowrap
325 movl -4(%edi),%ebp 331 movl -4(%edi),%ebp
326 .L015cnowrap: 332 .L017cnowrap:
327 movb %al,(%edi,%edx,1) 333 movb %al,(%edi,%edx,1)
328 movb %bl,(%edi,%ecx,1) 334 movb %bl,(%edi,%ecx,1)
329 addb $1,%cl 335 addb $1,%cl
330 » jnc» .L014c2ndloop 336 » jnc» .L016c2ndloop
331 movl $-1,256(%edi) 337 movl $-1,256(%edi)
332 .L013exit: 338 .L015exit:
333 xorl %eax,%eax 339 xorl %eax,%eax
334 movl %eax,-8(%edi) 340 movl %eax,-8(%edi)
335 movl %eax,-4(%edi) 341 movl %eax,-4(%edi)
336 popl %edi 342 popl %edi
337 popl %esi 343 popl %esi
338 popl %ebx 344 popl %ebx
339 popl %ebp 345 popl %ebp
340 ret 346 ret
341 .size RC4_set_key,.-.L_RC4_set_key_begin 347 .size RC4_set_key,.-.L_RC4_set_key_begin
342 .globl RC4_options 348 .globl RC4_options
343 .type RC4_options,@function 349 .type RC4_options,@function
344 .align 16 350 .align 16
345 RC4_options: 351 RC4_options:
346 .L_RC4_options_begin: 352 .L_RC4_options_begin:
347 » call» .L016pic_point 353 » call» .L018pic_point
348 .L016pic_point: 354 .L018pic_point:
349 popl %eax 355 popl %eax
350 » leal» .L017opts-.L016pic_point(%eax),%eax 356 » leal» .L019opts-.L018pic_point(%eax),%eax
351 » leal» OPENSSL_ia32cap_P,%edx 357 » call» .L020PIC_me_up
358 .L020PIC_me_up:
359 » popl» %edx
360 » leal» OPENSSL_ia32cap_P-.L020PIC_me_up(%edx),%edx
352 movl (%edx),%edx 361 movl (%edx),%edx
353 btl $20,%edx 362 btl $20,%edx
354 » jc» .L0181xchar 363 » jc» .L0211xchar
355 btl $26,%edx 364 btl $26,%edx
356 » jnc» .L019ret 365 » jnc» .L022ret
357 addl $25,%eax 366 addl $25,%eax
358 ret 367 ret
359 .L0181xchar: 368 .L0211xchar:
360 addl $12,%eax 369 addl $12,%eax
361 .L019ret: 370 .L022ret:
362 ret 371 ret
363 .align 64 372 .align 64
364 .L017opts: 373 .L019opts:
365 .byte 114,99,52,40,52,120,44,105,110,116,41,0 374 .byte 114,99,52,40,52,120,44,105,110,116,41,0
366 .byte 114,99,52,40,49,120,44,99,104,97,114,41,0 375 .byte 114,99,52,40,49,120,44,99,104,97,114,41,0
367 .byte 114,99,52,40,56,120,44,109,109,120,41,0 376 .byte 114,99,52,40,56,120,44,109,109,120,41,0
368 .byte 82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89 377 .byte 82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89
369 .byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 378 .byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
370 .byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 379 .byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
371 .align 64 380 .align 64
372 .size RC4_options,.-.L_RC4_options_begin 381 .size RC4_options,.-.L_RC4_options_begin
373 #endif 382 #endif
OLDNEW
« no previous file with comments | « third_party/boringssl/linux-x86/crypto/modes/ghash-x86.S ('k') | third_party/boringssl/linux-x86/crypto/sha/sha1-586.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698