1 .section ".text",#alloc,#execinstr
6 .long 0x428a2f98,0xd728ae22, 0x71374491,0x23ef65cd
7 .long 0xb5c0fbcf,0xec4d3b2f, 0xe9b5dba5,0x8189dbbc
8 .long 0x3956c25b,0xf348b538, 0x59f111f1,0xb605d019
9 .long 0x923f82a4,0xaf194f9b, 0xab1c5ed5,0xda6d8118
10 .long 0xd807aa98,0xa3030242, 0x12835b01,0x45706fbe
11 .long 0x243185be,0x4ee4b28c, 0x550c7dc3,0xd5ffb4e2
12 .long 0x72be5d74,0xf27b896f, 0x80deb1fe,0x3b1696b1
13 .long 0x9bdc06a7,0x25c71235, 0xc19bf174,0xcf692694
14 .long 0xe49b69c1,0x9ef14ad2, 0xefbe4786,0x384f25e3
15 .long 0x0fc19dc6,0x8b8cd5b5, 0x240ca1cc,0x77ac9c65
16 .long 0x2de92c6f,0x592b0275, 0x4a7484aa,0x6ea6e483
17 .long 0x5cb0a9dc,0xbd41fbd4, 0x76f988da,0x831153b5
18 .long 0x983e5152,0xee66dfab, 0xa831c66d,0x2db43210
19 .long 0xb00327c8,0x98fb213f, 0xbf597fc7,0xbeef0ee4
20 .long 0xc6e00bf3,0x3da88fc2, 0xd5a79147,0x930aa725
21 .long 0x06ca6351,0xe003826f, 0x14292967,0x0a0e6e70
22 .long 0x27b70a85,0x46d22ffc, 0x2e1b2138,0x5c26c926
23 .long 0x4d2c6dfc,0x5ac42aed, 0x53380d13,0x9d95b3df
24 .long 0x650a7354,0x8baf63de, 0x766a0abb,0x3c77b2a8
25 .long 0x81c2c92e,0x47edaee6, 0x92722c85,0x1482353b
26 .long 0xa2bfe8a1,0x4cf10364, 0xa81a664b,0xbc423001
27 .long 0xc24b8b70,0xd0f89791, 0xc76c51a3,0x0654be30
28 .long 0xd192e819,0xd6ef5218, 0xd6990624,0x5565a910
29 .long 0xf40e3585,0x5771202a, 0x106aa070,0x32bbd1b8
30 .long 0x19a4c116,0xb8d2d0c8, 0x1e376c08,0x5141ab53
31 .long 0x2748774c,0xdf8eeb99, 0x34b0bcb5,0xe19b48a8
32 .long 0x391c0cb3,0xc5c95a63, 0x4ed8aa4a,0xe3418acb
33 .long 0x5b9cca4f,0x7763e373, 0x682e6ff3,0xd6b2b8a3
34 .long 0x748f82ee,0x5defb2fc, 0x78a5636f,0x43172f60
35 .long 0x84c87814,0xa1f0ab72, 0x8cc70208,0x1a6439ec
36 .long 0x90befffa,0x23631e28, 0xa4506ceb,0xde82bde9
37 .long 0xbef9a3f7,0xb2c67915, 0xc67178f2,0xe372532b
38 .long 0xca273ece,0xea26619c, 0xd186b8c7,0x21c0c207
39 .long 0xeada7dd6,0xcde0eb1e, 0xf57d4f7f,0xee6ed178
40 .long 0x06f067aa,0x72176fba, 0x0a637dc5,0xa2c898a6
41 .long 0x113f9804,0xbef90dae, 0x1b710b35,0x131c471b
42 .long 0x28db77f5,0x23047d84, 0x32caab7b,0x40c72493
43 .long 0x3c9ebe0a,0x15c9bebc, 0x431d67c4,0x9c100d4c
44 .long 0x4cc5d4be,0xcb3e42b6, 0x597f299c,0xfc657e2a
45 .long 0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817
47 .globl sha512_block_data_order
48 sha512_block_data_order:
58 add %o7,K512-.Lpic,%i3
78 sllx %l1,%i4,%g5 ! Xload(0)
100 xor %g1,%g5,%g5 ! Ch(e,f,g)
101 xor %g4,%o7,%g3 ! Sigma1(e)
105 ldx [%i3+0],%g5 ! K[0]
116 xor %g4,%o7,%o7 ! Sigma0(a)
121 or %g3,%g4,%g4 ! Maj(a,b,c)
122 add %g5,%g2,%g2 ! +=K[0]
127 sllx %l3,%i4,%g5 ! Xload(1)
149 xor %o5,%g5,%g5 ! Ch(e,f,g)
150 xor %g4,%g1,%g3 ! Sigma1(e)
154 ldx [%i3+8],%g5 ! K[1]
165 xor %g4,%g1,%g1 ! Sigma0(a)
170 or %g3,%g4,%g4 ! Maj(a,b,c)
171 add %g5,%g2,%g2 ! +=K[1]
176 sllx %l5,%i4,%g5 ! Xload(2)
198 xor %o4,%g5,%g5 ! Ch(e,f,g)
199 xor %g4,%o5,%g3 ! Sigma1(e)
203 ldx [%i3+16],%g5 ! K[2]
214 xor %g4,%o5,%o5 ! Sigma0(a)
219 or %g3,%g4,%g4 ! Maj(a,b,c)
220 add %g5,%g2,%g2 ! +=K[2]
225 sllx %l7,%i4,%g5 ! Xload(3)
247 xor %o3,%g5,%g5 ! Ch(e,f,g)
248 xor %g4,%o4,%g3 ! Sigma1(e)
252 ldx [%i3+24],%g5 ! K[3]
263 xor %g4,%o4,%o4 ! Sigma0(a)
268 or %g3,%g4,%g4 ! Maj(a,b,c)
269 add %g5,%g2,%g2 ! +=K[3]
274 sllx %l1,%i4,%g5 ! Xload(4)
296 xor %o2,%g5,%g5 ! Ch(e,f,g)
297 xor %g4,%o3,%g3 ! Sigma1(e)
301 ldx [%i3+32],%g5 ! K[4]
312 xor %g4,%o3,%o3 ! Sigma0(a)
317 or %g3,%g4,%g4 ! Maj(a,b,c)
318 add %g5,%g2,%g2 ! +=K[4]
323 sllx %l3,%i4,%g5 ! Xload(5)
345 xor %o1,%g5,%g5 ! Ch(e,f,g)
346 xor %g4,%o2,%g3 ! Sigma1(e)
350 ldx [%i3+40],%g5 ! K[5]
361 xor %g4,%o2,%o2 ! Sigma0(a)
366 or %g3,%g4,%g4 ! Maj(a,b,c)
367 add %g5,%g2,%g2 ! +=K[5]
372 sllx %l5,%i4,%g5 ! Xload(6)
394 xor %o0,%g5,%g5 ! Ch(e,f,g)
395 xor %g4,%o1,%g3 ! Sigma1(e)
399 ldx [%i3+48],%g5 ! K[6]
410 xor %g4,%o1,%o1 ! Sigma0(a)
415 or %g3,%g4,%g4 ! Maj(a,b,c)
416 add %g5,%g2,%g2 ! +=K[6]
421 sllx %l7,%i4,%g5 ! Xload(7)
443 xor %o7,%g5,%g5 ! Ch(e,f,g)
444 xor %g4,%o0,%g3 ! Sigma1(e)
448 ldx [%i3+56],%g5 ! K[7]
459 xor %g4,%o0,%o0 ! Sigma0(a)
464 or %g3,%g4,%g4 ! Maj(a,b,c)
465 add %g5,%g2,%g2 ! +=K[7]
470 sllx %l1,%i4,%g5 ! Xload(8)
492 xor %g1,%g5,%g5 ! Ch(e,f,g)
493 xor %g4,%o7,%g3 ! Sigma1(e)
497 ldx [%i3+64],%g5 ! K[8]
508 xor %g4,%o7,%o7 ! Sigma0(a)
513 or %g3,%g4,%g4 ! Maj(a,b,c)
514 add %g5,%g2,%g2 ! +=K[8]
519 sllx %l3,%i4,%g5 ! Xload(9)
541 xor %o5,%g5,%g5 ! Ch(e,f,g)
542 xor %g4,%g1,%g3 ! Sigma1(e)
546 ldx [%i3+72],%g5 ! K[9]
557 xor %g4,%g1,%g1 ! Sigma0(a)
562 or %g3,%g4,%g4 ! Maj(a,b,c)
563 add %g5,%g2,%g2 ! +=K[9]
568 sllx %l5,%i4,%g5 ! Xload(10)
578 srlx %o2,14,%o5 !! 10
590 xor %o4,%g5,%g5 ! Ch(e,f,g)
591 xor %g4,%o5,%g3 ! Sigma1(e)
595 ldx [%i3+80],%g5 ! K[10]
606 xor %g4,%o5,%o5 ! Sigma0(a)
611 or %g3,%g4,%g4 ! Maj(a,b,c)
612 add %g5,%g2,%g2 ! +=K[10]
617 sllx %l7,%i4,%g5 ! Xload(11)
627 srlx %o1,14,%o4 !! 11
639 xor %o3,%g5,%g5 ! Ch(e,f,g)
640 xor %g4,%o4,%g3 ! Sigma1(e)
644 ldx [%i3+88],%g5 ! K[11]
655 xor %g4,%o4,%o4 ! Sigma0(a)
660 or %g3,%g4,%g4 ! Maj(a,b,c)
661 add %g5,%g2,%g2 ! +=K[11]
666 sllx %l1,%i4,%g5 ! Xload(12)
678 srlx %o0,14,%o3 !! 12
690 xor %o2,%g5,%g5 ! Ch(e,f,g)
691 xor %g4,%o3,%g3 ! Sigma1(e)
695 ldx [%i3+96],%g5 ! K[12]
706 xor %g4,%o3,%o3 ! Sigma0(a)
711 or %g3,%g4,%g4 ! Maj(a,b,c)
712 add %g5,%g2,%g2 ! +=K[12]
717 sllx %l3,%i4,%g5 ! Xload(13)
727 srlx %o7,14,%o2 !! 13
739 xor %o1,%g5,%g5 ! Ch(e,f,g)
740 xor %g4,%o2,%g3 ! Sigma1(e)
744 ldx [%i3+104],%g5 ! K[13]
755 xor %g4,%o2,%o2 ! Sigma0(a)
760 or %g3,%g4,%g4 ! Maj(a,b,c)
761 add %g5,%g2,%g2 ! +=K[13]
766 sllx %l5,%i4,%g5 ! Xload(14)
776 srlx %g1,14,%o1 !! 14
788 xor %o0,%g5,%g5 ! Ch(e,f,g)
789 xor %g4,%o1,%g3 ! Sigma1(e)
793 ldx [%i3+112],%g5 ! K[14]
804 xor %g4,%o1,%o1 ! Sigma0(a)
809 or %g3,%g4,%g4 ! Maj(a,b,c)
810 add %g5,%g2,%g2 ! +=K[14]
816 sllx %l7,%i4,%g5 ! Xload(15)
831 srlx %o5,14,%o0 !! 15
843 xor %o7,%g5,%g5 ! Ch(e,f,g)
844 xor %g4,%o0,%g3 ! Sigma1(e)
848 ldx [%i3+120],%g5 ! K[15]
859 xor %g4,%o0,%o0 ! Sigma0(a)
864 or %g3,%g4,%g4 ! Maj(a,b,c)
865 add %g5,%g2,%g2 ! +=K[15]
871 sllx %l2,32,%g3 !! Xupdate(16)
885 xor %g3,%g2,%g2 ! sigma0(X[16+1])
899 xor %g5,%g4,%g4 ! sigma1(X[16+14])
908 add %g3,%g2,%g2 ! +=X[16+9]
910 add %g5,%g2,%g2 ! +=X[16]
913 srlx %o4,14,%o7 !! 16
925 xor %g1,%g5,%g5 ! Ch(e,f,g)
926 xor %g4,%o7,%g3 ! Sigma1(e)
930 ldx [%i3+128],%g5 ! K[16]
941 xor %g4,%o7,%o7 ! Sigma0(a)
946 or %g3,%g4,%g4 ! Maj(a,b,c)
947 add %g5,%g2,%g2 ! +=K[16]
952 sllx %l2,32,%g3 !! Xupdate(17)
966 xor %g3,%g2,%g2 ! sigma0(X[17+1])
980 xor %g5,%g4,%g4 ! sigma1(X[17+14])
989 add %g3,%g2,%g2 ! +=X[17+9]
991 add %g5,%g2,%g2 ! +=X[17]
994 srlx %o3,14,%g1 !! 17
1006 xor %o5,%g5,%g5 ! Ch(e,f,g)
1007 xor %g4,%g1,%g3 ! Sigma1(e)
1011 ldx [%i3+136],%g5 ! K[17]
1022 xor %g4,%g1,%g1 ! Sigma0(a)
1027 or %g3,%g4,%g4 ! Maj(a,b,c)
1028 add %g5,%g2,%g2 ! +=K[17]
1033 sllx %l2,32,%g3 !! Xupdate(18)
1047 xor %g3,%g2,%g2 ! sigma0(X[18+1])
1061 xor %g5,%g4,%g4 ! sigma1(X[18+14])
1070 add %g3,%g2,%g2 ! +=X[18+9]
1072 add %g5,%g2,%g2 ! +=X[18]
1075 srlx %o2,14,%o5 !! 18
1087 xor %o4,%g5,%g5 ! Ch(e,f,g)
1088 xor %g4,%o5,%g3 ! Sigma1(e)
1092 ldx [%i3+144],%g5 ! K[18]
1103 xor %g4,%o5,%o5 ! Sigma0(a)
1108 or %g3,%g4,%g4 ! Maj(a,b,c)
1109 add %g5,%g2,%g2 ! +=K[18]
1114 sllx %l2,32,%g3 !! Xupdate(19)
1128 xor %g3,%g2,%g2 ! sigma0(X[19+1])
1142 xor %g5,%g4,%g4 ! sigma1(X[19+14])
1151 add %g3,%g2,%g2 ! +=X[19+9]
1153 add %g5,%g2,%g2 ! +=X[19]
1156 srlx %o1,14,%o4 !! 19
1168 xor %o3,%g5,%g5 ! Ch(e,f,g)
1169 xor %g4,%o4,%g3 ! Sigma1(e)
1173 ldx [%i3+152],%g5 ! K[19]
1184 xor %g4,%o4,%o4 ! Sigma0(a)
1189 or %g3,%g4,%g4 ! Maj(a,b,c)
1190 add %g5,%g2,%g2 ! +=K[19]
1195 sllx %l2,32,%g3 !! Xupdate(20)
1209 xor %g3,%g2,%g2 ! sigma0(X[20+1])
1223 xor %g5,%g4,%g4 ! sigma1(X[20+14])
1232 add %g3,%g2,%g2 ! +=X[20+9]
1234 add %g5,%g2,%g2 ! +=X[20]
1237 srlx %o0,14,%o3 !! 20
1249 xor %o2,%g5,%g5 ! Ch(e,f,g)
1250 xor %g4,%o3,%g3 ! Sigma1(e)
1254 ldx [%i3+160],%g5 ! K[20]
1265 xor %g4,%o3,%o3 ! Sigma0(a)
1270 or %g3,%g4,%g4 ! Maj(a,b,c)
1271 add %g5,%g2,%g2 ! +=K[20]
1276 sllx %l2,32,%g3 !! Xupdate(21)
1290 xor %g3,%g2,%g2 ! sigma0(X[21+1])
1304 xor %g5,%g4,%g4 ! sigma1(X[21+14])
1313 add %g3,%g2,%g2 ! +=X[21+9]
1315 add %g5,%g2,%g2 ! +=X[21]
1318 srlx %o7,14,%o2 !! 21
1330 xor %o1,%g5,%g5 ! Ch(e,f,g)
1331 xor %g4,%o2,%g3 ! Sigma1(e)
1335 ldx [%i3+168],%g5 ! K[21]
1346 xor %g4,%o2,%o2 ! Sigma0(a)
1351 or %g3,%g4,%g4 ! Maj(a,b,c)
1352 add %g5,%g2,%g2 ! +=K[21]
1357 sllx %l2,32,%g3 !! Xupdate(22)
1371 xor %g3,%g2,%g2 ! sigma0(X[22+1])
1385 xor %g5,%g4,%g4 ! sigma1(X[22+14])
1394 add %g3,%g2,%g2 ! +=X[22+9]
1396 add %g5,%g2,%g2 ! +=X[22]
1399 srlx %g1,14,%o1 !! 22
1411 xor %o0,%g5,%g5 ! Ch(e,f,g)
1412 xor %g4,%o1,%g3 ! Sigma1(e)
1416 ldx [%i3+176],%g5 ! K[22]
1427 xor %g4,%o1,%o1 ! Sigma0(a)
1432 or %g3,%g4,%g4 ! Maj(a,b,c)
1433 add %g5,%g2,%g2 ! +=K[22]
1438 sllx %l2,32,%g3 !! Xupdate(23)
1452 xor %g3,%g2,%g2 ! sigma0(X[23+1])
1466 xor %g5,%g4,%g4 ! sigma1(X[23+14])
1475 add %g3,%g2,%g2 ! +=X[23+9]
1477 add %g5,%g2,%g2 ! +=X[23]
1480 srlx %o5,14,%o0 !! 23
1492 xor %o7,%g5,%g5 ! Ch(e,f,g)
1493 xor %g4,%o0,%g3 ! Sigma1(e)
1497 ldx [%i3+184],%g5 ! K[23]
1508 xor %g4,%o0,%o0 ! Sigma0(a)
1513 or %g3,%g4,%g4 ! Maj(a,b,c)
1514 add %g5,%g2,%g2 ! +=K[23]
1519 sllx %l2,32,%g3 !! Xupdate(24)
1533 xor %g3,%g2,%g2 ! sigma0(X[24+1])
1547 xor %g5,%g4,%g4 ! sigma1(X[24+14])
1556 add %g3,%g2,%g2 ! +=X[24+9]
1558 add %g5,%g2,%g2 ! +=X[24]
1561 srlx %o4,14,%o7 !! 24
1573 xor %g1,%g5,%g5 ! Ch(e,f,g)
1574 xor %g4,%o7,%g3 ! Sigma1(e)
1578 ldx [%i3+192],%g5 ! K[24]
1589 xor %g4,%o7,%o7 ! Sigma0(a)
1594 or %g3,%g4,%g4 ! Maj(a,b,c)
1595 add %g5,%g2,%g2 ! +=K[24]
1600 sllx %l2,32,%g3 !! Xupdate(25)
1614 xor %g3,%g2,%g2 ! sigma0(X[25+1])
1628 xor %g5,%g4,%g4 ! sigma1(X[25+14])
1637 add %g3,%g2,%g2 ! +=X[25+9]
1639 add %g5,%g2,%g2 ! +=X[25]
1642 srlx %o3,14,%g1 !! 25
1654 xor %o5,%g5,%g5 ! Ch(e,f,g)
1655 xor %g4,%g1,%g3 ! Sigma1(e)
1659 ldx [%i3+200],%g5 ! K[25]
1670 xor %g4,%g1,%g1 ! Sigma0(a)
1675 or %g3,%g4,%g4 ! Maj(a,b,c)
1676 add %g5,%g2,%g2 ! +=K[25]
1681 sllx %l2,32,%g3 !! Xupdate(26)
1695 xor %g3,%g2,%g2 ! sigma0(X[26+1])
1709 xor %g5,%g4,%g4 ! sigma1(X[26+14])
1718 add %g3,%g2,%g2 ! +=X[26+9]
1720 add %g5,%g2,%g2 ! +=X[26]
1723 srlx %o2,14,%o5 !! 26
1735 xor %o4,%g5,%g5 ! Ch(e,f,g)
1736 xor %g4,%o5,%g3 ! Sigma1(e)
1740 ldx [%i3+208],%g5 ! K[26]
1751 xor %g4,%o5,%o5 ! Sigma0(a)
1756 or %g3,%g4,%g4 ! Maj(a,b,c)
1757 add %g5,%g2,%g2 ! +=K[26]
1762 sllx %l2,32,%g3 !! Xupdate(27)
1776 xor %g3,%g2,%g2 ! sigma0(X[27+1])
1790 xor %g5,%g4,%g4 ! sigma1(X[27+14])
1799 add %g3,%g2,%g2 ! +=X[27+9]
1801 add %g5,%g2,%g2 ! +=X[27]
1804 srlx %o1,14,%o4 !! 27
1816 xor %o3,%g5,%g5 ! Ch(e,f,g)
1817 xor %g4,%o4,%g3 ! Sigma1(e)
1821 ldx [%i3+216],%g5 ! K[27]
1832 xor %g4,%o4,%o4 ! Sigma0(a)
1837 or %g3,%g4,%g4 ! Maj(a,b,c)
1838 add %g5,%g2,%g2 ! +=K[27]
1843 sllx %l2,32,%g3 !! Xupdate(28)
1857 xor %g3,%g2,%g2 ! sigma0(X[28+1])
1871 xor %g5,%g4,%g4 ! sigma1(X[28+14])
1880 add %g3,%g2,%g2 ! +=X[28+9]
1882 add %g5,%g2,%g2 ! +=X[28]
1885 srlx %o0,14,%o3 !! 28
1897 xor %o2,%g5,%g5 ! Ch(e,f,g)
1898 xor %g4,%o3,%g3 ! Sigma1(e)
1902 ldx [%i3+224],%g5 ! K[28]
1913 xor %g4,%o3,%o3 ! Sigma0(a)
1918 or %g3,%g4,%g4 ! Maj(a,b,c)
1919 add %g5,%g2,%g2 ! +=K[28]
1924 sllx %l2,32,%g3 !! Xupdate(29)
1938 xor %g3,%g2,%g2 ! sigma0(X[29+1])
1952 xor %g5,%g4,%g4 ! sigma1(X[29+14])
1961 add %g3,%g2,%g2 ! +=X[29+9]
1963 add %g5,%g2,%g2 ! +=X[29]
1966 srlx %o7,14,%o2 !! 29
1978 xor %o1,%g5,%g5 ! Ch(e,f,g)
1979 xor %g4,%o2,%g3 ! Sigma1(e)
1983 ldx [%i3+232],%g5 ! K[29]
1994 xor %g4,%o2,%o2 ! Sigma0(a)
1999 or %g3,%g4,%g4 ! Maj(a,b,c)
2000 add %g5,%g2,%g2 ! +=K[29]
2005 sllx %l2,32,%g3 !! Xupdate(30)
2019 xor %g3,%g2,%g2 ! sigma0(X[30+1])
2033 xor %g5,%g4,%g4 ! sigma1(X[30+14])
2042 add %g3,%g2,%g2 ! +=X[30+9]
2044 add %g5,%g2,%g2 ! +=X[30]
2047 srlx %g1,14,%o1 !! 30
2059 xor %o0,%g5,%g5 ! Ch(e,f,g)
2060 xor %g4,%o1,%g3 ! Sigma1(e)
2064 ldx [%i3+240],%g5 ! K[30]
2075 xor %g4,%o1,%o1 ! Sigma0(a)
2080 or %g3,%g4,%g4 ! Maj(a,b,c)
2081 add %g5,%g2,%g2 ! +=K[30]
2086 sllx %l2,32,%g3 !! Xupdate(31)
2100 xor %g3,%g2,%g2 ! sigma0(X[31+1])
2114 xor %g5,%g4,%g4 ! sigma1(X[31+14])
2123 add %g3,%g2,%g2 ! +=X[31+9]
2125 add %g5,%g2,%g2 ! +=X[31]
2128 srlx %o5,14,%o0 !! 31
2140 xor %o7,%g5,%g5 ! Ch(e,f,g)
2141 xor %g4,%o0,%g3 ! Sigma1(e)
2145 ldx [%i3+248],%g5 ! K[31]
2156 xor %g4,%o0,%o0 ! Sigma0(a)
2161 or %g3,%g4,%g4 ! Maj(a,b,c)
2162 add %g5,%g2,%g2 ! +=K[31]
2170 add %i3,128,%i3 ! Ktbl+=16
2223 add %i1,128,%i1 ! advance inp
2226 sub %i3,512,%i3 ! rewind Ktbl
2230 .type sha512_block_data_order,#function
2231 .size sha512_block_data_order,(.-sha512_block_data_order)
2232 .asciz "SHA512 block transform for SPARCv9, CRYPTOGAMS by <appro@openssl.org>"