Debian Codegraph @

win-x86_64/crypto/fipsmodule/ghash-x86_64-win.asm

raw
1 ; This file is generated from a similarly-named Perl script in the BoringSSL
2 ; source tree. Do not edit by hand.
3
4 %ifidn __OUTPUT_FORMAT__, win64
5 default rel
6 %define XMMWORD
7 %define YMMWORD
8 %define ZMMWORD
9
10 %ifdef BORINGSSL_PREFIX
11 %include "boringssl_prefix_symbols_nasm.inc"
12 %endif
13 section .text code align=64
14
15 EXTERN OPENSSL_ia32cap_P
16 global gcm_init_clmul
17
18 ALIGN 16
19 gcm_init_clmul:
20
21 $L$SEH_begin_gcm_init_clmul_1:
22 $L$_init_clmul:
23 sub rsp,0x18
24 $L$SEH_prolog_gcm_init_clmul_2:
25 movaps XMMWORD[rsp],xmm6
26 $L$SEH_prolog_gcm_init_clmul_3:
27 movdqu xmm2,XMMWORD[rdx]
28 pshufd xmm2,xmm2,78
29
30
31 pshufd xmm4,xmm2,255
32 movdqa xmm3,xmm2
33 psllq xmm2,1
34 pxor xmm5,xmm5
35 psrlq xmm3,63
36 pcmpgtd xmm5,xmm4
37 pslldq xmm3,8
38 por xmm2,xmm3
39
40
41 pand xmm5,XMMWORD[$L$0x1c2_polynomial]
42 pxor xmm2,xmm5
43
44
45 pshufd xmm6,xmm2,78
46 movdqa xmm0,xmm2
47 pxor xmm6,xmm2
48 movdqa xmm1,xmm0
49 pshufd xmm3,xmm0,78
50 pxor xmm3,xmm0
51 DB 102,15,58,68,194,0
52 DB 102,15,58,68,202,17
53 DB 102,15,58,68,222,0
54 pxor xmm3,xmm0
55 pxor xmm3,xmm1
56
57 movdqa xmm4,xmm3
58 psrldq xmm3,8
59 pslldq xmm4,8
60 pxor xmm1,xmm3
61 pxor xmm0,xmm4
62
63 movdqa xmm4,xmm0
64 movdqa xmm3,xmm0
65 psllq xmm0,5
66 pxor xmm3,xmm0
67 psllq xmm0,1
68 pxor xmm0,xmm3
69 psllq xmm0,57
70 movdqa xmm3,xmm0
71 pslldq xmm0,8
72 psrldq xmm3,8
73 pxor xmm0,xmm4
74 pxor xmm1,xmm3
75
76
77 movdqa xmm4,xmm0
78 psrlq xmm0,1
79 pxor xmm1,xmm4
80 pxor xmm4,xmm0
81 psrlq xmm0,5
82 pxor xmm0,xmm4
83 psrlq xmm0,1
84 pxor xmm0,xmm1
85 pshufd xmm3,xmm2,78
86 pshufd xmm4,xmm0,78
87 pxor xmm3,xmm2
88 movdqu XMMWORD[rcx],xmm2
89 pxor xmm4,xmm0
90 movdqu XMMWORD[16+rcx],xmm0
91 DB 102,15,58,15,227,8
92 movdqu XMMWORD[32+rcx],xmm4
93 movdqa xmm1,xmm0
94 pshufd xmm3,xmm0,78
95 pxor xmm3,xmm0
96 DB 102,15,58,68,194,0
97 DB 102,15,58,68,202,17
98 DB 102,15,58,68,222,0
99 pxor xmm3,xmm0
100 pxor xmm3,xmm1
101
102 movdqa xmm4,xmm3
103 psrldq xmm3,8
104 pslldq xmm4,8
105 pxor xmm1,xmm3
106 pxor xmm0,xmm4
107
108 movdqa xmm4,xmm0
109 movdqa xmm3,xmm0
110 psllq xmm0,5
111 pxor xmm3,xmm0
112 psllq xmm0,1
113 pxor xmm0,xmm3
114 psllq xmm0,57
115 movdqa xmm3,xmm0
116 pslldq xmm0,8
117 psrldq xmm3,8
118 pxor xmm0,xmm4
119 pxor xmm1,xmm3
120
121
122 movdqa xmm4,xmm0
123 psrlq xmm0,1
124 pxor xmm1,xmm4
125 pxor xmm4,xmm0
126 psrlq xmm0,5
127 pxor xmm0,xmm4
128 psrlq xmm0,1
129 pxor xmm0,xmm1
130 movdqa xmm5,xmm0
131 movdqa xmm1,xmm0
132 pshufd xmm3,xmm0,78
133 pxor xmm3,xmm0
134 DB 102,15,58,68,194,0
135 DB 102,15,58,68,202,17
136 DB 102,15,58,68,222,0
137 pxor xmm3,xmm0
138 pxor xmm3,xmm1
139
140 movdqa xmm4,xmm3
141 psrldq xmm3,8
142 pslldq xmm4,8
143 pxor xmm1,xmm3
144 pxor xmm0,xmm4
145
146 movdqa xmm4,xmm0
147 movdqa xmm3,xmm0
148 psllq xmm0,5
149 pxor xmm3,xmm0
150 psllq xmm0,1
151 pxor xmm0,xmm3
152 psllq xmm0,57
153 movdqa xmm3,xmm0
154 pslldq xmm0,8
155 psrldq xmm3,8
156 pxor xmm0,xmm4
157 pxor xmm1,xmm3
158
159
160 movdqa xmm4,xmm0
161 psrlq xmm0,1
162 pxor xmm1,xmm4
163 pxor xmm4,xmm0
164 psrlq xmm0,5
165 pxor xmm0,xmm4
166 psrlq xmm0,1
167 pxor xmm0,xmm1
168 pshufd xmm3,xmm5,78
169 pshufd xmm4,xmm0,78
170 pxor xmm3,xmm5
171 movdqu XMMWORD[48+rcx],xmm5
172 pxor xmm4,xmm0
173 movdqu XMMWORD[64+rcx],xmm0
174 DB 102,15,58,15,227,8
175 movdqu XMMWORD[80+rcx],xmm4
176 movaps xmm6,XMMWORD[rsp]
177 lea rsp,[24+rsp]
178 DB 0F3h,0C3h ;repret
179
180 $L$SEH_end_gcm_init_clmul_4:
181
182 global gcm_gmult_clmul
183
184 ALIGN 16
185 gcm_gmult_clmul:
186
187 $L$_gmult_clmul:
188 movdqu xmm0,XMMWORD[rcx]
189 movdqa xmm5,XMMWORD[$L$bswap_mask]
190 movdqu xmm2,XMMWORD[rdx]
191 movdqu xmm4,XMMWORD[32+rdx]
192 DB 102,15,56,0,197
193 movdqa xmm1,xmm0
194 pshufd xmm3,xmm0,78
195 pxor xmm3,xmm0
196 DB 102,15,58,68,194,0
197 DB 102,15,58,68,202,17
198 DB 102,15,58,68,220,0
199 pxor xmm3,xmm0
200 pxor xmm3,xmm1
201
202 movdqa xmm4,xmm3
203 psrldq xmm3,8
204 pslldq xmm4,8
205 pxor xmm1,xmm3
206 pxor xmm0,xmm4
207
208 movdqa xmm4,xmm0
209 movdqa xmm3,xmm0
210 psllq xmm0,5
211 pxor xmm3,xmm0
212 psllq xmm0,1
213 pxor xmm0,xmm3
214 psllq xmm0,57
215 movdqa xmm3,xmm0
216 pslldq xmm0,8
217 psrldq xmm3,8
218 pxor xmm0,xmm4
219 pxor xmm1,xmm3
220
221
222 movdqa xmm4,xmm0
223 psrlq xmm0,1
224 pxor xmm1,xmm4
225 pxor xmm4,xmm0
226 psrlq xmm0,5
227 pxor xmm0,xmm4
228 psrlq xmm0,1
229 pxor xmm0,xmm1
230 DB 102,15,56,0,197
231 movdqu XMMWORD[rcx],xmm0
232 DB 0F3h,0C3h ;repret
233
234
235 global gcm_ghash_clmul
236
237 ALIGN 32
238 gcm_ghash_clmul:
239
240 $L$SEH_begin_gcm_ghash_clmul_1:
241 $L$_ghash_clmul:
242 lea rax,[((-136))+rsp]
243 lea rsp,[((-32))+rax]
244 $L$SEH_prolog_gcm_ghash_clmul_2:
245 movaps XMMWORD[(-32)+rax],xmm6
246 $L$SEH_prolog_gcm_ghash_clmul_3:
247 movaps XMMWORD[(-16)+rax],xmm7
248 $L$SEH_prolog_gcm_ghash_clmul_4:
249 movaps XMMWORD[rax],xmm8
250 $L$SEH_prolog_gcm_ghash_clmul_5:
251 movaps XMMWORD[16+rax],xmm9
252 $L$SEH_prolog_gcm_ghash_clmul_6:
253 movaps XMMWORD[32+rax],xmm10
254 $L$SEH_prolog_gcm_ghash_clmul_7:
255 movaps XMMWORD[48+rax],xmm11
256 $L$SEH_prolog_gcm_ghash_clmul_8:
257 movaps XMMWORD[64+rax],xmm12
258 $L$SEH_prolog_gcm_ghash_clmul_9:
259 movaps XMMWORD[80+rax],xmm13
260 $L$SEH_prolog_gcm_ghash_clmul_10:
261 movaps XMMWORD[96+rax],xmm14
262 $L$SEH_prolog_gcm_ghash_clmul_11:
263 movaps XMMWORD[112+rax],xmm15
264 $L$SEH_prolog_gcm_ghash_clmul_12:
265 movdqa xmm10,XMMWORD[$L$bswap_mask]
266
267 movdqu xmm0,XMMWORD[rcx]
268 movdqu xmm2,XMMWORD[rdx]
269 movdqu xmm7,XMMWORD[32+rdx]
270 DB 102,65,15,56,0,194
271
272 sub r9,0x10
273 jz NEAR $L$odd_tail
274
275 movdqu xmm6,XMMWORD[16+rdx]
276 lea rax,[OPENSSL_ia32cap_P]
277 mov eax,DWORD[4+rax]
278 cmp r9,0x30
279 jb NEAR $L$skip4x
280
281 and eax,71303168
282 cmp eax,4194304
283 je NEAR $L$skip4x
284
285 sub r9,0x30
286 mov rax,0xA040608020C0E000
287 movdqu xmm14,XMMWORD[48+rdx]
288 movdqu xmm15,XMMWORD[64+rdx]
289
290
291
292
293 movdqu xmm3,XMMWORD[48+r8]
294 movdqu xmm11,XMMWORD[32+r8]
295 DB 102,65,15,56,0,218
296 DB 102,69,15,56,0,218
297 movdqa xmm5,xmm3
298 pshufd xmm4,xmm3,78
299 pxor xmm4,xmm3
300 DB 102,15,58,68,218,0
301 DB 102,15,58,68,234,17
302 DB 102,15,58,68,231,0
303
304 movdqa xmm13,xmm11
305 pshufd xmm12,xmm11,78
306 pxor xmm12,xmm11
307 DB 102,68,15,58,68,222,0
308 DB 102,68,15,58,68,238,17
309 DB 102,68,15,58,68,231,16
310 xorps xmm3,xmm11
311 xorps xmm5,xmm13
312 movups xmm7,XMMWORD[80+rdx]
313 xorps xmm4,xmm12
314
315 movdqu xmm11,XMMWORD[16+r8]
316 movdqu xmm8,XMMWORD[r8]
317 DB 102,69,15,56,0,218
318 DB 102,69,15,56,0,194
319 movdqa xmm13,xmm11
320 pshufd xmm12,xmm11,78
321 pxor xmm0,xmm8
322 pxor xmm12,xmm11
323 DB 102,69,15,58,68,222,0
324 movdqa xmm1,xmm0
325 pshufd xmm8,xmm0,78
326 pxor xmm8,xmm0
327 DB 102,69,15,58,68,238,17
328 DB 102,68,15,58,68,231,0
329 xorps xmm3,xmm11
330 xorps xmm5,xmm13
331
332 lea r8,[64+r8]
333 sub r9,0x40
334 jc NEAR $L$tail4x
335
336 jmp NEAR $L$mod4_loop
337 ALIGN 32
338 $L$mod4_loop:
339 DB 102,65,15,58,68,199,0
340 xorps xmm4,xmm12
341 movdqu xmm11,XMMWORD[48+r8]
342 DB 102,69,15,56,0,218
343 DB 102,65,15,58,68,207,17
344 xorps xmm0,xmm3
345 movdqu xmm3,XMMWORD[32+r8]
346 movdqa xmm13,xmm11
347 DB 102,68,15,58,68,199,16
348 pshufd xmm12,xmm11,78
349 xorps xmm1,xmm5
350 pxor xmm12,xmm11
351 DB 102,65,15,56,0,218
352 movups xmm7,XMMWORD[32+rdx]
353 xorps xmm8,xmm4
354 DB 102,68,15,58,68,218,0
355 pshufd xmm4,xmm3,78
356
357 pxor xmm8,xmm0
358 movdqa xmm5,xmm3
359 pxor xmm8,xmm1
360 pxor xmm4,xmm3
361 movdqa xmm9,xmm8
362 DB 102,68,15,58,68,234,17
363 pslldq xmm8,8
364 psrldq xmm9,8
365 pxor xmm0,xmm8
366 movdqa xmm8,XMMWORD[$L$7_mask]
367 pxor xmm1,xmm9
368 DB 102,76,15,110,200
369
370 pand xmm8,xmm0
371 DB 102,69,15,56,0,200
372 pxor xmm9,xmm0
373 DB 102,68,15,58,68,231,0
374 psllq xmm9,57
375 movdqa xmm8,xmm9
376 pslldq xmm9,8
377 DB 102,15,58,68,222,0
378 psrldq xmm8,8
379 pxor xmm0,xmm9
380 pxor xmm1,xmm8
381 movdqu xmm8,XMMWORD[r8]
382
383 movdqa xmm9,xmm0
384 psrlq xmm0,1
385 DB 102,15,58,68,238,17
386 xorps xmm3,xmm11
387 movdqu xmm11,XMMWORD[16+r8]
388 DB 102,69,15,56,0,218
389 DB 102,15,58,68,231,16
390 xorps xmm5,xmm13
391 movups xmm7,XMMWORD[80+rdx]
392 DB 102,69,15,56,0,194
393 pxor xmm1,xmm9
394 pxor xmm9,xmm0
395 psrlq xmm0,5
396
397 movdqa xmm13,xmm11
398 pxor xmm4,xmm12
399 pshufd xmm12,xmm11,78
400 pxor xmm0,xmm9
401 pxor xmm1,xmm8
402 pxor xmm12,xmm11
403 DB 102,69,15,58,68,222,0
404 psrlq xmm0,1
405 pxor xmm0,xmm1
406 movdqa xmm1,xmm0
407 DB 102,69,15,58,68,238,17
408 xorps xmm3,xmm11
409 pshufd xmm8,xmm0,78
410 pxor xmm8,xmm0
411
412 DB 102,68,15,58,68,231,0
413 xorps xmm5,xmm13
414
415 lea r8,[64+r8]
416 sub r9,0x40
417 jnc NEAR $L$mod4_loop
418
419 $L$tail4x:
420 DB 102,65,15,58,68,199,0
421 DB 102,65,15,58,68,207,17
422 DB 102,68,15,58,68,199,16
423 xorps xmm4,xmm12
424 xorps xmm0,xmm3
425 xorps xmm1,xmm5
426 pxor xmm1,xmm0
427 pxor xmm8,xmm4
428
429 pxor xmm8,xmm1
430 pxor xmm1,xmm0
431
432 movdqa xmm9,xmm8
433 psrldq xmm8,8
434 pslldq xmm9,8
435 pxor xmm1,xmm8
436 pxor xmm0,xmm9
437
438 movdqa xmm4,xmm0
439 movdqa xmm3,xmm0
440 psllq xmm0,5
441 pxor xmm3,xmm0
442 psllq xmm0,1
443 pxor xmm0,xmm3
444 psllq xmm0,57
445 movdqa xmm3,xmm0
446 pslldq xmm0,8
447 psrldq xmm3,8
448 pxor xmm0,xmm4
449 pxor xmm1,xmm3
450
451
452 movdqa xmm4,xmm0
453 psrlq xmm0,1
454 pxor xmm1,xmm4
455 pxor xmm4,xmm0
456 psrlq xmm0,5
457 pxor xmm0,xmm4
458 psrlq xmm0,1
459 pxor xmm0,xmm1
460 add r9,0x40
461 jz NEAR $L$done
462 movdqu xmm7,XMMWORD[32+rdx]
463 sub r9,0x10
464 jz NEAR $L$odd_tail
465 $L$skip4x:
466
467
468
469
470
471 movdqu xmm8,XMMWORD[r8]
472 movdqu xmm3,XMMWORD[16+r8]
473 DB 102,69,15,56,0,194
474 DB 102,65,15,56,0,218
475 pxor xmm0,xmm8
476
477 movdqa xmm5,xmm3
478 pshufd xmm4,xmm3,78
479 pxor xmm4,xmm3
480 DB 102,15,58,68,218,0
481 DB 102,15,58,68,234,17
482 DB 102,15,58,68,231,0
483
484 lea r8,[32+r8]
485 nop
486 sub r9,0x20
487 jbe NEAR $L$even_tail
488 nop
489 jmp NEAR $L$mod_loop
490
491 ALIGN 32
492 $L$mod_loop:
493 movdqa xmm1,xmm0
494 movdqa xmm8,xmm4
495 pshufd xmm4,xmm0,78
496 pxor xmm4,xmm0
497
498 DB 102,15,58,68,198,0
499 DB 102,15,58,68,206,17
500 DB 102,15,58,68,231,16
501
502 pxor xmm0,xmm3
503 pxor xmm1,xmm5
504 movdqu xmm9,XMMWORD[r8]
505 pxor xmm8,xmm0
506 DB 102,69,15,56,0,202
507 movdqu xmm3,XMMWORD[16+r8]
508
509 pxor xmm8,xmm1
510 pxor xmm1,xmm9
511 pxor xmm4,xmm8
512 DB 102,65,15,56,0,218
513 movdqa xmm8,xmm4
514 psrldq xmm8,8
515 pslldq xmm4,8
516 pxor xmm1,xmm8
517 pxor xmm0,xmm4
518
519 movdqa xmm5,xmm3
520
521 movdqa xmm9,xmm0
522 movdqa xmm8,xmm0
523 psllq xmm0,5
524 pxor xmm8,xmm0
525 DB 102,15,58,68,218,0
526 psllq xmm0,1
527 pxor xmm0,xmm8
528 psllq xmm0,57
529 movdqa xmm8,xmm0
530 pslldq xmm0,8
531 psrldq xmm8,8
532 pxor xmm0,xmm9
533 pshufd xmm4,xmm5,78
534 pxor xmm1,xmm8
535 pxor xmm4,xmm5
536
537 movdqa xmm9,xmm0
538 psrlq xmm0,1
539 DB 102,15,58,68,234,17
540 pxor xmm1,xmm9
541 pxor xmm9,xmm0
542 psrlq xmm0,5
543 pxor xmm0,xmm9
544 lea r8,[32+r8]
545 psrlq xmm0,1
546 DB 102,15,58,68,231,0
547 pxor xmm0,xmm1
548
549 sub r9,0x20
550 ja NEAR $L$mod_loop
551
552 $L$even_tail:
553 movdqa xmm1,xmm0
554 movdqa xmm8,xmm4
555 pshufd xmm4,xmm0,78
556 pxor xmm4,xmm0
557
558 DB 102,15,58,68,198,0
559 DB 102,15,58,68,206,17
560 DB 102,15,58,68,231,16
561
562 pxor xmm0,xmm3
563 pxor xmm1,xmm5
564 pxor xmm8,xmm0
565 pxor xmm8,xmm1
566 pxor xmm4,xmm8
567 movdqa xmm8,xmm4
568 psrldq xmm8,8
569 pslldq xmm4,8
570 pxor xmm1,xmm8
571 pxor xmm0,xmm4
572
573 movdqa xmm4,xmm0
574 movdqa xmm3,xmm0
575 psllq xmm0,5
576 pxor xmm3,xmm0
577 psllq xmm0,1
578 pxor xmm0,xmm3
579 psllq xmm0,57
580 movdqa xmm3,xmm0
581 pslldq xmm0,8
582 psrldq xmm3,8
583 pxor xmm0,xmm4
584 pxor xmm1,xmm3
585
586
587 movdqa xmm4,xmm0
588 psrlq xmm0,1
589 pxor xmm1,xmm4
590 pxor xmm4,xmm0
591 psrlq xmm0,5
592 pxor xmm0,xmm4
593 psrlq xmm0,1
594 pxor xmm0,xmm1
595 test r9,r9
596 jnz NEAR $L$done
597
598 $L$odd_tail:
599 movdqu xmm8,XMMWORD[r8]
600 DB 102,69,15,56,0,194
601 pxor xmm0,xmm8
602 movdqa xmm1,xmm0
603 pshufd xmm3,xmm0,78
604 pxor xmm3,xmm0
605 DB 102,15,58,68,194,0
606 DB 102,15,58,68,202,17
607 DB 102,15,58,68,223,0
608 pxor xmm3,xmm0
609 pxor xmm3,xmm1
610
611 movdqa xmm4,xmm3
612 psrldq xmm3,8
613 pslldq xmm4,8
614 pxor xmm1,xmm3
615 pxor xmm0,xmm4
616
617 movdqa xmm4,xmm0
618 movdqa xmm3,xmm0
619 psllq xmm0,5
620 pxor xmm3,xmm0
621 psllq xmm0,1
622 pxor xmm0,xmm3
623 psllq xmm0,57
624 movdqa xmm3,xmm0
625 pslldq xmm0,8
626 psrldq xmm3,8
627 pxor xmm0,xmm4
628 pxor xmm1,xmm3
629
630
631 movdqa xmm4,xmm0
632 psrlq xmm0,1
633 pxor xmm1,xmm4
634 pxor xmm4,xmm0
635 psrlq xmm0,5
636 pxor xmm0,xmm4
637 psrlq xmm0,1
638 pxor xmm0,xmm1
639 $L$done:
640 DB 102,65,15,56,0,194
641 movdqu XMMWORD[rcx],xmm0
642 movaps xmm6,XMMWORD[rsp]
643 movaps xmm7,XMMWORD[16+rsp]
644 movaps xmm8,XMMWORD[32+rsp]
645 movaps xmm9,XMMWORD[48+rsp]
646 movaps xmm10,XMMWORD[64+rsp]
647 movaps xmm11,XMMWORD[80+rsp]
648 movaps xmm12,XMMWORD[96+rsp]
649 movaps xmm13,XMMWORD[112+rsp]
650 movaps xmm14,XMMWORD[128+rsp]
651 movaps xmm15,XMMWORD[144+rsp]
652 lea rsp,[168+rsp]
653 DB 0F3h,0C3h ;repret
654
655 $L$SEH_end_gcm_ghash_clmul_13:
656
657 global gcm_init_avx
658
659 ALIGN 32
660 gcm_init_avx:
661
662 $L$SEH_begin_gcm_init_avx_1:
663 sub rsp,0x18
664 $L$SEH_prolog_gcm_init_avx_2:
665 movaps XMMWORD[rsp],xmm6
666 $L$SEH_prolog_gcm_init_avx_3:
667 vzeroupper
668
669 vmovdqu xmm2,XMMWORD[rdx]
670 vpshufd xmm2,xmm2,78
671
672
673 vpshufd xmm4,xmm2,255
674 vpsrlq xmm3,xmm2,63
675 vpsllq xmm2,xmm2,1
676 vpxor xmm5,xmm5,xmm5
677 vpcmpgtd xmm5,xmm5,xmm4
678 vpslldq xmm3,xmm3,8
679 vpor xmm2,xmm2,xmm3
680
681
682 vpand xmm5,xmm5,XMMWORD[$L$0x1c2_polynomial]
683 vpxor xmm2,xmm2,xmm5
684
685 vpunpckhqdq xmm6,xmm2,xmm2
686 vmovdqa xmm0,xmm2
687 vpxor xmm6,xmm6,xmm2
688 mov r10,4
689 jmp NEAR $L$init_start_avx
690 ALIGN 32
691 $L$init_loop_avx:
692 vpalignr xmm5,xmm4,xmm3,8
693 vmovdqu XMMWORD[(-16)+rcx],xmm5
694 vpunpckhqdq xmm3,xmm0,xmm0
695 vpxor xmm3,xmm3,xmm0
696 vpclmulqdq xmm1,xmm0,xmm2,0x11
697 vpclmulqdq xmm0,xmm0,xmm2,0x00
698 vpclmulqdq xmm3,xmm3,xmm6,0x00
699 vpxor xmm4,xmm1,xmm0
700 vpxor xmm3,xmm3,xmm4
701
702 vpslldq xmm4,xmm3,8
703 vpsrldq xmm3,xmm3,8
704 vpxor xmm0,xmm0,xmm4
705 vpxor xmm1,xmm1,xmm3
706 vpsllq xmm3,xmm0,57
707 vpsllq xmm4,xmm0,62
708 vpxor xmm4,xmm4,xmm3
709 vpsllq xmm3,xmm0,63
710 vpxor xmm4,xmm4,xmm3
711 vpslldq xmm3,xmm4,8
712 vpsrldq xmm4,xmm4,8
713 vpxor xmm0,xmm0,xmm3
714 vpxor xmm1,xmm1,xmm4
715
716 vpsrlq xmm4,xmm0,1
717 vpxor xmm1,xmm1,xmm0
718 vpxor xmm0,xmm0,xmm4
719 vpsrlq xmm4,xmm4,5
720 vpxor xmm0,xmm0,xmm4
721 vpsrlq xmm0,xmm0,1
722 vpxor xmm0,xmm0,xmm1
723 $L$init_start_avx:
724 vmovdqa xmm5,xmm0
725 vpunpckhqdq xmm3,xmm0,xmm0
726 vpxor xmm3,xmm3,xmm0
727 vpclmulqdq xmm1,xmm0,xmm2,0x11
728 vpclmulqdq xmm0,xmm0,xmm2,0x00
729 vpclmulqdq xmm3,xmm3,xmm6,0x00
730 vpxor xmm4,xmm1,xmm0
731 vpxor xmm3,xmm3,xmm4
732
733 vpslldq xmm4,xmm3,8
734 vpsrldq xmm3,xmm3,8
735 vpxor xmm0,xmm0,xmm4
736 vpxor xmm1,xmm1,xmm3
737 vpsllq xmm3,xmm0,57
738 vpsllq xmm4,xmm0,62
739 vpxor xmm4,xmm4,xmm3
740 vpsllq xmm3,xmm0,63
741 vpxor xmm4,xmm4,xmm3
742 vpslldq xmm3,xmm4,8
743 vpsrldq xmm4,xmm4,8
744 vpxor xmm0,xmm0,xmm3
745 vpxor xmm1,xmm1,xmm4
746
747 vpsrlq xmm4,xmm0,1
748 vpxor xmm1,xmm1,xmm0
749 vpxor xmm0,xmm0,xmm4
750 vpsrlq xmm4,xmm4,5
751 vpxor xmm0,xmm0,xmm4
752 vpsrlq xmm0,xmm0,1
753 vpxor xmm0,xmm0,xmm1
754 vpshufd xmm3,xmm5,78
755 vpshufd xmm4,xmm0,78
756 vpxor xmm3,xmm3,xmm5
757 vmovdqu XMMWORD[rcx],xmm5
758 vpxor xmm4,xmm4,xmm0
759 vmovdqu XMMWORD[16+rcx],xmm0
760 lea rcx,[48+rcx]
761 sub r10,1
762 jnz NEAR $L$init_loop_avx
763
764 vpalignr xmm5,xmm3,xmm4,8
765 vmovdqu XMMWORD[(-16)+rcx],xmm5
766
767 vzeroupper
768 movaps xmm6,XMMWORD[rsp]
769 lea rsp,[24+rsp]
770 DB 0F3h,0C3h ;repret
771 $L$SEH_end_gcm_init_avx_4:
772
773
774 global gcm_gmult_avx
775
776 ALIGN 32
777 gcm_gmult_avx:
778
779 jmp NEAR $L$_gmult_clmul
780
781
782 global gcm_ghash_avx
783
784 ALIGN 32
785 gcm_ghash_avx:
786
787 $L$SEH_begin_gcm_ghash_avx_1:
788 lea rax,[((-136))+rsp]
789 lea rsp,[((-32))+rax]
790 $L$SEH_prolog_gcm_ghash_avx_2:
791 movaps XMMWORD[(-32)+rax],xmm6
792 $L$SEH_prolog_gcm_ghash_avx_3:
793 movaps XMMWORD[(-16)+rax],xmm7
794 $L$SEH_prolog_gcm_ghash_avx_4:
795 movaps XMMWORD[rax],xmm8
796 $L$SEH_prolog_gcm_ghash_avx_5:
797 movaps XMMWORD[16+rax],xmm9
798 $L$SEH_prolog_gcm_ghash_avx_6:
799 movaps XMMWORD[32+rax],xmm10
800 $L$SEH_prolog_gcm_ghash_avx_7:
801 movaps XMMWORD[48+rax],xmm11
802 $L$SEH_prolog_gcm_ghash_avx_8:
803 movaps XMMWORD[64+rax],xmm12
804 $L$SEH_prolog_gcm_ghash_avx_9:
805 movaps XMMWORD[80+rax],xmm13
806 $L$SEH_prolog_gcm_ghash_avx_10:
807 movaps XMMWORD[96+rax],xmm14
808 $L$SEH_prolog_gcm_ghash_avx_11:
809 movaps XMMWORD[112+rax],xmm15
810 $L$SEH_prolog_gcm_ghash_avx_12:
811 vzeroupper
812
813 vmovdqu xmm10,XMMWORD[rcx]
814 lea r10,[$L$0x1c2_polynomial]
815 lea rdx,[64+rdx]
816 vmovdqu xmm13,XMMWORD[$L$bswap_mask]
817 vpshufb xmm10,xmm10,xmm13
818 cmp r9,0x80
819 jb NEAR $L$short_avx
820 sub r9,0x80
821
822 vmovdqu xmm14,XMMWORD[112+r8]
823 vmovdqu xmm6,XMMWORD[((0-64))+rdx]
824 vpshufb xmm14,xmm14,xmm13
825 vmovdqu xmm7,XMMWORD[((32-64))+rdx]
826
827 vpunpckhqdq xmm9,xmm14,xmm14
828 vmovdqu xmm15,XMMWORD[96+r8]
829 vpclmulqdq xmm0,xmm14,xmm6,0x00
830 vpxor xmm9,xmm9,xmm14
831 vpshufb xmm15,xmm15,xmm13
832 vpclmulqdq xmm1,xmm14,xmm6,0x11
833 vmovdqu xmm6,XMMWORD[((16-64))+rdx]
834 vpunpckhqdq xmm8,xmm15,xmm15
835 vmovdqu xmm14,XMMWORD[80+r8]
836 vpclmulqdq xmm2,xmm9,xmm7,0x00
837 vpxor xmm8,xmm8,xmm15
838
839 vpshufb xmm14,xmm14,xmm13
840 vpclmulqdq xmm3,xmm15,xmm6,0x00
841 vpunpckhqdq xmm9,xmm14,xmm14
842 vpclmulqdq xmm4,xmm15,xmm6,0x11
843 vmovdqu xmm6,XMMWORD[((48-64))+rdx]
844 vpxor xmm9,xmm9,xmm14
845 vmovdqu xmm15,XMMWORD[64+r8]
846 vpclmulqdq xmm5,xmm8,xmm7,0x10
847 vmovdqu xmm7,XMMWORD[((80-64))+rdx]
848
849 vpshufb xmm15,xmm15,xmm13
850 vpxor xmm3,xmm3,xmm0
851 vpclmulqdq xmm0,xmm14,xmm6,0x00
852 vpxor xmm4,xmm4,xmm1
853 vpunpckhqdq xmm8,xmm15,xmm15
854 vpclmulqdq xmm1,xmm14,xmm6,0x11
855 vmovdqu xmm6,XMMWORD[((64-64))+rdx]
856 vpxor xmm5,xmm5,xmm2
857 vpclmulqdq xmm2,xmm9,xmm7,0x00
858 vpxor xmm8,xmm8,xmm15
859
860 vmovdqu xmm14,XMMWORD[48+r8]
861 vpxor xmm0,xmm0,xmm3
862 vpclmulqdq xmm3,xmm15,xmm6,0x00
863 vpxor xmm1,xmm1,xmm4
864 vpshufb xmm14,xmm14,xmm13
865 vpclmulqdq xmm4,xmm15,xmm6,0x11
866 vmovdqu xmm6,XMMWORD[((96-64))+rdx]
867 vpxor xmm2,xmm2,xmm5
868 vpunpckhqdq xmm9,xmm14,xmm14
869 vpclmulqdq xmm5,xmm8,xmm7,0x10
870 vmovdqu xmm7,XMMWORD[((128-64))+rdx]
871 vpxor xmm9,xmm9,xmm14
872
873 vmovdqu xmm15,XMMWORD[32+r8]
874 vpxor xmm3,xmm3,xmm0
875 vpclmulqdq xmm0,xmm14,xmm6,0x00
876 vpxor xmm4,xmm4,xmm1
877 vpshufb xmm15,xmm15,xmm13
878 vpclmulqdq xmm1,xmm14,xmm6,0x11
879 vmovdqu xmm6,XMMWORD[((112-64))+rdx]
880 vpxor xmm5,xmm5,xmm2
881 vpunpckhqdq xmm8,xmm15,xmm15
882 vpclmulqdq xmm2,xmm9,xmm7,0x00
883 vpxor xmm8,xmm8,xmm15
884
885 vmovdqu xmm14,XMMWORD[16+r8]
886 vpxor xmm0,xmm0,xmm3
887 vpclmulqdq xmm3,xmm15,xmm6,0x00
888 vpxor xmm1,xmm1,xmm4
889 vpshufb xmm14,xmm14,xmm13
890 vpclmulqdq xmm4,xmm15,xmm6,0x11
891 vmovdqu xmm6,XMMWORD[((144-64))+rdx]
892 vpxor xmm2,xmm2,xmm5
893 vpunpckhqdq xmm9,xmm14,xmm14
894 vpclmulqdq xmm5,xmm8,xmm7,0x10
895 vmovdqu xmm7,XMMWORD[((176-64))+rdx]
896 vpxor xmm9,xmm9,xmm14
897
898 vmovdqu xmm15,XMMWORD[r8]
899 vpxor xmm3,xmm3,xmm0
900 vpclmulqdq xmm0,xmm14,xmm6,0x00
901 vpxor xmm4,xmm4,xmm1
902 vpshufb xmm15,xmm15,xmm13
903 vpclmulqdq xmm1,xmm14,xmm6,0x11
904 vmovdqu xmm6,XMMWORD[((160-64))+rdx]
905 vpxor xmm5,xmm5,xmm2
906 vpclmulqdq xmm2,xmm9,xmm7,0x10
907
908 lea r8,[128+r8]
909 cmp r9,0x80
910 jb NEAR $L$tail_avx
911
912 vpxor xmm15,xmm15,xmm10
913 sub r9,0x80
914 jmp NEAR $L$oop8x_avx
915
916 ALIGN 32
917 $L$oop8x_avx:
918 vpunpckhqdq xmm8,xmm15,xmm15
919 vmovdqu xmm14,XMMWORD[112+r8]
920 vpxor xmm3,xmm3,xmm0
921 vpxor xmm8,xmm8,xmm15
922 vpclmulqdq xmm10,xmm15,xmm6,0x00
923 vpshufb xmm14,xmm14,xmm13
924 vpxor xmm4,xmm4,xmm1
925 vpclmulqdq xmm11,xmm15,xmm6,0x11
926 vmovdqu xmm6,XMMWORD[((0-64))+rdx]
927 vpunpckhqdq xmm9,xmm14,xmm14
928 vpxor xmm5,xmm5,xmm2
929 vpclmulqdq xmm12,xmm8,xmm7,0x00
930 vmovdqu xmm7,XMMWORD[((32-64))+rdx]
931 vpxor xmm9,xmm9,xmm14
932
933 vmovdqu xmm15,XMMWORD[96+r8]
934 vpclmulqdq xmm0,xmm14,xmm6,0x00
935 vpxor xmm10,xmm10,xmm3
936 vpshufb xmm15,xmm15,xmm13
937 vpclmulqdq xmm1,xmm14,xmm6,0x11
938 vxorps xmm11,xmm11,xmm4
939 vmovdqu xmm6,XMMWORD[((16-64))+rdx]
940 vpunpckhqdq xmm8,xmm15,xmm15
941 vpclmulqdq xmm2,xmm9,xmm7,0x00
942 vpxor xmm12,xmm12,xmm5
943 vxorps xmm8,xmm8,xmm15
944
945 vmovdqu xmm14,XMMWORD[80+r8]
946 vpxor xmm12,xmm12,xmm10
947 vpclmulqdq xmm3,xmm15,xmm6,0x00
948 vpxor xmm12,xmm12,xmm11
949 vpslldq xmm9,xmm12,8
950 vpxor xmm3,xmm3,xmm0
951 vpclmulqdq xmm4,xmm15,xmm6,0x11
952 vpsrldq xmm12,xmm12,8
953 vpxor xmm10,xmm10,xmm9
954 vmovdqu xmm6,XMMWORD[((48-64))+rdx]
955 vpshufb xmm14,xmm14,xmm13
956 vxorps xmm11,xmm11,xmm12
957 vpxor xmm4,xmm4,xmm1
958 vpunpckhqdq xmm9,xmm14,xmm14
959 vpclmulqdq xmm5,xmm8,xmm7,0x10
960 vmovdqu xmm7,XMMWORD[((80-64))+rdx]
961 vpxor xmm9,xmm9,xmm14
962 vpxor xmm5,xmm5,xmm2
963
964 vmovdqu xmm15,XMMWORD[64+r8]
965 vpalignr xmm12,xmm10,xmm10,8
966 vpclmulqdq xmm0,xmm14,xmm6,0x00
967 vpshufb xmm15,xmm15,xmm13
968 vpxor xmm0,xmm0,xmm3
969 vpclmulqdq xmm1,xmm14,xmm6,0x11
970 vmovdqu xmm6,XMMWORD[((64-64))+rdx]
971 vpunpckhqdq xmm8,xmm15,xmm15
972 vpxor xmm1,xmm1,xmm4
973 vpclmulqdq xmm2,xmm9,xmm7,0x00
974 vxorps xmm8,xmm8,xmm15
975 vpxor xmm2,xmm2,xmm5
976
977 vmovdqu xmm14,XMMWORD[48+r8]
978 vpclmulqdq xmm10,xmm10,XMMWORD[r10],0x10
979 vpclmulqdq xmm3,xmm15,xmm6,0x00
980 vpshufb xmm14,xmm14,xmm13
981 vpxor xmm3,xmm3,xmm0
982 vpclmulqdq xmm4,xmm15,xmm6,0x11
983 vmovdqu xmm6,XMMWORD[((96-64))+rdx]
984 vpunpckhqdq xmm9,xmm14,xmm14
985 vpxor xmm4,xmm4,xmm1
986 vpclmulqdq xmm5,xmm8,xmm7,0x10
987 vmovdqu xmm7,XMMWORD[((128-64))+rdx]
988 vpxor xmm9,xmm9,xmm14
989 vpxor xmm5,xmm5,xmm2
990
991 vmovdqu xmm15,XMMWORD[32+r8]
992 vpclmulqdq xmm0,xmm14,xmm6,0x00
993 vpshufb xmm15,xmm15,xmm13
994 vpxor xmm0,xmm0,xmm3
995 vpclmulqdq xmm1,xmm14,xmm6,0x11
996 vmovdqu xmm6,XMMWORD[((112-64))+rdx]
997 vpunpckhqdq xmm8,xmm15,xmm15
998 vpxor xmm1,xmm1,xmm4
999 vpclmulqdq xmm2,xmm9,xmm7,0x00
1000 vpxor xmm8,xmm8,xmm15
1001 vpxor xmm2,xmm2,xmm5
1002 vxorps xmm10,xmm10,xmm12
1003
1004 vmovdqu xmm14,XMMWORD[16+r8]
1005 vpalignr xmm12,xmm10,xmm10,8
1006 vpclmulqdq xmm3,xmm15,xmm6,0x00
1007 vpshufb xmm14,xmm14,xmm13
1008 vpxor xmm3,xmm3,xmm0
1009 vpclmulqdq xmm4,xmm15,xmm6,0x11
1010 vmovdqu xmm6,XMMWORD[((144-64))+rdx]
1011 vpclmulqdq xmm10,xmm10,XMMWORD[r10],0x10
1012 vxorps xmm12,xmm12,xmm11
1013 vpunpckhqdq xmm9,xmm14,xmm14
1014 vpxor xmm4,xmm4,xmm1
1015 vpclmulqdq xmm5,xmm8,xmm7,0x10
1016 vmovdqu xmm7,XMMWORD[((176-64))+rdx]
1017 vpxor xmm9,xmm9,xmm14
1018 vpxor xmm5,xmm5,xmm2
1019
1020 vmovdqu xmm15,XMMWORD[r8]
1021 vpclmulqdq xmm0,xmm14,xmm6,0x00
1022 vpshufb xmm15,xmm15,xmm13
1023 vpclmulqdq xmm1,xmm14,xmm6,0x11
1024 vmovdqu xmm6,XMMWORD[((160-64))+rdx]
1025 vpxor xmm15,xmm15,xmm12
1026 vpclmulqdq xmm2,xmm9,xmm7,0x10
1027 vpxor xmm15,xmm15,xmm10
1028
1029 lea r8,[128+r8]
1030 sub r9,0x80
1031 jnc NEAR $L$oop8x_avx
1032
1033 add r9,0x80
1034 jmp NEAR $L$tail_no_xor_avx
1035
1036 ALIGN 32
1037 $L$short_avx:
1038 vmovdqu xmm14,XMMWORD[((-16))+r9*1+r8]
1039 lea r8,[r9*1+r8]
1040 vmovdqu xmm6,XMMWORD[((0-64))+rdx]
1041 vmovdqu xmm7,XMMWORD[((32-64))+rdx]
1042 vpshufb xmm15,xmm14,xmm13
1043
1044 vmovdqa xmm3,xmm0
1045 vmovdqa xmm4,xmm1
1046 vmovdqa xmm5,xmm2
1047 sub r9,0x10
1048 jz NEAR $L$tail_avx
1049
1050 vpunpckhqdq xmm8,xmm15,xmm15
1051 vpxor xmm3,xmm3,xmm0
1052 vpclmulqdq xmm0,xmm15,xmm6,0x00
1053 vpxor xmm8,xmm8,xmm15
1054 vmovdqu xmm14,XMMWORD[((-32))+r8]
1055 vpxor xmm4,xmm4,xmm1
1056 vpclmulqdq xmm1,xmm15,xmm6,0x11
1057 vmovdqu xmm6,XMMWORD[((16-64))+rdx]
1058 vpshufb xmm15,xmm14,xmm13
1059 vpxor xmm5,xmm5,xmm2
1060 vpclmulqdq xmm2,xmm8,xmm7,0x00
1061 vpsrldq xmm7,xmm7,8
1062 sub r9,0x10
1063 jz NEAR $L$tail_avx
1064
1065 vpunpckhqdq xmm8,xmm15,xmm15
1066 vpxor xmm3,xmm3,xmm0
1067 vpclmulqdq xmm0,xmm15,xmm6,0x00
1068 vpxor xmm8,xmm8,xmm15
1069 vmovdqu xmm14,XMMWORD[((-48))+r8]
1070 vpxor xmm4,xmm4,xmm1
1071 vpclmulqdq xmm1,xmm15,xmm6,0x11
1072 vmovdqu xmm6,XMMWORD[((48-64))+rdx]
1073 vpshufb xmm15,xmm14,xmm13
1074 vpxor xmm5,xmm5,xmm2
1075 vpclmulqdq xmm2,xmm8,xmm7,0x00
1076 vmovdqu xmm7,XMMWORD[((80-64))+rdx]
1077 sub r9,0x10
1078 jz NEAR $L$tail_avx
1079
1080 vpunpckhqdq xmm8,xmm15,xmm15
1081 vpxor xmm3,xmm3,xmm0
1082 vpclmulqdq xmm0,xmm15,xmm6,0x00
1083 vpxor xmm8,xmm8,xmm15
1084 vmovdqu xmm14,XMMWORD[((-64))+r8]
1085 vpxor xmm4,xmm4,xmm1
1086 vpclmulqdq xmm1,xmm15,xmm6,0x11
1087 vmovdqu xmm6,XMMWORD[((64-64))+rdx]
1088 vpshufb xmm15,xmm14,xmm13
1089 vpxor xmm5,xmm5,xmm2
1090 vpclmulqdq xmm2,xmm8,xmm7,0x00
1091 vpsrldq xmm7,xmm7,8
1092 sub r9,0x10
1093 jz NEAR $L$tail_avx
1094
1095 vpunpckhqdq xmm8,xmm15,xmm15
1096 vpxor xmm3,xmm3,xmm0
1097 vpclmulqdq xmm0,xmm15,xmm6,0x00
1098 vpxor xmm8,xmm8,xmm15
1099 vmovdqu xmm14,XMMWORD[((-80))+r8]
1100 vpxor xmm4,xmm4,xmm1
1101 vpclmulqdq xmm1,xmm15,xmm6,0x11
1102 vmovdqu xmm6,XMMWORD[((96-64))+rdx]
1103 vpshufb xmm15,xmm14,xmm13
1104 vpxor xmm5,xmm5,xmm2
1105 vpclmulqdq xmm2,xmm8,xmm7,0x00
1106 vmovdqu xmm7,XMMWORD[((128-64))+rdx]
1107 sub r9,0x10
1108 jz NEAR $L$tail_avx
1109
1110 vpunpckhqdq xmm8,xmm15,xmm15
1111 vpxor xmm3,xmm3,xmm0
1112 vpclmulqdq xmm0,xmm15,xmm6,0x00
1113 vpxor xmm8,xmm8,xmm15
1114 vmovdqu xmm14,XMMWORD[((-96))+r8]
1115 vpxor xmm4,xmm4,xmm1
1116 vpclmulqdq xmm1,xmm15,xmm6,0x11
1117 vmovdqu xmm6,XMMWORD[((112-64))+rdx]
1118 vpshufb xmm15,xmm14,xmm13
1119 vpxor xmm5,xmm5,xmm2
1120 vpclmulqdq xmm2,xmm8,xmm7,0x00
1121 vpsrldq xmm7,xmm7,8
1122 sub r9,0x10
1123 jz NEAR $L$tail_avx
1124
1125 vpunpckhqdq xmm8,xmm15,xmm15
1126 vpxor xmm3,xmm3,xmm0
1127 vpclmulqdq xmm0,xmm15,xmm6,0x00
1128 vpxor xmm8,xmm8,xmm15
1129 vmovdqu xmm14,XMMWORD[((-112))+r8]
1130 vpxor xmm4,xmm4,xmm1
1131 vpclmulqdq xmm1,xmm15,xmm6,0x11
1132 vmovdqu xmm6,XMMWORD[((144-64))+rdx]
1133 vpshufb xmm15,xmm14,xmm13
1134 vpxor xmm5,xmm5,xmm2
1135 vpclmulqdq xmm2,xmm8,xmm7,0x00
1136 vmovq xmm7,QWORD[((184-64))+rdx]
1137 sub r9,0x10
1138 jmp NEAR $L$tail_avx
1139
1140 ALIGN 32
1141 $L$tail_avx:
1142 vpxor xmm15,xmm15,xmm10
1143 $L$tail_no_xor_avx:
1144 vpunpckhqdq xmm8,xmm15,xmm15
1145 vpxor xmm3,xmm3,xmm0
1146 vpclmulqdq xmm0,xmm15,xmm6,0x00
1147 vpxor xmm8,xmm8,xmm15
1148 vpxor xmm4,xmm4,xmm1
1149 vpclmulqdq xmm1,xmm15,xmm6,0x11
1150 vpxor xmm5,xmm5,xmm2
1151 vpclmulqdq xmm2,xmm8,xmm7,0x00
1152
1153 vmovdqu xmm12,XMMWORD[r10]
1154
1155 vpxor xmm10,xmm3,xmm0
1156 vpxor xmm11,xmm4,xmm1
1157 vpxor xmm5,xmm5,xmm2
1158
1159 vpxor xmm5,xmm5,xmm10
1160 vpxor xmm5,xmm5,xmm11
1161 vpslldq xmm9,xmm5,8
1162 vpsrldq xmm5,xmm5,8
1163 vpxor xmm10,xmm10,xmm9
1164 vpxor xmm11,xmm11,xmm5
1165
1166 vpclmulqdq xmm9,xmm10,xmm12,0x10
1167 vpalignr xmm10,xmm10,xmm10,8
1168 vpxor xmm10,xmm10,xmm9
1169
1170 vpclmulqdq xmm9,xmm10,xmm12,0x10
1171 vpalignr xmm10,xmm10,xmm10,8
1172 vpxor xmm10,xmm10,xmm11
1173 vpxor xmm10,xmm10,xmm9
1174
1175 cmp r9,0
1176 jne NEAR $L$short_avx
1177
1178 vpshufb xmm10,xmm10,xmm13
1179 vmovdqu XMMWORD[rcx],xmm10
1180 vzeroupper
1181 movaps xmm6,XMMWORD[rsp]
1182 movaps xmm7,XMMWORD[16+rsp]
1183 movaps xmm8,XMMWORD[32+rsp]
1184 movaps xmm9,XMMWORD[48+rsp]
1185 movaps xmm10,XMMWORD[64+rsp]
1186 movaps xmm11,XMMWORD[80+rsp]
1187 movaps xmm12,XMMWORD[96+rsp]
1188 movaps xmm13,XMMWORD[112+rsp]
1189 movaps xmm14,XMMWORD[128+rsp]
1190 movaps xmm15,XMMWORD[144+rsp]
1191 lea rsp,[168+rsp]
1192 DB 0F3h,0C3h ;repret
1193
1194 $L$SEH_end_gcm_ghash_avx_13:
1195
1196 section .rdata rdata align=8
1197 ALIGN 64
1198 $L$bswap_mask:
1199 DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
1200 $L$0x1c2_polynomial:
1201 DB 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2
1202 $L$7_mask:
1203 DD 7,0,7,0
1204 ALIGN 64
1205
1206 DB 71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52
1207 DB 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
1208 DB 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
1209 DB 114,103,62,0
1210 ALIGN 64
1211 section .text
1212
1213 section .pdata rdata align=4
1214 ALIGN 4
1215 DD $L$SEH_begin_gcm_init_clmul_1 wrt ..imagebase
1216 DD $L$SEH_end_gcm_init_clmul_4 wrt ..imagebase
1217 DD $L$SEH_info_gcm_init_clmul_0 wrt ..imagebase
1218
1219 DD $L$SEH_begin_gcm_ghash_clmul_1 wrt ..imagebase
1220 DD $L$SEH_end_gcm_ghash_clmul_13 wrt ..imagebase
1221 DD $L$SEH_info_gcm_ghash_clmul_0 wrt ..imagebase
1222
1223 DD $L$SEH_begin_gcm_init_avx_1 wrt ..imagebase
1224 DD $L$SEH_end_gcm_init_avx_4 wrt ..imagebase
1225 DD $L$SEH_info_gcm_init_avx_0 wrt ..imagebase
1226
1227 DD $L$SEH_begin_gcm_ghash_avx_1 wrt ..imagebase
1228 DD $L$SEH_end_gcm_ghash_avx_13 wrt ..imagebase
1229 DD $L$SEH_info_gcm_ghash_avx_0 wrt ..imagebase
1230
1231
1232 section .xdata rdata align=8
1233 ALIGN 4
1234 $L$SEH_info_gcm_init_clmul_0:
1235 DB 1
1236 DB $L$SEH_prolog_gcm_init_clmul_3-$L$SEH_begin_gcm_init_clmul_1
1237 DB 3
1238 DB 0
1239 DB $L$SEH_prolog_gcm_init_clmul_3-$L$SEH_begin_gcm_init_clmul_1
1240 DB 104
1241 DW 0
1242 DB $L$SEH_prolog_gcm_init_clmul_2-$L$SEH_begin_gcm_init_clmul_1
1243 DB 34
1244
1245 $L$SEH_info_gcm_ghash_clmul_0:
1246 DB 1
1247 DB $L$SEH_prolog_gcm_ghash_clmul_12-$L$SEH_begin_gcm_ghash_clmul_1
1248 DB 22
1249 DB 0
1250 DB $L$SEH_prolog_gcm_ghash_clmul_12-$L$SEH_begin_gcm_ghash_clmul_1
1251 DB 248
1252 DW 9
1253 DB $L$SEH_prolog_gcm_ghash_clmul_11-$L$SEH_begin_gcm_ghash_clmul_1
1254 DB 232
1255 DW 8
1256 DB $L$SEH_prolog_gcm_ghash_clmul_10-$L$SEH_begin_gcm_ghash_clmul_1
1257 DB 216
1258 DW 7
1259 DB $L$SEH_prolog_gcm_ghash_clmul_9-$L$SEH_begin_gcm_ghash_clmul_1
1260 DB 200
1261 DW 6
1262 DB $L$SEH_prolog_gcm_ghash_clmul_8-$L$SEH_begin_gcm_ghash_clmul_1
1263 DB 184
1264 DW 5
1265 DB $L$SEH_prolog_gcm_ghash_clmul_7-$L$SEH_begin_gcm_ghash_clmul_1
1266 DB 168
1267 DW 4
1268 DB $L$SEH_prolog_gcm_ghash_clmul_6-$L$SEH_begin_gcm_ghash_clmul_1
1269 DB 152
1270 DW 3
1271 DB $L$SEH_prolog_gcm_ghash_clmul_5-$L$SEH_begin_gcm_ghash_clmul_1
1272 DB 136
1273 DW 2
1274 DB $L$SEH_prolog_gcm_ghash_clmul_4-$L$SEH_begin_gcm_ghash_clmul_1
1275 DB 120
1276 DW 1
1277 DB $L$SEH_prolog_gcm_ghash_clmul_3-$L$SEH_begin_gcm_ghash_clmul_1
1278 DB 104
1279 DW 0
1280 DB $L$SEH_prolog_gcm_ghash_clmul_2-$L$SEH_begin_gcm_ghash_clmul_1
1281 DB 1
1282 DW 21
1283
1284 $L$SEH_info_gcm_init_avx_0:
1285 DB 1
1286 DB $L$SEH_prolog_gcm_init_avx_3-$L$SEH_begin_gcm_init_avx_1
1287 DB 3
1288 DB 0
1289 DB $L$SEH_prolog_gcm_init_avx_3-$L$SEH_begin_gcm_init_avx_1
1290 DB 104
1291 DW 0
1292 DB $L$SEH_prolog_gcm_init_avx_2-$L$SEH_begin_gcm_init_avx_1
1293 DB 34
1294
1295 $L$SEH_info_gcm_ghash_avx_0:
1296 DB 1
1297 DB $L$SEH_prolog_gcm_ghash_avx_12-$L$SEH_begin_gcm_ghash_avx_1
1298 DB 22
1299 DB 0
1300 DB $L$SEH_prolog_gcm_ghash_avx_12-$L$SEH_begin_gcm_ghash_avx_1
1301 DB 248
1302 DW 9
1303 DB $L$SEH_prolog_gcm_ghash_avx_11-$L$SEH_begin_gcm_ghash_avx_1
1304 DB 232
1305 DW 8
1306 DB $L$SEH_prolog_gcm_ghash_avx_10-$L$SEH_begin_gcm_ghash_avx_1
1307 DB 216
1308 DW 7
1309 DB $L$SEH_prolog_gcm_ghash_avx_9-$L$SEH_begin_gcm_ghash_avx_1
1310 DB 200
1311 DW 6
1312 DB $L$SEH_prolog_gcm_ghash_avx_8-$L$SEH_begin_gcm_ghash_avx_1
1313 DB 184
1314 DW 5
1315 DB $L$SEH_prolog_gcm_ghash_avx_7-$L$SEH_begin_gcm_ghash_avx_1
1316 DB 168
1317 DW 4
1318 DB $L$SEH_prolog_gcm_ghash_avx_6-$L$SEH_begin_gcm_ghash_avx_1
1319 DB 152
1320 DW 3
1321 DB $L$SEH_prolog_gcm_ghash_avx_5-$L$SEH_begin_gcm_ghash_avx_1
1322 DB 136
1323 DW 2
1324 DB $L$SEH_prolog_gcm_ghash_avx_4-$L$SEH_begin_gcm_ghash_avx_1
1325 DB 120
1326 DW 1
1327 DB $L$SEH_prolog_gcm_ghash_avx_3-$L$SEH_begin_gcm_ghash_avx_1
1328 DB 104
1329 DW 0
1330 DB $L$SEH_prolog_gcm_ghash_avx_2-$L$SEH_begin_gcm_ghash_avx_1
1331 DB 1
1332 DW 21
1333 %else
1334 ; Work around https://bugzilla.nasm.us/show_bug.cgi?id=3392738
1335 ret
1336 %endif