VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1j/crypto/genasm-elf/keccak1600-mmx.S@ 88461

Last change on this file since 88461 was 83531, checked in by vboxsync, 5 years ago

setting svn:sync-process=export for openssl-1.1.1f, all files except tests

File size: 8.4 KB
Line 
1.text
2.type _KeccakF1600,@function
3.align 16
4_KeccakF1600:
5 movq 60(%esi),%mm0
6 movq 68(%esi),%mm1
7 movq 76(%esi),%mm2
8 movq 84(%esi),%mm3
9 movq 92(%esi),%mm4
10 movl $24,%ecx
11 jmp .L000loop
12.align 16
13.L000loop:
14 pxor -100(%esi),%mm0
15 pxor -92(%esi),%mm1
16 pxor -84(%esi),%mm2
17 pxor -76(%esi),%mm3
18 pxor -68(%esi),%mm4
19 pxor -60(%esi),%mm0
20 pxor -52(%esi),%mm1
21 pxor -44(%esi),%mm2
22 pxor -36(%esi),%mm3
23 pxor -28(%esi),%mm4
24 pxor -20(%esi),%mm0
25 pxor -12(%esi),%mm1
26 pxor -4(%esi),%mm2
27 pxor 4(%esi),%mm3
28 pxor 12(%esi),%mm4
29 pxor 36(%esi),%mm2
30 pxor 20(%esi),%mm0
31 pxor 28(%esi),%mm1
32 pxor 44(%esi),%mm3
33 movq %mm2,%mm5
34 pxor 52(%esi),%mm4
35 movq %mm2,%mm7
36 psrlq $63,%mm5
37 movq %mm0,%mm6
38 psllq $1,%mm7
39 pxor %mm0,%mm5
40 psrlq $63,%mm0
41 pxor %mm7,%mm5
42 psllq $1,%mm6
43 movq %mm1,%mm7
44 movq %mm5,12(%esp)
45 pxor %mm0,%mm6
46 psrlq $63,%mm7
47 pxor %mm3,%mm6
48 movq %mm1,%mm0
49 movq %mm6,36(%esp)
50 psllq $1,%mm0
51 pxor %mm4,%mm7
52 pxor %mm7,%mm0
53 movq %mm3,%mm7
54 psrlq $63,%mm3
55 movq %mm0,4(%esp)
56 psllq $1,%mm7
57 movq %mm4,%mm5
58 psrlq $63,%mm4
59 pxor %mm3,%mm1
60 psllq $1,%mm5
61 pxor %mm7,%mm1
62 pxor %mm4,%mm2
63 movq %mm1,20(%esp)
64 pxor %mm5,%mm2
65 movq 44(%esi),%mm3
66 movq %mm2,28(%esp)
67 pxor %mm2,%mm3
68 movq 92(%esi),%mm4
69 movq %mm3,%mm7
70 psrlq $43,%mm3
71 pxor %mm6,%mm4
72 psllq $21,%mm7
73 movq %mm4,%mm6
74 psrlq $50,%mm4
75 por %mm7,%mm3
76 psllq $14,%mm6
77 movq -4(%esi),%mm2
78 por %mm6,%mm4
79 pxor %mm1,%mm2
80 movq -52(%esi),%mm1
81 movq %mm2,%mm6
82 psrlq $21,%mm2
83 pxor 12(%esp),%mm1
84 psllq $43,%mm6
85 movq %mm1,%mm7
86 psrlq $20,%mm1
87 por %mm6,%mm2
88 psllq $44,%mm7
89 pxor -100(%esi),%mm0
90 por %mm7,%mm1
91 movq %mm1,%mm5
92 movq %mm2,%mm6
93 pandn %mm2,%mm5
94 pandn %mm3,%mm2
95 pxor %mm0,%mm5
96 pxor %mm1,%mm2
97 pxor (%ebx),%mm5
98 leal 8(%ebx),%ebx
99 movq %mm3,%mm7
100 movq %mm5,-100(%edi)
101 movq %mm4,%mm5
102 pandn %mm4,%mm3
103 pandn %mm0,%mm4
104 pxor %mm6,%mm3
105 movq %mm2,-92(%edi)
106 pxor %mm7,%mm4
107 movq -76(%esi),%mm7
108 movq %mm3,-84(%edi)
109 pandn %mm1,%mm0
110 movq %mm4,-76(%edi)
111 pxor %mm5,%mm0
112 pxor 28(%esp),%mm7
113 movq %mm0,-68(%edi)
114 movq %mm7,%mm0
115 psrlq $36,%mm7
116 movq -28(%esi),%mm1
117 psllq $28,%mm0
118 pxor 36(%esp),%mm1
119 por %mm7,%mm0
120 movq %mm1,%mm6
121 psrlq $44,%mm1
122 movq -20(%esi),%mm2
123 psllq $20,%mm6
124 pxor 4(%esp),%mm2
125 por %mm6,%mm1
126 movq %mm2,%mm7
127 psrlq $61,%mm2
128 movq 28(%esi),%mm3
129 psllq $3,%mm7
130 pxor 12(%esp),%mm3
131 por %mm7,%mm2
132 movq %mm3,%mm5
133 psrlq $19,%mm3
134 movq 76(%esi),%mm4
135 psllq $45,%mm5
136 pxor 20(%esp),%mm4
137 por %mm5,%mm3
138 movq %mm4,%mm6
139 psrlq $3,%mm4
140 psllq $61,%mm6
141 por %mm6,%mm4
142 movq %mm1,%mm5
143 movq %mm2,%mm6
144 pandn %mm2,%mm5
145 pandn %mm3,%mm2
146 pxor %mm0,%mm5
147 pxor %mm1,%mm2
148 movq %mm3,%mm7
149 movq %mm5,-60(%edi)
150 movq %mm4,%mm5
151 pandn %mm4,%mm3
152 pandn %mm0,%mm4
153 pxor %mm6,%mm3
154 movq %mm2,-52(%edi)
155 pxor %mm7,%mm4
156 movq -92(%esi),%mm7
157 movq %mm3,-44(%edi)
158 pandn %mm1,%mm0
159 movq %mm4,-36(%edi)
160 pxor %mm5,%mm0
161 pxor 12(%esp),%mm7
162 movq %mm0,-28(%edi)
163 movq %mm7,%mm0
164 psrlq $63,%mm7
165 movq -44(%esi),%mm1
166 psllq $1,%mm0
167 pxor 20(%esp),%mm1
168 por %mm7,%mm0
169 movq %mm1,%mm6
170 psrlq $58,%mm1
171 movq 4(%esi),%mm2
172 psllq $6,%mm6
173 pxor 28(%esp),%mm2
174 por %mm6,%mm1
175 movq %mm2,%mm7
176 psrlq $39,%mm2
177 movq 52(%esi),%mm3
178 psllq $25,%mm7
179 pxor 36(%esp),%mm3
180 por %mm7,%mm2
181 movq %mm3,%mm5
182 psrlq $56,%mm3
183 movq 60(%esi),%mm4
184 psllq $8,%mm5
185 pxor 4(%esp),%mm4
186 por %mm5,%mm3
187 movq %mm4,%mm6
188 psrlq $46,%mm4
189 psllq $18,%mm6
190 por %mm6,%mm4
191 movq %mm1,%mm5
192 movq %mm2,%mm6
193 pandn %mm2,%mm5
194 pandn %mm3,%mm2
195 pxor %mm0,%mm5
196 pxor %mm1,%mm2
197 movq %mm3,%mm7
198 movq %mm5,-20(%edi)
199 movq %mm4,%mm5
200 pandn %mm4,%mm3
201 pandn %mm0,%mm4
202 pxor %mm6,%mm3
203 movq %mm2,-12(%edi)
204 pxor %mm7,%mm4
205 movq -68(%esi),%mm7
206 movq %mm3,-4(%edi)
207 pandn %mm1,%mm0
208 movq %mm4,4(%edi)
209 pxor %mm5,%mm0
210 pxor 36(%esp),%mm7
211 movq %mm0,12(%edi)
212 movq %mm7,%mm0
213 psrlq $37,%mm7
214 movq -60(%esi),%mm1
215 psllq $27,%mm0
216 pxor 4(%esp),%mm1
217 por %mm7,%mm0
218 movq %mm1,%mm6
219 psrlq $28,%mm1
220 movq -12(%esi),%mm2
221 psllq $36,%mm6
222 pxor 12(%esp),%mm2
223 por %mm6,%mm1
224 movq %mm2,%mm7
225 psrlq $54,%mm2
226 movq 36(%esi),%mm3
227 psllq $10,%mm7
228 pxor 20(%esp),%mm3
229 por %mm7,%mm2
230 movq %mm3,%mm5
231 psrlq $49,%mm3
232 movq 84(%esi),%mm4
233 psllq $15,%mm5
234 pxor 28(%esp),%mm4
235 por %mm5,%mm3
236 movq %mm4,%mm6
237 psrlq $8,%mm4
238 psllq $56,%mm6
239 por %mm6,%mm4
240 movq %mm1,%mm5
241 movq %mm2,%mm6
242 pandn %mm2,%mm5
243 pandn %mm3,%mm2
244 pxor %mm0,%mm5
245 pxor %mm1,%mm2
246 movq %mm3,%mm7
247 movq %mm5,20(%edi)
248 movq %mm4,%mm5
249 pandn %mm4,%mm3
250 pandn %mm0,%mm4
251 pxor %mm6,%mm3
252 movq %mm2,28(%edi)
253 pxor %mm7,%mm4
254 movq -84(%esi),%mm7
255 movq %mm3,36(%edi)
256 pandn %mm1,%mm0
257 movq %mm4,44(%edi)
258 pxor %mm5,%mm0
259 pxor 20(%esp),%mm7
260 movq %mm0,52(%edi)
261 movq %mm7,%mm0
262 psrlq $2,%mm7
263 movq -36(%esi),%mm1
264 psllq $62,%mm0
265 pxor 28(%esp),%mm1
266 por %mm7,%mm0
267 movq %mm1,%mm6
268 psrlq $9,%mm1
269 movq 12(%esi),%mm2
270 psllq $55,%mm6
271 pxor 36(%esp),%mm2
272 por %mm6,%mm1
273 movq %mm2,%mm7
274 psrlq $25,%mm2
275 movq 20(%esi),%mm3
276 psllq $39,%mm7
277 pxor 4(%esp),%mm3
278 por %mm7,%mm2
279 movq %mm3,%mm5
280 psrlq $23,%mm3
281 movq 68(%esi),%mm4
282 psllq $41,%mm5
283 pxor 12(%esp),%mm4
284 por %mm5,%mm3
285 movq %mm4,%mm6
286 psrlq $62,%mm4
287 psllq $2,%mm6
288 por %mm6,%mm4
289 movq %mm0,%mm5
290 xorl %esi,%edi
291 movq %mm1,12(%esp)
292 xorl %edi,%esi
293 xorl %esi,%edi
294 movq %mm1,%mm6
295 movq %mm2,%mm7
296 pandn %mm2,%mm6
297 pandn %mm3,%mm7
298 pxor %mm6,%mm0
299 pxor %mm7,%mm1
300 movq %mm3,%mm6
301 movq %mm0,60(%esi)
302 pandn %mm4,%mm6
303 movq %mm1,68(%esi)
304 pxor %mm6,%mm2
305 movq %mm4,%mm7
306 movq %mm2,76(%esi)
307 pandn %mm5,%mm7
308 pandn 12(%esp),%mm5
309 pxor %mm7,%mm3
310 pxor %mm5,%mm4
311 movq %mm3,84(%esi)
312 subl $1,%ecx
313 movq %mm4,92(%esi)
314 jnz .L000loop
315 leal -192(%ebx),%ebx
316 ret
317.size _KeccakF1600,.-_KeccakF1600
318.globl KeccakF1600
319.type KeccakF1600,@function
320.align 16
321KeccakF1600:
322.L_KeccakF1600_begin:
323 pushl %ebp
324 pushl %ebx
325 pushl %esi
326 pushl %edi
327 movl 20(%esp),%esi
328 movl %esp,%ebp
329 subl $240,%esp
330 call .L001pic_point
331.L001pic_point:
332 popl %ebx
333 leal .Liotas-.L001pic_point(%ebx),%ebx
334 andl $-8,%esp
335 leal 100(%esi),%esi
336 leal 140(%esp),%edi
337 call _KeccakF1600
338 movl %ebp,%esp
339 emms
340 popl %edi
341 popl %esi
342 popl %ebx
343 popl %ebp
344 ret
345.size KeccakF1600,.-.L_KeccakF1600_begin
346.globl SHA3_absorb
347.type SHA3_absorb,@function
348.align 16
349SHA3_absorb:
350.L_SHA3_absorb_begin:
351 pushl %ebp
352 pushl %ebx
353 pushl %esi
354 pushl %edi
355 movl 20(%esp),%esi
356 movl 24(%esp),%eax
357 movl 28(%esp),%ecx
358 movl 32(%esp),%edx
359 movl %esp,%ebp
360 subl $248,%esp
361 call .L002pic_point
362.L002pic_point:
363 popl %ebx
364 leal .Liotas-.L002pic_point(%ebx),%ebx
365 andl $-8,%esp
366 movl %esi,%edi
367 leal 100(%esi),%esi
368 movl %edx,-4(%ebp)
369 jmp .L003loop
370.align 16
371.L003loop:
372 cmpl %edx,%ecx
373 jc .L004absorbed
374 shrl $3,%edx
375.L005block:
376 movq (%eax),%mm0
377 leal 8(%eax),%eax
378 pxor (%edi),%mm0
379 leal 8(%edi),%edi
380 subl $8,%ecx
381 movq %mm0,-8(%edi)
382 decl %edx
383 jnz .L005block
384 leal 140(%esp),%edi
385 movl %ecx,-8(%ebp)
386 call _KeccakF1600
387 movl -8(%ebp),%ecx
388 movl -4(%ebp),%edx
389 leal -100(%esi),%edi
390 jmp .L003loop
391.align 16
392.L004absorbed:
393 movl %ecx,%eax
394 movl %ebp,%esp
395 emms
396 popl %edi
397 popl %esi
398 popl %ebx
399 popl %ebp
400 ret
401.size SHA3_absorb,.-.L_SHA3_absorb_begin
402.globl SHA3_squeeze
403.type SHA3_squeeze,@function
404.align 16
405SHA3_squeeze:
406.L_SHA3_squeeze_begin:
407 pushl %ebp
408 pushl %ebx
409 pushl %esi
410 pushl %edi
411 movl 20(%esp),%esi
412 movl 24(%esp),%eax
413 movl 28(%esp),%ecx
414 movl 32(%esp),%edx
415 movl %esp,%ebp
416 subl $248,%esp
417 call .L006pic_point
418.L006pic_point:
419 popl %ebx
420 leal .Liotas-.L006pic_point(%ebx),%ebx
421 andl $-8,%esp
422 shrl $3,%edx
423 movl %esi,%edi
424 leal 100(%esi),%esi
425 movl %edx,-4(%ebp)
426 jmp .L007loop
427.align 16
428.L007loop:
429 cmpl $8,%ecx
430 jc .L008tail
431 movq (%edi),%mm0
432 leal 8(%edi),%edi
433 movq %mm0,(%eax)
434 leal 8(%eax),%eax
435 subl $8,%ecx
436 jz .L009done
437 decl %edx
438 jnz .L007loop
439 leal 140(%esp),%edi
440 movl %ecx,-8(%ebp)
441 call _KeccakF1600
442 movl -8(%ebp),%ecx
443 movl -4(%ebp),%edx
444 leal -100(%esi),%edi
445 jmp .L007loop
446.align 16
447.L008tail:
448 movl %edi,%esi
449 movl %eax,%edi
450.long 0xA4F39066
451.L009done:
452 movl %ebp,%esp
453 emms
454 popl %edi
455 popl %esi
456 popl %ebx
457 popl %ebp
458 ret
459.size SHA3_squeeze,.-.L_SHA3_squeeze_begin
460.align 32
461.Liotas:
462.long 1,0
463.long 32898,0
464.long 32906,2147483648
465.long 2147516416,2147483648
466.long 32907,0
467.long 2147483649,0
468.long 2147516545,2147483648
469.long 32777,2147483648
470.long 138,0
471.long 136,0
472.long 2147516425,0
473.long 2147483658,0
474.long 2147516555,0
475.long 139,2147483648
476.long 32905,2147483648
477.long 32771,2147483648
478.long 32770,2147483648
479.long 128,2147483648
480.long 32778,0
481.long 2147483658,2147483648
482.long 2147516545,2147483648
483.long 32896,2147483648
484.long 2147483649,0
485.long 2147516424,2147483648
486.byte 75,101,99,99,97,107,45,49,54,48,48,32,97,98,115,111
487.byte 114,98,32,97,110,100,32,115,113,117,101,101,122,101,32,102
488.byte 111,114,32,77,77,88,44,32,67,82,89,80,84,79,71,65
489.byte 77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101
490.byte 110,115,115,108,46,111,114,103,62,0
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