Text file
src/crypto/md5/md5block_amd64.s
1 // Code generated by command: go run md5block_amd64_asm.go -out ../md5block_amd64.s -pkg md5. DO NOT EDIT.
2
3 //go:build !purego
4
5 #include "textflag.h"
6
7 // func block(dig *digest, p []byte)
8 TEXT ·block(SB), NOSPLIT, $8-32
9 MOVQ dig+0(FP), BP
10 MOVQ p_base+8(FP), SI
11 MOVQ p_len+16(FP), DX
12 SHRQ $0x06, DX
13 SHLQ $0x06, DX
14 LEAQ (SI)(DX*1), DI
15 MOVL (BP), AX
16 MOVL 4(BP), BX
17 MOVL 8(BP), CX
18 MOVL 12(BP), DX
19 MOVL $0xffffffff, R11
20 CMPQ SI, DI
21 JEQ end
22
23 loop:
24 MOVL AX, R12
25 MOVL BX, R13
26 MOVL CX, R14
27 MOVL DX, R15
28 MOVL (SI), R8
29 MOVL DX, R9
30 XORL CX, R9
31 ADDL $0xd76aa478, AX
32 ADDL R8, AX
33 ANDL BX, R9
34 XORL DX, R9
35 MOVL 4(SI), R8
36 ADDL R9, AX
37 ROLL $0x07, AX
38 MOVL CX, R9
39 ADDL BX, AX
40 XORL BX, R9
41 ADDL $0xe8c7b756, DX
42 ADDL R8, DX
43 ANDL AX, R9
44 XORL CX, R9
45 MOVL 8(SI), R8
46 ADDL R9, DX
47 ROLL $0x0c, DX
48 MOVL BX, R9
49 ADDL AX, DX
50 XORL AX, R9
51 ADDL $0x242070db, CX
52 ADDL R8, CX
53 ANDL DX, R9
54 XORL BX, R9
55 MOVL 12(SI), R8
56 ADDL R9, CX
57 ROLL $0x11, CX
58 MOVL AX, R9
59 ADDL DX, CX
60 XORL DX, R9
61 ADDL $0xc1bdceee, BX
62 ADDL R8, BX
63 ANDL CX, R9
64 XORL AX, R9
65 MOVL 16(SI), R8
66 ADDL R9, BX
67 ROLL $0x16, BX
68 MOVL DX, R9
69 ADDL CX, BX
70 XORL CX, R9
71 ADDL $0xf57c0faf, AX
72 ADDL R8, AX
73 ANDL BX, R9
74 XORL DX, R9
75 MOVL 20(SI), R8
76 ADDL R9, AX
77 ROLL $0x07, AX
78 MOVL CX, R9
79 ADDL BX, AX
80 XORL BX, R9
81 ADDL $0x4787c62a, DX
82 ADDL R8, DX
83 ANDL AX, R9
84 XORL CX, R9
85 MOVL 24(SI), R8
86 ADDL R9, DX
87 ROLL $0x0c, DX
88 MOVL BX, R9
89 ADDL AX, DX
90 XORL AX, R9
91 ADDL $0xa8304613, CX
92 ADDL R8, CX
93 ANDL DX, R9
94 XORL BX, R9
95 MOVL 28(SI), R8
96 ADDL R9, CX
97 ROLL $0x11, CX
98 MOVL AX, R9
99 ADDL DX, CX
100 XORL DX, R9
101 ADDL $0xfd469501, BX
102 ADDL R8, BX
103 ANDL CX, R9
104 XORL AX, R9
105 MOVL 32(SI), R8
106 ADDL R9, BX
107 ROLL $0x16, BX
108 MOVL DX, R9
109 ADDL CX, BX
110 XORL CX, R9
111 ADDL $0x698098d8, AX
112 ADDL R8, AX
113 ANDL BX, R9
114 XORL DX, R9
115 MOVL 36(SI), R8
116 ADDL R9, AX
117 ROLL $0x07, AX
118 MOVL CX, R9
119 ADDL BX, AX
120 XORL BX, R9
121 ADDL $0x8b44f7af, DX
122 ADDL R8, DX
123 ANDL AX, R9
124 XORL CX, R9
125 MOVL 40(SI), R8
126 ADDL R9, DX
127 ROLL $0x0c, DX
128 MOVL BX, R9
129 ADDL AX, DX
130 XORL AX, R9
131 ADDL $0xffff5bb1, CX
132 ADDL R8, CX
133 ANDL DX, R9
134 XORL BX, R9
135 MOVL 44(SI), R8
136 ADDL R9, CX
137 ROLL $0x11, CX
138 MOVL AX, R9
139 ADDL DX, CX
140 XORL DX, R9
141 ADDL $0x895cd7be, BX
142 ADDL R8, BX
143 ANDL CX, R9
144 XORL AX, R9
145 MOVL 48(SI), R8
146 ADDL R9, BX
147 ROLL $0x16, BX
148 MOVL DX, R9
149 ADDL CX, BX
150 XORL CX, R9
151 ADDL $0x6b901122, AX
152 ADDL R8, AX
153 ANDL BX, R9
154 XORL DX, R9
155 MOVL 52(SI), R8
156 ADDL R9, AX
157 ROLL $0x07, AX
158 MOVL CX, R9
159 ADDL BX, AX
160 XORL BX, R9
161 ADDL $0xfd987193, DX
162 ADDL R8, DX
163 ANDL AX, R9
164 XORL CX, R9
165 MOVL 56(SI), R8
166 ADDL R9, DX
167 ROLL $0x0c, DX
168 MOVL BX, R9
169 ADDL AX, DX
170 XORL AX, R9
171 ADDL $0xa679438e, CX
172 ADDL R8, CX
173 ANDL DX, R9
174 XORL BX, R9
175 MOVL 60(SI), R8
176 ADDL R9, CX
177 ROLL $0x11, CX
178 MOVL AX, R9
179 ADDL DX, CX
180 XORL DX, R9
181 ADDL $0x49b40821, BX
182 ADDL R8, BX
183 ANDL CX, R9
184 XORL AX, R9
185 MOVL 4(SI), R8
186 ADDL R9, BX
187 ROLL $0x16, BX
188 MOVL DX, R9
189 ADDL CX, BX
190 MOVL DX, R9
191 MOVL DX, R10
192 XORL R11, R9
193 ADDL $0xf61e2562, AX
194 ADDL R8, AX
195 ANDL BX, R10
196 ANDL CX, R9
197 MOVL 24(SI), R8
198 ADDL R9, AX
199 ADDL R10, AX
200 MOVL CX, R9
201 MOVL CX, R10
202 ROLL $0x05, AX
203 ADDL BX, AX
204 XORL R11, R9
205 ADDL $0xc040b340, DX
206 ADDL R8, DX
207 ANDL AX, R10
208 ANDL BX, R9
209 MOVL 44(SI), R8
210 ADDL R9, DX
211 ADDL R10, DX
212 MOVL BX, R9
213 MOVL BX, R10
214 ROLL $0x09, DX
215 ADDL AX, DX
216 XORL R11, R9
217 ADDL $0x265e5a51, CX
218 ADDL R8, CX
219 ANDL DX, R10
220 ANDL AX, R9
221 MOVL (SI), R8
222 ADDL R9, CX
223 ADDL R10, CX
224 MOVL AX, R9
225 MOVL AX, R10
226 ROLL $0x0e, CX
227 ADDL DX, CX
228 XORL R11, R9
229 ADDL $0xe9b6c7aa, BX
230 ADDL R8, BX
231 ANDL CX, R10
232 ANDL DX, R9
233 MOVL 20(SI), R8
234 ADDL R9, BX
235 ADDL R10, BX
236 MOVL DX, R9
237 MOVL DX, R10
238 ROLL $0x14, BX
239 ADDL CX, BX
240 XORL R11, R9
241 ADDL $0xd62f105d, AX
242 ADDL R8, AX
243 ANDL BX, R10
244 ANDL CX, R9
245 MOVL 40(SI), R8
246 ADDL R9, AX
247 ADDL R10, AX
248 MOVL CX, R9
249 MOVL CX, R10
250 ROLL $0x05, AX
251 ADDL BX, AX
252 XORL R11, R9
253 ADDL $0x02441453, DX
254 ADDL R8, DX
255 ANDL AX, R10
256 ANDL BX, R9
257 MOVL 60(SI), R8
258 ADDL R9, DX
259 ADDL R10, DX
260 MOVL BX, R9
261 MOVL BX, R10
262 ROLL $0x09, DX
263 ADDL AX, DX
264 XORL R11, R9
265 ADDL $0xd8a1e681, CX
266 ADDL R8, CX
267 ANDL DX, R10
268 ANDL AX, R9
269 MOVL 16(SI), R8
270 ADDL R9, CX
271 ADDL R10, CX
272 MOVL AX, R9
273 MOVL AX, R10
274 ROLL $0x0e, CX
275 ADDL DX, CX
276 XORL R11, R9
277 ADDL $0xe7d3fbc8, BX
278 ADDL R8, BX
279 ANDL CX, R10
280 ANDL DX, R9
281 MOVL 36(SI), R8
282 ADDL R9, BX
283 ADDL R10, BX
284 MOVL DX, R9
285 MOVL DX, R10
286 ROLL $0x14, BX
287 ADDL CX, BX
288 XORL R11, R9
289 ADDL $0x21e1cde6, AX
290 ADDL R8, AX
291 ANDL BX, R10
292 ANDL CX, R9
293 MOVL 56(SI), R8
294 ADDL R9, AX
295 ADDL R10, AX
296 MOVL CX, R9
297 MOVL CX, R10
298 ROLL $0x05, AX
299 ADDL BX, AX
300 XORL R11, R9
301 ADDL $0xc33707d6, DX
302 ADDL R8, DX
303 ANDL AX, R10
304 ANDL BX, R9
305 MOVL 12(SI), R8
306 ADDL R9, DX
307 ADDL R10, DX
308 MOVL BX, R9
309 MOVL BX, R10
310 ROLL $0x09, DX
311 ADDL AX, DX
312 XORL R11, R9
313 ADDL $0xf4d50d87, CX
314 ADDL R8, CX
315 ANDL DX, R10
316 ANDL AX, R9
317 MOVL 32(SI), R8
318 ADDL R9, CX
319 ADDL R10, CX
320 MOVL AX, R9
321 MOVL AX, R10
322 ROLL $0x0e, CX
323 ADDL DX, CX
324 XORL R11, R9
325 ADDL $0x455a14ed, BX
326 ADDL R8, BX
327 ANDL CX, R10
328 ANDL DX, R9
329 MOVL 52(SI), R8
330 ADDL R9, BX
331 ADDL R10, BX
332 MOVL DX, R9
333 MOVL DX, R10
334 ROLL $0x14, BX
335 ADDL CX, BX
336 XORL R11, R9
337 ADDL $0xa9e3e905, AX
338 ADDL R8, AX
339 ANDL BX, R10
340 ANDL CX, R9
341 MOVL 8(SI), R8
342 ADDL R9, AX
343 ADDL R10, AX
344 MOVL CX, R9
345 MOVL CX, R10
346 ROLL $0x05, AX
347 ADDL BX, AX
348 XORL R11, R9
349 ADDL $0xfcefa3f8, DX
350 ADDL R8, DX
351 ANDL AX, R10
352 ANDL BX, R9
353 MOVL 28(SI), R8
354 ADDL R9, DX
355 ADDL R10, DX
356 MOVL BX, R9
357 MOVL BX, R10
358 ROLL $0x09, DX
359 ADDL AX, DX
360 XORL R11, R9
361 ADDL $0x676f02d9, CX
362 ADDL R8, CX
363 ANDL DX, R10
364 ANDL AX, R9
365 MOVL 48(SI), R8
366 ADDL R9, CX
367 ADDL R10, CX
368 MOVL AX, R9
369 MOVL AX, R10
370 ROLL $0x0e, CX
371 ADDL DX, CX
372 XORL R11, R9
373 ADDL $0x8d2a4c8a, BX
374 ADDL R8, BX
375 ANDL CX, R10
376 ANDL DX, R9
377 MOVL 20(SI), R8
378 ADDL R9, BX
379 ADDL R10, BX
380 MOVL DX, R9
381 MOVL DX, R10
382 ROLL $0x14, BX
383 ADDL CX, BX
384 MOVL CX, R9
385 MOVL DX, R9
386 XORL CX, R9
387 XORL BX, R9
388 ADDL $0xfffa3942, AX
389 ADDL R8, AX
390 MOVL 32(SI), R8
391 ADDL R9, AX
392 ROLL $0x04, AX
393 ADDL BX, AX
394 XORL DX, R9
395 XORL AX, R9
396 ADDL $0x8771f681, DX
397 ADDL R8, DX
398 MOVL 44(SI), R8
399 ADDL R9, DX
400 ROLL $0x0b, DX
401 ADDL AX, DX
402 XORL CX, R9
403 XORL DX, R9
404 ADDL $0x6d9d6122, CX
405 ADDL R8, CX
406 MOVL 56(SI), R8
407 ADDL R9, CX
408 ROLL $0x10, CX
409 ADDL DX, CX
410 XORL BX, R9
411 XORL CX, R9
412 ADDL $0xfde5380c, BX
413 ADDL R8, BX
414 MOVL 4(SI), R8
415 ADDL R9, BX
416 ROLL $0x17, BX
417 ADDL CX, BX
418 XORL AX, R9
419 XORL BX, R9
420 ADDL $0xa4beea44, AX
421 ADDL R8, AX
422 MOVL 16(SI), R8
423 ADDL R9, AX
424 ROLL $0x04, AX
425 ADDL BX, AX
426 XORL DX, R9
427 XORL AX, R9
428 ADDL $0x4bdecfa9, DX
429 ADDL R8, DX
430 MOVL 28(SI), R8
431 ADDL R9, DX
432 ROLL $0x0b, DX
433 ADDL AX, DX
434 XORL CX, R9
435 XORL DX, R9
436 ADDL $0xf6bb4b60, CX
437 ADDL R8, CX
438 MOVL 40(SI), R8
439 ADDL R9, CX
440 ROLL $0x10, CX
441 ADDL DX, CX
442 XORL BX, R9
443 XORL CX, R9
444 ADDL $0xbebfbc70, BX
445 ADDL R8, BX
446 MOVL 52(SI), R8
447 ADDL R9, BX
448 ROLL $0x17, BX
449 ADDL CX, BX
450 XORL AX, R9
451 XORL BX, R9
452 ADDL $0x289b7ec6, AX
453 ADDL R8, AX
454 MOVL (SI), R8
455 ADDL R9, AX
456 ROLL $0x04, AX
457 ADDL BX, AX
458 XORL DX, R9
459 XORL AX, R9
460 ADDL $0xeaa127fa, DX
461 ADDL R8, DX
462 MOVL 12(SI), R8
463 ADDL R9, DX
464 ROLL $0x0b, DX
465 ADDL AX, DX
466 XORL CX, R9
467 XORL DX, R9
468 ADDL $0xd4ef3085, CX
469 ADDL R8, CX
470 MOVL 24(SI), R8
471 ADDL R9, CX
472 ROLL $0x10, CX
473 ADDL DX, CX
474 XORL BX, R9
475 XORL CX, R9
476 ADDL $0x04881d05, BX
477 ADDL R8, BX
478 MOVL 36(SI), R8
479 ADDL R9, BX
480 ROLL $0x17, BX
481 ADDL CX, BX
482 XORL AX, R9
483 XORL BX, R9
484 ADDL $0xd9d4d039, AX
485 ADDL R8, AX
486 MOVL 48(SI), R8
487 ADDL R9, AX
488 ROLL $0x04, AX
489 ADDL BX, AX
490 XORL DX, R9
491 XORL AX, R9
492 ADDL $0xe6db99e5, DX
493 ADDL R8, DX
494 MOVL 60(SI), R8
495 ADDL R9, DX
496 ROLL $0x0b, DX
497 ADDL AX, DX
498 XORL CX, R9
499 XORL DX, R9
500 ADDL $0x1fa27cf8, CX
501 ADDL R8, CX
502 MOVL 8(SI), R8
503 ADDL R9, CX
504 ROLL $0x10, CX
505 ADDL DX, CX
506 XORL BX, R9
507 XORL CX, R9
508 ADDL $0xc4ac5665, BX
509 ADDL R8, BX
510 MOVL (SI), R8
511 ADDL R9, BX
512 ROLL $0x17, BX
513 ADDL CX, BX
514 MOVL R11, R9
515 XORL DX, R9
516 ADDL $0xf4292244, AX
517 ADDL R8, AX
518 ORL BX, R9
519 XORL CX, R9
520 ADDL R9, AX
521 MOVL 28(SI), R8
522 MOVL $0xffffffff, R9
523 ROLL $0x06, AX
524 XORL CX, R9
525 ADDL BX, AX
526 ADDL $0x432aff97, DX
527 ADDL R8, DX
528 ORL AX, R9
529 XORL BX, R9
530 ADDL R9, DX
531 MOVL 56(SI), R8
532 MOVL $0xffffffff, R9
533 ROLL $0x0a, DX
534 XORL BX, R9
535 ADDL AX, DX
536 ADDL $0xab9423a7, CX
537 ADDL R8, CX
538 ORL DX, R9
539 XORL AX, R9
540 ADDL R9, CX
541 MOVL 20(SI), R8
542 MOVL $0xffffffff, R9
543 ROLL $0x0f, CX
544 XORL AX, R9
545 ADDL DX, CX
546 ADDL $0xfc93a039, BX
547 ADDL R8, BX
548 ORL CX, R9
549 XORL DX, R9
550 ADDL R9, BX
551 MOVL 48(SI), R8
552 MOVL $0xffffffff, R9
553 ROLL $0x15, BX
554 XORL DX, R9
555 ADDL CX, BX
556 ADDL $0x655b59c3, AX
557 ADDL R8, AX
558 ORL BX, R9
559 XORL CX, R9
560 ADDL R9, AX
561 MOVL 12(SI), R8
562 MOVL $0xffffffff, R9
563 ROLL $0x06, AX
564 XORL CX, R9
565 ADDL BX, AX
566 ADDL $0x8f0ccc92, DX
567 ADDL R8, DX
568 ORL AX, R9
569 XORL BX, R9
570 ADDL R9, DX
571 MOVL 40(SI), R8
572 MOVL $0xffffffff, R9
573 ROLL $0x0a, DX
574 XORL BX, R9
575 ADDL AX, DX
576 ADDL $0xffeff47d, CX
577 ADDL R8, CX
578 ORL DX, R9
579 XORL AX, R9
580 ADDL R9, CX
581 MOVL 4(SI), R8
582 MOVL $0xffffffff, R9
583 ROLL $0x0f, CX
584 XORL AX, R9
585 ADDL DX, CX
586 ADDL $0x85845dd1, BX
587 ADDL R8, BX
588 ORL CX, R9
589 XORL DX, R9
590 ADDL R9, BX
591 MOVL 32(SI), R8
592 MOVL $0xffffffff, R9
593 ROLL $0x15, BX
594 XORL DX, R9
595 ADDL CX, BX
596 ADDL $0x6fa87e4f, AX
597 ADDL R8, AX
598 ORL BX, R9
599 XORL CX, R9
600 ADDL R9, AX
601 MOVL 60(SI), R8
602 MOVL $0xffffffff, R9
603 ROLL $0x06, AX
604 XORL CX, R9
605 ADDL BX, AX
606 ADDL $0xfe2ce6e0, DX
607 ADDL R8, DX
608 ORL AX, R9
609 XORL BX, R9
610 ADDL R9, DX
611 MOVL 24(SI), R8
612 MOVL $0xffffffff, R9
613 ROLL $0x0a, DX
614 XORL BX, R9
615 ADDL AX, DX
616 ADDL $0xa3014314, CX
617 ADDL R8, CX
618 ORL DX, R9
619 XORL AX, R9
620 ADDL R9, CX
621 MOVL 52(SI), R8
622 MOVL $0xffffffff, R9
623 ROLL $0x0f, CX
624 XORL AX, R9
625 ADDL DX, CX
626 ADDL $0x4e0811a1, BX
627 ADDL R8, BX
628 ORL CX, R9
629 XORL DX, R9
630 ADDL R9, BX
631 MOVL 16(SI), R8
632 MOVL $0xffffffff, R9
633 ROLL $0x15, BX
634 XORL DX, R9
635 ADDL CX, BX
636 ADDL $0xf7537e82, AX
637 ADDL R8, AX
638 ORL BX, R9
639 XORL CX, R9
640 ADDL R9, AX
641 MOVL 44(SI), R8
642 MOVL $0xffffffff, R9
643 ROLL $0x06, AX
644 XORL CX, R9
645 ADDL BX, AX
646 ADDL $0xbd3af235, DX
647 ADDL R8, DX
648 ORL AX, R9
649 XORL BX, R9
650 ADDL R9, DX
651 MOVL 8(SI), R8
652 MOVL $0xffffffff, R9
653 ROLL $0x0a, DX
654 XORL BX, R9
655 ADDL AX, DX
656 ADDL $0x2ad7d2bb, CX
657 ADDL R8, CX
658 ORL DX, R9
659 XORL AX, R9
660 ADDL R9, CX
661 MOVL 36(SI), R8
662 MOVL $0xffffffff, R9
663 ROLL $0x0f, CX
664 XORL AX, R9
665 ADDL DX, CX
666 ADDL $0xeb86d391, BX
667 ADDL R8, BX
668 ORL CX, R9
669 XORL DX, R9
670 ADDL R9, BX
671 MOVL (SI), R8
672 MOVL $0xffffffff, R9
673 ROLL $0x15, BX
674 XORL DX, R9
675 ADDL CX, BX
676 ADDL R12, AX
677 ADDL R13, BX
678 ADDL R14, CX
679 ADDL R15, DX
680 ADDQ $0x40, SI
681 CMPQ SI, DI
682 JB loop
683
684 end:
685 MOVL AX, (BP)
686 MOVL BX, 4(BP)
687 MOVL CX, 8(BP)
688 MOVL DX, 12(BP)
689 RET
690
View as plain text