3 .section ".text",#alloc,#execinstr
8 .long 0x428a2f98,0xd728ae22, 0x71374491,0x23ef65cd
9 .long 0xb5c0fbcf,0xec4d3b2f, 0xe9b5dba5,0x8189dbbc
10 .long 0x3956c25b,0xf348b538, 0x59f111f1,0xb605d019
11 .long 0x923f82a4,0xaf194f9b, 0xab1c5ed5,0xda6d8118
12 .long 0xd807aa98,0xa3030242, 0x12835b01,0x45706fbe
13 .long 0x243185be,0x4ee4b28c, 0x550c7dc3,0xd5ffb4e2
14 .long 0x72be5d74,0xf27b896f, 0x80deb1fe,0x3b1696b1
15 .long 0x9bdc06a7,0x25c71235, 0xc19bf174,0xcf692694
16 .long 0xe49b69c1,0x9ef14ad2, 0xefbe4786,0x384f25e3
17 .long 0x0fc19dc6,0x8b8cd5b5, 0x240ca1cc,0x77ac9c65
18 .long 0x2de92c6f,0x592b0275, 0x4a7484aa,0x6ea6e483
19 .long 0x5cb0a9dc,0xbd41fbd4, 0x76f988da,0x831153b5
20 .long 0x983e5152,0xee66dfab, 0xa831c66d,0x2db43210
21 .long 0xb00327c8,0x98fb213f, 0xbf597fc7,0xbeef0ee4
22 .long 0xc6e00bf3,0x3da88fc2, 0xd5a79147,0x930aa725
23 .long 0x06ca6351,0xe003826f, 0x14292967,0x0a0e6e70
24 .long 0x27b70a85,0x46d22ffc, 0x2e1b2138,0x5c26c926
25 .long 0x4d2c6dfc,0x5ac42aed, 0x53380d13,0x9d95b3df
26 .long 0x650a7354,0x8baf63de, 0x766a0abb,0x3c77b2a8
27 .long 0x81c2c92e,0x47edaee6, 0x92722c85,0x1482353b
28 .long 0xa2bfe8a1,0x4cf10364, 0xa81a664b,0xbc423001
29 .long 0xc24b8b70,0xd0f89791, 0xc76c51a3,0x0654be30
30 .long 0xd192e819,0xd6ef5218, 0xd6990624,0x5565a910
31 .long 0xf40e3585,0x5771202a, 0x106aa070,0x32bbd1b8
32 .long 0x19a4c116,0xb8d2d0c8, 0x1e376c08,0x5141ab53
33 .long 0x2748774c,0xdf8eeb99, 0x34b0bcb5,0xe19b48a8
34 .long 0x391c0cb3,0xc5c95a63, 0x4ed8aa4a,0xe3418acb
35 .long 0x5b9cca4f,0x7763e373, 0x682e6ff3,0xd6b2b8a3
36 .long 0x748f82ee,0x5defb2fc, 0x78a5636f,0x43172f60
37 .long 0x84c87814,0xa1f0ab72, 0x8cc70208,0x1a6439ec
38 .long 0x90befffa,0x23631e28, 0xa4506ceb,0xde82bde9
39 .long 0xbef9a3f7,0xb2c67915, 0xc67178f2,0xe372532b
40 .long 0xca273ece,0xea26619c, 0xd186b8c7,0x21c0c207
41 .long 0xeada7dd6,0xcde0eb1e, 0xf57d4f7f,0xee6ed178
42 .long 0x06f067aa,0x72176fba, 0x0a637dc5,0xa2c898a6
43 .long 0x113f9804,0xbef90dae, 0x1b710b35,0x131c471b
44 .long 0x28db77f5,0x23047d84, 0x32caab7b,0x40c72493
45 .long 0x3c9ebe0a,0x15c9bebc, 0x431d67c4,0x9c100d4c
46 .long 0x4cc5d4be,0xcb3e42b6, 0x597f299c,0xfc657e2a
47 .long 0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817
49 .globl sha512_block_data_order
50 sha512_block_data_order:
60 add %o7,K512-.Lpic,%i3
80 sllx %l1,%i4,%g5 ! Xload(0)
102 xor %g1,%g5,%g5 ! Ch(e,f,g)
103 xor %g4,%o7,%g3 ! Sigma1(e)
107 ldx [%i3+0],%g5 ! K[0]
118 xor %g4,%o7,%o7 ! Sigma0(a)
123 or %g3,%g4,%g4 ! Maj(a,b,c)
124 add %g5,%g2,%g2 ! +=K[0]
129 sllx %l3,%i4,%g5 ! Xload(1)
151 xor %o5,%g5,%g5 ! Ch(e,f,g)
152 xor %g4,%g1,%g3 ! Sigma1(e)
156 ldx [%i3+8],%g5 ! K[1]
167 xor %g4,%g1,%g1 ! Sigma0(a)
172 or %g3,%g4,%g4 ! Maj(a,b,c)
173 add %g5,%g2,%g2 ! +=K[1]
178 sllx %l5,%i4,%g5 ! Xload(2)
200 xor %o4,%g5,%g5 ! Ch(e,f,g)
201 xor %g4,%o5,%g3 ! Sigma1(e)
205 ldx [%i3+16],%g5 ! K[2]
216 xor %g4,%o5,%o5 ! Sigma0(a)
221 or %g3,%g4,%g4 ! Maj(a,b,c)
222 add %g5,%g2,%g2 ! +=K[2]
227 sllx %l7,%i4,%g5 ! Xload(3)
249 xor %o3,%g5,%g5 ! Ch(e,f,g)
250 xor %g4,%o4,%g3 ! Sigma1(e)
254 ldx [%i3+24],%g5 ! K[3]
265 xor %g4,%o4,%o4 ! Sigma0(a)
270 or %g3,%g4,%g4 ! Maj(a,b,c)
271 add %g5,%g2,%g2 ! +=K[3]
276 sllx %l1,%i4,%g5 ! Xload(4)
298 xor %o2,%g5,%g5 ! Ch(e,f,g)
299 xor %g4,%o3,%g3 ! Sigma1(e)
303 ldx [%i3+32],%g5 ! K[4]
314 xor %g4,%o3,%o3 ! Sigma0(a)
319 or %g3,%g4,%g4 ! Maj(a,b,c)
320 add %g5,%g2,%g2 ! +=K[4]
325 sllx %l3,%i4,%g5 ! Xload(5)
347 xor %o1,%g5,%g5 ! Ch(e,f,g)
348 xor %g4,%o2,%g3 ! Sigma1(e)
352 ldx [%i3+40],%g5 ! K[5]
363 xor %g4,%o2,%o2 ! Sigma0(a)
368 or %g3,%g4,%g4 ! Maj(a,b,c)
369 add %g5,%g2,%g2 ! +=K[5]
374 sllx %l5,%i4,%g5 ! Xload(6)
396 xor %o0,%g5,%g5 ! Ch(e,f,g)
397 xor %g4,%o1,%g3 ! Sigma1(e)
401 ldx [%i3+48],%g5 ! K[6]
412 xor %g4,%o1,%o1 ! Sigma0(a)
417 or %g3,%g4,%g4 ! Maj(a,b,c)
418 add %g5,%g2,%g2 ! +=K[6]
423 sllx %l7,%i4,%g5 ! Xload(7)
445 xor %o7,%g5,%g5 ! Ch(e,f,g)
446 xor %g4,%o0,%g3 ! Sigma1(e)
450 ldx [%i3+56],%g5 ! K[7]
461 xor %g4,%o0,%o0 ! Sigma0(a)
466 or %g3,%g4,%g4 ! Maj(a,b,c)
467 add %g5,%g2,%g2 ! +=K[7]
472 sllx %l1,%i4,%g5 ! Xload(8)
494 xor %g1,%g5,%g5 ! Ch(e,f,g)
495 xor %g4,%o7,%g3 ! Sigma1(e)
499 ldx [%i3+64],%g5 ! K[8]
510 xor %g4,%o7,%o7 ! Sigma0(a)
515 or %g3,%g4,%g4 ! Maj(a,b,c)
516 add %g5,%g2,%g2 ! +=K[8]
521 sllx %l3,%i4,%g5 ! Xload(9)
543 xor %o5,%g5,%g5 ! Ch(e,f,g)
544 xor %g4,%g1,%g3 ! Sigma1(e)
548 ldx [%i3+72],%g5 ! K[9]
559 xor %g4,%g1,%g1 ! Sigma0(a)
564 or %g3,%g4,%g4 ! Maj(a,b,c)
565 add %g5,%g2,%g2 ! +=K[9]
570 sllx %l5,%i4,%g5 ! Xload(10)
580 srlx %o2,14,%o5 !! 10
592 xor %o4,%g5,%g5 ! Ch(e,f,g)
593 xor %g4,%o5,%g3 ! Sigma1(e)
597 ldx [%i3+80],%g5 ! K[10]
608 xor %g4,%o5,%o5 ! Sigma0(a)
613 or %g3,%g4,%g4 ! Maj(a,b,c)
614 add %g5,%g2,%g2 ! +=K[10]
619 sllx %l7,%i4,%g5 ! Xload(11)
629 srlx %o1,14,%o4 !! 11
641 xor %o3,%g5,%g5 ! Ch(e,f,g)
642 xor %g4,%o4,%g3 ! Sigma1(e)
646 ldx [%i3+88],%g5 ! K[11]
657 xor %g4,%o4,%o4 ! Sigma0(a)
662 or %g3,%g4,%g4 ! Maj(a,b,c)
663 add %g5,%g2,%g2 ! +=K[11]
668 sllx %l1,%i4,%g5 ! Xload(12)
680 srlx %o0,14,%o3 !! 12
692 xor %o2,%g5,%g5 ! Ch(e,f,g)
693 xor %g4,%o3,%g3 ! Sigma1(e)
697 ldx [%i3+96],%g5 ! K[12]
708 xor %g4,%o3,%o3 ! Sigma0(a)
713 or %g3,%g4,%g4 ! Maj(a,b,c)
714 add %g5,%g2,%g2 ! +=K[12]
719 sllx %l3,%i4,%g5 ! Xload(13)
729 srlx %o7,14,%o2 !! 13
741 xor %o1,%g5,%g5 ! Ch(e,f,g)
742 xor %g4,%o2,%g3 ! Sigma1(e)
746 ldx [%i3+104],%g5 ! K[13]
757 xor %g4,%o2,%o2 ! Sigma0(a)
762 or %g3,%g4,%g4 ! Maj(a,b,c)
763 add %g5,%g2,%g2 ! +=K[13]
768 sllx %l5,%i4,%g5 ! Xload(14)
778 srlx %g1,14,%o1 !! 14
790 xor %o0,%g5,%g5 ! Ch(e,f,g)
791 xor %g4,%o1,%g3 ! Sigma1(e)
795 ldx [%i3+112],%g5 ! K[14]
806 xor %g4,%o1,%o1 ! Sigma0(a)
811 or %g3,%g4,%g4 ! Maj(a,b,c)
812 add %g5,%g2,%g2 ! +=K[14]
818 sllx %l7,%i4,%g5 ! Xload(15)
833 srlx %o5,14,%o0 !! 15
845 xor %o7,%g5,%g5 ! Ch(e,f,g)
846 xor %g4,%o0,%g3 ! Sigma1(e)
850 ldx [%i3+120],%g5 ! K[15]
861 xor %g4,%o0,%o0 ! Sigma0(a)
866 or %g3,%g4,%g4 ! Maj(a,b,c)
867 add %g5,%g2,%g2 ! +=K[15]
873 sllx %l2,32,%g3 !! Xupdate(16)
887 xor %g3,%g2,%g2 ! sigma0(X[16+1])
901 xor %g5,%g4,%g4 ! sigma1(X[16+14])
910 add %g3,%g2,%g2 ! +=X[16+9]
912 add %g5,%g2,%g2 ! +=X[16]
915 srlx %o4,14,%o7 !! 16
927 xor %g1,%g5,%g5 ! Ch(e,f,g)
928 xor %g4,%o7,%g3 ! Sigma1(e)
932 ldx [%i3+128],%g5 ! K[16]
943 xor %g4,%o7,%o7 ! Sigma0(a)
948 or %g3,%g4,%g4 ! Maj(a,b,c)
949 add %g5,%g2,%g2 ! +=K[16]
954 sllx %l2,32,%g3 !! Xupdate(17)
968 xor %g3,%g2,%g2 ! sigma0(X[17+1])
982 xor %g5,%g4,%g4 ! sigma1(X[17+14])
991 add %g3,%g2,%g2 ! +=X[17+9]
993 add %g5,%g2,%g2 ! +=X[17]
996 srlx %o3,14,%g1 !! 17
1008 xor %o5,%g5,%g5 ! Ch(e,f,g)
1009 xor %g4,%g1,%g3 ! Sigma1(e)
1013 ldx [%i3+136],%g5 ! K[17]
1024 xor %g4,%g1,%g1 ! Sigma0(a)
1029 or %g3,%g4,%g4 ! Maj(a,b,c)
1030 add %g5,%g2,%g2 ! +=K[17]
1035 sllx %l2,32,%g3 !! Xupdate(18)
1049 xor %g3,%g2,%g2 ! sigma0(X[18+1])
1063 xor %g5,%g4,%g4 ! sigma1(X[18+14])
1072 add %g3,%g2,%g2 ! +=X[18+9]
1074 add %g5,%g2,%g2 ! +=X[18]
1077 srlx %o2,14,%o5 !! 18
1089 xor %o4,%g5,%g5 ! Ch(e,f,g)
1090 xor %g4,%o5,%g3 ! Sigma1(e)
1094 ldx [%i3+144],%g5 ! K[18]
1105 xor %g4,%o5,%o5 ! Sigma0(a)
1110 or %g3,%g4,%g4 ! Maj(a,b,c)
1111 add %g5,%g2,%g2 ! +=K[18]
1116 sllx %l2,32,%g3 !! Xupdate(19)
1130 xor %g3,%g2,%g2 ! sigma0(X[19+1])
1144 xor %g5,%g4,%g4 ! sigma1(X[19+14])
1153 add %g3,%g2,%g2 ! +=X[19+9]
1155 add %g5,%g2,%g2 ! +=X[19]
1158 srlx %o1,14,%o4 !! 19
1170 xor %o3,%g5,%g5 ! Ch(e,f,g)
1171 xor %g4,%o4,%g3 ! Sigma1(e)
1175 ldx [%i3+152],%g5 ! K[19]
1186 xor %g4,%o4,%o4 ! Sigma0(a)
1191 or %g3,%g4,%g4 ! Maj(a,b,c)
1192 add %g5,%g2,%g2 ! +=K[19]
1197 sllx %l2,32,%g3 !! Xupdate(20)
1211 xor %g3,%g2,%g2 ! sigma0(X[20+1])
1225 xor %g5,%g4,%g4 ! sigma1(X[20+14])
1234 add %g3,%g2,%g2 ! +=X[20+9]
1236 add %g5,%g2,%g2 ! +=X[20]
1239 srlx %o0,14,%o3 !! 20
1251 xor %o2,%g5,%g5 ! Ch(e,f,g)
1252 xor %g4,%o3,%g3 ! Sigma1(e)
1256 ldx [%i3+160],%g5 ! K[20]
1267 xor %g4,%o3,%o3 ! Sigma0(a)
1272 or %g3,%g4,%g4 ! Maj(a,b,c)
1273 add %g5,%g2,%g2 ! +=K[20]
1278 sllx %l2,32,%g3 !! Xupdate(21)
1292 xor %g3,%g2,%g2 ! sigma0(X[21+1])
1306 xor %g5,%g4,%g4 ! sigma1(X[21+14])
1315 add %g3,%g2,%g2 ! +=X[21+9]
1317 add %g5,%g2,%g2 ! +=X[21]
1320 srlx %o7,14,%o2 !! 21
1332 xor %o1,%g5,%g5 ! Ch(e,f,g)
1333 xor %g4,%o2,%g3 ! Sigma1(e)
1337 ldx [%i3+168],%g5 ! K[21]
1348 xor %g4,%o2,%o2 ! Sigma0(a)
1353 or %g3,%g4,%g4 ! Maj(a,b,c)
1354 add %g5,%g2,%g2 ! +=K[21]
1359 sllx %l2,32,%g3 !! Xupdate(22)
1373 xor %g3,%g2,%g2 ! sigma0(X[22+1])
1387 xor %g5,%g4,%g4 ! sigma1(X[22+14])
1396 add %g3,%g2,%g2 ! +=X[22+9]
1398 add %g5,%g2,%g2 ! +=X[22]
1401 srlx %g1,14,%o1 !! 22
1413 xor %o0,%g5,%g5 ! Ch(e,f,g)
1414 xor %g4,%o1,%g3 ! Sigma1(e)
1418 ldx [%i3+176],%g5 ! K[22]
1429 xor %g4,%o1,%o1 ! Sigma0(a)
1434 or %g3,%g4,%g4 ! Maj(a,b,c)
1435 add %g5,%g2,%g2 ! +=K[22]
1440 sllx %l2,32,%g3 !! Xupdate(23)
1454 xor %g3,%g2,%g2 ! sigma0(X[23+1])
1468 xor %g5,%g4,%g4 ! sigma1(X[23+14])
1477 add %g3,%g2,%g2 ! +=X[23+9]
1479 add %g5,%g2,%g2 ! +=X[23]
1482 srlx %o5,14,%o0 !! 23
1494 xor %o7,%g5,%g5 ! Ch(e,f,g)
1495 xor %g4,%o0,%g3 ! Sigma1(e)
1499 ldx [%i3+184],%g5 ! K[23]
1510 xor %g4,%o0,%o0 ! Sigma0(a)
1515 or %g3,%g4,%g4 ! Maj(a,b,c)
1516 add %g5,%g2,%g2 ! +=K[23]
1521 sllx %l2,32,%g3 !! Xupdate(24)
1535 xor %g3,%g2,%g2 ! sigma0(X[24+1])
1549 xor %g5,%g4,%g4 ! sigma1(X[24+14])
1558 add %g3,%g2,%g2 ! +=X[24+9]
1560 add %g5,%g2,%g2 ! +=X[24]
1563 srlx %o4,14,%o7 !! 24
1575 xor %g1,%g5,%g5 ! Ch(e,f,g)
1576 xor %g4,%o7,%g3 ! Sigma1(e)
1580 ldx [%i3+192],%g5 ! K[24]
1591 xor %g4,%o7,%o7 ! Sigma0(a)
1596 or %g3,%g4,%g4 ! Maj(a,b,c)
1597 add %g5,%g2,%g2 ! +=K[24]
1602 sllx %l2,32,%g3 !! Xupdate(25)
1616 xor %g3,%g2,%g2 ! sigma0(X[25+1])
1630 xor %g5,%g4,%g4 ! sigma1(X[25+14])
1639 add %g3,%g2,%g2 ! +=X[25+9]
1641 add %g5,%g2,%g2 ! +=X[25]
1644 srlx %o3,14,%g1 !! 25
1656 xor %o5,%g5,%g5 ! Ch(e,f,g)
1657 xor %g4,%g1,%g3 ! Sigma1(e)
1661 ldx [%i3+200],%g5 ! K[25]
1672 xor %g4,%g1,%g1 ! Sigma0(a)
1677 or %g3,%g4,%g4 ! Maj(a,b,c)
1678 add %g5,%g2,%g2 ! +=K[25]
1683 sllx %l2,32,%g3 !! Xupdate(26)
1697 xor %g3,%g2,%g2 ! sigma0(X[26+1])
1711 xor %g5,%g4,%g4 ! sigma1(X[26+14])
1720 add %g3,%g2,%g2 ! +=X[26+9]
1722 add %g5,%g2,%g2 ! +=X[26]
1725 srlx %o2,14,%o5 !! 26
1737 xor %o4,%g5,%g5 ! Ch(e,f,g)
1738 xor %g4,%o5,%g3 ! Sigma1(e)
1742 ldx [%i3+208],%g5 ! K[26]
1753 xor %g4,%o5,%o5 ! Sigma0(a)
1758 or %g3,%g4,%g4 ! Maj(a,b,c)
1759 add %g5,%g2,%g2 ! +=K[26]
1764 sllx %l2,32,%g3 !! Xupdate(27)
1778 xor %g3,%g2,%g2 ! sigma0(X[27+1])
1792 xor %g5,%g4,%g4 ! sigma1(X[27+14])
1801 add %g3,%g2,%g2 ! +=X[27+9]
1803 add %g5,%g2,%g2 ! +=X[27]
1806 srlx %o1,14,%o4 !! 27
1818 xor %o3,%g5,%g5 ! Ch(e,f,g)
1819 xor %g4,%o4,%g3 ! Sigma1(e)
1823 ldx [%i3+216],%g5 ! K[27]
1834 xor %g4,%o4,%o4 ! Sigma0(a)
1839 or %g3,%g4,%g4 ! Maj(a,b,c)
1840 add %g5,%g2,%g2 ! +=K[27]
1845 sllx %l2,32,%g3 !! Xupdate(28)
1859 xor %g3,%g2,%g2 ! sigma0(X[28+1])
1873 xor %g5,%g4,%g4 ! sigma1(X[28+14])
1882 add %g3,%g2,%g2 ! +=X[28+9]
1884 add %g5,%g2,%g2 ! +=X[28]
1887 srlx %o0,14,%o3 !! 28
1899 xor %o2,%g5,%g5 ! Ch(e,f,g)
1900 xor %g4,%o3,%g3 ! Sigma1(e)
1904 ldx [%i3+224],%g5 ! K[28]
1915 xor %g4,%o3,%o3 ! Sigma0(a)
1920 or %g3,%g4,%g4 ! Maj(a,b,c)
1921 add %g5,%g2,%g2 ! +=K[28]
1926 sllx %l2,32,%g3 !! Xupdate(29)
1940 xor %g3,%g2,%g2 ! sigma0(X[29+1])
1954 xor %g5,%g4,%g4 ! sigma1(X[29+14])
1963 add %g3,%g2,%g2 ! +=X[29+9]
1965 add %g5,%g2,%g2 ! +=X[29]
1968 srlx %o7,14,%o2 !! 29
1980 xor %o1,%g5,%g5 ! Ch(e,f,g)
1981 xor %g4,%o2,%g3 ! Sigma1(e)
1985 ldx [%i3+232],%g5 ! K[29]
1996 xor %g4,%o2,%o2 ! Sigma0(a)
2001 or %g3,%g4,%g4 ! Maj(a,b,c)
2002 add %g5,%g2,%g2 ! +=K[29]
2007 sllx %l2,32,%g3 !! Xupdate(30)
2021 xor %g3,%g2,%g2 ! sigma0(X[30+1])
2035 xor %g5,%g4,%g4 ! sigma1(X[30+14])
2044 add %g3,%g2,%g2 ! +=X[30+9]
2046 add %g5,%g2,%g2 ! +=X[30]
2049 srlx %g1,14,%o1 !! 30
2061 xor %o0,%g5,%g5 ! Ch(e,f,g)
2062 xor %g4,%o1,%g3 ! Sigma1(e)
2066 ldx [%i3+240],%g5 ! K[30]
2077 xor %g4,%o1,%o1 ! Sigma0(a)
2082 or %g3,%g4,%g4 ! Maj(a,b,c)
2083 add %g5,%g2,%g2 ! +=K[30]
2088 sllx %l2,32,%g3 !! Xupdate(31)
2102 xor %g3,%g2,%g2 ! sigma0(X[31+1])
2116 xor %g5,%g4,%g4 ! sigma1(X[31+14])
2125 add %g3,%g2,%g2 ! +=X[31+9]
2127 add %g5,%g2,%g2 ! +=X[31]
2130 srlx %o5,14,%o0 !! 31
2142 xor %o7,%g5,%g5 ! Ch(e,f,g)
2143 xor %g4,%o0,%g3 ! Sigma1(e)
2147 ldx [%i3+248],%g5 ! K[31]
2158 xor %g4,%o0,%o0 ! Sigma0(a)
2163 or %g3,%g4,%g4 ! Maj(a,b,c)
2164 add %g5,%g2,%g2 ! +=K[31]
2172 add %i3,128,%i3 ! Ktbl+=16
2225 add %i1,128,%i1 ! advance inp
2228 sub %i3,512,%i3 ! rewind Ktbl
2232 .type sha512_block_data_order,#function
2233 .size sha512_block_data_order,(.-sha512_block_data_order)
2234 .asciz "SHA512 block transform for SPARCv9, CRYPTOGAMS by <appro@openssl.org>"