9 .word 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
10 .word 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
11 .word 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
12 .word 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
13 .word 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
14 .word 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
15 .word 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
16 .word 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
17 .word 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
18 .word 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
19 .word 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
20 .word 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
21 .word 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
22 .word 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
23 .word 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
24 .word 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
27 #if __ARM_MAX_ARCH__>=7
29 .word OPENSSL_armcap_P-sha256_block_data_order
33 .global sha256_block_data_order
34 .type sha256_block_data_order,%function
35 sha256_block_data_order:
36 sub r3,pc,#8 @ sha256_block_data_order
37 add r2,r1,r2,lsl#6 @ len to point at the end of inp
38 #if __ARM_MAX_ARCH__>=7
39 ldr r12,.LOPENSSL_armcap
40 ldr r12,[r3,r12] @ OPENSSL_armcap_P
46 stmdb sp!,{r0,r1,r2,r4-r11,lr}
47 ldmia r0,{r4,r5,r6,r7,r8,r9,r10,r11}
48 sub r14,r3,#256+32 @ K256
49 sub sp,sp,#16*4 @ alloca(X[16])
61 str r1,[sp,#17*4] @ make room for r1
64 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
65 eor r0,r0,r8,ror#19 @ Sigma1(e)
69 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
76 str r1,[sp,#17*4] @ make room for r1
80 eor r0,r0,r8,ror#19 @ Sigma1(e)
82 ldr r12,[r14],#4 @ *K256++
83 add r11,r11,r2 @ h+=X[i]
86 add r11,r11,r0,ror#6 @ h+=Sigma1(e)
88 add r11,r11,r12 @ h+=K256[i]
89 eor r2,r2,r10 @ Ch(e,f,g)
91 add r11,r11,r2 @ h+=Ch(e,f,g)
98 ldr r2,[r1],#4 @ prefetch
102 eor r12,r4,r5 @ a^b, b^c in next round
104 ldr r2,[sp,#2*4] @ from future BODY_16_xx
105 eor r12,r4,r5 @ a^b, b^c in next round
106 ldr r1,[sp,#15*4] @ from future BODY_16_xx
108 eor r0,r0,r4,ror#20 @ Sigma0(a)
109 and r3,r3,r12 @ (b^c)&=(a^b)
111 eor r3,r3,r5 @ Maj(a,b,c)
112 add r11,r11,r0,ror#2 @ h+=Sigma0(a)
113 @ add r11,r11,r3 @ h+=Maj(a,b,c)
117 str r1,[sp,#17*4] @ make room for r1
120 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
121 eor r0,r0,r7,ror#19 @ Sigma1(e)
124 @ ldrb r2,[r1,#3] @ 1
125 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
132 str r1,[sp,#17*4] @ make room for r1
136 eor r0,r0,r7,ror#19 @ Sigma1(e)
138 ldr r3,[r14],#4 @ *K256++
139 add r10,r10,r2 @ h+=X[i]
142 add r10,r10,r0,ror#6 @ h+=Sigma1(e)
144 add r10,r10,r3 @ h+=K256[i]
145 eor r2,r2,r9 @ Ch(e,f,g)
146 eor r0,r11,r11,ror#11
147 add r10,r10,r2 @ h+=Ch(e,f,g)
154 ldr r2,[r1],#4 @ prefetch
158 eor r3,r11,r4 @ a^b, b^c in next round
160 ldr r2,[sp,#3*4] @ from future BODY_16_xx
161 eor r3,r11,r4 @ a^b, b^c in next round
162 ldr r1,[sp,#0*4] @ from future BODY_16_xx
164 eor r0,r0,r11,ror#20 @ Sigma0(a)
165 and r12,r12,r3 @ (b^c)&=(a^b)
167 eor r12,r12,r4 @ Maj(a,b,c)
168 add r10,r10,r0,ror#2 @ h+=Sigma0(a)
169 @ add r10,r10,r12 @ h+=Maj(a,b,c)
173 str r1,[sp,#17*4] @ make room for r1
176 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
177 eor r0,r0,r6,ror#19 @ Sigma1(e)
180 @ ldrb r2,[r1,#3] @ 2
181 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
188 str r1,[sp,#17*4] @ make room for r1
192 eor r0,r0,r6,ror#19 @ Sigma1(e)
194 ldr r12,[r14],#4 @ *K256++
195 add r9,r9,r2 @ h+=X[i]
198 add r9,r9,r0,ror#6 @ h+=Sigma1(e)
200 add r9,r9,r12 @ h+=K256[i]
201 eor r2,r2,r8 @ Ch(e,f,g)
202 eor r0,r10,r10,ror#11
203 add r9,r9,r2 @ h+=Ch(e,f,g)
206 cmp r12,#0xf2 @ done?
210 ldr r2,[r1],#4 @ prefetch
214 eor r12,r10,r11 @ a^b, b^c in next round
216 ldr r2,[sp,#4*4] @ from future BODY_16_xx
217 eor r12,r10,r11 @ a^b, b^c in next round
218 ldr r1,[sp,#1*4] @ from future BODY_16_xx
220 eor r0,r0,r10,ror#20 @ Sigma0(a)
221 and r3,r3,r12 @ (b^c)&=(a^b)
223 eor r3,r3,r11 @ Maj(a,b,c)
224 add r9,r9,r0,ror#2 @ h+=Sigma0(a)
225 @ add r9,r9,r3 @ h+=Maj(a,b,c)
229 str r1,[sp,#17*4] @ make room for r1
232 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
233 eor r0,r0,r5,ror#19 @ Sigma1(e)
236 @ ldrb r2,[r1,#3] @ 3
237 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
244 str r1,[sp,#17*4] @ make room for r1
248 eor r0,r0,r5,ror#19 @ Sigma1(e)
250 ldr r3,[r14],#4 @ *K256++
251 add r8,r8,r2 @ h+=X[i]
254 add r8,r8,r0,ror#6 @ h+=Sigma1(e)
256 add r8,r8,r3 @ h+=K256[i]
257 eor r2,r2,r7 @ Ch(e,f,g)
259 add r8,r8,r2 @ h+=Ch(e,f,g)
266 ldr r2,[r1],#4 @ prefetch
270 eor r3,r9,r10 @ a^b, b^c in next round
272 ldr r2,[sp,#5*4] @ from future BODY_16_xx
273 eor r3,r9,r10 @ a^b, b^c in next round
274 ldr r1,[sp,#2*4] @ from future BODY_16_xx
276 eor r0,r0,r9,ror#20 @ Sigma0(a)
277 and r12,r12,r3 @ (b^c)&=(a^b)
279 eor r12,r12,r10 @ Maj(a,b,c)
280 add r8,r8,r0,ror#2 @ h+=Sigma0(a)
281 @ add r8,r8,r12 @ h+=Maj(a,b,c)
285 str r1,[sp,#17*4] @ make room for r1
288 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
289 eor r0,r0,r4,ror#19 @ Sigma1(e)
292 @ ldrb r2,[r1,#3] @ 4
293 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
300 str r1,[sp,#17*4] @ make room for r1
304 eor r0,r0,r4,ror#19 @ Sigma1(e)
306 ldr r12,[r14],#4 @ *K256++
307 add r7,r7,r2 @ h+=X[i]
310 add r7,r7,r0,ror#6 @ h+=Sigma1(e)
312 add r7,r7,r12 @ h+=K256[i]
313 eor r2,r2,r6 @ Ch(e,f,g)
315 add r7,r7,r2 @ h+=Ch(e,f,g)
318 cmp r12,#0xf2 @ done?
322 ldr r2,[r1],#4 @ prefetch
326 eor r12,r8,r9 @ a^b, b^c in next round
328 ldr r2,[sp,#6*4] @ from future BODY_16_xx
329 eor r12,r8,r9 @ a^b, b^c in next round
330 ldr r1,[sp,#3*4] @ from future BODY_16_xx
332 eor r0,r0,r8,ror#20 @ Sigma0(a)
333 and r3,r3,r12 @ (b^c)&=(a^b)
334 add r11,r11,r7 @ d+=h
335 eor r3,r3,r9 @ Maj(a,b,c)
336 add r7,r7,r0,ror#2 @ h+=Sigma0(a)
337 @ add r7,r7,r3 @ h+=Maj(a,b,c)
341 str r1,[sp,#17*4] @ make room for r1
344 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
345 eor r0,r0,r11,ror#19 @ Sigma1(e)
348 @ ldrb r2,[r1,#3] @ 5
349 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
356 str r1,[sp,#17*4] @ make room for r1
360 eor r0,r0,r11,ror#19 @ Sigma1(e)
362 ldr r3,[r14],#4 @ *K256++
363 add r6,r6,r2 @ h+=X[i]
366 add r6,r6,r0,ror#6 @ h+=Sigma1(e)
368 add r6,r6,r3 @ h+=K256[i]
369 eor r2,r2,r5 @ Ch(e,f,g)
371 add r6,r6,r2 @ h+=Ch(e,f,g)
378 ldr r2,[r1],#4 @ prefetch
382 eor r3,r7,r8 @ a^b, b^c in next round
384 ldr r2,[sp,#7*4] @ from future BODY_16_xx
385 eor r3,r7,r8 @ a^b, b^c in next round
386 ldr r1,[sp,#4*4] @ from future BODY_16_xx
388 eor r0,r0,r7,ror#20 @ Sigma0(a)
389 and r12,r12,r3 @ (b^c)&=(a^b)
390 add r10,r10,r6 @ d+=h
391 eor r12,r12,r8 @ Maj(a,b,c)
392 add r6,r6,r0,ror#2 @ h+=Sigma0(a)
393 @ add r6,r6,r12 @ h+=Maj(a,b,c)
397 str r1,[sp,#17*4] @ make room for r1
400 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
401 eor r0,r0,r10,ror#19 @ Sigma1(e)
404 @ ldrb r2,[r1,#3] @ 6
405 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
412 str r1,[sp,#17*4] @ make room for r1
416 eor r0,r0,r10,ror#19 @ Sigma1(e)
418 ldr r12,[r14],#4 @ *K256++
419 add r5,r5,r2 @ h+=X[i]
422 add r5,r5,r0,ror#6 @ h+=Sigma1(e)
424 add r5,r5,r12 @ h+=K256[i]
425 eor r2,r2,r4 @ Ch(e,f,g)
427 add r5,r5,r2 @ h+=Ch(e,f,g)
430 cmp r12,#0xf2 @ done?
434 ldr r2,[r1],#4 @ prefetch
438 eor r12,r6,r7 @ a^b, b^c in next round
440 ldr r2,[sp,#8*4] @ from future BODY_16_xx
441 eor r12,r6,r7 @ a^b, b^c in next round
442 ldr r1,[sp,#5*4] @ from future BODY_16_xx
444 eor r0,r0,r6,ror#20 @ Sigma0(a)
445 and r3,r3,r12 @ (b^c)&=(a^b)
447 eor r3,r3,r7 @ Maj(a,b,c)
448 add r5,r5,r0,ror#2 @ h+=Sigma0(a)
449 @ add r5,r5,r3 @ h+=Maj(a,b,c)
453 str r1,[sp,#17*4] @ make room for r1
456 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
457 eor r0,r0,r9,ror#19 @ Sigma1(e)
460 @ ldrb r2,[r1,#3] @ 7
461 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
468 str r1,[sp,#17*4] @ make room for r1
472 eor r0,r0,r9,ror#19 @ Sigma1(e)
474 ldr r3,[r14],#4 @ *K256++
475 add r4,r4,r2 @ h+=X[i]
478 add r4,r4,r0,ror#6 @ h+=Sigma1(e)
480 add r4,r4,r3 @ h+=K256[i]
481 eor r2,r2,r11 @ Ch(e,f,g)
483 add r4,r4,r2 @ h+=Ch(e,f,g)
490 ldr r2,[r1],#4 @ prefetch
494 eor r3,r5,r6 @ a^b, b^c in next round
496 ldr r2,[sp,#9*4] @ from future BODY_16_xx
497 eor r3,r5,r6 @ a^b, b^c in next round
498 ldr r1,[sp,#6*4] @ from future BODY_16_xx
500 eor r0,r0,r5,ror#20 @ Sigma0(a)
501 and r12,r12,r3 @ (b^c)&=(a^b)
503 eor r12,r12,r6 @ Maj(a,b,c)
504 add r4,r4,r0,ror#2 @ h+=Sigma0(a)
505 @ add r4,r4,r12 @ h+=Maj(a,b,c)
509 str r1,[sp,#17*4] @ make room for r1
512 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
513 eor r0,r0,r8,ror#19 @ Sigma1(e)
516 @ ldrb r2,[r1,#3] @ 8
517 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
524 str r1,[sp,#17*4] @ make room for r1
528 eor r0,r0,r8,ror#19 @ Sigma1(e)
530 ldr r12,[r14],#4 @ *K256++
531 add r11,r11,r2 @ h+=X[i]
534 add r11,r11,r0,ror#6 @ h+=Sigma1(e)
536 add r11,r11,r12 @ h+=K256[i]
537 eor r2,r2,r10 @ Ch(e,f,g)
539 add r11,r11,r2 @ h+=Ch(e,f,g)
542 cmp r12,#0xf2 @ done?
546 ldr r2,[r1],#4 @ prefetch
550 eor r12,r4,r5 @ a^b, b^c in next round
552 ldr r2,[sp,#10*4] @ from future BODY_16_xx
553 eor r12,r4,r5 @ a^b, b^c in next round
554 ldr r1,[sp,#7*4] @ from future BODY_16_xx
556 eor r0,r0,r4,ror#20 @ Sigma0(a)
557 and r3,r3,r12 @ (b^c)&=(a^b)
559 eor r3,r3,r5 @ Maj(a,b,c)
560 add r11,r11,r0,ror#2 @ h+=Sigma0(a)
561 @ add r11,r11,r3 @ h+=Maj(a,b,c)
565 str r1,[sp,#17*4] @ make room for r1
568 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
569 eor r0,r0,r7,ror#19 @ Sigma1(e)
572 @ ldrb r2,[r1,#3] @ 9
573 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
580 str r1,[sp,#17*4] @ make room for r1
584 eor r0,r0,r7,ror#19 @ Sigma1(e)
586 ldr r3,[r14],#4 @ *K256++
587 add r10,r10,r2 @ h+=X[i]
590 add r10,r10,r0,ror#6 @ h+=Sigma1(e)
592 add r10,r10,r3 @ h+=K256[i]
593 eor r2,r2,r9 @ Ch(e,f,g)
594 eor r0,r11,r11,ror#11
595 add r10,r10,r2 @ h+=Ch(e,f,g)
602 ldr r2,[r1],#4 @ prefetch
606 eor r3,r11,r4 @ a^b, b^c in next round
608 ldr r2,[sp,#11*4] @ from future BODY_16_xx
609 eor r3,r11,r4 @ a^b, b^c in next round
610 ldr r1,[sp,#8*4] @ from future BODY_16_xx
612 eor r0,r0,r11,ror#20 @ Sigma0(a)
613 and r12,r12,r3 @ (b^c)&=(a^b)
615 eor r12,r12,r4 @ Maj(a,b,c)
616 add r10,r10,r0,ror#2 @ h+=Sigma0(a)
617 @ add r10,r10,r12 @ h+=Maj(a,b,c)
619 @ ldr r2,[r1],#4 @ 10
621 str r1,[sp,#17*4] @ make room for r1
624 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
625 eor r0,r0,r6,ror#19 @ Sigma1(e)
628 @ ldrb r2,[r1,#3] @ 10
629 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
636 str r1,[sp,#17*4] @ make room for r1
640 eor r0,r0,r6,ror#19 @ Sigma1(e)
642 ldr r12,[r14],#4 @ *K256++
643 add r9,r9,r2 @ h+=X[i]
646 add r9,r9,r0,ror#6 @ h+=Sigma1(e)
648 add r9,r9,r12 @ h+=K256[i]
649 eor r2,r2,r8 @ Ch(e,f,g)
650 eor r0,r10,r10,ror#11
651 add r9,r9,r2 @ h+=Ch(e,f,g)
654 cmp r12,#0xf2 @ done?
658 ldr r2,[r1],#4 @ prefetch
662 eor r12,r10,r11 @ a^b, b^c in next round
664 ldr r2,[sp,#12*4] @ from future BODY_16_xx
665 eor r12,r10,r11 @ a^b, b^c in next round
666 ldr r1,[sp,#9*4] @ from future BODY_16_xx
668 eor r0,r0,r10,ror#20 @ Sigma0(a)
669 and r3,r3,r12 @ (b^c)&=(a^b)
671 eor r3,r3,r11 @ Maj(a,b,c)
672 add r9,r9,r0,ror#2 @ h+=Sigma0(a)
673 @ add r9,r9,r3 @ h+=Maj(a,b,c)
675 @ ldr r2,[r1],#4 @ 11
677 str r1,[sp,#17*4] @ make room for r1
680 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
681 eor r0,r0,r5,ror#19 @ Sigma1(e)
684 @ ldrb r2,[r1,#3] @ 11
685 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
692 str r1,[sp,#17*4] @ make room for r1
696 eor r0,r0,r5,ror#19 @ Sigma1(e)
698 ldr r3,[r14],#4 @ *K256++
699 add r8,r8,r2 @ h+=X[i]
702 add r8,r8,r0,ror#6 @ h+=Sigma1(e)
704 add r8,r8,r3 @ h+=K256[i]
705 eor r2,r2,r7 @ Ch(e,f,g)
707 add r8,r8,r2 @ h+=Ch(e,f,g)
714 ldr r2,[r1],#4 @ prefetch
718 eor r3,r9,r10 @ a^b, b^c in next round
720 ldr r2,[sp,#13*4] @ from future BODY_16_xx
721 eor r3,r9,r10 @ a^b, b^c in next round
722 ldr r1,[sp,#10*4] @ from future BODY_16_xx
724 eor r0,r0,r9,ror#20 @ Sigma0(a)
725 and r12,r12,r3 @ (b^c)&=(a^b)
727 eor r12,r12,r10 @ Maj(a,b,c)
728 add r8,r8,r0,ror#2 @ h+=Sigma0(a)
729 @ add r8,r8,r12 @ h+=Maj(a,b,c)
731 @ ldr r2,[r1],#4 @ 12
733 str r1,[sp,#17*4] @ make room for r1
736 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
737 eor r0,r0,r4,ror#19 @ Sigma1(e)
740 @ ldrb r2,[r1,#3] @ 12
741 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
748 str r1,[sp,#17*4] @ make room for r1
752 eor r0,r0,r4,ror#19 @ Sigma1(e)
754 ldr r12,[r14],#4 @ *K256++
755 add r7,r7,r2 @ h+=X[i]
758 add r7,r7,r0,ror#6 @ h+=Sigma1(e)
760 add r7,r7,r12 @ h+=K256[i]
761 eor r2,r2,r6 @ Ch(e,f,g)
763 add r7,r7,r2 @ h+=Ch(e,f,g)
766 cmp r12,#0xf2 @ done?
770 ldr r2,[r1],#4 @ prefetch
774 eor r12,r8,r9 @ a^b, b^c in next round
776 ldr r2,[sp,#14*4] @ from future BODY_16_xx
777 eor r12,r8,r9 @ a^b, b^c in next round
778 ldr r1,[sp,#11*4] @ from future BODY_16_xx
780 eor r0,r0,r8,ror#20 @ Sigma0(a)
781 and r3,r3,r12 @ (b^c)&=(a^b)
782 add r11,r11,r7 @ d+=h
783 eor r3,r3,r9 @ Maj(a,b,c)
784 add r7,r7,r0,ror#2 @ h+=Sigma0(a)
785 @ add r7,r7,r3 @ h+=Maj(a,b,c)
787 @ ldr r2,[r1],#4 @ 13
789 str r1,[sp,#17*4] @ make room for r1
792 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
793 eor r0,r0,r11,ror#19 @ Sigma1(e)
796 @ ldrb r2,[r1,#3] @ 13
797 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
804 str r1,[sp,#17*4] @ make room for r1
808 eor r0,r0,r11,ror#19 @ Sigma1(e)
810 ldr r3,[r14],#4 @ *K256++
811 add r6,r6,r2 @ h+=X[i]
814 add r6,r6,r0,ror#6 @ h+=Sigma1(e)
816 add r6,r6,r3 @ h+=K256[i]
817 eor r2,r2,r5 @ Ch(e,f,g)
819 add r6,r6,r2 @ h+=Ch(e,f,g)
826 ldr r2,[r1],#4 @ prefetch
830 eor r3,r7,r8 @ a^b, b^c in next round
832 ldr r2,[sp,#15*4] @ from future BODY_16_xx
833 eor r3,r7,r8 @ a^b, b^c in next round
834 ldr r1,[sp,#12*4] @ from future BODY_16_xx
836 eor r0,r0,r7,ror#20 @ Sigma0(a)
837 and r12,r12,r3 @ (b^c)&=(a^b)
838 add r10,r10,r6 @ d+=h
839 eor r12,r12,r8 @ Maj(a,b,c)
840 add r6,r6,r0,ror#2 @ h+=Sigma0(a)
841 @ add r6,r6,r12 @ h+=Maj(a,b,c)
843 @ ldr r2,[r1],#4 @ 14
845 str r1,[sp,#17*4] @ make room for r1
848 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
849 eor r0,r0,r10,ror#19 @ Sigma1(e)
852 @ ldrb r2,[r1,#3] @ 14
853 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
860 str r1,[sp,#17*4] @ make room for r1
864 eor r0,r0,r10,ror#19 @ Sigma1(e)
866 ldr r12,[r14],#4 @ *K256++
867 add r5,r5,r2 @ h+=X[i]
870 add r5,r5,r0,ror#6 @ h+=Sigma1(e)
872 add r5,r5,r12 @ h+=K256[i]
873 eor r2,r2,r4 @ Ch(e,f,g)
875 add r5,r5,r2 @ h+=Ch(e,f,g)
878 cmp r12,#0xf2 @ done?
882 ldr r2,[r1],#4 @ prefetch
886 eor r12,r6,r7 @ a^b, b^c in next round
888 ldr r2,[sp,#0*4] @ from future BODY_16_xx
889 eor r12,r6,r7 @ a^b, b^c in next round
890 ldr r1,[sp,#13*4] @ from future BODY_16_xx
892 eor r0,r0,r6,ror#20 @ Sigma0(a)
893 and r3,r3,r12 @ (b^c)&=(a^b)
895 eor r3,r3,r7 @ Maj(a,b,c)
896 add r5,r5,r0,ror#2 @ h+=Sigma0(a)
897 @ add r5,r5,r3 @ h+=Maj(a,b,c)
899 @ ldr r2,[r1],#4 @ 15
901 str r1,[sp,#17*4] @ make room for r1
904 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
905 eor r0,r0,r9,ror#19 @ Sigma1(e)
908 @ ldrb r2,[r1,#3] @ 15
909 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
916 str r1,[sp,#17*4] @ make room for r1
920 eor r0,r0,r9,ror#19 @ Sigma1(e)
922 ldr r3,[r14],#4 @ *K256++
923 add r4,r4,r2 @ h+=X[i]
926 add r4,r4,r0,ror#6 @ h+=Sigma1(e)
928 add r4,r4,r3 @ h+=K256[i]
929 eor r2,r2,r11 @ Ch(e,f,g)
931 add r4,r4,r2 @ h+=Ch(e,f,g)
938 ldr r2,[r1],#4 @ prefetch
942 eor r3,r5,r6 @ a^b, b^c in next round
944 ldr r2,[sp,#1*4] @ from future BODY_16_xx
945 eor r3,r5,r6 @ a^b, b^c in next round
946 ldr r1,[sp,#14*4] @ from future BODY_16_xx
948 eor r0,r0,r5,ror#20 @ Sigma0(a)
949 and r12,r12,r3 @ (b^c)&=(a^b)
951 eor r12,r12,r6 @ Maj(a,b,c)
952 add r4,r4,r0,ror#2 @ h+=Sigma0(a)
953 @ add r4,r4,r12 @ h+=Maj(a,b,c)
955 @ ldr r2,[sp,#1*4] @ 16
958 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
961 eor r12,r12,r1,ror#19
962 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
964 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
968 eor r0,r8,r8,ror#5 @ from BODY_00_15
970 eor r0,r0,r8,ror#19 @ Sigma1(e)
972 ldr r12,[r14],#4 @ *K256++
973 add r11,r11,r2 @ h+=X[i]
976 add r11,r11,r0,ror#6 @ h+=Sigma1(e)
978 add r11,r11,r12 @ h+=K256[i]
979 eor r2,r2,r10 @ Ch(e,f,g)
981 add r11,r11,r2 @ h+=Ch(e,f,g)
984 cmp r12,#0xf2 @ done?
988 ldr r2,[r1],#4 @ prefetch
992 eor r12,r4,r5 @ a^b, b^c in next round
994 ldr r2,[sp,#2*4] @ from future BODY_16_xx
995 eor r12,r4,r5 @ a^b, b^c in next round
996 ldr r1,[sp,#15*4] @ from future BODY_16_xx
998 eor r0,r0,r4,ror#20 @ Sigma0(a)
999 and r3,r3,r12 @ (b^c)&=(a^b)
1000 add r7,r7,r11 @ d+=h
1001 eor r3,r3,r5 @ Maj(a,b,c)
1002 add r11,r11,r0,ror#2 @ h+=Sigma0(a)
1003 @ add r11,r11,r3 @ h+=Maj(a,b,c)
1004 @ ldr r2,[sp,#2*4] @ 17
1007 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
1011 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1013 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1017 eor r0,r7,r7,ror#5 @ from BODY_00_15
1019 eor r0,r0,r7,ror#19 @ Sigma1(e)
1021 ldr r3,[r14],#4 @ *K256++
1022 add r10,r10,r2 @ h+=X[i]
1025 add r10,r10,r0,ror#6 @ h+=Sigma1(e)
1027 add r10,r10,r3 @ h+=K256[i]
1028 eor r2,r2,r9 @ Ch(e,f,g)
1029 eor r0,r11,r11,ror#11
1030 add r10,r10,r2 @ h+=Ch(e,f,g)
1033 cmp r3,#0xf2 @ done?
1036 # if __ARM_ARCH__>=7
1037 ldr r2,[r1],#4 @ prefetch
1041 eor r3,r11,r4 @ a^b, b^c in next round
1043 ldr r2,[sp,#3*4] @ from future BODY_16_xx
1044 eor r3,r11,r4 @ a^b, b^c in next round
1045 ldr r1,[sp,#0*4] @ from future BODY_16_xx
1047 eor r0,r0,r11,ror#20 @ Sigma0(a)
1048 and r12,r12,r3 @ (b^c)&=(a^b)
1049 add r6,r6,r10 @ d+=h
1050 eor r12,r12,r4 @ Maj(a,b,c)
1051 add r10,r10,r0,ror#2 @ h+=Sigma0(a)
1052 @ add r10,r10,r12 @ h+=Maj(a,b,c)
1053 @ ldr r2,[sp,#3*4] @ 18
1056 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
1059 eor r12,r12,r1,ror#19
1060 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1062 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1066 eor r0,r6,r6,ror#5 @ from BODY_00_15
1068 eor r0,r0,r6,ror#19 @ Sigma1(e)
1070 ldr r12,[r14],#4 @ *K256++
1071 add r9,r9,r2 @ h+=X[i]
1074 add r9,r9,r0,ror#6 @ h+=Sigma1(e)
1076 add r9,r9,r12 @ h+=K256[i]
1077 eor r2,r2,r8 @ Ch(e,f,g)
1078 eor r0,r10,r10,ror#11
1079 add r9,r9,r2 @ h+=Ch(e,f,g)
1082 cmp r12,#0xf2 @ done?
1085 # if __ARM_ARCH__>=7
1086 ldr r2,[r1],#4 @ prefetch
1090 eor r12,r10,r11 @ a^b, b^c in next round
1092 ldr r2,[sp,#4*4] @ from future BODY_16_xx
1093 eor r12,r10,r11 @ a^b, b^c in next round
1094 ldr r1,[sp,#1*4] @ from future BODY_16_xx
1096 eor r0,r0,r10,ror#20 @ Sigma0(a)
1097 and r3,r3,r12 @ (b^c)&=(a^b)
1099 eor r3,r3,r11 @ Maj(a,b,c)
1100 add r9,r9,r0,ror#2 @ h+=Sigma0(a)
1101 @ add r9,r9,r3 @ h+=Maj(a,b,c)
1102 @ ldr r2,[sp,#4*4] @ 19
1105 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
1109 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1111 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1115 eor r0,r5,r5,ror#5 @ from BODY_00_15
1117 eor r0,r0,r5,ror#19 @ Sigma1(e)
1119 ldr r3,[r14],#4 @ *K256++
1120 add r8,r8,r2 @ h+=X[i]
1123 add r8,r8,r0,ror#6 @ h+=Sigma1(e)
1125 add r8,r8,r3 @ h+=K256[i]
1126 eor r2,r2,r7 @ Ch(e,f,g)
1128 add r8,r8,r2 @ h+=Ch(e,f,g)
1131 cmp r3,#0xf2 @ done?
1134 # if __ARM_ARCH__>=7
1135 ldr r2,[r1],#4 @ prefetch
1139 eor r3,r9,r10 @ a^b, b^c in next round
1141 ldr r2,[sp,#5*4] @ from future BODY_16_xx
1142 eor r3,r9,r10 @ a^b, b^c in next round
1143 ldr r1,[sp,#2*4] @ from future BODY_16_xx
1145 eor r0,r0,r9,ror#20 @ Sigma0(a)
1146 and r12,r12,r3 @ (b^c)&=(a^b)
1148 eor r12,r12,r10 @ Maj(a,b,c)
1149 add r8,r8,r0,ror#2 @ h+=Sigma0(a)
1150 @ add r8,r8,r12 @ h+=Maj(a,b,c)
1151 @ ldr r2,[sp,#5*4] @ 20
1154 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
1157 eor r12,r12,r1,ror#19
1158 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1160 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1164 eor r0,r4,r4,ror#5 @ from BODY_00_15
1166 eor r0,r0,r4,ror#19 @ Sigma1(e)
1168 ldr r12,[r14],#4 @ *K256++
1169 add r7,r7,r2 @ h+=X[i]
1172 add r7,r7,r0,ror#6 @ h+=Sigma1(e)
1174 add r7,r7,r12 @ h+=K256[i]
1175 eor r2,r2,r6 @ Ch(e,f,g)
1177 add r7,r7,r2 @ h+=Ch(e,f,g)
1180 cmp r12,#0xf2 @ done?
1183 # if __ARM_ARCH__>=7
1184 ldr r2,[r1],#4 @ prefetch
1188 eor r12,r8,r9 @ a^b, b^c in next round
1190 ldr r2,[sp,#6*4] @ from future BODY_16_xx
1191 eor r12,r8,r9 @ a^b, b^c in next round
1192 ldr r1,[sp,#3*4] @ from future BODY_16_xx
1194 eor r0,r0,r8,ror#20 @ Sigma0(a)
1195 and r3,r3,r12 @ (b^c)&=(a^b)
1196 add r11,r11,r7 @ d+=h
1197 eor r3,r3,r9 @ Maj(a,b,c)
1198 add r7,r7,r0,ror#2 @ h+=Sigma0(a)
1199 @ add r7,r7,r3 @ h+=Maj(a,b,c)
1200 @ ldr r2,[sp,#6*4] @ 21
1203 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
1207 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1209 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1213 eor r0,r11,r11,ror#5 @ from BODY_00_15
1215 eor r0,r0,r11,ror#19 @ Sigma1(e)
1217 ldr r3,[r14],#4 @ *K256++
1218 add r6,r6,r2 @ h+=X[i]
1221 add r6,r6,r0,ror#6 @ h+=Sigma1(e)
1223 add r6,r6,r3 @ h+=K256[i]
1224 eor r2,r2,r5 @ Ch(e,f,g)
1226 add r6,r6,r2 @ h+=Ch(e,f,g)
1229 cmp r3,#0xf2 @ done?
1232 # if __ARM_ARCH__>=7
1233 ldr r2,[r1],#4 @ prefetch
1237 eor r3,r7,r8 @ a^b, b^c in next round
1239 ldr r2,[sp,#7*4] @ from future BODY_16_xx
1240 eor r3,r7,r8 @ a^b, b^c in next round
1241 ldr r1,[sp,#4*4] @ from future BODY_16_xx
1243 eor r0,r0,r7,ror#20 @ Sigma0(a)
1244 and r12,r12,r3 @ (b^c)&=(a^b)
1245 add r10,r10,r6 @ d+=h
1246 eor r12,r12,r8 @ Maj(a,b,c)
1247 add r6,r6,r0,ror#2 @ h+=Sigma0(a)
1248 @ add r6,r6,r12 @ h+=Maj(a,b,c)
1249 @ ldr r2,[sp,#7*4] @ 22
1252 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
1255 eor r12,r12,r1,ror#19
1256 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1258 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1262 eor r0,r10,r10,ror#5 @ from BODY_00_15
1264 eor r0,r0,r10,ror#19 @ Sigma1(e)
1266 ldr r12,[r14],#4 @ *K256++
1267 add r5,r5,r2 @ h+=X[i]
1270 add r5,r5,r0,ror#6 @ h+=Sigma1(e)
1272 add r5,r5,r12 @ h+=K256[i]
1273 eor r2,r2,r4 @ Ch(e,f,g)
1275 add r5,r5,r2 @ h+=Ch(e,f,g)
1278 cmp r12,#0xf2 @ done?
1281 # if __ARM_ARCH__>=7
1282 ldr r2,[r1],#4 @ prefetch
1286 eor r12,r6,r7 @ a^b, b^c in next round
1288 ldr r2,[sp,#8*4] @ from future BODY_16_xx
1289 eor r12,r6,r7 @ a^b, b^c in next round
1290 ldr r1,[sp,#5*4] @ from future BODY_16_xx
1292 eor r0,r0,r6,ror#20 @ Sigma0(a)
1293 and r3,r3,r12 @ (b^c)&=(a^b)
1295 eor r3,r3,r7 @ Maj(a,b,c)
1296 add r5,r5,r0,ror#2 @ h+=Sigma0(a)
1297 @ add r5,r5,r3 @ h+=Maj(a,b,c)
1298 @ ldr r2,[sp,#8*4] @ 23
1301 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
1305 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1307 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1311 eor r0,r9,r9,ror#5 @ from BODY_00_15
1313 eor r0,r0,r9,ror#19 @ Sigma1(e)
1315 ldr r3,[r14],#4 @ *K256++
1316 add r4,r4,r2 @ h+=X[i]
1319 add r4,r4,r0,ror#6 @ h+=Sigma1(e)
1321 add r4,r4,r3 @ h+=K256[i]
1322 eor r2,r2,r11 @ Ch(e,f,g)
1324 add r4,r4,r2 @ h+=Ch(e,f,g)
1327 cmp r3,#0xf2 @ done?
1330 # if __ARM_ARCH__>=7
1331 ldr r2,[r1],#4 @ prefetch
1335 eor r3,r5,r6 @ a^b, b^c in next round
1337 ldr r2,[sp,#9*4] @ from future BODY_16_xx
1338 eor r3,r5,r6 @ a^b, b^c in next round
1339 ldr r1,[sp,#6*4] @ from future BODY_16_xx
1341 eor r0,r0,r5,ror#20 @ Sigma0(a)
1342 and r12,r12,r3 @ (b^c)&=(a^b)
1344 eor r12,r12,r6 @ Maj(a,b,c)
1345 add r4,r4,r0,ror#2 @ h+=Sigma0(a)
1346 @ add r4,r4,r12 @ h+=Maj(a,b,c)
1347 @ ldr r2,[sp,#9*4] @ 24
1350 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
1353 eor r12,r12,r1,ror#19
1354 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1356 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1360 eor r0,r8,r8,ror#5 @ from BODY_00_15
1362 eor r0,r0,r8,ror#19 @ Sigma1(e)
1364 ldr r12,[r14],#4 @ *K256++
1365 add r11,r11,r2 @ h+=X[i]
1368 add r11,r11,r0,ror#6 @ h+=Sigma1(e)
1370 add r11,r11,r12 @ h+=K256[i]
1371 eor r2,r2,r10 @ Ch(e,f,g)
1373 add r11,r11,r2 @ h+=Ch(e,f,g)
1376 cmp r12,#0xf2 @ done?
1379 # if __ARM_ARCH__>=7
1380 ldr r2,[r1],#4 @ prefetch
1384 eor r12,r4,r5 @ a^b, b^c in next round
1386 ldr r2,[sp,#10*4] @ from future BODY_16_xx
1387 eor r12,r4,r5 @ a^b, b^c in next round
1388 ldr r1,[sp,#7*4] @ from future BODY_16_xx
1390 eor r0,r0,r4,ror#20 @ Sigma0(a)
1391 and r3,r3,r12 @ (b^c)&=(a^b)
1392 add r7,r7,r11 @ d+=h
1393 eor r3,r3,r5 @ Maj(a,b,c)
1394 add r11,r11,r0,ror#2 @ h+=Sigma0(a)
1395 @ add r11,r11,r3 @ h+=Maj(a,b,c)
1396 @ ldr r2,[sp,#10*4] @ 25
1399 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
1403 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1405 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1409 eor r0,r7,r7,ror#5 @ from BODY_00_15
1411 eor r0,r0,r7,ror#19 @ Sigma1(e)
1413 ldr r3,[r14],#4 @ *K256++
1414 add r10,r10,r2 @ h+=X[i]
1417 add r10,r10,r0,ror#6 @ h+=Sigma1(e)
1419 add r10,r10,r3 @ h+=K256[i]
1420 eor r2,r2,r9 @ Ch(e,f,g)
1421 eor r0,r11,r11,ror#11
1422 add r10,r10,r2 @ h+=Ch(e,f,g)
1425 cmp r3,#0xf2 @ done?
1428 # if __ARM_ARCH__>=7
1429 ldr r2,[r1],#4 @ prefetch
1433 eor r3,r11,r4 @ a^b, b^c in next round
1435 ldr r2,[sp,#11*4] @ from future BODY_16_xx
1436 eor r3,r11,r4 @ a^b, b^c in next round
1437 ldr r1,[sp,#8*4] @ from future BODY_16_xx
1439 eor r0,r0,r11,ror#20 @ Sigma0(a)
1440 and r12,r12,r3 @ (b^c)&=(a^b)
1441 add r6,r6,r10 @ d+=h
1442 eor r12,r12,r4 @ Maj(a,b,c)
1443 add r10,r10,r0,ror#2 @ h+=Sigma0(a)
1444 @ add r10,r10,r12 @ h+=Maj(a,b,c)
1445 @ ldr r2,[sp,#11*4] @ 26
1448 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
1451 eor r12,r12,r1,ror#19
1452 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1454 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1458 eor r0,r6,r6,ror#5 @ from BODY_00_15
1460 eor r0,r0,r6,ror#19 @ Sigma1(e)
1462 ldr r12,[r14],#4 @ *K256++
1463 add r9,r9,r2 @ h+=X[i]
1466 add r9,r9,r0,ror#6 @ h+=Sigma1(e)
1468 add r9,r9,r12 @ h+=K256[i]
1469 eor r2,r2,r8 @ Ch(e,f,g)
1470 eor r0,r10,r10,ror#11
1471 add r9,r9,r2 @ h+=Ch(e,f,g)
1474 cmp r12,#0xf2 @ done?
1477 # if __ARM_ARCH__>=7
1478 ldr r2,[r1],#4 @ prefetch
1482 eor r12,r10,r11 @ a^b, b^c in next round
1484 ldr r2,[sp,#12*4] @ from future BODY_16_xx
1485 eor r12,r10,r11 @ a^b, b^c in next round
1486 ldr r1,[sp,#9*4] @ from future BODY_16_xx
1488 eor r0,r0,r10,ror#20 @ Sigma0(a)
1489 and r3,r3,r12 @ (b^c)&=(a^b)
1491 eor r3,r3,r11 @ Maj(a,b,c)
1492 add r9,r9,r0,ror#2 @ h+=Sigma0(a)
1493 @ add r9,r9,r3 @ h+=Maj(a,b,c)
1494 @ ldr r2,[sp,#12*4] @ 27
1497 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
1501 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1503 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1507 eor r0,r5,r5,ror#5 @ from BODY_00_15
1509 eor r0,r0,r5,ror#19 @ Sigma1(e)
1511 ldr r3,[r14],#4 @ *K256++
1512 add r8,r8,r2 @ h+=X[i]
1515 add r8,r8,r0,ror#6 @ h+=Sigma1(e)
1517 add r8,r8,r3 @ h+=K256[i]
1518 eor r2,r2,r7 @ Ch(e,f,g)
1520 add r8,r8,r2 @ h+=Ch(e,f,g)
1523 cmp r3,#0xf2 @ done?
1526 # if __ARM_ARCH__>=7
1527 ldr r2,[r1],#4 @ prefetch
1531 eor r3,r9,r10 @ a^b, b^c in next round
1533 ldr r2,[sp,#13*4] @ from future BODY_16_xx
1534 eor r3,r9,r10 @ a^b, b^c in next round
1535 ldr r1,[sp,#10*4] @ from future BODY_16_xx
1537 eor r0,r0,r9,ror#20 @ Sigma0(a)
1538 and r12,r12,r3 @ (b^c)&=(a^b)
1540 eor r12,r12,r10 @ Maj(a,b,c)
1541 add r8,r8,r0,ror#2 @ h+=Sigma0(a)
1542 @ add r8,r8,r12 @ h+=Maj(a,b,c)
1543 @ ldr r2,[sp,#13*4] @ 28
1546 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
1549 eor r12,r12,r1,ror#19
1550 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1552 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1556 eor r0,r4,r4,ror#5 @ from BODY_00_15
1558 eor r0,r0,r4,ror#19 @ Sigma1(e)
1560 ldr r12,[r14],#4 @ *K256++
1561 add r7,r7,r2 @ h+=X[i]
1564 add r7,r7,r0,ror#6 @ h+=Sigma1(e)
1566 add r7,r7,r12 @ h+=K256[i]
1567 eor r2,r2,r6 @ Ch(e,f,g)
1569 add r7,r7,r2 @ h+=Ch(e,f,g)
1572 cmp r12,#0xf2 @ done?
1575 # if __ARM_ARCH__>=7
1576 ldr r2,[r1],#4 @ prefetch
1580 eor r12,r8,r9 @ a^b, b^c in next round
1582 ldr r2,[sp,#14*4] @ from future BODY_16_xx
1583 eor r12,r8,r9 @ a^b, b^c in next round
1584 ldr r1,[sp,#11*4] @ from future BODY_16_xx
1586 eor r0,r0,r8,ror#20 @ Sigma0(a)
1587 and r3,r3,r12 @ (b^c)&=(a^b)
1588 add r11,r11,r7 @ d+=h
1589 eor r3,r3,r9 @ Maj(a,b,c)
1590 add r7,r7,r0,ror#2 @ h+=Sigma0(a)
1591 @ add r7,r7,r3 @ h+=Maj(a,b,c)
1592 @ ldr r2,[sp,#14*4] @ 29
1595 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
1599 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1601 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1605 eor r0,r11,r11,ror#5 @ from BODY_00_15
1607 eor r0,r0,r11,ror#19 @ Sigma1(e)
1609 ldr r3,[r14],#4 @ *K256++
1610 add r6,r6,r2 @ h+=X[i]
1613 add r6,r6,r0,ror#6 @ h+=Sigma1(e)
1615 add r6,r6,r3 @ h+=K256[i]
1616 eor r2,r2,r5 @ Ch(e,f,g)
1618 add r6,r6,r2 @ h+=Ch(e,f,g)
1621 cmp r3,#0xf2 @ done?
1624 # if __ARM_ARCH__>=7
1625 ldr r2,[r1],#4 @ prefetch
1629 eor r3,r7,r8 @ a^b, b^c in next round
1631 ldr r2,[sp,#15*4] @ from future BODY_16_xx
1632 eor r3,r7,r8 @ a^b, b^c in next round
1633 ldr r1,[sp,#12*4] @ from future BODY_16_xx
1635 eor r0,r0,r7,ror#20 @ Sigma0(a)
1636 and r12,r12,r3 @ (b^c)&=(a^b)
1637 add r10,r10,r6 @ d+=h
1638 eor r12,r12,r8 @ Maj(a,b,c)
1639 add r6,r6,r0,ror#2 @ h+=Sigma0(a)
1640 @ add r6,r6,r12 @ h+=Maj(a,b,c)
1641 @ ldr r2,[sp,#15*4] @ 30
1644 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
1647 eor r12,r12,r1,ror#19
1648 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1650 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1654 eor r0,r10,r10,ror#5 @ from BODY_00_15
1656 eor r0,r0,r10,ror#19 @ Sigma1(e)
1658 ldr r12,[r14],#4 @ *K256++
1659 add r5,r5,r2 @ h+=X[i]
1662 add r5,r5,r0,ror#6 @ h+=Sigma1(e)
1664 add r5,r5,r12 @ h+=K256[i]
1665 eor r2,r2,r4 @ Ch(e,f,g)
1667 add r5,r5,r2 @ h+=Ch(e,f,g)
1670 cmp r12,#0xf2 @ done?
1673 # if __ARM_ARCH__>=7
1674 ldr r2,[r1],#4 @ prefetch
1678 eor r12,r6,r7 @ a^b, b^c in next round
1680 ldr r2,[sp,#0*4] @ from future BODY_16_xx
1681 eor r12,r6,r7 @ a^b, b^c in next round
1682 ldr r1,[sp,#13*4] @ from future BODY_16_xx
1684 eor r0,r0,r6,ror#20 @ Sigma0(a)
1685 and r3,r3,r12 @ (b^c)&=(a^b)
1687 eor r3,r3,r7 @ Maj(a,b,c)
1688 add r5,r5,r0,ror#2 @ h+=Sigma0(a)
1689 @ add r5,r5,r3 @ h+=Maj(a,b,c)
1690 @ ldr r2,[sp,#0*4] @ 31
1693 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
1697 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1699 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1703 eor r0,r9,r9,ror#5 @ from BODY_00_15
1705 eor r0,r0,r9,ror#19 @ Sigma1(e)
1707 ldr r3,[r14],#4 @ *K256++
1708 add r4,r4,r2 @ h+=X[i]
1711 add r4,r4,r0,ror#6 @ h+=Sigma1(e)
1713 add r4,r4,r3 @ h+=K256[i]
1714 eor r2,r2,r11 @ Ch(e,f,g)
1716 add r4,r4,r2 @ h+=Ch(e,f,g)
1719 cmp r3,#0xf2 @ done?
1722 # if __ARM_ARCH__>=7
1723 ldr r2,[r1],#4 @ prefetch
1727 eor r3,r5,r6 @ a^b, b^c in next round
1729 ldr r2,[sp,#1*4] @ from future BODY_16_xx
1730 eor r3,r5,r6 @ a^b, b^c in next round
1731 ldr r1,[sp,#14*4] @ from future BODY_16_xx
1733 eor r0,r0,r5,ror#20 @ Sigma0(a)
1734 and r12,r12,r3 @ (b^c)&=(a^b)
1736 eor r12,r12,r6 @ Maj(a,b,c)
1737 add r4,r4,r0,ror#2 @ h+=Sigma0(a)
1738 @ add r4,r4,r12 @ h+=Maj(a,b,c)
1739 ldreq r3,[sp,#16*4] @ pull ctx
1742 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
1757 ldr r1,[sp,#17*4] @ pull inp
1758 ldr r12,[sp,#18*4] @ pull inp+len
1761 stmia r3,{r4,r5,r6,r7,r8,r9,r10,r11}
1763 sub r14,r14,#256 @ rewind Ktbl
1766 add sp,sp,#19*4 @ destroy frame
1768 ldmia sp!,{r4-r11,pc}
1770 ldmia sp!,{r4-r11,lr}
1772 moveq pc,lr @ be binary compatible with V4, yet
1773 .word 0xe12fff1e @ interoperable with Thumb ISA:-)
1775 .size sha256_block_data_order,.-sha256_block_data_order
1776 #if __ARM_MAX_ARCH__>=7
1780 .type sha256_block_data_order_neon,%function
1782 sha256_block_data_order_neon:
1784 stmdb sp!,{r4-r12,lr}
1787 sub sp,sp,#16*4+16 @ alloca
1788 sub r14,r3,#256+32 @ K256
1789 bic sp,sp,#15 @ align for 128-bit stores
1795 vld1.32 {q8},[r14,:128]!
1796 vld1.32 {q9},[r14,:128]!
1797 vld1.32 {q10},[r14,:128]!
1798 vld1.32 {q11},[r14,:128]!
1799 vrev32.8 q0,q0 @ yes, even on
1801 vrev32.8 q1,q1 @ big-endian
1807 str r12,[sp,#76] @ save original sp
1810 vst1.32 {q8},[r1,:128]!
1812 vst1.32 {q9},[r1,:128]!
1814 vst1.32 {q10},[r1,:128]!
1815 vst1.32 {q11},[r1,:128]!
1833 eor r12,r0,r8,ror#19
1838 add r11,r11,r12,ror#6
1848 add r11,r11,r0,ror#2
1860 eor r0,r11,r11,ror#11
1863 add r10,r10,r3,ror#6
1866 eor r0,r0,r11,ror#20
1874 add r10,r10,r0,ror#2
1884 eor r12,r0,r6,ror#19
1886 eor r0,r10,r10,ror#11
1892 eor r0,r0,r10,ror#20
1901 vld1.32 {q8},[r14,:128]!
1921 vst1.32 {q8},[r1,:128]!
1931 eor r12,r0,r4,ror#19
1952 eor r0,r11,r11,ror#5
1957 eor r3,r0,r11,ror#19
1978 eor r0,r10,r10,ror#5
1982 eor r12,r0,r10,ror#19
1999 vld1.32 {q8},[r14,:128]!
2019 vst1.32 {q8},[r1,:128]!
2029 eor r12,r0,r8,ror#19
2034 add r11,r11,r12,ror#6
2044 add r11,r11,r0,ror#2
2056 eor r0,r11,r11,ror#11
2059 add r10,r10,r3,ror#6
2062 eor r0,r0,r11,ror#20
2070 add r10,r10,r0,ror#2
2080 eor r12,r0,r6,ror#19
2082 eor r0,r10,r10,ror#11
2088 eor r0,r0,r10,ror#20
2097 vld1.32 {q8},[r14,:128]!
2117 vst1.32 {q8},[r1,:128]!
2127 eor r12,r0,r4,ror#19
2148 eor r0,r11,r11,ror#5
2153 eor r3,r0,r11,ror#19
2174 eor r0,r10,r10,ror#5
2178 eor r12,r0,r10,ror#19
2195 vld1.32 {q8},[r14,:128]!
2215 vst1.32 {q8},[r1,:128]!
2218 teq r2,#0 @ check for K256 terminator
2225 sub r14,r14,#256 @ rewind r14
2227 subeq r1,r1,#64 @ avoid SEGV
2228 vld1.8 {q0},[r1]! @ load next input block
2238 vld1.32 {q8},[r14,:128]!
2240 eor r12,r0,r8,ror#19
2244 add r11,r11,r12,ror#6
2252 add r11,r11,r0,ror#2
2260 eor r0,r11,r11,ror#11
2262 add r10,r10,r3,ror#6
2264 eor r0,r0,r11,ror#20
2269 add r10,r10,r0,ror#2
2276 eor r12,r0,r6,ror#19
2277 eor r0,r10,r10,ror#11
2281 eor r0,r0,r10,ror#20
2305 vst1.32 {q8},[r1,:128]!
2310 vld1.32 {q8},[r14,:128]!
2312 eor r12,r0,r4,ror#19
2328 eor r0,r11,r11,ror#5
2331 eor r3,r0,r11,ror#19
2345 eor r0,r10,r10,ror#5
2348 eor r12,r0,r10,ror#19
2377 vst1.32 {q8},[r1,:128]!
2382 vld1.32 {q8},[r14,:128]!
2384 eor r12,r0,r8,ror#19
2388 add r11,r11,r12,ror#6
2396 add r11,r11,r0,ror#2
2404 eor r0,r11,r11,ror#11
2406 add r10,r10,r3,ror#6
2408 eor r0,r0,r11,ror#20
2413 add r10,r10,r0,ror#2
2420 eor r12,r0,r6,ror#19
2421 eor r0,r10,r10,ror#11
2425 eor r0,r0,r10,ror#20
2449 vst1.32 {q8},[r1,:128]!
2454 vld1.32 {q8},[r14,:128]!
2456 eor r12,r0,r4,ror#19
2472 eor r0,r11,r11,ror#5
2475 eor r3,r0,r11,ror#19
2489 eor r0,r10,r10,ror#5
2492 eor r12,r0,r10,ror#19
2521 vst1.32 {q8},[r1,:128]!
2523 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
2527 add r4,r4,r0 @ accumulate
2548 ldreq sp,[sp,#76] @ restore original sp
2552 ldmia sp!,{r4-r12,pc}
2553 .size sha256_block_data_order_neon,.-sha256_block_data_order_neon
2555 #if __ARM_MAX_ARCH__>=7
2556 .type sha256_block_data_order_armv8,%function
2558 sha256_block_data_order_armv8:
2560 vld1.32 {q0,q1},[r0]
2561 sub r3,r3,#sha256_block_data_order-K256
2564 vld1.8 {q8-q9},[r1]!
2565 vld1.8 {q10-q11},[r1]!
2571 vmov q14,q0 @ offload
2576 .byte 0xe2,0x03,0xfa,0xf3 @ sha256su0 q8,q9
2578 .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
2579 .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
2580 .byte 0xe6,0x0c,0x64,0xf3 @ sha256su1 q8,q10,q11
2583 .byte 0xe4,0x23,0xfa,0xf3 @ sha256su0 q9,q10
2585 .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
2586 .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
2587 .byte 0xe0,0x2c,0x66,0xf3 @ sha256su1 q9,q11,q8
2589 vadd.i32 q12,q12,q10
2590 .byte 0xe6,0x43,0xfa,0xf3 @ sha256su0 q10,q11
2592 .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
2593 .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
2594 .byte 0xe2,0x4c,0x60,0xf3 @ sha256su1 q10,q8,q9
2596 vadd.i32 q13,q13,q11
2597 .byte 0xe0,0x63,0xfa,0xf3 @ sha256su0 q11,q8
2599 .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
2600 .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
2601 .byte 0xe4,0x6c,0x62,0xf3 @ sha256su1 q11,q9,q10
2604 .byte 0xe2,0x03,0xfa,0xf3 @ sha256su0 q8,q9
2606 .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
2607 .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
2608 .byte 0xe6,0x0c,0x64,0xf3 @ sha256su1 q8,q10,q11
2611 .byte 0xe4,0x23,0xfa,0xf3 @ sha256su0 q9,q10
2613 .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
2614 .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
2615 .byte 0xe0,0x2c,0x66,0xf3 @ sha256su1 q9,q11,q8
2617 vadd.i32 q12,q12,q10
2618 .byte 0xe6,0x43,0xfa,0xf3 @ sha256su0 q10,q11
2620 .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
2621 .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
2622 .byte 0xe2,0x4c,0x60,0xf3 @ sha256su1 q10,q8,q9
2624 vadd.i32 q13,q13,q11
2625 .byte 0xe0,0x63,0xfa,0xf3 @ sha256su0 q11,q8
2627 .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
2628 .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
2629 .byte 0xe4,0x6c,0x62,0xf3 @ sha256su1 q11,q9,q10
2632 .byte 0xe2,0x03,0xfa,0xf3 @ sha256su0 q8,q9
2634 .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
2635 .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
2636 .byte 0xe6,0x0c,0x64,0xf3 @ sha256su1 q8,q10,q11
2639 .byte 0xe4,0x23,0xfa,0xf3 @ sha256su0 q9,q10
2641 .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
2642 .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
2643 .byte 0xe0,0x2c,0x66,0xf3 @ sha256su1 q9,q11,q8
2645 vadd.i32 q12,q12,q10
2646 .byte 0xe6,0x43,0xfa,0xf3 @ sha256su0 q10,q11
2648 .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
2649 .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
2650 .byte 0xe2,0x4c,0x60,0xf3 @ sha256su1 q10,q8,q9
2652 vadd.i32 q13,q13,q11
2653 .byte 0xe0,0x63,0xfa,0xf3 @ sha256su0 q11,q8
2655 .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
2656 .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
2657 .byte 0xe4,0x6c,0x62,0xf3 @ sha256su1 q11,q9,q10
2661 .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
2662 .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
2667 .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
2668 .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
2671 vadd.i32 q12,q12,q10
2672 sub r3,r3,#256-16 @ rewind
2674 .byte 0x68,0x0c,0x02,0xf3 @ sha256h q0,q1,q12
2675 .byte 0x68,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q12
2677 vadd.i32 q13,q13,q11
2679 .byte 0x6a,0x0c,0x02,0xf3 @ sha256h q0,q1,q13
2680 .byte 0x6a,0x2c,0x14,0xf3 @ sha256h2 q1,q2,q13
2686 vst1.32 {q0,q1},[r0]
2689 .size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8
2691 .asciz "SHA256 block transform for ARMv4/NEON/ARMv8, CRYPTOGAMS by <appro@openssl.org>"
2693 #if __ARM_MAX_ARCH__>=7
2694 .comm OPENSSL_armcap_P,4,4
2695 .hidden OPENSSL_armcap_P