VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.1/crypto/genasm-elf/rc4-586.S@ 94083

Last change on this file since 94083 was 94083, checked in by vboxsync, 3 years ago

libs/openssl-3.0.1: Recreate asm files, bugref:10128

File size: 7.2 KB
Line 
1.text
2.globl RC4
3.type RC4,@function
4.align 16
5RC4:
6.L_RC4_begin:
7.byte 243,15,30,251
8 pushl %ebp
9 pushl %ebx
10 pushl %esi
11 pushl %edi
12 movl 20(%esp),%edi
13 movl 24(%esp),%edx
14 movl 28(%esp),%esi
15 movl 32(%esp),%ebp
16 xorl %eax,%eax
17 xorl %ebx,%ebx
18 cmpl $0,%edx
19 je .L000abort
20 movb (%edi),%al
21 movb 4(%edi),%bl
22 addl $8,%edi
23 leal (%esi,%edx,1),%ecx
24 subl %esi,%ebp
25 movl %ecx,24(%esp)
26 incb %al
27 cmpl $-1,256(%edi)
28 je .L001RC4_CHAR
29 movl (%edi,%eax,4),%ecx
30 andl $-4,%edx
31 jz .L002loop1
32 movl %ebp,32(%esp)
33 testl $-8,%edx
34 jz .L003go4loop4
35 call .L004PIC_me_up
36.L004PIC_me_up:
37 popl %ebp
38 leal OPENSSL_ia32cap_P-.L004PIC_me_up(%ebp),%ebp
39 btl $26,(%ebp)
40 jnc .L003go4loop4
41 movl 32(%esp),%ebp
42 andl $-8,%edx
43 leal -8(%esi,%edx,1),%edx
44 movl %edx,-4(%edi)
45 addb %cl,%bl
46 movl (%edi,%ebx,4),%edx
47 movl %ecx,(%edi,%ebx,4)
48 movl %edx,(%edi,%eax,4)
49 incl %eax
50 addl %ecx,%edx
51 movzbl %al,%eax
52 movzbl %dl,%edx
53 movq (%esi),%mm0
54 movl (%edi,%eax,4),%ecx
55 movd (%edi,%edx,4),%mm2
56 jmp .L005loop_mmx_enter
57.align 16
58.L006loop_mmx:
59 addb %cl,%bl
60 psllq $56,%mm1
61 movl (%edi,%ebx,4),%edx
62 movl %ecx,(%edi,%ebx,4)
63 movl %edx,(%edi,%eax,4)
64 incl %eax
65 addl %ecx,%edx
66 movzbl %al,%eax
67 movzbl %dl,%edx
68 pxor %mm1,%mm2
69 movq (%esi),%mm0
70 movq %mm2,-8(%ebp,%esi,1)
71 movl (%edi,%eax,4),%ecx
72 movd (%edi,%edx,4),%mm2
73.L005loop_mmx_enter:
74 addb %cl,%bl
75 movl (%edi,%ebx,4),%edx
76 movl %ecx,(%edi,%ebx,4)
77 movl %edx,(%edi,%eax,4)
78 incl %eax
79 addl %ecx,%edx
80 movzbl %al,%eax
81 movzbl %dl,%edx
82 pxor %mm0,%mm2
83 movl (%edi,%eax,4),%ecx
84 movd (%edi,%edx,4),%mm1
85 addb %cl,%bl
86 psllq $8,%mm1
87 movl (%edi,%ebx,4),%edx
88 movl %ecx,(%edi,%ebx,4)
89 movl %edx,(%edi,%eax,4)
90 incl %eax
91 addl %ecx,%edx
92 movzbl %al,%eax
93 movzbl %dl,%edx
94 pxor %mm1,%mm2
95 movl (%edi,%eax,4),%ecx
96 movd (%edi,%edx,4),%mm1
97 addb %cl,%bl
98 psllq $16,%mm1
99 movl (%edi,%ebx,4),%edx
100 movl %ecx,(%edi,%ebx,4)
101 movl %edx,(%edi,%eax,4)
102 incl %eax
103 addl %ecx,%edx
104 movzbl %al,%eax
105 movzbl %dl,%edx
106 pxor %mm1,%mm2
107 movl (%edi,%eax,4),%ecx
108 movd (%edi,%edx,4),%mm1
109 addb %cl,%bl
110 psllq $24,%mm1
111 movl (%edi,%ebx,4),%edx
112 movl %ecx,(%edi,%ebx,4)
113 movl %edx,(%edi,%eax,4)
114 incl %eax
115 addl %ecx,%edx
116 movzbl %al,%eax
117 movzbl %dl,%edx
118 pxor %mm1,%mm2
119 movl (%edi,%eax,4),%ecx
120 movd (%edi,%edx,4),%mm1
121 addb %cl,%bl
122 psllq $32,%mm1
123 movl (%edi,%ebx,4),%edx
124 movl %ecx,(%edi,%ebx,4)
125 movl %edx,(%edi,%eax,4)
126 incl %eax
127 addl %ecx,%edx
128 movzbl %al,%eax
129 movzbl %dl,%edx
130 pxor %mm1,%mm2
131 movl (%edi,%eax,4),%ecx
132 movd (%edi,%edx,4),%mm1
133 addb %cl,%bl
134 psllq $40,%mm1
135 movl (%edi,%ebx,4),%edx
136 movl %ecx,(%edi,%ebx,4)
137 movl %edx,(%edi,%eax,4)
138 incl %eax
139 addl %ecx,%edx
140 movzbl %al,%eax
141 movzbl %dl,%edx
142 pxor %mm1,%mm2
143 movl (%edi,%eax,4),%ecx
144 movd (%edi,%edx,4),%mm1
145 addb %cl,%bl
146 psllq $48,%mm1
147 movl (%edi,%ebx,4),%edx
148 movl %ecx,(%edi,%ebx,4)
149 movl %edx,(%edi,%eax,4)
150 incl %eax
151 addl %ecx,%edx
152 movzbl %al,%eax
153 movzbl %dl,%edx
154 pxor %mm1,%mm2
155 movl (%edi,%eax,4),%ecx
156 movd (%edi,%edx,4),%mm1
157 movl %ebx,%edx
158 xorl %ebx,%ebx
159 movb %dl,%bl
160 cmpl -4(%edi),%esi
161 leal 8(%esi),%esi
162 jb .L006loop_mmx
163 psllq $56,%mm1
164 pxor %mm1,%mm2
165 movq %mm2,-8(%ebp,%esi,1)
166 emms
167 cmpl 24(%esp),%esi
168 je .L007done
169 jmp .L002loop1
170.align 16
171.L003go4loop4:
172 leal -4(%esi,%edx,1),%edx
173 movl %edx,28(%esp)
174.L008loop4:
175 addb %cl,%bl
176 movl (%edi,%ebx,4),%edx
177 movl %ecx,(%edi,%ebx,4)
178 movl %edx,(%edi,%eax,4)
179 addl %ecx,%edx
180 incb %al
181 andl $255,%edx
182 movl (%edi,%eax,4),%ecx
183 movl (%edi,%edx,4),%ebp
184 addb %cl,%bl
185 movl (%edi,%ebx,4),%edx
186 movl %ecx,(%edi,%ebx,4)
187 movl %edx,(%edi,%eax,4)
188 addl %ecx,%edx
189 incb %al
190 andl $255,%edx
191 rorl $8,%ebp
192 movl (%edi,%eax,4),%ecx
193 orl (%edi,%edx,4),%ebp
194 addb %cl,%bl
195 movl (%edi,%ebx,4),%edx
196 movl %ecx,(%edi,%ebx,4)
197 movl %edx,(%edi,%eax,4)
198 addl %ecx,%edx
199 incb %al
200 andl $255,%edx
201 rorl $8,%ebp
202 movl (%edi,%eax,4),%ecx
203 orl (%edi,%edx,4),%ebp
204 addb %cl,%bl
205 movl (%edi,%ebx,4),%edx
206 movl %ecx,(%edi,%ebx,4)
207 movl %edx,(%edi,%eax,4)
208 addl %ecx,%edx
209 incb %al
210 andl $255,%edx
211 rorl $8,%ebp
212 movl 32(%esp),%ecx
213 orl (%edi,%edx,4),%ebp
214 rorl $8,%ebp
215 xorl (%esi),%ebp
216 cmpl 28(%esp),%esi
217 movl %ebp,(%ecx,%esi,1)
218 leal 4(%esi),%esi
219 movl (%edi,%eax,4),%ecx
220 jb .L008loop4
221 cmpl 24(%esp),%esi
222 je .L007done
223 movl 32(%esp),%ebp
224.align 16
225.L002loop1:
226 addb %cl,%bl
227 movl (%edi,%ebx,4),%edx
228 movl %ecx,(%edi,%ebx,4)
229 movl %edx,(%edi,%eax,4)
230 addl %ecx,%edx
231 incb %al
232 andl $255,%edx
233 movl (%edi,%edx,4),%edx
234 xorb (%esi),%dl
235 leal 1(%esi),%esi
236 movl (%edi,%eax,4),%ecx
237 cmpl 24(%esp),%esi
238 movb %dl,-1(%ebp,%esi,1)
239 jb .L002loop1
240 jmp .L007done
241.align 16
242.L001RC4_CHAR:
243 movzbl (%edi,%eax,1),%ecx
244.L009cloop1:
245 addb %cl,%bl
246 movzbl (%edi,%ebx,1),%edx
247 movb %cl,(%edi,%ebx,1)
248 movb %dl,(%edi,%eax,1)
249 addb %cl,%dl
250 movzbl (%edi,%edx,1),%edx
251 addb $1,%al
252 xorb (%esi),%dl
253 leal 1(%esi),%esi
254 movzbl (%edi,%eax,1),%ecx
255 cmpl 24(%esp),%esi
256 movb %dl,-1(%ebp,%esi,1)
257 jb .L009cloop1
258.L007done:
259 decb %al
260 movl %ebx,-4(%edi)
261 movb %al,-8(%edi)
262.L000abort:
263 popl %edi
264 popl %esi
265 popl %ebx
266 popl %ebp
267 ret
268.size RC4,.-.L_RC4_begin
269.globl RC4_set_key
270.type RC4_set_key,@function
271.align 16
272RC4_set_key:
273.L_RC4_set_key_begin:
274.byte 243,15,30,251
275 pushl %ebp
276 pushl %ebx
277 pushl %esi
278 pushl %edi
279 movl 20(%esp),%edi
280 movl 24(%esp),%ebp
281 movl 28(%esp),%esi
282 call .L010PIC_me_up
283.L010PIC_me_up:
284 popl %edx
285 leal OPENSSL_ia32cap_P-.L010PIC_me_up(%edx),%edx
286 leal 8(%edi),%edi
287 leal (%esi,%ebp,1),%esi
288 negl %ebp
289 xorl %eax,%eax
290 movl %ebp,-4(%edi)
291 btl $20,(%edx)
292 jc .L011c1stloop
293.align 16
294.L012w1stloop:
295 movl %eax,(%edi,%eax,4)
296 addb $1,%al
297 jnc .L012w1stloop
298 xorl %ecx,%ecx
299 xorl %edx,%edx
300.align 16
301.L013w2ndloop:
302 movl (%edi,%ecx,4),%eax
303 addb (%esi,%ebp,1),%dl
304 addb %al,%dl
305 addl $1,%ebp
306 movl (%edi,%edx,4),%ebx
307 jnz .L014wnowrap
308 movl -4(%edi),%ebp
309.L014wnowrap:
310 movl %eax,(%edi,%edx,4)
311 movl %ebx,(%edi,%ecx,4)
312 addb $1,%cl
313 jnc .L013w2ndloop
314 jmp .L015exit
315.align 16
316.L011c1stloop:
317 movb %al,(%edi,%eax,1)
318 addb $1,%al
319 jnc .L011c1stloop
320 xorl %ecx,%ecx
321 xorl %edx,%edx
322 xorl %ebx,%ebx
323.align 16
324.L016c2ndloop:
325 movb (%edi,%ecx,1),%al
326 addb (%esi,%ebp,1),%dl
327 addb %al,%dl
328 addl $1,%ebp
329 movb (%edi,%edx,1),%bl
330 jnz .L017cnowrap
331 movl -4(%edi),%ebp
332.L017cnowrap:
333 movb %al,(%edi,%edx,1)
334 movb %bl,(%edi,%ecx,1)
335 addb $1,%cl
336 jnc .L016c2ndloop
337 movl $-1,256(%edi)
338.L015exit:
339 xorl %eax,%eax
340 movl %eax,-8(%edi)
341 movl %eax,-4(%edi)
342 popl %edi
343 popl %esi
344 popl %ebx
345 popl %ebp
346 ret
347.size RC4_set_key,.-.L_RC4_set_key_begin
348.globl RC4_options
349.type RC4_options,@function
350.align 16
351RC4_options:
352.L_RC4_options_begin:
353.byte 243,15,30,251
354 call .L018pic_point
355.L018pic_point:
356 popl %eax
357 leal .L019opts-.L018pic_point(%eax),%eax
358 call .L020PIC_me_up
359.L020PIC_me_up:
360 popl %edx
361 leal OPENSSL_ia32cap_P-.L020PIC_me_up(%edx),%edx
362 movl (%edx),%edx
363 btl $20,%edx
364 jc .L0211xchar
365 btl $26,%edx
366 jnc .L022ret
367 addl $25,%eax
368 ret
369.L0211xchar:
370 addl $12,%eax
371.L022ret:
372 ret
373.align 64
374.L019opts:
375.byte 114,99,52,40,52,120,44,105,110,116,41,0
376.byte 114,99,52,40,49,120,44,99,104,97,114,41,0
377.byte 114,99,52,40,56,120,44,109,109,120,41,0
378.byte 82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89
379.byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
380.byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
381.align 64
382.size RC4_options,.-.L_RC4_options_begin
383.comm OPENSSL_ia32cap_P,16,4
384
385 .section ".note.gnu.property", "a"
386 .p2align 2
387 .long 1f - 0f
388 .long 4f - 1f
389 .long 5
3900:
391 .asciz "GNU"
3921:
393 .p2align 2
394 .long 0xc0000002
395 .long 3f - 2f
3962:
397 .long 3
3983:
399 .p2align 2
4004:
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette