ghashp8-ppc.S 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. // This file is generated from a similarly-named Perl script in the BoringSSL
  2. // source tree. Do not edit by hand.
  3. #if defined(__has_feature)
  4. #if __has_feature(memory_sanitizer) && !defined(OPENSSL_NO_ASM)
  5. #define OPENSSL_NO_ASM
  6. #endif
  7. #endif
  8. #if !defined(OPENSSL_NO_ASM) && defined(__powerpc64__)
  9. .machine "any"
  10. .abiversion 2
  11. .text
  12. .globl gcm_init_p8
  13. .type gcm_init_p8,@function
  14. .align 5
  15. gcm_init_p8:
  16. .localentry gcm_init_p8,0
  17. li 0,-4096
  18. li 8,0x10
  19. li 12,-1
  20. li 9,0x20
  21. or 0,0,0
  22. li 10,0x30
  23. .long 0x7D202699
  24. vspltisb 8,-16
  25. vspltisb 5,1
  26. vaddubm 8,8,8
  27. vxor 4,4,4
  28. vor 8,8,5
  29. vsldoi 8,8,4,15
  30. vsldoi 6,4,5,1
  31. vaddubm 8,8,8
  32. vspltisb 7,7
  33. vor 8,8,6
  34. vspltb 6,9,0
  35. vsl 9,9,5
  36. vsrab 6,6,7
  37. vand 6,6,8
  38. vxor 3,9,6
  39. vsldoi 9,3,3,8
  40. vsldoi 8,4,8,8
  41. vsldoi 11,4,9,8
  42. vsldoi 10,9,4,8
  43. .long 0x7D001F99
  44. .long 0x7D681F99
  45. li 8,0x40
  46. .long 0x7D291F99
  47. li 9,0x50
  48. .long 0x7D4A1F99
  49. li 10,0x60
  50. .long 0x10035CC8
  51. .long 0x10234CC8
  52. .long 0x104354C8
  53. .long 0x10E044C8
  54. vsldoi 5,1,4,8
  55. vsldoi 6,4,1,8
  56. vxor 0,0,5
  57. vxor 2,2,6
  58. vsldoi 0,0,0,8
  59. vxor 0,0,7
  60. vsldoi 6,0,0,8
  61. .long 0x100044C8
  62. vxor 6,6,2
  63. vxor 16,0,6
  64. vsldoi 17,16,16,8
  65. vsldoi 19,4,17,8
  66. vsldoi 18,17,4,8
  67. .long 0x7E681F99
  68. li 8,0x70
  69. .long 0x7E291F99
  70. li 9,0x80
  71. .long 0x7E4A1F99
  72. li 10,0x90
  73. .long 0x10039CC8
  74. .long 0x11B09CC8
  75. .long 0x10238CC8
  76. .long 0x11D08CC8
  77. .long 0x104394C8
  78. .long 0x11F094C8
  79. .long 0x10E044C8
  80. .long 0x114D44C8
  81. vsldoi 5,1,4,8
  82. vsldoi 6,4,1,8
  83. vsldoi 11,14,4,8
  84. vsldoi 9,4,14,8
  85. vxor 0,0,5
  86. vxor 2,2,6
  87. vxor 13,13,11
  88. vxor 15,15,9
  89. vsldoi 0,0,0,8
  90. vsldoi 13,13,13,8
  91. vxor 0,0,7
  92. vxor 13,13,10
  93. vsldoi 6,0,0,8
  94. vsldoi 9,13,13,8
  95. .long 0x100044C8
  96. .long 0x11AD44C8
  97. vxor 6,6,2
  98. vxor 9,9,15
  99. vxor 0,0,6
  100. vxor 13,13,9
  101. vsldoi 9,0,0,8
  102. vsldoi 17,13,13,8
  103. vsldoi 11,4,9,8
  104. vsldoi 10,9,4,8
  105. vsldoi 19,4,17,8
  106. vsldoi 18,17,4,8
  107. .long 0x7D681F99
  108. li 8,0xa0
  109. .long 0x7D291F99
  110. li 9,0xb0
  111. .long 0x7D4A1F99
  112. li 10,0xc0
  113. .long 0x7E681F99
  114. .long 0x7E291F99
  115. .long 0x7E4A1F99
  116. or 12,12,12
  117. blr
  118. .long 0
  119. .byte 0,12,0x14,0,0,0,2,0
  120. .long 0
  121. .size gcm_init_p8,.-gcm_init_p8
  122. .globl gcm_gmult_p8
  123. .type gcm_gmult_p8,@function
  124. .align 5
  125. gcm_gmult_p8:
  126. .localentry gcm_gmult_p8,0
  127. lis 0,0xfff8
  128. li 8,0x10
  129. li 12,-1
  130. li 9,0x20
  131. or 0,0,0
  132. li 10,0x30
  133. .long 0x7C601E99
  134. .long 0x7D682699
  135. lvsl 12,0,0
  136. .long 0x7D292699
  137. vspltisb 5,0x07
  138. .long 0x7D4A2699
  139. vxor 12,12,5
  140. .long 0x7D002699
  141. vperm 3,3,3,12
  142. vxor 4,4,4
  143. .long 0x10035CC8
  144. .long 0x10234CC8
  145. .long 0x104354C8
  146. .long 0x10E044C8
  147. vsldoi 5,1,4,8
  148. vsldoi 6,4,1,8
  149. vxor 0,0,5
  150. vxor 2,2,6
  151. vsldoi 0,0,0,8
  152. vxor 0,0,7
  153. vsldoi 6,0,0,8
  154. .long 0x100044C8
  155. vxor 6,6,2
  156. vxor 0,0,6
  157. vperm 0,0,0,12
  158. .long 0x7C001F99
  159. or 12,12,12
  160. blr
  161. .long 0
  162. .byte 0,12,0x14,0,0,0,2,0
  163. .long 0
  164. .size gcm_gmult_p8,.-gcm_gmult_p8
  165. .globl gcm_ghash_p8
  166. .type gcm_ghash_p8,@function
  167. .align 5
  168. gcm_ghash_p8:
  169. .localentry gcm_ghash_p8,0
  170. li 0,-4096
  171. li 8,0x10
  172. li 12,-1
  173. li 9,0x20
  174. or 0,0,0
  175. li 10,0x30
  176. .long 0x7C001E99
  177. .long 0x7D682699
  178. li 8,0x40
  179. lvsl 12,0,0
  180. .long 0x7D292699
  181. li 9,0x50
  182. vspltisb 5,0x07
  183. .long 0x7D4A2699
  184. li 10,0x60
  185. vxor 12,12,5
  186. .long 0x7D002699
  187. vperm 0,0,0,12
  188. vxor 4,4,4
  189. cmpldi 6,64
  190. bge .Lgcm_ghash_p8_4x
  191. .long 0x7C602E99
  192. addi 5,5,16
  193. subic. 6,6,16
  194. vperm 3,3,3,12
  195. vxor 3,3,0
  196. beq .Lshort
  197. .long 0x7E682699
  198. li 8,16
  199. .long 0x7E292699
  200. add 9,5,6
  201. .long 0x7E4A2699
  202. .align 5
  203. .Loop_2x:
  204. .long 0x7E002E99
  205. vperm 16,16,16,12
  206. subic 6,6,32
  207. .long 0x10039CC8
  208. .long 0x11B05CC8
  209. subfe 0,0,0
  210. .long 0x10238CC8
  211. .long 0x11D04CC8
  212. and 0,0,6
  213. .long 0x104394C8
  214. .long 0x11F054C8
  215. add 5,5,0
  216. vxor 0,0,13
  217. vxor 1,1,14
  218. .long 0x10E044C8
  219. vsldoi 5,1,4,8
  220. vsldoi 6,4,1,8
  221. vxor 2,2,15
  222. vxor 0,0,5
  223. vxor 2,2,6
  224. vsldoi 0,0,0,8
  225. vxor 0,0,7
  226. .long 0x7C682E99
  227. addi 5,5,32
  228. vsldoi 6,0,0,8
  229. .long 0x100044C8
  230. vperm 3,3,3,12
  231. vxor 6,6,2
  232. vxor 3,3,6
  233. vxor 3,3,0
  234. cmpld 9,5
  235. bgt .Loop_2x
  236. cmplwi 6,0
  237. bne .Leven
  238. .Lshort:
  239. .long 0x10035CC8
  240. .long 0x10234CC8
  241. .long 0x104354C8
  242. .long 0x10E044C8
  243. vsldoi 5,1,4,8
  244. vsldoi 6,4,1,8
  245. vxor 0,0,5
  246. vxor 2,2,6
  247. vsldoi 0,0,0,8
  248. vxor 0,0,7
  249. vsldoi 6,0,0,8
  250. .long 0x100044C8
  251. vxor 6,6,2
  252. .Leven:
  253. vxor 0,0,6
  254. vperm 0,0,0,12
  255. .long 0x7C001F99
  256. or 12,12,12
  257. blr
  258. .long 0
  259. .byte 0,12,0x14,0,0,0,4,0
  260. .long 0
  261. .align 5
  262. .gcm_ghash_p8_4x:
  263. .Lgcm_ghash_p8_4x:
  264. stdu 1,-256(1)
  265. li 10,63
  266. li 11,79
  267. stvx 20,10,1
  268. addi 10,10,32
  269. stvx 21,11,1
  270. addi 11,11,32
  271. stvx 22,10,1
  272. addi 10,10,32
  273. stvx 23,11,1
  274. addi 11,11,32
  275. stvx 24,10,1
  276. addi 10,10,32
  277. stvx 25,11,1
  278. addi 11,11,32
  279. stvx 26,10,1
  280. addi 10,10,32
  281. stvx 27,11,1
  282. addi 11,11,32
  283. stvx 28,10,1
  284. addi 10,10,32
  285. stvx 29,11,1
  286. addi 11,11,32
  287. stvx 30,10,1
  288. li 10,0x60
  289. stvx 31,11,1
  290. li 0,-1
  291. stw 12,252(1)
  292. or 0,0,0
  293. lvsl 5,0,8
  294. li 8,0x70
  295. .long 0x7E292699
  296. li 9,0x80
  297. vspltisb 6,8
  298. li 10,0x90
  299. .long 0x7EE82699
  300. li 8,0xa0
  301. .long 0x7F092699
  302. li 9,0xb0
  303. .long 0x7F2A2699
  304. li 10,0xc0
  305. .long 0x7FA82699
  306. li 8,0x10
  307. .long 0x7FC92699
  308. li 9,0x20
  309. .long 0x7FEA2699
  310. li 10,0x30
  311. vsldoi 7,4,6,8
  312. vaddubm 18,5,7
  313. vaddubm 19,6,18
  314. srdi 6,6,4
  315. .long 0x7C602E99
  316. .long 0x7E082E99
  317. subic. 6,6,8
  318. .long 0x7EC92E99
  319. .long 0x7F8A2E99
  320. addi 5,5,0x40
  321. vperm 3,3,3,12
  322. vperm 16,16,16,12
  323. vperm 22,22,22,12
  324. vperm 28,28,28,12
  325. vxor 2,3,0
  326. .long 0x11B0BCC8
  327. .long 0x11D0C4C8
  328. .long 0x11F0CCC8
  329. vperm 11,17,9,18
  330. vperm 5,22,28,19
  331. vperm 10,17,9,19
  332. vperm 6,22,28,18
  333. .long 0x12B68CC8
  334. .long 0x12855CC8
  335. .long 0x137C4CC8
  336. .long 0x134654C8
  337. vxor 21,21,14
  338. vxor 20,20,13
  339. vxor 27,27,21
  340. vxor 26,26,15
  341. blt .Ltail_4x
  342. .Loop_4x:
  343. .long 0x7C602E99
  344. .long 0x7E082E99
  345. subic. 6,6,4
  346. .long 0x7EC92E99
  347. .long 0x7F8A2E99
  348. addi 5,5,0x40
  349. vperm 16,16,16,12
  350. vperm 22,22,22,12
  351. vperm 28,28,28,12
  352. vperm 3,3,3,12
  353. .long 0x1002ECC8
  354. .long 0x1022F4C8
  355. .long 0x1042FCC8
  356. .long 0x11B0BCC8
  357. .long 0x11D0C4C8
  358. .long 0x11F0CCC8
  359. vxor 0,0,20
  360. vxor 1,1,27
  361. vxor 2,2,26
  362. vperm 5,22,28,19
  363. vperm 6,22,28,18
  364. .long 0x10E044C8
  365. .long 0x12855CC8
  366. .long 0x134654C8
  367. vsldoi 5,1,4,8
  368. vsldoi 6,4,1,8
  369. vxor 0,0,5
  370. vxor 2,2,6
  371. vsldoi 0,0,0,8
  372. vxor 0,0,7
  373. vsldoi 6,0,0,8
  374. .long 0x12B68CC8
  375. .long 0x137C4CC8
  376. .long 0x100044C8
  377. vxor 20,20,13
  378. vxor 26,26,15
  379. vxor 2,2,3
  380. vxor 21,21,14
  381. vxor 2,2,6
  382. vxor 27,27,21
  383. vxor 2,2,0
  384. bge .Loop_4x
  385. .Ltail_4x:
  386. .long 0x1002ECC8
  387. .long 0x1022F4C8
  388. .long 0x1042FCC8
  389. vxor 0,0,20
  390. vxor 1,1,27
  391. .long 0x10E044C8
  392. vsldoi 5,1,4,8
  393. vsldoi 6,4,1,8
  394. vxor 2,2,26
  395. vxor 0,0,5
  396. vxor 2,2,6
  397. vsldoi 0,0,0,8
  398. vxor 0,0,7
  399. vsldoi 6,0,0,8
  400. .long 0x100044C8
  401. vxor 6,6,2
  402. vxor 0,0,6
  403. addic. 6,6,4
  404. beq .Ldone_4x
  405. .long 0x7C602E99
  406. cmpldi 6,2
  407. li 6,-4
  408. blt .Lone
  409. .long 0x7E082E99
  410. beq .Ltwo
  411. .Lthree:
  412. .long 0x7EC92E99
  413. vperm 3,3,3,12
  414. vperm 16,16,16,12
  415. vperm 22,22,22,12
  416. vxor 2,3,0
  417. vor 29,23,23
  418. vor 30, 24, 24
  419. vor 31,25,25
  420. vperm 5,16,22,19
  421. vperm 6,16,22,18
  422. .long 0x12B08CC8
  423. .long 0x13764CC8
  424. .long 0x12855CC8
  425. .long 0x134654C8
  426. vxor 27,27,21
  427. b .Ltail_4x
  428. .align 4
  429. .Ltwo:
  430. vperm 3,3,3,12
  431. vperm 16,16,16,12
  432. vxor 2,3,0
  433. vperm 5,4,16,19
  434. vperm 6,4,16,18
  435. vsldoi 29,4,17,8
  436. vor 30, 17, 17
  437. vsldoi 31,17,4,8
  438. .long 0x12855CC8
  439. .long 0x13704CC8
  440. .long 0x134654C8
  441. b .Ltail_4x
  442. .align 4
  443. .Lone:
  444. vperm 3,3,3,12
  445. vsldoi 29,4,9,8
  446. vor 30, 9, 9
  447. vsldoi 31,9,4,8
  448. vxor 2,3,0
  449. vxor 20,20,20
  450. vxor 27,27,27
  451. vxor 26,26,26
  452. b .Ltail_4x
  453. .Ldone_4x:
  454. vperm 0,0,0,12
  455. .long 0x7C001F99
  456. li 10,63
  457. li 11,79
  458. or 12,12,12
  459. lvx 20,10,1
  460. addi 10,10,32
  461. lvx 21,11,1
  462. addi 11,11,32
  463. lvx 22,10,1
  464. addi 10,10,32
  465. lvx 23,11,1
  466. addi 11,11,32
  467. lvx 24,10,1
  468. addi 10,10,32
  469. lvx 25,11,1
  470. addi 11,11,32
  471. lvx 26,10,1
  472. addi 10,10,32
  473. lvx 27,11,1
  474. addi 11,11,32
  475. lvx 28,10,1
  476. addi 10,10,32
  477. lvx 29,11,1
  478. addi 11,11,32
  479. lvx 30,10,1
  480. lvx 31,11,1
  481. addi 1,1,256
  482. blr
  483. .long 0
  484. .byte 0,12,0x04,0,0x80,0,4,0
  485. .long 0
  486. .size gcm_ghash_p8,.-gcm_ghash_p8
  487. .byte 71,72,65,83,72,32,102,111,114,32,80,111,119,101,114,73,83,65,32,50,46,48,55,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
  488. .align 2
  489. .align 2
  490. #endif // !OPENSSL_NO_ASM && __powerpc64__
  491. .section .note.GNU-stack,"",@progbits