10 .word 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
11 .word 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
12 .word 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
13 .word 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
14 .word 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
15 .word 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
16 .word 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
17 .word 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
18 .word 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
19 .word 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
20 .word 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
21 .word 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
22 .word 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
23 .word 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
24 .word 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
25 .word 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
28 #if __ARM_MAX_ARCH__>=7
30 .word OPENSSL_armcap_P-sha256_block_data_order
34 .global sha256_block_data_order
35 .type sha256_block_data_order,%function
36 sha256_block_data_order:
37 sub r3,pc,#8 @ sha256_block_data_order
38 add r2,r1,r2,lsl#6 @ len to point at the end of inp
39 #if __ARM_MAX_ARCH__>=7
40 ldr r12,.LOPENSSL_armcap
41 ldr r12,[r3,r12] @ OPENSSL_armcap_P
47 stmdb sp!,{r0,r1,r2,r4-r11,lr}
48 ldmia r0,{r4,r5,r6,r7,r8,r9,r10,r11}
49 sub r14,r3,#256+32 @ K256
50 sub sp,sp,#16*4 @ alloca(X[16])
62 str r1,[sp,#17*4] @ make room for r1
65 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
66 eor r0,r0,r8,ror#19 @ Sigma1(e)
70 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
77 str r1,[sp,#17*4] @ make room for r1
81 eor r0,r0,r8,ror#19 @ Sigma1(e)
83 ldr r12,[r14],#4 @ *K256++
84 add r11,r11,r2 @ h+=X[i]
87 add r11,r11,r0,ror#6 @ h+=Sigma1(e)
89 add r11,r11,r12 @ h+=K256[i]
90 eor r2,r2,r10 @ Ch(e,f,g)
92 add r11,r11,r2 @ h+=Ch(e,f,g)
99 ldr r2,[r1],#4 @ prefetch
103 eor r12,r4,r5 @ a^b, b^c in next round
105 ldr r2,[sp,#2*4] @ from future BODY_16_xx
106 eor r12,r4,r5 @ a^b, b^c in next round
107 ldr r1,[sp,#15*4] @ from future BODY_16_xx
109 eor r0,r0,r4,ror#20 @ Sigma0(a)
110 and r3,r3,r12 @ (b^c)&=(a^b)
112 eor r3,r3,r5 @ Maj(a,b,c)
113 add r11,r11,r0,ror#2 @ h+=Sigma0(a)
114 @ add r11,r11,r3 @ h+=Maj(a,b,c)
118 str r1,[sp,#17*4] @ make room for r1
121 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
122 eor r0,r0,r7,ror#19 @ Sigma1(e)
125 @ ldrb r2,[r1,#3] @ 1
126 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
133 str r1,[sp,#17*4] @ make room for r1
137 eor r0,r0,r7,ror#19 @ Sigma1(e)
139 ldr r3,[r14],#4 @ *K256++
140 add r10,r10,r2 @ h+=X[i]
143 add r10,r10,r0,ror#6 @ h+=Sigma1(e)
145 add r10,r10,r3 @ h+=K256[i]
146 eor r2,r2,r9 @ Ch(e,f,g)
147 eor r0,r11,r11,ror#11
148 add r10,r10,r2 @ h+=Ch(e,f,g)
155 ldr r2,[r1],#4 @ prefetch
159 eor r3,r11,r4 @ a^b, b^c in next round
161 ldr r2,[sp,#3*4] @ from future BODY_16_xx
162 eor r3,r11,r4 @ a^b, b^c in next round
163 ldr r1,[sp,#0*4] @ from future BODY_16_xx
165 eor r0,r0,r11,ror#20 @ Sigma0(a)
166 and r12,r12,r3 @ (b^c)&=(a^b)
168 eor r12,r12,r4 @ Maj(a,b,c)
169 add r10,r10,r0,ror#2 @ h+=Sigma0(a)
170 @ add r10,r10,r12 @ h+=Maj(a,b,c)
174 str r1,[sp,#17*4] @ make room for r1
177 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
178 eor r0,r0,r6,ror#19 @ Sigma1(e)
181 @ ldrb r2,[r1,#3] @ 2
182 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
189 str r1,[sp,#17*4] @ make room for r1
193 eor r0,r0,r6,ror#19 @ Sigma1(e)
195 ldr r12,[r14],#4 @ *K256++
196 add r9,r9,r2 @ h+=X[i]
199 add r9,r9,r0,ror#6 @ h+=Sigma1(e)
201 add r9,r9,r12 @ h+=K256[i]
202 eor r2,r2,r8 @ Ch(e,f,g)
203 eor r0,r10,r10,ror#11
204 add r9,r9,r2 @ h+=Ch(e,f,g)
207 cmp r12,#0xf2 @ done?
211 ldr r2,[r1],#4 @ prefetch
215 eor r12,r10,r11 @ a^b, b^c in next round
217 ldr r2,[sp,#4*4] @ from future BODY_16_xx
218 eor r12,r10,r11 @ a^b, b^c in next round
219 ldr r1,[sp,#1*4] @ from future BODY_16_xx
221 eor r0,r0,r10,ror#20 @ Sigma0(a)
222 and r3,r3,r12 @ (b^c)&=(a^b)
224 eor r3,r3,r11 @ Maj(a,b,c)
225 add r9,r9,r0,ror#2 @ h+=Sigma0(a)
226 @ add r9,r9,r3 @ h+=Maj(a,b,c)
230 str r1,[sp,#17*4] @ make room for r1
233 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
234 eor r0,r0,r5,ror#19 @ Sigma1(e)
237 @ ldrb r2,[r1,#3] @ 3
238 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
245 str r1,[sp,#17*4] @ make room for r1
249 eor r0,r0,r5,ror#19 @ Sigma1(e)
251 ldr r3,[r14],#4 @ *K256++
252 add r8,r8,r2 @ h+=X[i]
255 add r8,r8,r0,ror#6 @ h+=Sigma1(e)
257 add r8,r8,r3 @ h+=K256[i]
258 eor r2,r2,r7 @ Ch(e,f,g)
260 add r8,r8,r2 @ h+=Ch(e,f,g)
267 ldr r2,[r1],#4 @ prefetch
271 eor r3,r9,r10 @ a^b, b^c in next round
273 ldr r2,[sp,#5*4] @ from future BODY_16_xx
274 eor r3,r9,r10 @ a^b, b^c in next round
275 ldr r1,[sp,#2*4] @ from future BODY_16_xx
277 eor r0,r0,r9,ror#20 @ Sigma0(a)
278 and r12,r12,r3 @ (b^c)&=(a^b)
280 eor r12,r12,r10 @ Maj(a,b,c)
281 add r8,r8,r0,ror#2 @ h+=Sigma0(a)
282 @ add r8,r8,r12 @ h+=Maj(a,b,c)
286 str r1,[sp,#17*4] @ make room for r1
289 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
290 eor r0,r0,r4,ror#19 @ Sigma1(e)
293 @ ldrb r2,[r1,#3] @ 4
294 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
301 str r1,[sp,#17*4] @ make room for r1
305 eor r0,r0,r4,ror#19 @ Sigma1(e)
307 ldr r12,[r14],#4 @ *K256++
308 add r7,r7,r2 @ h+=X[i]
311 add r7,r7,r0,ror#6 @ h+=Sigma1(e)
313 add r7,r7,r12 @ h+=K256[i]
314 eor r2,r2,r6 @ Ch(e,f,g)
316 add r7,r7,r2 @ h+=Ch(e,f,g)
319 cmp r12,#0xf2 @ done?
323 ldr r2,[r1],#4 @ prefetch
327 eor r12,r8,r9 @ a^b, b^c in next round
329 ldr r2,[sp,#6*4] @ from future BODY_16_xx
330 eor r12,r8,r9 @ a^b, b^c in next round
331 ldr r1,[sp,#3*4] @ from future BODY_16_xx
333 eor r0,r0,r8,ror#20 @ Sigma0(a)
334 and r3,r3,r12 @ (b^c)&=(a^b)
335 add r11,r11,r7 @ d+=h
336 eor r3,r3,r9 @ Maj(a,b,c)
337 add r7,r7,r0,ror#2 @ h+=Sigma0(a)
338 @ add r7,r7,r3 @ h+=Maj(a,b,c)
342 str r1,[sp,#17*4] @ make room for r1
345 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
346 eor r0,r0,r11,ror#19 @ Sigma1(e)
349 @ ldrb r2,[r1,#3] @ 5
350 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
357 str r1,[sp,#17*4] @ make room for r1
361 eor r0,r0,r11,ror#19 @ Sigma1(e)
363 ldr r3,[r14],#4 @ *K256++
364 add r6,r6,r2 @ h+=X[i]
367 add r6,r6,r0,ror#6 @ h+=Sigma1(e)
369 add r6,r6,r3 @ h+=K256[i]
370 eor r2,r2,r5 @ Ch(e,f,g)
372 add r6,r6,r2 @ h+=Ch(e,f,g)
379 ldr r2,[r1],#4 @ prefetch
383 eor r3,r7,r8 @ a^b, b^c in next round
385 ldr r2,[sp,#7*4] @ from future BODY_16_xx
386 eor r3,r7,r8 @ a^b, b^c in next round
387 ldr r1,[sp,#4*4] @ from future BODY_16_xx
389 eor r0,r0,r7,ror#20 @ Sigma0(a)
390 and r12,r12,r3 @ (b^c)&=(a^b)
391 add r10,r10,r6 @ d+=h
392 eor r12,r12,r8 @ Maj(a,b,c)
393 add r6,r6,r0,ror#2 @ h+=Sigma0(a)
394 @ add r6,r6,r12 @ h+=Maj(a,b,c)
398 str r1,[sp,#17*4] @ make room for r1
401 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
402 eor r0,r0,r10,ror#19 @ Sigma1(e)
405 @ ldrb r2,[r1,#3] @ 6
406 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
413 str r1,[sp,#17*4] @ make room for r1
417 eor r0,r0,r10,ror#19 @ Sigma1(e)
419 ldr r12,[r14],#4 @ *K256++
420 add r5,r5,r2 @ h+=X[i]
423 add r5,r5,r0,ror#6 @ h+=Sigma1(e)
425 add r5,r5,r12 @ h+=K256[i]
426 eor r2,r2,r4 @ Ch(e,f,g)
428 add r5,r5,r2 @ h+=Ch(e,f,g)
431 cmp r12,#0xf2 @ done?
435 ldr r2,[r1],#4 @ prefetch
439 eor r12,r6,r7 @ a^b, b^c in next round
441 ldr r2,[sp,#8*4] @ from future BODY_16_xx
442 eor r12,r6,r7 @ a^b, b^c in next round
443 ldr r1,[sp,#5*4] @ from future BODY_16_xx
445 eor r0,r0,r6,ror#20 @ Sigma0(a)
446 and r3,r3,r12 @ (b^c)&=(a^b)
448 eor r3,r3,r7 @ Maj(a,b,c)
449 add r5,r5,r0,ror#2 @ h+=Sigma0(a)
450 @ add r5,r5,r3 @ h+=Maj(a,b,c)
454 str r1,[sp,#17*4] @ make room for r1
457 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
458 eor r0,r0,r9,ror#19 @ Sigma1(e)
461 @ ldrb r2,[r1,#3] @ 7
462 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
469 str r1,[sp,#17*4] @ make room for r1
473 eor r0,r0,r9,ror#19 @ Sigma1(e)
475 ldr r3,[r14],#4 @ *K256++
476 add r4,r4,r2 @ h+=X[i]
479 add r4,r4,r0,ror#6 @ h+=Sigma1(e)
481 add r4,r4,r3 @ h+=K256[i]
482 eor r2,r2,r11 @ Ch(e,f,g)
484 add r4,r4,r2 @ h+=Ch(e,f,g)
491 ldr r2,[r1],#4 @ prefetch
495 eor r3,r5,r6 @ a^b, b^c in next round
497 ldr r2,[sp,#9*4] @ from future BODY_16_xx
498 eor r3,r5,r6 @ a^b, b^c in next round
499 ldr r1,[sp,#6*4] @ from future BODY_16_xx
501 eor r0,r0,r5,ror#20 @ Sigma0(a)
502 and r12,r12,r3 @ (b^c)&=(a^b)
504 eor r12,r12,r6 @ Maj(a,b,c)
505 add r4,r4,r0,ror#2 @ h+=Sigma0(a)
506 @ add r4,r4,r12 @ h+=Maj(a,b,c)
510 str r1,[sp,#17*4] @ make room for r1
513 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
514 eor r0,r0,r8,ror#19 @ Sigma1(e)
517 @ ldrb r2,[r1,#3] @ 8
518 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
525 str r1,[sp,#17*4] @ make room for r1
529 eor r0,r0,r8,ror#19 @ Sigma1(e)
531 ldr r12,[r14],#4 @ *K256++
532 add r11,r11,r2 @ h+=X[i]
535 add r11,r11,r0,ror#6 @ h+=Sigma1(e)
537 add r11,r11,r12 @ h+=K256[i]
538 eor r2,r2,r10 @ Ch(e,f,g)
540 add r11,r11,r2 @ h+=Ch(e,f,g)
543 cmp r12,#0xf2 @ done?
547 ldr r2,[r1],#4 @ prefetch
551 eor r12,r4,r5 @ a^b, b^c in next round
553 ldr r2,[sp,#10*4] @ from future BODY_16_xx
554 eor r12,r4,r5 @ a^b, b^c in next round
555 ldr r1,[sp,#7*4] @ from future BODY_16_xx
557 eor r0,r0,r4,ror#20 @ Sigma0(a)
558 and r3,r3,r12 @ (b^c)&=(a^b)
560 eor r3,r3,r5 @ Maj(a,b,c)
561 add r11,r11,r0,ror#2 @ h+=Sigma0(a)
562 @ add r11,r11,r3 @ h+=Maj(a,b,c)
566 str r1,[sp,#17*4] @ make room for r1
569 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
570 eor r0,r0,r7,ror#19 @ Sigma1(e)
573 @ ldrb r2,[r1,#3] @ 9
574 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
581 str r1,[sp,#17*4] @ make room for r1
585 eor r0,r0,r7,ror#19 @ Sigma1(e)
587 ldr r3,[r14],#4 @ *K256++
588 add r10,r10,r2 @ h+=X[i]
591 add r10,r10,r0,ror#6 @ h+=Sigma1(e)
593 add r10,r10,r3 @ h+=K256[i]
594 eor r2,r2,r9 @ Ch(e,f,g)
595 eor r0,r11,r11,ror#11
596 add r10,r10,r2 @ h+=Ch(e,f,g)
603 ldr r2,[r1],#4 @ prefetch
607 eor r3,r11,r4 @ a^b, b^c in next round
609 ldr r2,[sp,#11*4] @ from future BODY_16_xx
610 eor r3,r11,r4 @ a^b, b^c in next round
611 ldr r1,[sp,#8*4] @ from future BODY_16_xx
613 eor r0,r0,r11,ror#20 @ Sigma0(a)
614 and r12,r12,r3 @ (b^c)&=(a^b)
616 eor r12,r12,r4 @ Maj(a,b,c)
617 add r10,r10,r0,ror#2 @ h+=Sigma0(a)
618 @ add r10,r10,r12 @ h+=Maj(a,b,c)
620 @ ldr r2,[r1],#4 @ 10
622 str r1,[sp,#17*4] @ make room for r1
625 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
626 eor r0,r0,r6,ror#19 @ Sigma1(e)
629 @ ldrb r2,[r1,#3] @ 10
630 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
637 str r1,[sp,#17*4] @ make room for r1
641 eor r0,r0,r6,ror#19 @ Sigma1(e)
643 ldr r12,[r14],#4 @ *K256++
644 add r9,r9,r2 @ h+=X[i]
647 add r9,r9,r0,ror#6 @ h+=Sigma1(e)
649 add r9,r9,r12 @ h+=K256[i]
650 eor r2,r2,r8 @ Ch(e,f,g)
651 eor r0,r10,r10,ror#11
652 add r9,r9,r2 @ h+=Ch(e,f,g)
655 cmp r12,#0xf2 @ done?
659 ldr r2,[r1],#4 @ prefetch
663 eor r12,r10,r11 @ a^b, b^c in next round
665 ldr r2,[sp,#12*4] @ from future BODY_16_xx
666 eor r12,r10,r11 @ a^b, b^c in next round
667 ldr r1,[sp,#9*4] @ from future BODY_16_xx
669 eor r0,r0,r10,ror#20 @ Sigma0(a)
670 and r3,r3,r12 @ (b^c)&=(a^b)
672 eor r3,r3,r11 @ Maj(a,b,c)
673 add r9,r9,r0,ror#2 @ h+=Sigma0(a)
674 @ add r9,r9,r3 @ h+=Maj(a,b,c)
676 @ ldr r2,[r1],#4 @ 11
678 str r1,[sp,#17*4] @ make room for r1
681 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
682 eor r0,r0,r5,ror#19 @ Sigma1(e)
685 @ ldrb r2,[r1,#3] @ 11
686 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
693 str r1,[sp,#17*4] @ make room for r1
697 eor r0,r0,r5,ror#19 @ Sigma1(e)
699 ldr r3,[r14],#4 @ *K256++
700 add r8,r8,r2 @ h+=X[i]
703 add r8,r8,r0,ror#6 @ h+=Sigma1(e)
705 add r8,r8,r3 @ h+=K256[i]
706 eor r2,r2,r7 @ Ch(e,f,g)
708 add r8,r8,r2 @ h+=Ch(e,f,g)
715 ldr r2,[r1],#4 @ prefetch
719 eor r3,r9,r10 @ a^b, b^c in next round
721 ldr r2,[sp,#13*4] @ from future BODY_16_xx
722 eor r3,r9,r10 @ a^b, b^c in next round
723 ldr r1,[sp,#10*4] @ from future BODY_16_xx
725 eor r0,r0,r9,ror#20 @ Sigma0(a)
726 and r12,r12,r3 @ (b^c)&=(a^b)
728 eor r12,r12,r10 @ Maj(a,b,c)
729 add r8,r8,r0,ror#2 @ h+=Sigma0(a)
730 @ add r8,r8,r12 @ h+=Maj(a,b,c)
732 @ ldr r2,[r1],#4 @ 12
734 str r1,[sp,#17*4] @ make room for r1
737 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
738 eor r0,r0,r4,ror#19 @ Sigma1(e)
741 @ ldrb r2,[r1,#3] @ 12
742 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
749 str r1,[sp,#17*4] @ make room for r1
753 eor r0,r0,r4,ror#19 @ Sigma1(e)
755 ldr r12,[r14],#4 @ *K256++
756 add r7,r7,r2 @ h+=X[i]
759 add r7,r7,r0,ror#6 @ h+=Sigma1(e)
761 add r7,r7,r12 @ h+=K256[i]
762 eor r2,r2,r6 @ Ch(e,f,g)
764 add r7,r7,r2 @ h+=Ch(e,f,g)
767 cmp r12,#0xf2 @ done?
771 ldr r2,[r1],#4 @ prefetch
775 eor r12,r8,r9 @ a^b, b^c in next round
777 ldr r2,[sp,#14*4] @ from future BODY_16_xx
778 eor r12,r8,r9 @ a^b, b^c in next round
779 ldr r1,[sp,#11*4] @ from future BODY_16_xx
781 eor r0,r0,r8,ror#20 @ Sigma0(a)
782 and r3,r3,r12 @ (b^c)&=(a^b)
783 add r11,r11,r7 @ d+=h
784 eor r3,r3,r9 @ Maj(a,b,c)
785 add r7,r7,r0,ror#2 @ h+=Sigma0(a)
786 @ add r7,r7,r3 @ h+=Maj(a,b,c)
788 @ ldr r2,[r1],#4 @ 13
790 str r1,[sp,#17*4] @ make room for r1
793 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
794 eor r0,r0,r11,ror#19 @ Sigma1(e)
797 @ ldrb r2,[r1,#3] @ 13
798 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
805 str r1,[sp,#17*4] @ make room for r1
809 eor r0,r0,r11,ror#19 @ Sigma1(e)
811 ldr r3,[r14],#4 @ *K256++
812 add r6,r6,r2 @ h+=X[i]
815 add r6,r6,r0,ror#6 @ h+=Sigma1(e)
817 add r6,r6,r3 @ h+=K256[i]
818 eor r2,r2,r5 @ Ch(e,f,g)
820 add r6,r6,r2 @ h+=Ch(e,f,g)
827 ldr r2,[r1],#4 @ prefetch
831 eor r3,r7,r8 @ a^b, b^c in next round
833 ldr r2,[sp,#15*4] @ from future BODY_16_xx
834 eor r3,r7,r8 @ a^b, b^c in next round
835 ldr r1,[sp,#12*4] @ from future BODY_16_xx
837 eor r0,r0,r7,ror#20 @ Sigma0(a)
838 and r12,r12,r3 @ (b^c)&=(a^b)
839 add r10,r10,r6 @ d+=h
840 eor r12,r12,r8 @ Maj(a,b,c)
841 add r6,r6,r0,ror#2 @ h+=Sigma0(a)
842 @ add r6,r6,r12 @ h+=Maj(a,b,c)
844 @ ldr r2,[r1],#4 @ 14
846 str r1,[sp,#17*4] @ make room for r1
849 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
850 eor r0,r0,r10,ror#19 @ Sigma1(e)
853 @ ldrb r2,[r1,#3] @ 14
854 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
861 str r1,[sp,#17*4] @ make room for r1
865 eor r0,r0,r10,ror#19 @ Sigma1(e)
867 ldr r12,[r14],#4 @ *K256++
868 add r5,r5,r2 @ h+=X[i]
871 add r5,r5,r0,ror#6 @ h+=Sigma1(e)
873 add r5,r5,r12 @ h+=K256[i]
874 eor r2,r2,r4 @ Ch(e,f,g)
876 add r5,r5,r2 @ h+=Ch(e,f,g)
879 cmp r12,#0xf2 @ done?
883 ldr r2,[r1],#4 @ prefetch
887 eor r12,r6,r7 @ a^b, b^c in next round
889 ldr r2,[sp,#0*4] @ from future BODY_16_xx
890 eor r12,r6,r7 @ a^b, b^c in next round
891 ldr r1,[sp,#13*4] @ from future BODY_16_xx
893 eor r0,r0,r6,ror#20 @ Sigma0(a)
894 and r3,r3,r12 @ (b^c)&=(a^b)
896 eor r3,r3,r7 @ Maj(a,b,c)
897 add r5,r5,r0,ror#2 @ h+=Sigma0(a)
898 @ add r5,r5,r3 @ h+=Maj(a,b,c)
900 @ ldr r2,[r1],#4 @ 15
902 str r1,[sp,#17*4] @ make room for r1
905 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
906 eor r0,r0,r9,ror#19 @ Sigma1(e)
909 @ ldrb r2,[r1,#3] @ 15
910 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
917 str r1,[sp,#17*4] @ make room for r1
921 eor r0,r0,r9,ror#19 @ Sigma1(e)
923 ldr r3,[r14],#4 @ *K256++
924 add r4,r4,r2 @ h+=X[i]
927 add r4,r4,r0,ror#6 @ h+=Sigma1(e)
929 add r4,r4,r3 @ h+=K256[i]
930 eor r2,r2,r11 @ Ch(e,f,g)
932 add r4,r4,r2 @ h+=Ch(e,f,g)
939 ldr r2,[r1],#4 @ prefetch
943 eor r3,r5,r6 @ a^b, b^c in next round
945 ldr r2,[sp,#1*4] @ from future BODY_16_xx
946 eor r3,r5,r6 @ a^b, b^c in next round
947 ldr r1,[sp,#14*4] @ from future BODY_16_xx
949 eor r0,r0,r5,ror#20 @ Sigma0(a)
950 and r12,r12,r3 @ (b^c)&=(a^b)
952 eor r12,r12,r6 @ Maj(a,b,c)
953 add r4,r4,r0,ror#2 @ h+=Sigma0(a)
954 @ add r4,r4,r12 @ h+=Maj(a,b,c)
956 @ ldr r2,[sp,#1*4] @ 16
959 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
962 eor r12,r12,r1,ror#19
963 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
965 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
969 eor r0,r8,r8,ror#5 @ from BODY_00_15
971 eor r0,r0,r8,ror#19 @ Sigma1(e)
973 ldr r12,[r14],#4 @ *K256++
974 add r11,r11,r2 @ h+=X[i]
977 add r11,r11,r0,ror#6 @ h+=Sigma1(e)
979 add r11,r11,r12 @ h+=K256[i]
980 eor r2,r2,r10 @ Ch(e,f,g)
982 add r11,r11,r2 @ h+=Ch(e,f,g)
985 cmp r12,#0xf2 @ done?
989 ldr r2,[r1],#4 @ prefetch
993 eor r12,r4,r5 @ a^b, b^c in next round
995 ldr r2,[sp,#2*4] @ from future BODY_16_xx
996 eor r12,r4,r5 @ a^b, b^c in next round
997 ldr r1,[sp,#15*4] @ from future BODY_16_xx
999 eor r0,r0,r4,ror#20 @ Sigma0(a)
1000 and r3,r3,r12 @ (b^c)&=(a^b)
1001 add r7,r7,r11 @ d+=h
1002 eor r3,r3,r5 @ Maj(a,b,c)
1003 add r11,r11,r0,ror#2 @ h+=Sigma0(a)
1004 @ add r11,r11,r3 @ h+=Maj(a,b,c)
1005 @ ldr r2,[sp,#2*4] @ 17
1008 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
1012 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1014 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1018 eor r0,r7,r7,ror#5 @ from BODY_00_15
1020 eor r0,r0,r7,ror#19 @ Sigma1(e)
1022 ldr r3,[r14],#4 @ *K256++
1023 add r10,r10,r2 @ h+=X[i]
1026 add r10,r10,r0,ror#6 @ h+=Sigma1(e)
1028 add r10,r10,r3 @ h+=K256[i]
1029 eor r2,r2,r9 @ Ch(e,f,g)
1030 eor r0,r11,r11,ror#11
1031 add r10,r10,r2 @ h+=Ch(e,f,g)
1034 cmp r3,#0xf2 @ done?
1037 # if __ARM_ARCH__>=7
1038 ldr r2,[r1],#4 @ prefetch
1042 eor r3,r11,r4 @ a^b, b^c in next round
1044 ldr r2,[sp,#3*4] @ from future BODY_16_xx
1045 eor r3,r11,r4 @ a^b, b^c in next round
1046 ldr r1,[sp,#0*4] @ from future BODY_16_xx
1048 eor r0,r0,r11,ror#20 @ Sigma0(a)
1049 and r12,r12,r3 @ (b^c)&=(a^b)
1050 add r6,r6,r10 @ d+=h
1051 eor r12,r12,r4 @ Maj(a,b,c)
1052 add r10,r10,r0,ror#2 @ h+=Sigma0(a)
1053 @ add r10,r10,r12 @ h+=Maj(a,b,c)
1054 @ ldr r2,[sp,#3*4] @ 18
1057 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
1060 eor r12,r12,r1,ror#19
1061 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1063 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1067 eor r0,r6,r6,ror#5 @ from BODY_00_15
1069 eor r0,r0,r6,ror#19 @ Sigma1(e)
1071 ldr r12,[r14],#4 @ *K256++
1072 add r9,r9,r2 @ h+=X[i]
1075 add r9,r9,r0,ror#6 @ h+=Sigma1(e)
1077 add r9,r9,r12 @ h+=K256[i]
1078 eor r2,r2,r8 @ Ch(e,f,g)
1079 eor r0,r10,r10,ror#11
1080 add r9,r9,r2 @ h+=Ch(e,f,g)
1083 cmp r12,#0xf2 @ done?
1086 # if __ARM_ARCH__>=7
1087 ldr r2,[r1],#4 @ prefetch
1091 eor r12,r10,r11 @ a^b, b^c in next round
1093 ldr r2,[sp,#4*4] @ from future BODY_16_xx
1094 eor r12,r10,r11 @ a^b, b^c in next round
1095 ldr r1,[sp,#1*4] @ from future BODY_16_xx
1097 eor r0,r0,r10,ror#20 @ Sigma0(a)
1098 and r3,r3,r12 @ (b^c)&=(a^b)
1100 eor r3,r3,r11 @ Maj(a,b,c)
1101 add r9,r9,r0,ror#2 @ h+=Sigma0(a)
1102 @ add r9,r9,r3 @ h+=Maj(a,b,c)
1103 @ ldr r2,[sp,#4*4] @ 19
1106 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
1110 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1112 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1116 eor r0,r5,r5,ror#5 @ from BODY_00_15
1118 eor r0,r0,r5,ror#19 @ Sigma1(e)
1120 ldr r3,[r14],#4 @ *K256++
1121 add r8,r8,r2 @ h+=X[i]
1124 add r8,r8,r0,ror#6 @ h+=Sigma1(e)
1126 add r8,r8,r3 @ h+=K256[i]
1127 eor r2,r2,r7 @ Ch(e,f,g)
1129 add r8,r8,r2 @ h+=Ch(e,f,g)
1132 cmp r3,#0xf2 @ done?
1135 # if __ARM_ARCH__>=7
1136 ldr r2,[r1],#4 @ prefetch
1140 eor r3,r9,r10 @ a^b, b^c in next round
1142 ldr r2,[sp,#5*4] @ from future BODY_16_xx
1143 eor r3,r9,r10 @ a^b, b^c in next round
1144 ldr r1,[sp,#2*4] @ from future BODY_16_xx
1146 eor r0,r0,r9,ror#20 @ Sigma0(a)
1147 and r12,r12,r3 @ (b^c)&=(a^b)
1149 eor r12,r12,r10 @ Maj(a,b,c)
1150 add r8,r8,r0,ror#2 @ h+=Sigma0(a)
1151 @ add r8,r8,r12 @ h+=Maj(a,b,c)
1152 @ ldr r2,[sp,#5*4] @ 20
1155 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
1158 eor r12,r12,r1,ror#19
1159 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1161 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1165 eor r0,r4,r4,ror#5 @ from BODY_00_15
1167 eor r0,r0,r4,ror#19 @ Sigma1(e)
1169 ldr r12,[r14],#4 @ *K256++
1170 add r7,r7,r2 @ h+=X[i]
1173 add r7,r7,r0,ror#6 @ h+=Sigma1(e)
1175 add r7,r7,r12 @ h+=K256[i]
1176 eor r2,r2,r6 @ Ch(e,f,g)
1178 add r7,r7,r2 @ h+=Ch(e,f,g)
1181 cmp r12,#0xf2 @ done?
1184 # if __ARM_ARCH__>=7
1185 ldr r2,[r1],#4 @ prefetch
1189 eor r12,r8,r9 @ a^b, b^c in next round
1191 ldr r2,[sp,#6*4] @ from future BODY_16_xx
1192 eor r12,r8,r9 @ a^b, b^c in next round
1193 ldr r1,[sp,#3*4] @ from future BODY_16_xx
1195 eor r0,r0,r8,ror#20 @ Sigma0(a)
1196 and r3,r3,r12 @ (b^c)&=(a^b)
1197 add r11,r11,r7 @ d+=h
1198 eor r3,r3,r9 @ Maj(a,b,c)
1199 add r7,r7,r0,ror#2 @ h+=Sigma0(a)
1200 @ add r7,r7,r3 @ h+=Maj(a,b,c)
1201 @ ldr r2,[sp,#6*4] @ 21
1204 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
1208 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1210 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1214 eor r0,r11,r11,ror#5 @ from BODY_00_15
1216 eor r0,r0,r11,ror#19 @ Sigma1(e)
1218 ldr r3,[r14],#4 @ *K256++
1219 add r6,r6,r2 @ h+=X[i]
1222 add r6,r6,r0,ror#6 @ h+=Sigma1(e)
1224 add r6,r6,r3 @ h+=K256[i]
1225 eor r2,r2,r5 @ Ch(e,f,g)
1227 add r6,r6,r2 @ h+=Ch(e,f,g)
1230 cmp r3,#0xf2 @ done?
1233 # if __ARM_ARCH__>=7
1234 ldr r2,[r1],#4 @ prefetch
1238 eor r3,r7,r8 @ a^b, b^c in next round
1240 ldr r2,[sp,#7*4] @ from future BODY_16_xx
1241 eor r3,r7,r8 @ a^b, b^c in next round
1242 ldr r1,[sp,#4*4] @ from future BODY_16_xx
1244 eor r0,r0,r7,ror#20 @ Sigma0(a)
1245 and r12,r12,r3 @ (b^c)&=(a^b)
1246 add r10,r10,r6 @ d+=h
1247 eor r12,r12,r8 @ Maj(a,b,c)
1248 add r6,r6,r0,ror#2 @ h+=Sigma0(a)
1249 @ add r6,r6,r12 @ h+=Maj(a,b,c)
1250 @ ldr r2,[sp,#7*4] @ 22
1253 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
1256 eor r12,r12,r1,ror#19
1257 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1259 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1263 eor r0,r10,r10,ror#5 @ from BODY_00_15
1265 eor r0,r0,r10,ror#19 @ Sigma1(e)
1267 ldr r12,[r14],#4 @ *K256++
1268 add r5,r5,r2 @ h+=X[i]
1271 add r5,r5,r0,ror#6 @ h+=Sigma1(e)
1273 add r5,r5,r12 @ h+=K256[i]
1274 eor r2,r2,r4 @ Ch(e,f,g)
1276 add r5,r5,r2 @ h+=Ch(e,f,g)
1279 cmp r12,#0xf2 @ done?
1282 # if __ARM_ARCH__>=7
1283 ldr r2,[r1],#4 @ prefetch
1287 eor r12,r6,r7 @ a^b, b^c in next round
1289 ldr r2,[sp,#8*4] @ from future BODY_16_xx
1290 eor r12,r6,r7 @ a^b, b^c in next round
1291 ldr r1,[sp,#5*4] @ from future BODY_16_xx
1293 eor r0,r0,r6,ror#20 @ Sigma0(a)
1294 and r3,r3,r12 @ (b^c)&=(a^b)
1296 eor r3,r3,r7 @ Maj(a,b,c)
1297 add r5,r5,r0,ror#2 @ h+=Sigma0(a)
1298 @ add r5,r5,r3 @ h+=Maj(a,b,c)
1299 @ ldr r2,[sp,#8*4] @ 23
1302 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
1306 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1308 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1312 eor r0,r9,r9,ror#5 @ from BODY_00_15
1314 eor r0,r0,r9,ror#19 @ Sigma1(e)
1316 ldr r3,[r14],#4 @ *K256++
1317 add r4,r4,r2 @ h+=X[i]
1320 add r4,r4,r0,ror#6 @ h+=Sigma1(e)
1322 add r4,r4,r3 @ h+=K256[i]
1323 eor r2,r2,r11 @ Ch(e,f,g)
1325 add r4,r4,r2 @ h+=Ch(e,f,g)
1328 cmp r3,#0xf2 @ done?
1331 # if __ARM_ARCH__>=7
1332 ldr r2,[r1],#4 @ prefetch
1336 eor r3,r5,r6 @ a^b, b^c in next round
1338 ldr r2,[sp,#9*4] @ from future BODY_16_xx
1339 eor r3,r5,r6 @ a^b, b^c in next round
1340 ldr r1,[sp,#6*4] @ from future BODY_16_xx
1342 eor r0,r0,r5,ror#20 @ Sigma0(a)
1343 and r12,r12,r3 @ (b^c)&=(a^b)
1345 eor r12,r12,r6 @ Maj(a,b,c)
1346 add r4,r4,r0,ror#2 @ h+=Sigma0(a)
1347 @ add r4,r4,r12 @ h+=Maj(a,b,c)
1348 @ ldr r2,[sp,#9*4] @ 24
1351 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
1354 eor r12,r12,r1,ror#19
1355 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1357 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1361 eor r0,r8,r8,ror#5 @ from BODY_00_15
1363 eor r0,r0,r8,ror#19 @ Sigma1(e)
1365 ldr r12,[r14],#4 @ *K256++
1366 add r11,r11,r2 @ h+=X[i]
1369 add r11,r11,r0,ror#6 @ h+=Sigma1(e)
1371 add r11,r11,r12 @ h+=K256[i]
1372 eor r2,r2,r10 @ Ch(e,f,g)
1374 add r11,r11,r2 @ h+=Ch(e,f,g)
1377 cmp r12,#0xf2 @ done?
1380 # if __ARM_ARCH__>=7
1381 ldr r2,[r1],#4 @ prefetch
1385 eor r12,r4,r5 @ a^b, b^c in next round
1387 ldr r2,[sp,#10*4] @ from future BODY_16_xx
1388 eor r12,r4,r5 @ a^b, b^c in next round
1389 ldr r1,[sp,#7*4] @ from future BODY_16_xx
1391 eor r0,r0,r4,ror#20 @ Sigma0(a)
1392 and r3,r3,r12 @ (b^c)&=(a^b)
1393 add r7,r7,r11 @ d+=h
1394 eor r3,r3,r5 @ Maj(a,b,c)
1395 add r11,r11,r0,ror#2 @ h+=Sigma0(a)
1396 @ add r11,r11,r3 @ h+=Maj(a,b,c)
1397 @ ldr r2,[sp,#10*4] @ 25
1400 add r11,r11,r3 @ h+=Maj(a,b,c) from the past
1404 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1406 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1410 eor r0,r7,r7,ror#5 @ from BODY_00_15
1412 eor r0,r0,r7,ror#19 @ Sigma1(e)
1414 ldr r3,[r14],#4 @ *K256++
1415 add r10,r10,r2 @ h+=X[i]
1418 add r10,r10,r0,ror#6 @ h+=Sigma1(e)
1420 add r10,r10,r3 @ h+=K256[i]
1421 eor r2,r2,r9 @ Ch(e,f,g)
1422 eor r0,r11,r11,ror#11
1423 add r10,r10,r2 @ h+=Ch(e,f,g)
1426 cmp r3,#0xf2 @ done?
1429 # if __ARM_ARCH__>=7
1430 ldr r2,[r1],#4 @ prefetch
1434 eor r3,r11,r4 @ a^b, b^c in next round
1436 ldr r2,[sp,#11*4] @ from future BODY_16_xx
1437 eor r3,r11,r4 @ a^b, b^c in next round
1438 ldr r1,[sp,#8*4] @ from future BODY_16_xx
1440 eor r0,r0,r11,ror#20 @ Sigma0(a)
1441 and r12,r12,r3 @ (b^c)&=(a^b)
1442 add r6,r6,r10 @ d+=h
1443 eor r12,r12,r4 @ Maj(a,b,c)
1444 add r10,r10,r0,ror#2 @ h+=Sigma0(a)
1445 @ add r10,r10,r12 @ h+=Maj(a,b,c)
1446 @ ldr r2,[sp,#11*4] @ 26
1449 add r10,r10,r12 @ h+=Maj(a,b,c) from the past
1452 eor r12,r12,r1,ror#19
1453 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1455 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1459 eor r0,r6,r6,ror#5 @ from BODY_00_15
1461 eor r0,r0,r6,ror#19 @ Sigma1(e)
1463 ldr r12,[r14],#4 @ *K256++
1464 add r9,r9,r2 @ h+=X[i]
1467 add r9,r9,r0,ror#6 @ h+=Sigma1(e)
1469 add r9,r9,r12 @ h+=K256[i]
1470 eor r2,r2,r8 @ Ch(e,f,g)
1471 eor r0,r10,r10,ror#11
1472 add r9,r9,r2 @ h+=Ch(e,f,g)
1475 cmp r12,#0xf2 @ done?
1478 # if __ARM_ARCH__>=7
1479 ldr r2,[r1],#4 @ prefetch
1483 eor r12,r10,r11 @ a^b, b^c in next round
1485 ldr r2,[sp,#12*4] @ from future BODY_16_xx
1486 eor r12,r10,r11 @ a^b, b^c in next round
1487 ldr r1,[sp,#9*4] @ from future BODY_16_xx
1489 eor r0,r0,r10,ror#20 @ Sigma0(a)
1490 and r3,r3,r12 @ (b^c)&=(a^b)
1492 eor r3,r3,r11 @ Maj(a,b,c)
1493 add r9,r9,r0,ror#2 @ h+=Sigma0(a)
1494 @ add r9,r9,r3 @ h+=Maj(a,b,c)
1495 @ ldr r2,[sp,#12*4] @ 27
1498 add r9,r9,r3 @ h+=Maj(a,b,c) from the past
1502 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1504 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1508 eor r0,r5,r5,ror#5 @ from BODY_00_15
1510 eor r0,r0,r5,ror#19 @ Sigma1(e)
1512 ldr r3,[r14],#4 @ *K256++
1513 add r8,r8,r2 @ h+=X[i]
1516 add r8,r8,r0,ror#6 @ h+=Sigma1(e)
1518 add r8,r8,r3 @ h+=K256[i]
1519 eor r2,r2,r7 @ Ch(e,f,g)
1521 add r8,r8,r2 @ h+=Ch(e,f,g)
1524 cmp r3,#0xf2 @ done?
1527 # if __ARM_ARCH__>=7
1528 ldr r2,[r1],#4 @ prefetch
1532 eor r3,r9,r10 @ a^b, b^c in next round
1534 ldr r2,[sp,#13*4] @ from future BODY_16_xx
1535 eor r3,r9,r10 @ a^b, b^c in next round
1536 ldr r1,[sp,#10*4] @ from future BODY_16_xx
1538 eor r0,r0,r9,ror#20 @ Sigma0(a)
1539 and r12,r12,r3 @ (b^c)&=(a^b)
1541 eor r12,r12,r10 @ Maj(a,b,c)
1542 add r8,r8,r0,ror#2 @ h+=Sigma0(a)
1543 @ add r8,r8,r12 @ h+=Maj(a,b,c)
1544 @ ldr r2,[sp,#13*4] @ 28
1547 add r8,r8,r12 @ h+=Maj(a,b,c) from the past
1550 eor r12,r12,r1,ror#19
1551 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1553 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1557 eor r0,r4,r4,ror#5 @ from BODY_00_15
1559 eor r0,r0,r4,ror#19 @ Sigma1(e)
1561 ldr r12,[r14],#4 @ *K256++
1562 add r7,r7,r2 @ h+=X[i]
1565 add r7,r7,r0,ror#6 @ h+=Sigma1(e)
1567 add r7,r7,r12 @ h+=K256[i]
1568 eor r2,r2,r6 @ Ch(e,f,g)
1570 add r7,r7,r2 @ h+=Ch(e,f,g)
1573 cmp r12,#0xf2 @ done?
1576 # if __ARM_ARCH__>=7
1577 ldr r2,[r1],#4 @ prefetch
1581 eor r12,r8,r9 @ a^b, b^c in next round
1583 ldr r2,[sp,#14*4] @ from future BODY_16_xx
1584 eor r12,r8,r9 @ a^b, b^c in next round
1585 ldr r1,[sp,#11*4] @ from future BODY_16_xx
1587 eor r0,r0,r8,ror#20 @ Sigma0(a)
1588 and r3,r3,r12 @ (b^c)&=(a^b)
1589 add r11,r11,r7 @ d+=h
1590 eor r3,r3,r9 @ Maj(a,b,c)
1591 add r7,r7,r0,ror#2 @ h+=Sigma0(a)
1592 @ add r7,r7,r3 @ h+=Maj(a,b,c)
1593 @ ldr r2,[sp,#14*4] @ 29
1596 add r7,r7,r3 @ h+=Maj(a,b,c) from the past
1600 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1602 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1606 eor r0,r11,r11,ror#5 @ from BODY_00_15
1608 eor r0,r0,r11,ror#19 @ Sigma1(e)
1610 ldr r3,[r14],#4 @ *K256++
1611 add r6,r6,r2 @ h+=X[i]
1614 add r6,r6,r0,ror#6 @ h+=Sigma1(e)
1616 add r6,r6,r3 @ h+=K256[i]
1617 eor r2,r2,r5 @ Ch(e,f,g)
1619 add r6,r6,r2 @ h+=Ch(e,f,g)
1622 cmp r3,#0xf2 @ done?
1625 # if __ARM_ARCH__>=7
1626 ldr r2,[r1],#4 @ prefetch
1630 eor r3,r7,r8 @ a^b, b^c in next round
1632 ldr r2,[sp,#15*4] @ from future BODY_16_xx
1633 eor r3,r7,r8 @ a^b, b^c in next round
1634 ldr r1,[sp,#12*4] @ from future BODY_16_xx
1636 eor r0,r0,r7,ror#20 @ Sigma0(a)
1637 and r12,r12,r3 @ (b^c)&=(a^b)
1638 add r10,r10,r6 @ d+=h
1639 eor r12,r12,r8 @ Maj(a,b,c)
1640 add r6,r6,r0,ror#2 @ h+=Sigma0(a)
1641 @ add r6,r6,r12 @ h+=Maj(a,b,c)
1642 @ ldr r2,[sp,#15*4] @ 30
1645 add r6,r6,r12 @ h+=Maj(a,b,c) from the past
1648 eor r12,r12,r1,ror#19
1649 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1651 eor r12,r12,r1,lsr#10 @ sigma1(X[i+14])
1655 eor r0,r10,r10,ror#5 @ from BODY_00_15
1657 eor r0,r0,r10,ror#19 @ Sigma1(e)
1659 ldr r12,[r14],#4 @ *K256++
1660 add r5,r5,r2 @ h+=X[i]
1663 add r5,r5,r0,ror#6 @ h+=Sigma1(e)
1665 add r5,r5,r12 @ h+=K256[i]
1666 eor r2,r2,r4 @ Ch(e,f,g)
1668 add r5,r5,r2 @ h+=Ch(e,f,g)
1671 cmp r12,#0xf2 @ done?
1674 # if __ARM_ARCH__>=7
1675 ldr r2,[r1],#4 @ prefetch
1679 eor r12,r6,r7 @ a^b, b^c in next round
1681 ldr r2,[sp,#0*4] @ from future BODY_16_xx
1682 eor r12,r6,r7 @ a^b, b^c in next round
1683 ldr r1,[sp,#13*4] @ from future BODY_16_xx
1685 eor r0,r0,r6,ror#20 @ Sigma0(a)
1686 and r3,r3,r12 @ (b^c)&=(a^b)
1688 eor r3,r3,r7 @ Maj(a,b,c)
1689 add r5,r5,r0,ror#2 @ h+=Sigma0(a)
1690 @ add r5,r5,r3 @ h+=Maj(a,b,c)
1691 @ ldr r2,[sp,#0*4] @ 31
1694 add r5,r5,r3 @ h+=Maj(a,b,c) from the past
1698 eor r0,r0,r2,lsr#3 @ sigma0(X[i+1])
1700 eor r3,r3,r1,lsr#10 @ sigma1(X[i+14])
1704 eor r0,r9,r9,ror#5 @ from BODY_00_15
1706 eor r0,r0,r9,ror#19 @ Sigma1(e)
1708 ldr r3,[r14],#4 @ *K256++
1709 add r4,r4,r2 @ h+=X[i]
1712 add r4,r4,r0,ror#6 @ h+=Sigma1(e)
1714 add r4,r4,r3 @ h+=K256[i]
1715 eor r2,r2,r11 @ Ch(e,f,g)
1717 add r4,r4,r2 @ h+=Ch(e,f,g)
1720 cmp r3,#0xf2 @ done?
1723 # if __ARM_ARCH__>=7
1724 ldr r2,[r1],#4 @ prefetch
1728 eor r3,r5,r6 @ a^b, b^c in next round
1730 ldr r2,[sp,#1*4] @ from future BODY_16_xx
1731 eor r3,r5,r6 @ a^b, b^c in next round
1732 ldr r1,[sp,#14*4] @ from future BODY_16_xx
1734 eor r0,r0,r5,ror#20 @ Sigma0(a)
1735 and r12,r12,r3 @ (b^c)&=(a^b)
1737 eor r12,r12,r6 @ Maj(a,b,c)
1738 add r4,r4,r0,ror#2 @ h+=Sigma0(a)
1739 @ add r4,r4,r12 @ h+=Maj(a,b,c)
1740 ldreq r3,[sp,#16*4] @ pull ctx
1743 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
1758 ldr r1,[sp,#17*4] @ pull inp
1759 ldr r12,[sp,#18*4] @ pull inp+len
1762 stmia r3,{r4,r5,r6,r7,r8,r9,r10,r11}
1764 sub r14,r14,#256 @ rewind Ktbl
1767 add sp,sp,#19*4 @ destroy frame
1769 ldmia sp!,{r4-r11,pc}
1771 ldmia sp!,{r4-r11,lr}
1773 moveq pc,lr @ be binary compatible with V4, yet
1774 .word 0xe12fff1e @ interoperable with Thumb ISA:-)
1776 .size sha256_block_data_order,.-sha256_block_data_order
1777 #if __ARM_MAX_ARCH__>=7
1781 .type sha256_block_data_order_neon,%function
1783 sha256_block_data_order_neon:
1785 stmdb sp!,{r4-r12,lr}
1788 sub sp,sp,#16*4+16 @ alloca
1789 sub r14,r3,#256+32 @ K256
1790 bic sp,sp,#15 @ align for 128-bit stores
1796 vld1.32 {q8},[r14,:128]!
1797 vld1.32 {q9},[r14,:128]!
1798 vld1.32 {q10},[r14,:128]!
1799 vld1.32 {q11},[r14,:128]!
1800 vrev32.8 q0,q0 @ yes, even on
1802 vrev32.8 q1,q1 @ big-endian
1808 str r12,[sp,#76] @ save original sp
1811 vst1.32 {q8},[r1,:128]!
1813 vst1.32 {q9},[r1,:128]!
1815 vst1.32 {q10},[r1,:128]!
1816 vst1.32 {q11},[r1,:128]!
1834 eor r12,r0,r8,ror#19
1839 add r11,r11,r12,ror#6
1849 add r11,r11,r0,ror#2
1861 eor r0,r11,r11,ror#11
1864 add r10,r10,r3,ror#6
1867 eor r0,r0,r11,ror#20
1875 add r10,r10,r0,ror#2
1885 eor r12,r0,r6,ror#19
1887 eor r0,r10,r10,ror#11
1893 eor r0,r0,r10,ror#20
1902 vld1.32 {q8},[r14,:128]!
1922 vst1.32 {q8},[r1,:128]!
1932 eor r12,r0,r4,ror#19
1953 eor r0,r11,r11,ror#5
1958 eor r3,r0,r11,ror#19
1979 eor r0,r10,r10,ror#5
1983 eor r12,r0,r10,ror#19
2000 vld1.32 {q8},[r14,:128]!
2020 vst1.32 {q8},[r1,:128]!
2030 eor r12,r0,r8,ror#19
2035 add r11,r11,r12,ror#6
2045 add r11,r11,r0,ror#2
2057 eor r0,r11,r11,ror#11
2060 add r10,r10,r3,ror#6
2063 eor r0,r0,r11,ror#20
2071 add r10,r10,r0,ror#2
2081 eor r12,r0,r6,ror#19
2083 eor r0,r10,r10,ror#11
2089 eor r0,r0,r10,ror#20
2098 vld1.32 {q8},[r14,:128]!
2118 vst1.32 {q8},[r1,:128]!
2128 eor r12,r0,r4,ror#19
2149 eor r0,r11,r11,ror#5
2154 eor r3,r0,r11,ror#19
2175 eor r0,r10,r10,ror#5
2179 eor r12,r0,r10,ror#19
2196 vld1.32 {q8},[r14,:128]!
2216 vst1.32 {q8},[r1,:128]!
2219 teq r2,#0 @ check for K256 terminator
2226 sub r14,r14,#256 @ rewind r14
2228 subeq r1,r1,#64 @ avoid SEGV
2229 vld1.8 {q0},[r1]! @ load next input block
2239 vld1.32 {q8},[r14,:128]!
2241 eor r12,r0,r8,ror#19
2245 add r11,r11,r12,ror#6
2253 add r11,r11,r0,ror#2
2261 eor r0,r11,r11,ror#11
2263 add r10,r10,r3,ror#6
2265 eor r0,r0,r11,ror#20
2270 add r10,r10,r0,ror#2
2277 eor r12,r0,r6,ror#19
2278 eor r0,r10,r10,ror#11
2282 eor r0,r0,r10,ror#20
2306 vst1.32 {q8},[r1,:128]!
2311 vld1.32 {q8},[r14,:128]!
2313 eor r12,r0,r4,ror#19
2329 eor r0,r11,r11,ror#5
2332 eor r3,r0,r11,ror#19
2346 eor r0,r10,r10,ror#5
2349 eor r12,r0,r10,ror#19
2378 vst1.32 {q8},[r1,:128]!
2383 vld1.32 {q8},[r14,:128]!
2385 eor r12,r0,r8,ror#19
2389 add r11,r11,r12,ror#6
2397 add r11,r11,r0,ror#2
2405 eor r0,r11,r11,ror#11
2407 add r10,r10,r3,ror#6
2409 eor r0,r0,r11,ror#20
2414 add r10,r10,r0,ror#2
2421 eor r12,r0,r6,ror#19
2422 eor r0,r10,r10,ror#11
2426 eor r0,r0,r10,ror#20
2450 vst1.32 {q8},[r1,:128]!
2455 vld1.32 {q8},[r14,:128]!
2457 eor r12,r0,r4,ror#19
2473 eor r0,r11,r11,ror#5
2476 eor r3,r0,r11,ror#19
2490 eor r0,r10,r10,ror#5
2493 eor r12,r0,r10,ror#19
2522 vst1.32 {q8},[r1,:128]!
2524 add r4,r4,r12 @ h+=Maj(a,b,c) from the past
2528 add r4,r4,r0 @ accumulate
2549 ldreq sp,[sp,#76] @ restore original sp
2553 ldmia sp!,{r4-r12,pc}
2554 .size sha256_block_data_order_neon,.-sha256_block_data_order_neon
2556 #if __ARM_MAX_ARCH__>=7
2557 .type sha256_block_data_order_armv8,%function
2559 sha256_block_data_order_armv8:
2561 vld1.32 {q0,q1},[r0]
2562 sub r3,r3,#sha256_block_data_order-K256
2565 vld1.8 {q8-q9},[r1]!
2566 vld1.8 {q10-q11},[r1]!
2572 vmov q14,q0 @ offload
2577 .inst 0xf3fa03e2 @ sha256su0 q8,q9
2579 .inst 0xf3020c68 @ sha256h q0,q1,q12
2580 .inst 0xf3142c68 @ sha256h2 q1,q2,q12
2581 .inst 0xf3640ce6 @ sha256su1 q8,q10,q11
2584 .inst 0xf3fa23e4 @ sha256su0 q9,q10
2586 .inst 0xf3020c6a @ sha256h q0,q1,q13
2587 .inst 0xf3142c6a @ sha256h2 q1,q2,q13
2588 .inst 0xf3662ce0 @ sha256su1 q9,q11,q8
2590 vadd.i32 q12,q12,q10
2591 .inst 0xf3fa43e6 @ sha256su0 q10,q11
2593 .inst 0xf3020c68 @ sha256h q0,q1,q12
2594 .inst 0xf3142c68 @ sha256h2 q1,q2,q12
2595 .inst 0xf3604ce2 @ sha256su1 q10,q8,q9
2597 vadd.i32 q13,q13,q11
2598 .inst 0xf3fa63e0 @ sha256su0 q11,q8
2600 .inst 0xf3020c6a @ sha256h q0,q1,q13
2601 .inst 0xf3142c6a @ sha256h2 q1,q2,q13
2602 .inst 0xf3626ce4 @ sha256su1 q11,q9,q10
2605 .inst 0xf3fa03e2 @ sha256su0 q8,q9
2607 .inst 0xf3020c68 @ sha256h q0,q1,q12
2608 .inst 0xf3142c68 @ sha256h2 q1,q2,q12
2609 .inst 0xf3640ce6 @ sha256su1 q8,q10,q11
2612 .inst 0xf3fa23e4 @ sha256su0 q9,q10
2614 .inst 0xf3020c6a @ sha256h q0,q1,q13
2615 .inst 0xf3142c6a @ sha256h2 q1,q2,q13
2616 .inst 0xf3662ce0 @ sha256su1 q9,q11,q8
2618 vadd.i32 q12,q12,q10
2619 .inst 0xf3fa43e6 @ sha256su0 q10,q11
2621 .inst 0xf3020c68 @ sha256h q0,q1,q12
2622 .inst 0xf3142c68 @ sha256h2 q1,q2,q12
2623 .inst 0xf3604ce2 @ sha256su1 q10,q8,q9
2625 vadd.i32 q13,q13,q11
2626 .inst 0xf3fa63e0 @ sha256su0 q11,q8
2628 .inst 0xf3020c6a @ sha256h q0,q1,q13
2629 .inst 0xf3142c6a @ sha256h2 q1,q2,q13
2630 .inst 0xf3626ce4 @ sha256su1 q11,q9,q10
2633 .inst 0xf3fa03e2 @ sha256su0 q8,q9
2635 .inst 0xf3020c68 @ sha256h q0,q1,q12
2636 .inst 0xf3142c68 @ sha256h2 q1,q2,q12
2637 .inst 0xf3640ce6 @ sha256su1 q8,q10,q11
2640 .inst 0xf3fa23e4 @ sha256su0 q9,q10
2642 .inst 0xf3020c6a @ sha256h q0,q1,q13
2643 .inst 0xf3142c6a @ sha256h2 q1,q2,q13
2644 .inst 0xf3662ce0 @ sha256su1 q9,q11,q8
2646 vadd.i32 q12,q12,q10
2647 .inst 0xf3fa43e6 @ sha256su0 q10,q11
2649 .inst 0xf3020c68 @ sha256h q0,q1,q12
2650 .inst 0xf3142c68 @ sha256h2 q1,q2,q12
2651 .inst 0xf3604ce2 @ sha256su1 q10,q8,q9
2653 vadd.i32 q13,q13,q11
2654 .inst 0xf3fa63e0 @ sha256su0 q11,q8
2656 .inst 0xf3020c6a @ sha256h q0,q1,q13
2657 .inst 0xf3142c6a @ sha256h2 q1,q2,q13
2658 .inst 0xf3626ce4 @ sha256su1 q11,q9,q10
2662 .inst 0xf3020c68 @ sha256h q0,q1,q12
2663 .inst 0xf3142c68 @ sha256h2 q1,q2,q12
2668 .inst 0xf3020c6a @ sha256h q0,q1,q13
2669 .inst 0xf3142c6a @ sha256h2 q1,q2,q13
2672 vadd.i32 q12,q12,q10
2673 sub r3,r3,#256-16 @ rewind
2675 .inst 0xf3020c68 @ sha256h q0,q1,q12
2676 .inst 0xf3142c68 @ sha256h2 q1,q2,q12
2678 vadd.i32 q13,q13,q11
2680 .inst 0xf3020c6a @ sha256h q0,q1,q13
2681 .inst 0xf3142c6a @ sha256h2 q1,q2,q13
2687 vst1.32 {q0,q1},[r0]
2690 .size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8
2692 .asciz "SHA256 block transform for ARMv4/NEON/ARMv8, CRYPTOGAMS by <appro@openssl.org>"
2694 #if __ARM_MAX_ARCH__>=7
2695 .comm OPENSSL_armcap_P,4,4