VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1g/crypto/genasm-nasm/ghash-x86_64.S@ 86352

最後變更 在這個檔案從86352是 83531,由 vboxsync 提交於 5 年 前

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

檔案大小: 26.7 KB
 
1default rel
2%define XMMWORD
3%define YMMWORD
4%define ZMMWORD
5section .text code align=64
6
7EXTERN OPENSSL_ia32cap_P
8
9global gcm_gmult_4bit
10
11ALIGN 16
12gcm_gmult_4bit:
13 mov QWORD[8+rsp],rdi ;WIN64 prologue
14 mov QWORD[16+rsp],rsi
15 mov rax,rsp
16$L$SEH_begin_gcm_gmult_4bit:
17 mov rdi,rcx
18 mov rsi,rdx
19
20
21
22 push rbx
23
24 push rbp
25
26 push r12
27
28 push r13
29
30 push r14
31
32 push r15
33
34 sub rsp,280
35
36$L$gmult_prologue:
37
38 movzx r8,BYTE[15+rdi]
39 lea r11,[$L$rem_4bit]
40 xor rax,rax
41 xor rbx,rbx
42 mov al,r8b
43 mov bl,r8b
44 shl al,4
45 mov rcx,14
46 mov r8,QWORD[8+rax*1+rsi]
47 mov r9,QWORD[rax*1+rsi]
48 and bl,0xf0
49 mov rdx,r8
50 jmp NEAR $L$oop1
51
52ALIGN 16
53$L$oop1:
54 shr r8,4
55 and rdx,0xf
56 mov r10,r9
57 mov al,BYTE[rcx*1+rdi]
58 shr r9,4
59 xor r8,QWORD[8+rbx*1+rsi]
60 shl r10,60
61 xor r9,QWORD[rbx*1+rsi]
62 mov bl,al
63 xor r9,QWORD[rdx*8+r11]
64 mov rdx,r8
65 shl al,4
66 xor r8,r10
67 dec rcx
68 js NEAR $L$break1
69
70 shr r8,4
71 and rdx,0xf
72 mov r10,r9
73 shr r9,4
74 xor r8,QWORD[8+rax*1+rsi]
75 shl r10,60
76 xor r9,QWORD[rax*1+rsi]
77 and bl,0xf0
78 xor r9,QWORD[rdx*8+r11]
79 mov rdx,r8
80 xor r8,r10
81 jmp NEAR $L$oop1
82
83ALIGN 16
84$L$break1:
85 shr r8,4
86 and rdx,0xf
87 mov r10,r9
88 shr r9,4
89 xor r8,QWORD[8+rax*1+rsi]
90 shl r10,60
91 xor r9,QWORD[rax*1+rsi]
92 and bl,0xf0
93 xor r9,QWORD[rdx*8+r11]
94 mov rdx,r8
95 xor r8,r10
96
97 shr r8,4
98 and rdx,0xf
99 mov r10,r9
100 shr r9,4
101 xor r8,QWORD[8+rbx*1+rsi]
102 shl r10,60
103 xor r9,QWORD[rbx*1+rsi]
104 xor r8,r10
105 xor r9,QWORD[rdx*8+r11]
106
107 bswap r8
108 bswap r9
109 mov QWORD[8+rdi],r8
110 mov QWORD[rdi],r9
111
112 lea rsi,[((280+48))+rsp]
113
114 mov rbx,QWORD[((-8))+rsi]
115
116 lea rsp,[rsi]
117
118$L$gmult_epilogue:
119 mov rdi,QWORD[8+rsp] ;WIN64 epilogue
120 mov rsi,QWORD[16+rsp]
121 DB 0F3h,0C3h ;repret
122
123$L$SEH_end_gcm_gmult_4bit:
124global gcm_ghash_4bit
125
126ALIGN 16
127gcm_ghash_4bit:
128 mov QWORD[8+rsp],rdi ;WIN64 prologue
129 mov QWORD[16+rsp],rsi
130 mov rax,rsp
131$L$SEH_begin_gcm_ghash_4bit:
132 mov rdi,rcx
133 mov rsi,rdx
134 mov rdx,r8
135 mov rcx,r9
136
137
138
139 push rbx
140
141 push rbp
142
143 push r12
144
145 push r13
146
147 push r14
148
149 push r15
150
151 sub rsp,280
152
153$L$ghash_prologue:
154 mov r14,rdx
155 mov r15,rcx
156 sub rsi,-128
157 lea rbp,[((16+128))+rsp]
158 xor edx,edx
159 mov r8,QWORD[((0+0-128))+rsi]
160 mov rax,QWORD[((0+8-128))+rsi]
161 mov dl,al
162 shr rax,4
163 mov r10,r8
164 shr r8,4
165 mov r9,QWORD[((16+0-128))+rsi]
166 shl dl,4
167 mov rbx,QWORD[((16+8-128))+rsi]
168 shl r10,60
169 mov BYTE[rsp],dl
170 or rax,r10
171 mov dl,bl
172 shr rbx,4
173 mov r10,r9
174 shr r9,4
175 mov QWORD[rbp],r8
176 mov r8,QWORD[((32+0-128))+rsi]
177 shl dl,4
178 mov QWORD[((0-128))+rbp],rax
179 mov rax,QWORD[((32+8-128))+rsi]
180 shl r10,60
181 mov BYTE[1+rsp],dl
182 or rbx,r10
183 mov dl,al
184 shr rax,4
185 mov r10,r8
186 shr r8,4
187 mov QWORD[8+rbp],r9
188 mov r9,QWORD[((48+0-128))+rsi]
189 shl dl,4
190 mov QWORD[((8-128))+rbp],rbx
191 mov rbx,QWORD[((48+8-128))+rsi]
192 shl r10,60
193 mov BYTE[2+rsp],dl
194 or rax,r10
195 mov dl,bl
196 shr rbx,4
197 mov r10,r9
198 shr r9,4
199 mov QWORD[16+rbp],r8
200 mov r8,QWORD[((64+0-128))+rsi]
201 shl dl,4
202 mov QWORD[((16-128))+rbp],rax
203 mov rax,QWORD[((64+8-128))+rsi]
204 shl r10,60
205 mov BYTE[3+rsp],dl
206 or rbx,r10
207 mov dl,al
208 shr rax,4
209 mov r10,r8
210 shr r8,4
211 mov QWORD[24+rbp],r9
212 mov r9,QWORD[((80+0-128))+rsi]
213 shl dl,4
214 mov QWORD[((24-128))+rbp],rbx
215 mov rbx,QWORD[((80+8-128))+rsi]
216 shl r10,60
217 mov BYTE[4+rsp],dl
218 or rax,r10
219 mov dl,bl
220 shr rbx,4
221 mov r10,r9
222 shr r9,4
223 mov QWORD[32+rbp],r8
224 mov r8,QWORD[((96+0-128))+rsi]
225 shl dl,4
226 mov QWORD[((32-128))+rbp],rax
227 mov rax,QWORD[((96+8-128))+rsi]
228 shl r10,60
229 mov BYTE[5+rsp],dl
230 or rbx,r10
231 mov dl,al
232 shr rax,4
233 mov r10,r8
234 shr r8,4
235 mov QWORD[40+rbp],r9
236 mov r9,QWORD[((112+0-128))+rsi]
237 shl dl,4
238 mov QWORD[((40-128))+rbp],rbx
239 mov rbx,QWORD[((112+8-128))+rsi]
240 shl r10,60
241 mov BYTE[6+rsp],dl
242 or rax,r10
243 mov dl,bl
244 shr rbx,4
245 mov r10,r9
246 shr r9,4
247 mov QWORD[48+rbp],r8
248 mov r8,QWORD[((128+0-128))+rsi]
249 shl dl,4
250 mov QWORD[((48-128))+rbp],rax
251 mov rax,QWORD[((128+8-128))+rsi]
252 shl r10,60
253 mov BYTE[7+rsp],dl
254 or rbx,r10
255 mov dl,al
256 shr rax,4
257 mov r10,r8
258 shr r8,4
259 mov QWORD[56+rbp],r9
260 mov r9,QWORD[((144+0-128))+rsi]
261 shl dl,4
262 mov QWORD[((56-128))+rbp],rbx
263 mov rbx,QWORD[((144+8-128))+rsi]
264 shl r10,60
265 mov BYTE[8+rsp],dl
266 or rax,r10
267 mov dl,bl
268 shr rbx,4
269 mov r10,r9
270 shr r9,4
271 mov QWORD[64+rbp],r8
272 mov r8,QWORD[((160+0-128))+rsi]
273 shl dl,4
274 mov QWORD[((64-128))+rbp],rax
275 mov rax,QWORD[((160+8-128))+rsi]
276 shl r10,60
277 mov BYTE[9+rsp],dl
278 or rbx,r10
279 mov dl,al
280 shr rax,4
281 mov r10,r8
282 shr r8,4
283 mov QWORD[72+rbp],r9
284 mov r9,QWORD[((176+0-128))+rsi]
285 shl dl,4
286 mov QWORD[((72-128))+rbp],rbx
287 mov rbx,QWORD[((176+8-128))+rsi]
288 shl r10,60
289 mov BYTE[10+rsp],dl
290 or rax,r10
291 mov dl,bl
292 shr rbx,4
293 mov r10,r9
294 shr r9,4
295 mov QWORD[80+rbp],r8
296 mov r8,QWORD[((192+0-128))+rsi]
297 shl dl,4
298 mov QWORD[((80-128))+rbp],rax
299 mov rax,QWORD[((192+8-128))+rsi]
300 shl r10,60
301 mov BYTE[11+rsp],dl
302 or rbx,r10
303 mov dl,al
304 shr rax,4
305 mov r10,r8
306 shr r8,4
307 mov QWORD[88+rbp],r9
308 mov r9,QWORD[((208+0-128))+rsi]
309 shl dl,4
310 mov QWORD[((88-128))+rbp],rbx
311 mov rbx,QWORD[((208+8-128))+rsi]
312 shl r10,60
313 mov BYTE[12+rsp],dl
314 or rax,r10
315 mov dl,bl
316 shr rbx,4
317 mov r10,r9
318 shr r9,4
319 mov QWORD[96+rbp],r8
320 mov r8,QWORD[((224+0-128))+rsi]
321 shl dl,4
322 mov QWORD[((96-128))+rbp],rax
323 mov rax,QWORD[((224+8-128))+rsi]
324 shl r10,60
325 mov BYTE[13+rsp],dl
326 or rbx,r10
327 mov dl,al
328 shr rax,4
329 mov r10,r8
330 shr r8,4
331 mov QWORD[104+rbp],r9
332 mov r9,QWORD[((240+0-128))+rsi]
333 shl dl,4
334 mov QWORD[((104-128))+rbp],rbx
335 mov rbx,QWORD[((240+8-128))+rsi]
336 shl r10,60
337 mov BYTE[14+rsp],dl
338 or rax,r10
339 mov dl,bl
340 shr rbx,4
341 mov r10,r9
342 shr r9,4
343 mov QWORD[112+rbp],r8
344 shl dl,4
345 mov QWORD[((112-128))+rbp],rax
346 shl r10,60
347 mov BYTE[15+rsp],dl
348 or rbx,r10
349 mov QWORD[120+rbp],r9
350 mov QWORD[((120-128))+rbp],rbx
351 add rsi,-128
352 mov r8,QWORD[8+rdi]
353 mov r9,QWORD[rdi]
354 add r15,r14
355 lea r11,[$L$rem_8bit]
356 jmp NEAR $L$outer_loop
357ALIGN 16
358$L$outer_loop:
359 xor r9,QWORD[r14]
360 mov rdx,QWORD[8+r14]
361 lea r14,[16+r14]
362 xor rdx,r8
363 mov QWORD[rdi],r9
364 mov QWORD[8+rdi],rdx
365 shr rdx,32
366 xor rax,rax
367 rol edx,8
368 mov al,dl
369 movzx ebx,dl
370 shl al,4
371 shr ebx,4
372 rol edx,8
373 mov r8,QWORD[8+rax*1+rsi]
374 mov r9,QWORD[rax*1+rsi]
375 mov al,dl
376 movzx ecx,dl
377 shl al,4
378 movzx r12,BYTE[rbx*1+rsp]
379 shr ecx,4
380 xor r12,r8
381 mov r10,r9
382 shr r8,8
383 movzx r12,r12b
384 shr r9,8
385 xor r8,QWORD[((-128))+rbx*8+rbp]
386 shl r10,56
387 xor r9,QWORD[rbx*8+rbp]
388 rol edx,8
389 xor r8,QWORD[8+rax*1+rsi]
390 xor r9,QWORD[rax*1+rsi]
391 mov al,dl
392 xor r8,r10
393 movzx r12,WORD[r12*2+r11]
394 movzx ebx,dl
395 shl al,4
396 movzx r13,BYTE[rcx*1+rsp]
397 shr ebx,4
398 shl r12,48
399 xor r13,r8
400 mov r10,r9
401 xor r9,r12
402 shr r8,8
403 movzx r13,r13b
404 shr r9,8
405 xor r8,QWORD[((-128))+rcx*8+rbp]
406 shl r10,56
407 xor r9,QWORD[rcx*8+rbp]
408 rol edx,8
409 xor r8,QWORD[8+rax*1+rsi]
410 xor r9,QWORD[rax*1+rsi]
411 mov al,dl
412 xor r8,r10
413 movzx r13,WORD[r13*2+r11]
414 movzx ecx,dl
415 shl al,4
416 movzx r12,BYTE[rbx*1+rsp]
417 shr ecx,4
418 shl r13,48
419 xor r12,r8
420 mov r10,r9
421 xor r9,r13
422 shr r8,8
423 movzx r12,r12b
424 mov edx,DWORD[8+rdi]
425 shr r9,8
426 xor r8,QWORD[((-128))+rbx*8+rbp]
427 shl r10,56
428 xor r9,QWORD[rbx*8+rbp]
429 rol edx,8
430 xor r8,QWORD[8+rax*1+rsi]
431 xor r9,QWORD[rax*1+rsi]
432 mov al,dl
433 xor r8,r10
434 movzx r12,WORD[r12*2+r11]
435 movzx ebx,dl
436 shl al,4
437 movzx r13,BYTE[rcx*1+rsp]
438 shr ebx,4
439 shl r12,48
440 xor r13,r8
441 mov r10,r9
442 xor r9,r12
443 shr r8,8
444 movzx r13,r13b
445 shr r9,8
446 xor r8,QWORD[((-128))+rcx*8+rbp]
447 shl r10,56
448 xor r9,QWORD[rcx*8+rbp]
449 rol edx,8
450 xor r8,QWORD[8+rax*1+rsi]
451 xor r9,QWORD[rax*1+rsi]
452 mov al,dl
453 xor r8,r10
454 movzx r13,WORD[r13*2+r11]
455 movzx ecx,dl
456 shl al,4
457 movzx r12,BYTE[rbx*1+rsp]
458 shr ecx,4
459 shl r13,48
460 xor r12,r8
461 mov r10,r9
462 xor r9,r13
463 shr r8,8
464 movzx r12,r12b
465 shr r9,8
466 xor r8,QWORD[((-128))+rbx*8+rbp]
467 shl r10,56
468 xor r9,QWORD[rbx*8+rbp]
469 rol edx,8
470 xor r8,QWORD[8+rax*1+rsi]
471 xor r9,QWORD[rax*1+rsi]
472 mov al,dl
473 xor r8,r10
474 movzx r12,WORD[r12*2+r11]
475 movzx ebx,dl
476 shl al,4
477 movzx r13,BYTE[rcx*1+rsp]
478 shr ebx,4
479 shl r12,48
480 xor r13,r8
481 mov r10,r9
482 xor r9,r12
483 shr r8,8
484 movzx r13,r13b
485 shr r9,8
486 xor r8,QWORD[((-128))+rcx*8+rbp]
487 shl r10,56
488 xor r9,QWORD[rcx*8+rbp]
489 rol edx,8
490 xor r8,QWORD[8+rax*1+rsi]
491 xor r9,QWORD[rax*1+rsi]
492 mov al,dl
493 xor r8,r10
494 movzx r13,WORD[r13*2+r11]
495 movzx ecx,dl
496 shl al,4
497 movzx r12,BYTE[rbx*1+rsp]
498 shr ecx,4
499 shl r13,48
500 xor r12,r8
501 mov r10,r9
502 xor r9,r13
503 shr r8,8
504 movzx r12,r12b
505 mov edx,DWORD[4+rdi]
506 shr r9,8
507 xor r8,QWORD[((-128))+rbx*8+rbp]
508 shl r10,56
509 xor r9,QWORD[rbx*8+rbp]
510 rol edx,8
511 xor r8,QWORD[8+rax*1+rsi]
512 xor r9,QWORD[rax*1+rsi]
513 mov al,dl
514 xor r8,r10
515 movzx r12,WORD[r12*2+r11]
516 movzx ebx,dl
517 shl al,4
518 movzx r13,BYTE[rcx*1+rsp]
519 shr ebx,4
520 shl r12,48
521 xor r13,r8
522 mov r10,r9
523 xor r9,r12
524 shr r8,8
525 movzx r13,r13b
526 shr r9,8
527 xor r8,QWORD[((-128))+rcx*8+rbp]
528 shl r10,56
529 xor r9,QWORD[rcx*8+rbp]
530 rol edx,8
531 xor r8,QWORD[8+rax*1+rsi]
532 xor r9,QWORD[rax*1+rsi]
533 mov al,dl
534 xor r8,r10
535 movzx r13,WORD[r13*2+r11]
536 movzx ecx,dl
537 shl al,4
538 movzx r12,BYTE[rbx*1+rsp]
539 shr ecx,4
540 shl r13,48
541 xor r12,r8
542 mov r10,r9
543 xor r9,r13
544 shr r8,8
545 movzx r12,r12b
546 shr r9,8
547 xor r8,QWORD[((-128))+rbx*8+rbp]
548 shl r10,56
549 xor r9,QWORD[rbx*8+rbp]
550 rol edx,8
551 xor r8,QWORD[8+rax*1+rsi]
552 xor r9,QWORD[rax*1+rsi]
553 mov al,dl
554 xor r8,r10
555 movzx r12,WORD[r12*2+r11]
556 movzx ebx,dl
557 shl al,4
558 movzx r13,BYTE[rcx*1+rsp]
559 shr ebx,4
560 shl r12,48
561 xor r13,r8
562 mov r10,r9
563 xor r9,r12
564 shr r8,8
565 movzx r13,r13b
566 shr r9,8
567 xor r8,QWORD[((-128))+rcx*8+rbp]
568 shl r10,56
569 xor r9,QWORD[rcx*8+rbp]
570 rol edx,8
571 xor r8,QWORD[8+rax*1+rsi]
572 xor r9,QWORD[rax*1+rsi]
573 mov al,dl
574 xor r8,r10
575 movzx r13,WORD[r13*2+r11]
576 movzx ecx,dl
577 shl al,4
578 movzx r12,BYTE[rbx*1+rsp]
579 shr ecx,4
580 shl r13,48
581 xor r12,r8
582 mov r10,r9
583 xor r9,r13
584 shr r8,8
585 movzx r12,r12b
586 mov edx,DWORD[rdi]
587 shr r9,8
588 xor r8,QWORD[((-128))+rbx*8+rbp]
589 shl r10,56
590 xor r9,QWORD[rbx*8+rbp]
591 rol edx,8
592 xor r8,QWORD[8+rax*1+rsi]
593 xor r9,QWORD[rax*1+rsi]
594 mov al,dl
595 xor r8,r10
596 movzx r12,WORD[r12*2+r11]
597 movzx ebx,dl
598 shl al,4
599 movzx r13,BYTE[rcx*1+rsp]
600 shr ebx,4
601 shl r12,48
602 xor r13,r8
603 mov r10,r9
604 xor r9,r12
605 shr r8,8
606 movzx r13,r13b
607 shr r9,8
608 xor r8,QWORD[((-128))+rcx*8+rbp]
609 shl r10,56
610 xor r9,QWORD[rcx*8+rbp]
611 rol edx,8
612 xor r8,QWORD[8+rax*1+rsi]
613 xor r9,QWORD[rax*1+rsi]
614 mov al,dl
615 xor r8,r10
616 movzx r13,WORD[r13*2+r11]
617 movzx ecx,dl
618 shl al,4
619 movzx r12,BYTE[rbx*1+rsp]
620 shr ecx,4
621 shl r13,48
622 xor r12,r8
623 mov r10,r9
624 xor r9,r13
625 shr r8,8
626 movzx r12,r12b
627 shr r9,8
628 xor r8,QWORD[((-128))+rbx*8+rbp]
629 shl r10,56
630 xor r9,QWORD[rbx*8+rbp]
631 rol edx,8
632 xor r8,QWORD[8+rax*1+rsi]
633 xor r9,QWORD[rax*1+rsi]
634 mov al,dl
635 xor r8,r10
636 movzx r12,WORD[r12*2+r11]
637 movzx ebx,dl
638 shl al,4
639 movzx r13,BYTE[rcx*1+rsp]
640 shr ebx,4
641 shl r12,48
642 xor r13,r8
643 mov r10,r9
644 xor r9,r12
645 shr r8,8
646 movzx r13,r13b
647 shr r9,8
648 xor r8,QWORD[((-128))+rcx*8+rbp]
649 shl r10,56
650 xor r9,QWORD[rcx*8+rbp]
651 rol edx,8
652 xor r8,QWORD[8+rax*1+rsi]
653 xor r9,QWORD[rax*1+rsi]
654 mov al,dl
655 xor r8,r10
656 movzx r13,WORD[r13*2+r11]
657 movzx ecx,dl
658 shl al,4
659 movzx r12,BYTE[rbx*1+rsp]
660 and ecx,240
661 shl r13,48
662 xor r12,r8
663 mov r10,r9
664 xor r9,r13
665 shr r8,8
666 movzx r12,r12b
667 mov edx,DWORD[((-4))+rdi]
668 shr r9,8
669 xor r8,QWORD[((-128))+rbx*8+rbp]
670 shl r10,56
671 xor r9,QWORD[rbx*8+rbp]
672 movzx r12,WORD[r12*2+r11]
673 xor r8,QWORD[8+rax*1+rsi]
674 xor r9,QWORD[rax*1+rsi]
675 shl r12,48
676 xor r8,r10
677 xor r9,r12
678 movzx r13,r8b
679 shr r8,4
680 mov r10,r9
681 shl r13b,4
682 shr r9,4
683 xor r8,QWORD[8+rcx*1+rsi]
684 movzx r13,WORD[r13*2+r11]
685 shl r10,60
686 xor r9,QWORD[rcx*1+rsi]
687 xor r8,r10
688 shl r13,48
689 bswap r8
690 xor r9,r13
691 bswap r9
692 cmp r14,r15
693 jb NEAR $L$outer_loop
694 mov QWORD[8+rdi],r8
695 mov QWORD[rdi],r9
696
697 lea rsi,[((280+48))+rsp]
698
699 mov r15,QWORD[((-48))+rsi]
700
701 mov r14,QWORD[((-40))+rsi]
702
703 mov r13,QWORD[((-32))+rsi]
704
705 mov r12,QWORD[((-24))+rsi]
706
707 mov rbp,QWORD[((-16))+rsi]
708
709 mov rbx,QWORD[((-8))+rsi]
710
711 lea rsp,[rsi]
712
713$L$ghash_epilogue:
714 mov rdi,QWORD[8+rsp] ;WIN64 epilogue
715 mov rsi,QWORD[16+rsp]
716 DB 0F3h,0C3h ;repret
717
718$L$SEH_end_gcm_ghash_4bit:
719global gcm_init_clmul
720
721ALIGN 16
722gcm_init_clmul:
723
724$L$_init_clmul:
725$L$SEH_begin_gcm_init_clmul:
726
727DB 0x48,0x83,0xec,0x18
728DB 0x0f,0x29,0x34,0x24
729 movdqu xmm2,XMMWORD[rdx]
730 pshufd xmm2,xmm2,78
731
732
733 pshufd xmm4,xmm2,255
734 movdqa xmm3,xmm2
735 psllq xmm2,1
736 pxor xmm5,xmm5
737 psrlq xmm3,63
738 pcmpgtd xmm5,xmm4
739 pslldq xmm3,8
740 por xmm2,xmm3
741
742
743 pand xmm5,XMMWORD[$L$0x1c2_polynomial]
744 pxor xmm2,xmm5
745
746
747 pshufd xmm6,xmm2,78
748 movdqa xmm0,xmm2
749 pxor xmm6,xmm2
750 movdqa xmm1,xmm0
751 pshufd xmm3,xmm0,78
752 pxor xmm3,xmm0
753DB 102,15,58,68,194,0
754DB 102,15,58,68,202,17
755DB 102,15,58,68,222,0
756 pxor xmm3,xmm0
757 pxor xmm3,xmm1
758
759 movdqa xmm4,xmm3
760 psrldq xmm3,8
761 pslldq xmm4,8
762 pxor xmm1,xmm3
763 pxor xmm0,xmm4
764
765 movdqa xmm4,xmm0
766 movdqa xmm3,xmm0
767 psllq xmm0,5
768 pxor xmm3,xmm0
769 psllq xmm0,1
770 pxor xmm0,xmm3
771 psllq xmm0,57
772 movdqa xmm3,xmm0
773 pslldq xmm0,8
774 psrldq xmm3,8
775 pxor xmm0,xmm4
776 pxor xmm1,xmm3
777
778
779 movdqa xmm4,xmm0
780 psrlq xmm0,1
781 pxor xmm1,xmm4
782 pxor xmm4,xmm0
783 psrlq xmm0,5
784 pxor xmm0,xmm4
785 psrlq xmm0,1
786 pxor xmm0,xmm1
787 pshufd xmm3,xmm2,78
788 pshufd xmm4,xmm0,78
789 pxor xmm3,xmm2
790 movdqu XMMWORD[rcx],xmm2
791 pxor xmm4,xmm0
792 movdqu XMMWORD[16+rcx],xmm0
793DB 102,15,58,15,227,8
794 movdqu XMMWORD[32+rcx],xmm4
795 movdqa xmm1,xmm0
796 pshufd xmm3,xmm0,78
797 pxor xmm3,xmm0
798DB 102,15,58,68,194,0
799DB 102,15,58,68,202,17
800DB 102,15,58,68,222,0
801 pxor xmm3,xmm0
802 pxor xmm3,xmm1
803
804 movdqa xmm4,xmm3
805 psrldq xmm3,8
806 pslldq xmm4,8
807 pxor xmm1,xmm3
808 pxor xmm0,xmm4
809
810 movdqa xmm4,xmm0
811 movdqa xmm3,xmm0
812 psllq xmm0,5
813 pxor xmm3,xmm0
814 psllq xmm0,1
815 pxor xmm0,xmm3
816 psllq xmm0,57
817 movdqa xmm3,xmm0
818 pslldq xmm0,8
819 psrldq xmm3,8
820 pxor xmm0,xmm4
821 pxor xmm1,xmm3
822
823
824 movdqa xmm4,xmm0
825 psrlq xmm0,1
826 pxor xmm1,xmm4
827 pxor xmm4,xmm0
828 psrlq xmm0,5
829 pxor xmm0,xmm4
830 psrlq xmm0,1
831 pxor xmm0,xmm1
832 movdqa xmm5,xmm0
833 movdqa xmm1,xmm0
834 pshufd xmm3,xmm0,78
835 pxor xmm3,xmm0
836DB 102,15,58,68,194,0
837DB 102,15,58,68,202,17
838DB 102,15,58,68,222,0
839 pxor xmm3,xmm0
840 pxor xmm3,xmm1
841
842 movdqa xmm4,xmm3
843 psrldq xmm3,8
844 pslldq xmm4,8
845 pxor xmm1,xmm3
846 pxor xmm0,xmm4
847
848 movdqa xmm4,xmm0
849 movdqa xmm3,xmm0
850 psllq xmm0,5
851 pxor xmm3,xmm0
852 psllq xmm0,1
853 pxor xmm0,xmm3
854 psllq xmm0,57
855 movdqa xmm3,xmm0
856 pslldq xmm0,8
857 psrldq xmm3,8
858 pxor xmm0,xmm4
859 pxor xmm1,xmm3
860
861
862 movdqa xmm4,xmm0
863 psrlq xmm0,1
864 pxor xmm1,xmm4
865 pxor xmm4,xmm0
866 psrlq xmm0,5
867 pxor xmm0,xmm4
868 psrlq xmm0,1
869 pxor xmm0,xmm1
870 pshufd xmm3,xmm5,78
871 pshufd xmm4,xmm0,78
872 pxor xmm3,xmm5
873 movdqu XMMWORD[48+rcx],xmm5
874 pxor xmm4,xmm0
875 movdqu XMMWORD[64+rcx],xmm0
876DB 102,15,58,15,227,8
877 movdqu XMMWORD[80+rcx],xmm4
878 movaps xmm6,XMMWORD[rsp]
879 lea rsp,[24+rsp]
880$L$SEH_end_gcm_init_clmul:
881 DB 0F3h,0C3h ;repret
882
883
884global gcm_gmult_clmul
885
886ALIGN 16
887gcm_gmult_clmul:
888
889$L$_gmult_clmul:
890 movdqu xmm0,XMMWORD[rcx]
891 movdqa xmm5,XMMWORD[$L$bswap_mask]
892 movdqu xmm2,XMMWORD[rdx]
893 movdqu xmm4,XMMWORD[32+rdx]
894DB 102,15,56,0,197
895 movdqa xmm1,xmm0
896 pshufd xmm3,xmm0,78
897 pxor xmm3,xmm0
898DB 102,15,58,68,194,0
899DB 102,15,58,68,202,17
900DB 102,15,58,68,220,0
901 pxor xmm3,xmm0
902 pxor xmm3,xmm1
903
904 movdqa xmm4,xmm3
905 psrldq xmm3,8
906 pslldq xmm4,8
907 pxor xmm1,xmm3
908 pxor xmm0,xmm4
909
910 movdqa xmm4,xmm0
911 movdqa xmm3,xmm0
912 psllq xmm0,5
913 pxor xmm3,xmm0
914 psllq xmm0,1
915 pxor xmm0,xmm3
916 psllq xmm0,57
917 movdqa xmm3,xmm0
918 pslldq xmm0,8
919 psrldq xmm3,8
920 pxor xmm0,xmm4
921 pxor xmm1,xmm3
922
923
924 movdqa xmm4,xmm0
925 psrlq xmm0,1
926 pxor xmm1,xmm4
927 pxor xmm4,xmm0
928 psrlq xmm0,5
929 pxor xmm0,xmm4
930 psrlq xmm0,1
931 pxor xmm0,xmm1
932DB 102,15,56,0,197
933 movdqu XMMWORD[rcx],xmm0
934 DB 0F3h,0C3h ;repret
935
936
937global gcm_ghash_clmul
938
939ALIGN 32
940gcm_ghash_clmul:
941
942$L$_ghash_clmul:
943 lea rax,[((-136))+rsp]
944$L$SEH_begin_gcm_ghash_clmul:
945
946DB 0x48,0x8d,0x60,0xe0
947DB 0x0f,0x29,0x70,0xe0
948DB 0x0f,0x29,0x78,0xf0
949DB 0x44,0x0f,0x29,0x00
950DB 0x44,0x0f,0x29,0x48,0x10
951DB 0x44,0x0f,0x29,0x50,0x20
952DB 0x44,0x0f,0x29,0x58,0x30
953DB 0x44,0x0f,0x29,0x60,0x40
954DB 0x44,0x0f,0x29,0x68,0x50
955DB 0x44,0x0f,0x29,0x70,0x60
956DB 0x44,0x0f,0x29,0x78,0x70
957 movdqa xmm10,XMMWORD[$L$bswap_mask]
958
959 movdqu xmm0,XMMWORD[rcx]
960 movdqu xmm2,XMMWORD[rdx]
961 movdqu xmm7,XMMWORD[32+rdx]
962DB 102,65,15,56,0,194
963
964 sub r9,0x10
965 jz NEAR $L$odd_tail
966
967 movdqu xmm6,XMMWORD[16+rdx]
968 mov eax,DWORD[((OPENSSL_ia32cap_P+4))]
969 cmp r9,0x30
970 jb NEAR $L$skip4x
971
972 and eax,71303168
973 cmp eax,4194304
974 je NEAR $L$skip4x
975
976 sub r9,0x30
977 mov rax,0xA040608020C0E000
978 movdqu xmm14,XMMWORD[48+rdx]
979 movdqu xmm15,XMMWORD[64+rdx]
980
981
982
983
984 movdqu xmm3,XMMWORD[48+r8]
985 movdqu xmm11,XMMWORD[32+r8]
986DB 102,65,15,56,0,218
987DB 102,69,15,56,0,218
988 movdqa xmm5,xmm3
989 pshufd xmm4,xmm3,78
990 pxor xmm4,xmm3
991DB 102,15,58,68,218,0
992DB 102,15,58,68,234,17
993DB 102,15,58,68,231,0
994
995 movdqa xmm13,xmm11
996 pshufd xmm12,xmm11,78
997 pxor xmm12,xmm11
998DB 102,68,15,58,68,222,0
999DB 102,68,15,58,68,238,17
1000DB 102,68,15,58,68,231,16
1001 xorps xmm3,xmm11
1002 xorps xmm5,xmm13
1003 movups xmm7,XMMWORD[80+rdx]
1004 xorps xmm4,xmm12
1005
1006 movdqu xmm11,XMMWORD[16+r8]
1007 movdqu xmm8,XMMWORD[r8]
1008DB 102,69,15,56,0,218
1009DB 102,69,15,56,0,194
1010 movdqa xmm13,xmm11
1011 pshufd xmm12,xmm11,78
1012 pxor xmm0,xmm8
1013 pxor xmm12,xmm11
1014DB 102,69,15,58,68,222,0
1015 movdqa xmm1,xmm0
1016 pshufd xmm8,xmm0,78
1017 pxor xmm8,xmm0
1018DB 102,69,15,58,68,238,17
1019DB 102,68,15,58,68,231,0
1020 xorps xmm3,xmm11
1021 xorps xmm5,xmm13
1022
1023 lea r8,[64+r8]
1024 sub r9,0x40
1025 jc NEAR $L$tail4x
1026
1027 jmp NEAR $L$mod4_loop
1028ALIGN 32
1029$L$mod4_loop:
1030DB 102,65,15,58,68,199,0
1031 xorps xmm4,xmm12
1032 movdqu xmm11,XMMWORD[48+r8]
1033DB 102,69,15,56,0,218
1034DB 102,65,15,58,68,207,17
1035 xorps xmm0,xmm3
1036 movdqu xmm3,XMMWORD[32+r8]
1037 movdqa xmm13,xmm11
1038DB 102,68,15,58,68,199,16
1039 pshufd xmm12,xmm11,78
1040 xorps xmm1,xmm5
1041 pxor xmm12,xmm11
1042DB 102,65,15,56,0,218
1043 movups xmm7,XMMWORD[32+rdx]
1044 xorps xmm8,xmm4
1045DB 102,68,15,58,68,218,0
1046 pshufd xmm4,xmm3,78
1047
1048 pxor xmm8,xmm0
1049 movdqa xmm5,xmm3
1050 pxor xmm8,xmm1
1051 pxor xmm4,xmm3
1052 movdqa xmm9,xmm8
1053DB 102,68,15,58,68,234,17
1054 pslldq xmm8,8
1055 psrldq xmm9,8
1056 pxor xmm0,xmm8
1057 movdqa xmm8,XMMWORD[$L$7_mask]
1058 pxor xmm1,xmm9
1059DB 102,76,15,110,200
1060
1061 pand xmm8,xmm0
1062DB 102,69,15,56,0,200
1063 pxor xmm9,xmm0
1064DB 102,68,15,58,68,231,0
1065 psllq xmm9,57
1066 movdqa xmm8,xmm9
1067 pslldq xmm9,8
1068DB 102,15,58,68,222,0
1069 psrldq xmm8,8
1070 pxor xmm0,xmm9
1071 pxor xmm1,xmm8
1072 movdqu xmm8,XMMWORD[r8]
1073
1074 movdqa xmm9,xmm0
1075 psrlq xmm0,1
1076DB 102,15,58,68,238,17
1077 xorps xmm3,xmm11
1078 movdqu xmm11,XMMWORD[16+r8]
1079DB 102,69,15,56,0,218
1080DB 102,15,58,68,231,16
1081 xorps xmm5,xmm13
1082 movups xmm7,XMMWORD[80+rdx]
1083DB 102,69,15,56,0,194
1084 pxor xmm1,xmm9
1085 pxor xmm9,xmm0
1086 psrlq xmm0,5
1087
1088 movdqa xmm13,xmm11
1089 pxor xmm4,xmm12
1090 pshufd xmm12,xmm11,78
1091 pxor xmm0,xmm9
1092 pxor xmm1,xmm8
1093 pxor xmm12,xmm11
1094DB 102,69,15,58,68,222,0
1095 psrlq xmm0,1
1096 pxor xmm0,xmm1
1097 movdqa xmm1,xmm0
1098DB 102,69,15,58,68,238,17
1099 xorps xmm3,xmm11
1100 pshufd xmm8,xmm0,78
1101 pxor xmm8,xmm0
1102
1103DB 102,68,15,58,68,231,0
1104 xorps xmm5,xmm13
1105
1106 lea r8,[64+r8]
1107 sub r9,0x40
1108 jnc NEAR $L$mod4_loop
1109
1110$L$tail4x:
1111DB 102,65,15,58,68,199,0
1112DB 102,65,15,58,68,207,17
1113DB 102,68,15,58,68,199,16
1114 xorps xmm4,xmm12
1115 xorps xmm0,xmm3
1116 xorps xmm1,xmm5
1117 pxor xmm1,xmm0
1118 pxor xmm8,xmm4
1119
1120 pxor xmm8,xmm1
1121 pxor xmm1,xmm0
1122
1123 movdqa xmm9,xmm8
1124 psrldq xmm8,8
1125 pslldq xmm9,8
1126 pxor xmm1,xmm8
1127 pxor xmm0,xmm9
1128
1129 movdqa xmm4,xmm0
1130 movdqa xmm3,xmm0
1131 psllq xmm0,5
1132 pxor xmm3,xmm0
1133 psllq xmm0,1
1134 pxor xmm0,xmm3
1135 psllq xmm0,57
1136 movdqa xmm3,xmm0
1137 pslldq xmm0,8
1138 psrldq xmm3,8
1139 pxor xmm0,xmm4
1140 pxor xmm1,xmm3
1141
1142
1143 movdqa xmm4,xmm0
1144 psrlq xmm0,1
1145 pxor xmm1,xmm4
1146 pxor xmm4,xmm0
1147 psrlq xmm0,5
1148 pxor xmm0,xmm4
1149 psrlq xmm0,1
1150 pxor xmm0,xmm1
1151 add r9,0x40
1152 jz NEAR $L$done
1153 movdqu xmm7,XMMWORD[32+rdx]
1154 sub r9,0x10
1155 jz NEAR $L$odd_tail
1156$L$skip4x:
1157
1158
1159
1160
1161
1162 movdqu xmm8,XMMWORD[r8]
1163 movdqu xmm3,XMMWORD[16+r8]
1164DB 102,69,15,56,0,194
1165DB 102,65,15,56,0,218
1166 pxor xmm0,xmm8
1167
1168 movdqa xmm5,xmm3
1169 pshufd xmm4,xmm3,78
1170 pxor xmm4,xmm3
1171DB 102,15,58,68,218,0
1172DB 102,15,58,68,234,17
1173DB 102,15,58,68,231,0
1174
1175 lea r8,[32+r8]
1176 nop
1177 sub r9,0x20
1178 jbe NEAR $L$even_tail
1179 nop
1180 jmp NEAR $L$mod_loop
1181
1182ALIGN 32
1183$L$mod_loop:
1184 movdqa xmm1,xmm0
1185 movdqa xmm8,xmm4
1186 pshufd xmm4,xmm0,78
1187 pxor xmm4,xmm0
1188
1189DB 102,15,58,68,198,0
1190DB 102,15,58,68,206,17
1191DB 102,15,58,68,231,16
1192
1193 pxor xmm0,xmm3
1194 pxor xmm1,xmm5
1195 movdqu xmm9,XMMWORD[r8]
1196 pxor xmm8,xmm0
1197DB 102,69,15,56,0,202
1198 movdqu xmm3,XMMWORD[16+r8]
1199
1200 pxor xmm8,xmm1
1201 pxor xmm1,xmm9
1202 pxor xmm4,xmm8
1203DB 102,65,15,56,0,218
1204 movdqa xmm8,xmm4
1205 psrldq xmm8,8
1206 pslldq xmm4,8
1207 pxor xmm1,xmm8
1208 pxor xmm0,xmm4
1209
1210 movdqa xmm5,xmm3
1211
1212 movdqa xmm9,xmm0
1213 movdqa xmm8,xmm0
1214 psllq xmm0,5
1215 pxor xmm8,xmm0
1216DB 102,15,58,68,218,0
1217 psllq xmm0,1
1218 pxor xmm0,xmm8
1219 psllq xmm0,57
1220 movdqa xmm8,xmm0
1221 pslldq xmm0,8
1222 psrldq xmm8,8
1223 pxor xmm0,xmm9
1224 pshufd xmm4,xmm5,78
1225 pxor xmm1,xmm8
1226 pxor xmm4,xmm5
1227
1228 movdqa xmm9,xmm0
1229 psrlq xmm0,1
1230DB 102,15,58,68,234,17
1231 pxor xmm1,xmm9
1232 pxor xmm9,xmm0
1233 psrlq xmm0,5
1234 pxor xmm0,xmm9
1235 lea r8,[32+r8]
1236 psrlq xmm0,1
1237DB 102,15,58,68,231,0
1238 pxor xmm0,xmm1
1239
1240 sub r9,0x20
1241 ja NEAR $L$mod_loop
1242
1243$L$even_tail:
1244 movdqa xmm1,xmm0
1245 movdqa xmm8,xmm4
1246 pshufd xmm4,xmm0,78
1247 pxor xmm4,xmm0
1248
1249DB 102,15,58,68,198,0
1250DB 102,15,58,68,206,17
1251DB 102,15,58,68,231,16
1252
1253 pxor xmm0,xmm3
1254 pxor xmm1,xmm5
1255 pxor xmm8,xmm0
1256 pxor xmm8,xmm1
1257 pxor xmm4,xmm8
1258 movdqa xmm8,xmm4
1259 psrldq xmm8,8
1260 pslldq xmm4,8
1261 pxor xmm1,xmm8
1262 pxor xmm0,xmm4
1263
1264 movdqa xmm4,xmm0
1265 movdqa xmm3,xmm0
1266 psllq xmm0,5
1267 pxor xmm3,xmm0
1268 psllq xmm0,1
1269 pxor xmm0,xmm3
1270 psllq xmm0,57
1271 movdqa xmm3,xmm0
1272 pslldq xmm0,8
1273 psrldq xmm3,8
1274 pxor xmm0,xmm4
1275 pxor xmm1,xmm3
1276
1277
1278 movdqa xmm4,xmm0
1279 psrlq xmm0,1
1280 pxor xmm1,xmm4
1281 pxor xmm4,xmm0
1282 psrlq xmm0,5
1283 pxor xmm0,xmm4
1284 psrlq xmm0,1
1285 pxor xmm0,xmm1
1286 test r9,r9
1287 jnz NEAR $L$done
1288
1289$L$odd_tail:
1290 movdqu xmm8,XMMWORD[r8]
1291DB 102,69,15,56,0,194
1292 pxor xmm0,xmm8
1293 movdqa xmm1,xmm0
1294 pshufd xmm3,xmm0,78
1295 pxor xmm3,xmm0
1296DB 102,15,58,68,194,0
1297DB 102,15,58,68,202,17
1298DB 102,15,58,68,223,0
1299 pxor xmm3,xmm0
1300 pxor xmm3,xmm1
1301
1302 movdqa xmm4,xmm3
1303 psrldq xmm3,8
1304 pslldq xmm4,8
1305 pxor xmm1,xmm3
1306 pxor xmm0,xmm4
1307
1308 movdqa xmm4,xmm0
1309 movdqa xmm3,xmm0
1310 psllq xmm0,5
1311 pxor xmm3,xmm0
1312 psllq xmm0,1
1313 pxor xmm0,xmm3
1314 psllq xmm0,57
1315 movdqa xmm3,xmm0
1316 pslldq xmm0,8
1317 psrldq xmm3,8
1318 pxor xmm0,xmm4
1319 pxor xmm1,xmm3
1320
1321
1322 movdqa xmm4,xmm0
1323 psrlq xmm0,1
1324 pxor xmm1,xmm4
1325 pxor xmm4,xmm0
1326 psrlq xmm0,5
1327 pxor xmm0,xmm4
1328 psrlq xmm0,1
1329 pxor xmm0,xmm1
1330$L$done:
1331DB 102,65,15,56,0,194
1332 movdqu XMMWORD[rcx],xmm0
1333 movaps xmm6,XMMWORD[rsp]
1334 movaps xmm7,XMMWORD[16+rsp]
1335 movaps xmm8,XMMWORD[32+rsp]
1336 movaps xmm9,XMMWORD[48+rsp]
1337 movaps xmm10,XMMWORD[64+rsp]
1338 movaps xmm11,XMMWORD[80+rsp]
1339 movaps xmm12,XMMWORD[96+rsp]
1340 movaps xmm13,XMMWORD[112+rsp]
1341 movaps xmm14,XMMWORD[128+rsp]
1342 movaps xmm15,XMMWORD[144+rsp]
1343 lea rsp,[168+rsp]
1344$L$SEH_end_gcm_ghash_clmul:
1345 DB 0F3h,0C3h ;repret
1346
1347
1348global gcm_init_avx
1349
1350ALIGN 32
1351gcm_init_avx:
1352
1353 jmp NEAR $L$_init_clmul
1354
1355
1356global gcm_gmult_avx
1357
1358ALIGN 32
1359gcm_gmult_avx:
1360
1361 jmp NEAR $L$_gmult_clmul
1362
1363
1364global gcm_ghash_avx
1365
1366ALIGN 32
1367gcm_ghash_avx:
1368
1369 jmp NEAR $L$_ghash_clmul
1370
1371
1372ALIGN 64
1373$L$bswap_mask:
1374DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
1375$L$0x1c2_polynomial:
1376DB 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2
1377$L$7_mask:
1378 DD 7,0,7,0
1379$L$7_mask_poly:
1380 DD 7,0,450,0
1381ALIGN 64
1382
1383$L$rem_4bit:
1384 DD 0,0,0,471859200,0,943718400,0,610271232
1385 DD 0,1887436800,0,1822425088,0,1220542464,0,1423966208
1386 DD 0,3774873600,0,4246732800,0,3644850176,0,3311403008
1387 DD 0,2441084928,0,2376073216,0,2847932416,0,3051356160
1388
1389$L$rem_8bit:
1390 DW 0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E
1391 DW 0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E
1392 DW 0x1C20,0x1DE2,0x1FA4,0x1E66,0x1B28,0x1AEA,0x18AC,0x196E
1393 DW 0x1230,0x13F2,0x11B4,0x1076,0x1538,0x14FA,0x16BC,0x177E
1394 DW 0x3840,0x3982,0x3BC4,0x3A06,0x3F48,0x3E8A,0x3CCC,0x3D0E
1395 DW 0x3650,0x3792,0x35D4,0x3416,0x3158,0x309A,0x32DC,0x331E
1396 DW 0x2460,0x25A2,0x27E4,0x2626,0x2368,0x22AA,0x20EC,0x212E
1397 DW 0x2A70,0x2BB2,0x29F4,0x2836,0x2D78,0x2CBA,0x2EFC,0x2F3E
1398 DW 0x7080,0x7142,0x7304,0x72C6,0x7788,0x764A,0x740C,0x75CE
1399 DW 0x7E90,0x7F52,0x7D14,0x7CD6,0x7998,0x785A,0x7A1C,0x7BDE
1400 DW 0x6CA0,0x6D62,0x6F24,0x6EE6,0x6BA8,0x6A6A,0x682C,0x69EE
1401 DW 0x62B0,0x6372,0x6134,0x60F6,0x65B8,0x647A,0x663C,0x67FE
1402 DW 0x48C0,0x4902,0x4B44,0x4A86,0x4FC8,0x4E0A,0x4C4C,0x4D8E
1403 DW 0x46D0,0x4712,0x4554,0x4496,0x41D8,0x401A,0x425C,0x439E
1404 DW 0x54E0,0x5522,0x5764,0x56A6,0x53E8,0x522A,0x506C,0x51AE
1405 DW 0x5AF0,0x5B32,0x5974,0x58B6,0x5DF8,0x5C3A,0x5E7C,0x5FBE
1406 DW 0xE100,0xE0C2,0xE284,0xE346,0xE608,0xE7CA,0xE58C,0xE44E
1407 DW 0xEF10,0xEED2,0xEC94,0xED56,0xE818,0xE9DA,0xEB9C,0xEA5E
1408 DW 0xFD20,0xFCE2,0xFEA4,0xFF66,0xFA28,0xFBEA,0xF9AC,0xF86E
1409 DW 0xF330,0xF2F2,0xF0B4,0xF176,0xF438,0xF5FA,0xF7BC,0xF67E
1410 DW 0xD940,0xD882,0xDAC4,0xDB06,0xDE48,0xDF8A,0xDDCC,0xDC0E
1411 DW 0xD750,0xD692,0xD4D4,0xD516,0xD058,0xD19A,0xD3DC,0xD21E
1412 DW 0xC560,0xC4A2,0xC6E4,0xC726,0xC268,0xC3AA,0xC1EC,0xC02E
1413 DW 0xCB70,0xCAB2,0xC8F4,0xC936,0xCC78,0xCDBA,0xCFFC,0xCE3E
1414 DW 0x9180,0x9042,0x9204,0x93C6,0x9688,0x974A,0x950C,0x94CE
1415 DW 0x9F90,0x9E52,0x9C14,0x9DD6,0x9898,0x995A,0x9B1C,0x9ADE
1416 DW 0x8DA0,0x8C62,0x8E24,0x8FE6,0x8AA8,0x8B6A,0x892C,0x88EE
1417 DW 0x83B0,0x8272,0x8034,0x81F6,0x84B8,0x857A,0x873C,0x86FE
1418 DW 0xA9C0,0xA802,0xAA44,0xAB86,0xAEC8,0xAF0A,0xAD4C,0xAC8E
1419 DW 0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E
1420 DW 0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE
1421 DW 0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE
1422
1423DB 71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52
1424DB 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
1425DB 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
1426DB 114,103,62,0
1427ALIGN 64
1428EXTERN __imp_RtlVirtualUnwind
1429
1430ALIGN 16
1431se_handler:
1432 push rsi
1433 push rdi
1434 push rbx
1435 push rbp
1436 push r12
1437 push r13
1438 push r14
1439 push r15
1440 pushfq
1441 sub rsp,64
1442
1443 mov rax,QWORD[120+r8]
1444 mov rbx,QWORD[248+r8]
1445
1446 mov rsi,QWORD[8+r9]
1447 mov r11,QWORD[56+r9]
1448
1449 mov r10d,DWORD[r11]
1450 lea r10,[r10*1+rsi]
1451 cmp rbx,r10
1452 jb NEAR $L$in_prologue
1453
1454 mov rax,QWORD[152+r8]
1455
1456 mov r10d,DWORD[4+r11]
1457 lea r10,[r10*1+rsi]
1458 cmp rbx,r10
1459 jae NEAR $L$in_prologue
1460
1461 lea rax,[((48+280))+rax]
1462
1463 mov rbx,QWORD[((-8))+rax]
1464 mov rbp,QWORD[((-16))+rax]
1465 mov r12,QWORD[((-24))+rax]
1466 mov r13,QWORD[((-32))+rax]
1467 mov r14,QWORD[((-40))+rax]
1468 mov r15,QWORD[((-48))+rax]
1469 mov QWORD[144+r8],rbx
1470 mov QWORD[160+r8],rbp
1471 mov QWORD[216+r8],r12
1472 mov QWORD[224+r8],r13
1473 mov QWORD[232+r8],r14
1474 mov QWORD[240+r8],r15
1475
1476$L$in_prologue:
1477 mov rdi,QWORD[8+rax]
1478 mov rsi,QWORD[16+rax]
1479 mov QWORD[152+r8],rax
1480 mov QWORD[168+r8],rsi
1481 mov QWORD[176+r8],rdi
1482
1483 mov rdi,QWORD[40+r9]
1484 mov rsi,r8
1485 mov ecx,154
1486 DD 0xa548f3fc
1487
1488 mov rsi,r9
1489 xor rcx,rcx
1490 mov rdx,QWORD[8+rsi]
1491 mov r8,QWORD[rsi]
1492 mov r9,QWORD[16+rsi]
1493 mov r10,QWORD[40+rsi]
1494 lea r11,[56+rsi]
1495 lea r12,[24+rsi]
1496 mov QWORD[32+rsp],r10
1497 mov QWORD[40+rsp],r11
1498 mov QWORD[48+rsp],r12
1499 mov QWORD[56+rsp],rcx
1500 call QWORD[__imp_RtlVirtualUnwind]
1501
1502 mov eax,1
1503 add rsp,64
1504 popfq
1505 pop r15
1506 pop r14
1507 pop r13
1508 pop r12
1509 pop rbp
1510 pop rbx
1511 pop rdi
1512 pop rsi
1513 DB 0F3h,0C3h ;repret
1514
1515
1516section .pdata rdata align=4
1517ALIGN 4
1518 DD $L$SEH_begin_gcm_gmult_4bit wrt ..imagebase
1519 DD $L$SEH_end_gcm_gmult_4bit wrt ..imagebase
1520 DD $L$SEH_info_gcm_gmult_4bit wrt ..imagebase
1521
1522 DD $L$SEH_begin_gcm_ghash_4bit wrt ..imagebase
1523 DD $L$SEH_end_gcm_ghash_4bit wrt ..imagebase
1524 DD $L$SEH_info_gcm_ghash_4bit wrt ..imagebase
1525
1526 DD $L$SEH_begin_gcm_init_clmul wrt ..imagebase
1527 DD $L$SEH_end_gcm_init_clmul wrt ..imagebase
1528 DD $L$SEH_info_gcm_init_clmul wrt ..imagebase
1529
1530 DD $L$SEH_begin_gcm_ghash_clmul wrt ..imagebase
1531 DD $L$SEH_end_gcm_ghash_clmul wrt ..imagebase
1532 DD $L$SEH_info_gcm_ghash_clmul wrt ..imagebase
1533section .xdata rdata align=8
1534ALIGN 8
1535$L$SEH_info_gcm_gmult_4bit:
1536DB 9,0,0,0
1537 DD se_handler wrt ..imagebase
1538 DD $L$gmult_prologue wrt ..imagebase,$L$gmult_epilogue wrt ..imagebase
1539$L$SEH_info_gcm_ghash_4bit:
1540DB 9,0,0,0
1541 DD se_handler wrt ..imagebase
1542 DD $L$ghash_prologue wrt ..imagebase,$L$ghash_epilogue wrt ..imagebase
1543$L$SEH_info_gcm_init_clmul:
1544DB 0x01,0x08,0x03,0x00
1545DB 0x08,0x68,0x00,0x00
1546DB 0x04,0x22,0x00,0x00
1547$L$SEH_info_gcm_ghash_clmul:
1548DB 0x01,0x33,0x16,0x00
1549DB 0x33,0xf8,0x09,0x00
1550DB 0x2e,0xe8,0x08,0x00
1551DB 0x29,0xd8,0x07,0x00
1552DB 0x24,0xc8,0x06,0x00
1553DB 0x1f,0xb8,0x05,0x00
1554DB 0x1a,0xa8,0x04,0x00
1555DB 0x15,0x98,0x03,0x00
1556DB 0x10,0x88,0x02,0x00
1557DB 0x0c,0x78,0x01,0x00
1558DB 0x08,0x68,0x00,0x00
1559DB 0x04,0x01,0x15,0x00
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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