2
0

pa-risc.s 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710
  1. .SPACE $PRIVATE$
  2. .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
  3. .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
  4. .SPACE $TEXT$
  5. .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
  6. .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
  7. .IMPORT $global$,DATA
  8. .IMPORT $$dyncall,MILLICODE
  9. ; gcc_compiled.:
  10. .SPACE $TEXT$
  11. .SUBSPA $CODE$
  12. .align 4
  13. .EXPORT bn_mul_add_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
  14. bn_mul_add_words
  15. .PROC
  16. .CALLINFO FRAME=0,CALLS,SAVE_RP
  17. .ENTRY
  18. stw %r2,-20(0,%r30)
  19. ldi 0,%r28
  20. extru %r23,31,16,%r2
  21. stw %r2,-16(0,%r30)
  22. extru %r23,15,16,%r23
  23. ldil L'65536,%r31
  24. fldws -16(0,%r30),%fr11R
  25. stw %r23,-16(0,%r30)
  26. ldo 12(%r25),%r29
  27. ldo 12(%r26),%r23
  28. fldws -16(0,%r30),%fr11L
  29. L$0002
  30. ldw 0(0,%r25),%r19
  31. extru %r19,31,16,%r20
  32. stw %r20,-16(0,%r30)
  33. extru %r19,15,16,%r19
  34. fldws -16(0,%r30),%fr22L
  35. stw %r19,-16(0,%r30)
  36. xmpyu %fr22L,%fr11R,%fr8
  37. fldws -16(0,%r30),%fr22L
  38. fstws %fr8R,-16(0,%r30)
  39. xmpyu %fr11R,%fr22L,%fr10
  40. ldw -16(0,%r30),%r2
  41. stw %r20,-16(0,%r30)
  42. xmpyu %fr22L,%fr11L,%fr9
  43. fldws -16(0,%r30),%fr22L
  44. fstws %fr10R,-16(0,%r30)
  45. copy %r2,%r22
  46. ldw -16(0,%r30),%r2
  47. fstws %fr9R,-16(0,%r30)
  48. xmpyu %fr11L,%fr22L,%fr8
  49. copy %r2,%r19
  50. ldw -16(0,%r30),%r2
  51. fstws %fr8R,-16(0,%r30)
  52. copy %r2,%r20
  53. ldw -16(0,%r30),%r2
  54. addl %r2,%r19,%r21
  55. comclr,<<= %r19,%r21,0
  56. addl %r20,%r31,%r20
  57. L$0005
  58. extru %r21,15,16,%r19
  59. addl %r20,%r19,%r20
  60. zdep %r21,15,16,%r19
  61. addl %r22,%r19,%r22
  62. comclr,<<= %r19,%r22,0
  63. addi,tr 1,%r20,%r19
  64. copy %r20,%r19
  65. addl %r22,%r28,%r20
  66. comclr,<<= %r28,%r20,0
  67. addi 1,%r19,%r19
  68. ldw 0(0,%r26),%r28
  69. addl %r20,%r28,%r20
  70. comclr,<<= %r28,%r20,0
  71. addi,tr 1,%r19,%r28
  72. copy %r19,%r28
  73. addib,= -1,%r24,L$0003
  74. stw %r20,0(0,%r26)
  75. ldw -8(0,%r29),%r19
  76. extru %r19,31,16,%r20
  77. stw %r20,-16(0,%r30)
  78. extru %r19,15,16,%r19
  79. fldws -16(0,%r30),%fr22L
  80. stw %r19,-16(0,%r30)
  81. xmpyu %fr22L,%fr11R,%fr8
  82. fldws -16(0,%r30),%fr22L
  83. fstws %fr8R,-16(0,%r30)
  84. xmpyu %fr11R,%fr22L,%fr10
  85. ldw -16(0,%r30),%r2
  86. stw %r20,-16(0,%r30)
  87. xmpyu %fr22L,%fr11L,%fr9
  88. fldws -16(0,%r30),%fr22L
  89. fstws %fr10R,-16(0,%r30)
  90. copy %r2,%r22
  91. ldw -16(0,%r30),%r2
  92. fstws %fr9R,-16(0,%r30)
  93. xmpyu %fr11L,%fr22L,%fr8
  94. copy %r2,%r19
  95. ldw -16(0,%r30),%r2
  96. fstws %fr8R,-16(0,%r30)
  97. copy %r2,%r20
  98. ldw -16(0,%r30),%r2
  99. addl %r2,%r19,%r21
  100. comclr,<<= %r19,%r21,0
  101. addl %r20,%r31,%r20
  102. L$0010
  103. extru %r21,15,16,%r19
  104. addl %r20,%r19,%r20
  105. zdep %r21,15,16,%r19
  106. addl %r22,%r19,%r22
  107. comclr,<<= %r19,%r22,0
  108. addi,tr 1,%r20,%r19
  109. copy %r20,%r19
  110. addl %r22,%r28,%r20
  111. comclr,<<= %r28,%r20,0
  112. addi 1,%r19,%r19
  113. ldw -8(0,%r23),%r28
  114. addl %r20,%r28,%r20
  115. comclr,<<= %r28,%r20,0
  116. addi,tr 1,%r19,%r28
  117. copy %r19,%r28
  118. addib,= -1,%r24,L$0003
  119. stw %r20,-8(0,%r23)
  120. ldw -4(0,%r29),%r19
  121. extru %r19,31,16,%r20
  122. stw %r20,-16(0,%r30)
  123. extru %r19,15,16,%r19
  124. fldws -16(0,%r30),%fr22L
  125. stw %r19,-16(0,%r30)
  126. xmpyu %fr22L,%fr11R,%fr8
  127. fldws -16(0,%r30),%fr22L
  128. fstws %fr8R,-16(0,%r30)
  129. xmpyu %fr11R,%fr22L,%fr10
  130. ldw -16(0,%r30),%r2
  131. stw %r20,-16(0,%r30)
  132. xmpyu %fr22L,%fr11L,%fr9
  133. fldws -16(0,%r30),%fr22L
  134. fstws %fr10R,-16(0,%r30)
  135. copy %r2,%r22
  136. ldw -16(0,%r30),%r2
  137. fstws %fr9R,-16(0,%r30)
  138. xmpyu %fr11L,%fr22L,%fr8
  139. copy %r2,%r19
  140. ldw -16(0,%r30),%r2
  141. fstws %fr8R,-16(0,%r30)
  142. copy %r2,%r20
  143. ldw -16(0,%r30),%r2
  144. addl %r2,%r19,%r21
  145. comclr,<<= %r19,%r21,0
  146. addl %r20,%r31,%r20
  147. L$0015
  148. extru %r21,15,16,%r19
  149. addl %r20,%r19,%r20
  150. zdep %r21,15,16,%r19
  151. addl %r22,%r19,%r22
  152. comclr,<<= %r19,%r22,0
  153. addi,tr 1,%r20,%r19
  154. copy %r20,%r19
  155. addl %r22,%r28,%r20
  156. comclr,<<= %r28,%r20,0
  157. addi 1,%r19,%r19
  158. ldw -4(0,%r23),%r28
  159. addl %r20,%r28,%r20
  160. comclr,<<= %r28,%r20,0
  161. addi,tr 1,%r19,%r28
  162. copy %r19,%r28
  163. addib,= -1,%r24,L$0003
  164. stw %r20,-4(0,%r23)
  165. ldw 0(0,%r29),%r19
  166. extru %r19,31,16,%r20
  167. stw %r20,-16(0,%r30)
  168. extru %r19,15,16,%r19
  169. fldws -16(0,%r30),%fr22L
  170. stw %r19,-16(0,%r30)
  171. xmpyu %fr22L,%fr11R,%fr8
  172. fldws -16(0,%r30),%fr22L
  173. fstws %fr8R,-16(0,%r30)
  174. xmpyu %fr11R,%fr22L,%fr10
  175. ldw -16(0,%r30),%r2
  176. stw %r20,-16(0,%r30)
  177. xmpyu %fr22L,%fr11L,%fr9
  178. fldws -16(0,%r30),%fr22L
  179. fstws %fr10R,-16(0,%r30)
  180. copy %r2,%r22
  181. ldw -16(0,%r30),%r2
  182. fstws %fr9R,-16(0,%r30)
  183. xmpyu %fr11L,%fr22L,%fr8
  184. copy %r2,%r19
  185. ldw -16(0,%r30),%r2
  186. fstws %fr8R,-16(0,%r30)
  187. copy %r2,%r20
  188. ldw -16(0,%r30),%r2
  189. addl %r2,%r19,%r21
  190. comclr,<<= %r19,%r21,0
  191. addl %r20,%r31,%r20
  192. L$0020
  193. extru %r21,15,16,%r19
  194. addl %r20,%r19,%r20
  195. zdep %r21,15,16,%r19
  196. addl %r22,%r19,%r22
  197. comclr,<<= %r19,%r22,0
  198. addi,tr 1,%r20,%r19
  199. copy %r20,%r19
  200. addl %r22,%r28,%r20
  201. comclr,<<= %r28,%r20,0
  202. addi 1,%r19,%r19
  203. ldw 0(0,%r23),%r28
  204. addl %r20,%r28,%r20
  205. comclr,<<= %r28,%r20,0
  206. addi,tr 1,%r19,%r28
  207. copy %r19,%r28
  208. addib,= -1,%r24,L$0003
  209. stw %r20,0(0,%r23)
  210. ldo 16(%r29),%r29
  211. ldo 16(%r25),%r25
  212. ldo 16(%r23),%r23
  213. bl L$0002,0
  214. ldo 16(%r26),%r26
  215. L$0003
  216. ldw -20(0,%r30),%r2
  217. bv,n 0(%r2)
  218. .EXIT
  219. .PROCEND
  220. .align 4
  221. .EXPORT bn_mul_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
  222. bn_mul_words
  223. .PROC
  224. .CALLINFO FRAME=0,CALLS,SAVE_RP
  225. .ENTRY
  226. stw %r2,-20(0,%r30)
  227. ldi 0,%r28
  228. extru %r23,31,16,%r2
  229. stw %r2,-16(0,%r30)
  230. extru %r23,15,16,%r23
  231. ldil L'65536,%r31
  232. fldws -16(0,%r30),%fr11R
  233. stw %r23,-16(0,%r30)
  234. ldo 12(%r26),%r29
  235. ldo 12(%r25),%r23
  236. fldws -16(0,%r30),%fr11L
  237. L$0026
  238. ldw 0(0,%r25),%r19
  239. extru %r19,31,16,%r20
  240. stw %r20,-16(0,%r30)
  241. extru %r19,15,16,%r19
  242. fldws -16(0,%r30),%fr22L
  243. stw %r19,-16(0,%r30)
  244. xmpyu %fr22L,%fr11R,%fr8
  245. fldws -16(0,%r30),%fr22L
  246. fstws %fr8R,-16(0,%r30)
  247. xmpyu %fr11R,%fr22L,%fr10
  248. ldw -16(0,%r30),%r2
  249. stw %r20,-16(0,%r30)
  250. xmpyu %fr22L,%fr11L,%fr9
  251. fldws -16(0,%r30),%fr22L
  252. fstws %fr10R,-16(0,%r30)
  253. copy %r2,%r22
  254. ldw -16(0,%r30),%r2
  255. fstws %fr9R,-16(0,%r30)
  256. xmpyu %fr11L,%fr22L,%fr8
  257. copy %r2,%r19
  258. ldw -16(0,%r30),%r2
  259. fstws %fr8R,-16(0,%r30)
  260. copy %r2,%r20
  261. ldw -16(0,%r30),%r2
  262. addl %r2,%r19,%r21
  263. comclr,<<= %r19,%r21,0
  264. addl %r20,%r31,%r20
  265. L$0029
  266. extru %r21,15,16,%r19
  267. addl %r20,%r19,%r20
  268. zdep %r21,15,16,%r19
  269. addl %r22,%r19,%r22
  270. comclr,<<= %r19,%r22,0
  271. addi,tr 1,%r20,%r19
  272. copy %r20,%r19
  273. addl %r22,%r28,%r20
  274. comclr,<<= %r28,%r20,0
  275. addi,tr 1,%r19,%r28
  276. copy %r19,%r28
  277. addib,= -1,%r24,L$0027
  278. stw %r20,0(0,%r26)
  279. ldw -8(0,%r23),%r19
  280. extru %r19,31,16,%r20
  281. stw %r20,-16(0,%r30)
  282. extru %r19,15,16,%r19
  283. fldws -16(0,%r30),%fr22L
  284. stw %r19,-16(0,%r30)
  285. xmpyu %fr22L,%fr11R,%fr8
  286. fldws -16(0,%r30),%fr22L
  287. fstws %fr8R,-16(0,%r30)
  288. xmpyu %fr11R,%fr22L,%fr10
  289. ldw -16(0,%r30),%r2
  290. stw %r20,-16(0,%r30)
  291. xmpyu %fr22L,%fr11L,%fr9
  292. fldws -16(0,%r30),%fr22L
  293. fstws %fr10R,-16(0,%r30)
  294. copy %r2,%r22
  295. ldw -16(0,%r30),%r2
  296. fstws %fr9R,-16(0,%r30)
  297. xmpyu %fr11L,%fr22L,%fr8
  298. copy %r2,%r19
  299. ldw -16(0,%r30),%r2
  300. fstws %fr8R,-16(0,%r30)
  301. copy %r2,%r20
  302. ldw -16(0,%r30),%r2
  303. addl %r2,%r19,%r21
  304. comclr,<<= %r19,%r21,0
  305. addl %r20,%r31,%r20
  306. L$0033
  307. extru %r21,15,16,%r19
  308. addl %r20,%r19,%r20
  309. zdep %r21,15,16,%r19
  310. addl %r22,%r19,%r22
  311. comclr,<<= %r19,%r22,0
  312. addi,tr 1,%r20,%r19
  313. copy %r20,%r19
  314. addl %r22,%r28,%r20
  315. comclr,<<= %r28,%r20,0
  316. addi,tr 1,%r19,%r28
  317. copy %r19,%r28
  318. addib,= -1,%r24,L$0027
  319. stw %r20,-8(0,%r29)
  320. ldw -4(0,%r23),%r19
  321. extru %r19,31,16,%r20
  322. stw %r20,-16(0,%r30)
  323. extru %r19,15,16,%r19
  324. fldws -16(0,%r30),%fr22L
  325. stw %r19,-16(0,%r30)
  326. xmpyu %fr22L,%fr11R,%fr8
  327. fldws -16(0,%r30),%fr22L
  328. fstws %fr8R,-16(0,%r30)
  329. xmpyu %fr11R,%fr22L,%fr10
  330. ldw -16(0,%r30),%r2
  331. stw %r20,-16(0,%r30)
  332. xmpyu %fr22L,%fr11L,%fr9
  333. fldws -16(0,%r30),%fr22L
  334. fstws %fr10R,-16(0,%r30)
  335. copy %r2,%r22
  336. ldw -16(0,%r30),%r2
  337. fstws %fr9R,-16(0,%r30)
  338. xmpyu %fr11L,%fr22L,%fr8
  339. copy %r2,%r19
  340. ldw -16(0,%r30),%r2
  341. fstws %fr8R,-16(0,%r30)
  342. copy %r2,%r20
  343. ldw -16(0,%r30),%r2
  344. addl %r2,%r19,%r21
  345. comclr,<<= %r19,%r21,0
  346. addl %r20,%r31,%r20
  347. L$0037
  348. extru %r21,15,16,%r19
  349. addl %r20,%r19,%r20
  350. zdep %r21,15,16,%r19
  351. addl %r22,%r19,%r22
  352. comclr,<<= %r19,%r22,0
  353. addi,tr 1,%r20,%r19
  354. copy %r20,%r19
  355. addl %r22,%r28,%r20
  356. comclr,<<= %r28,%r20,0
  357. addi,tr 1,%r19,%r28
  358. copy %r19,%r28
  359. addib,= -1,%r24,L$0027
  360. stw %r20,-4(0,%r29)
  361. ldw 0(0,%r23),%r19
  362. extru %r19,31,16,%r20
  363. stw %r20,-16(0,%r30)
  364. extru %r19,15,16,%r19
  365. fldws -16(0,%r30),%fr22L
  366. stw %r19,-16(0,%r30)
  367. xmpyu %fr22L,%fr11R,%fr8
  368. fldws -16(0,%r30),%fr22L
  369. fstws %fr8R,-16(0,%r30)
  370. xmpyu %fr11R,%fr22L,%fr10
  371. ldw -16(0,%r30),%r2
  372. stw %r20,-16(0,%r30)
  373. xmpyu %fr22L,%fr11L,%fr9
  374. fldws -16(0,%r30),%fr22L
  375. fstws %fr10R,-16(0,%r30)
  376. copy %r2,%r22
  377. ldw -16(0,%r30),%r2
  378. fstws %fr9R,-16(0,%r30)
  379. xmpyu %fr11L,%fr22L,%fr8
  380. copy %r2,%r19
  381. ldw -16(0,%r30),%r2
  382. fstws %fr8R,-16(0,%r30)
  383. copy %r2,%r20
  384. ldw -16(0,%r30),%r2
  385. addl %r2,%r19,%r21
  386. comclr,<<= %r19,%r21,0
  387. addl %r20,%r31,%r20
  388. L$0041
  389. extru %r21,15,16,%r19
  390. addl %r20,%r19,%r20
  391. zdep %r21,15,16,%r19
  392. addl %r22,%r19,%r22
  393. comclr,<<= %r19,%r22,0
  394. addi,tr 1,%r20,%r19
  395. copy %r20,%r19
  396. addl %r22,%r28,%r20
  397. comclr,<<= %r28,%r20,0
  398. addi,tr 1,%r19,%r28
  399. copy %r19,%r28
  400. addib,= -1,%r24,L$0027
  401. stw %r20,0(0,%r29)
  402. ldo 16(%r23),%r23
  403. ldo 16(%r25),%r25
  404. ldo 16(%r29),%r29
  405. bl L$0026,0
  406. ldo 16(%r26),%r26
  407. L$0027
  408. ldw -20(0,%r30),%r2
  409. bv,n 0(%r2)
  410. .EXIT
  411. .PROCEND
  412. .align 4
  413. .EXPORT bn_sqr_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR
  414. bn_sqr_words
  415. .PROC
  416. .CALLINFO FRAME=0,NO_CALLS
  417. .ENTRY
  418. ldo 28(%r26),%r23
  419. ldo 12(%r25),%r28
  420. L$0046
  421. ldw 0(0,%r25),%r21
  422. extru %r21,31,16,%r22
  423. stw %r22,-16(0,%r30)
  424. extru %r21,15,16,%r21
  425. fldws -16(0,%r30),%fr10L
  426. stw %r21,-16(0,%r30)
  427. fldws -16(0,%r30),%fr10R
  428. xmpyu %fr10L,%fr10R,%fr8
  429. fstws %fr8R,-16(0,%r30)
  430. ldw -16(0,%r30),%r29
  431. stw %r22,-16(0,%r30)
  432. fldws -16(0,%r30),%fr10R
  433. stw %r21,-16(0,%r30)
  434. copy %r29,%r19
  435. xmpyu %fr10L,%fr10R,%fr8
  436. fldws -16(0,%r30),%fr10L
  437. stw %r21,-16(0,%r30)
  438. fldws -16(0,%r30),%fr10R
  439. fstws %fr8R,-16(0,%r30)
  440. extru %r19,16,17,%r20
  441. zdep %r19,14,15,%r19
  442. ldw -16(0,%r30),%r29
  443. xmpyu %fr10L,%fr10R,%fr9
  444. addl %r29,%r19,%r22
  445. stw %r22,0(0,%r26)
  446. fstws %fr9R,-16(0,%r30)
  447. ldw -16(0,%r30),%r29
  448. addl %r29,%r20,%r21
  449. comclr,<<= %r19,%r22,0
  450. addi 1,%r21,%r21
  451. addib,= -1,%r24,L$0057
  452. stw %r21,-24(0,%r23)
  453. ldw -8(0,%r28),%r21
  454. extru %r21,31,16,%r22
  455. stw %r22,-16(0,%r30)
  456. extru %r21,15,16,%r21
  457. fldws -16(0,%r30),%fr10L
  458. stw %r21,-16(0,%r30)
  459. fldws -16(0,%r30),%fr10R
  460. xmpyu %fr10L,%fr10R,%fr8
  461. fstws %fr8R,-16(0,%r30)
  462. ldw -16(0,%r30),%r29
  463. stw %r22,-16(0,%r30)
  464. fldws -16(0,%r30),%fr10R
  465. stw %r21,-16(0,%r30)
  466. copy %r29,%r19
  467. xmpyu %fr10L,%fr10R,%fr8
  468. fldws -16(0,%r30),%fr10L
  469. stw %r21,-16(0,%r30)
  470. fldws -16(0,%r30),%fr10R
  471. fstws %fr8R,-16(0,%r30)
  472. extru %r19,16,17,%r20
  473. zdep %r19,14,15,%r19
  474. ldw -16(0,%r30),%r29
  475. xmpyu %fr10L,%fr10R,%fr9
  476. addl %r29,%r19,%r22
  477. stw %r22,-20(0,%r23)
  478. fstws %fr9R,-16(0,%r30)
  479. ldw -16(0,%r30),%r29
  480. addl %r29,%r20,%r21
  481. comclr,<<= %r19,%r22,0
  482. addi 1,%r21,%r21
  483. addib,= -1,%r24,L$0057
  484. stw %r21,-16(0,%r23)
  485. ldw -4(0,%r28),%r21
  486. extru %r21,31,16,%r22
  487. stw %r22,-16(0,%r30)
  488. extru %r21,15,16,%r21
  489. fldws -16(0,%r30),%fr10L
  490. stw %r21,-16(0,%r30)
  491. fldws -16(0,%r30),%fr10R
  492. xmpyu %fr10L,%fr10R,%fr8
  493. fstws %fr8R,-16(0,%r30)
  494. ldw -16(0,%r30),%r29
  495. stw %r22,-16(0,%r30)
  496. fldws -16(0,%r30),%fr10R
  497. stw %r21,-16(0,%r30)
  498. copy %r29,%r19
  499. xmpyu %fr10L,%fr10R,%fr8
  500. fldws -16(0,%r30),%fr10L
  501. stw %r21,-16(0,%r30)
  502. fldws -16(0,%r30),%fr10R
  503. fstws %fr8R,-16(0,%r30)
  504. extru %r19,16,17,%r20
  505. zdep %r19,14,15,%r19
  506. ldw -16(0,%r30),%r29
  507. xmpyu %fr10L,%fr10R,%fr9
  508. addl %r29,%r19,%r22
  509. stw %r22,-12(0,%r23)
  510. fstws %fr9R,-16(0,%r30)
  511. ldw -16(0,%r30),%r29
  512. addl %r29,%r20,%r21
  513. comclr,<<= %r19,%r22,0
  514. addi 1,%r21,%r21
  515. addib,= -1,%r24,L$0057
  516. stw %r21,-8(0,%r23)
  517. ldw 0(0,%r28),%r21
  518. extru %r21,31,16,%r22
  519. stw %r22,-16(0,%r30)
  520. extru %r21,15,16,%r21
  521. fldws -16(0,%r30),%fr10L
  522. stw %r21,-16(0,%r30)
  523. fldws -16(0,%r30),%fr10R
  524. xmpyu %fr10L,%fr10R,%fr8
  525. fstws %fr8R,-16(0,%r30)
  526. ldw -16(0,%r30),%r29
  527. stw %r22,-16(0,%r30)
  528. fldws -16(0,%r30),%fr10R
  529. stw %r21,-16(0,%r30)
  530. copy %r29,%r19
  531. xmpyu %fr10L,%fr10R,%fr8
  532. fldws -16(0,%r30),%fr10L
  533. stw %r21,-16(0,%r30)
  534. fldws -16(0,%r30),%fr10R
  535. fstws %fr8R,-16(0,%r30)
  536. extru %r19,16,17,%r20
  537. zdep %r19,14,15,%r19
  538. ldw -16(0,%r30),%r29
  539. xmpyu %fr10L,%fr10R,%fr9
  540. addl %r29,%r19,%r22
  541. stw %r22,-4(0,%r23)
  542. fstws %fr9R,-16(0,%r30)
  543. ldw -16(0,%r30),%r29
  544. addl %r29,%r20,%r21
  545. comclr,<<= %r19,%r22,0
  546. addi 1,%r21,%r21
  547. addib,= -1,%r24,L$0057
  548. stw %r21,0(0,%r23)
  549. ldo 16(%r28),%r28
  550. ldo 16(%r25),%r25
  551. ldo 32(%r23),%r23
  552. bl L$0046,0
  553. ldo 32(%r26),%r26
  554. L$0057
  555. bv,n 0(%r2)
  556. .EXIT
  557. .PROCEND
  558. .IMPORT BN_num_bits_word,CODE
  559. .IMPORT fprintf,CODE
  560. .IMPORT __iob,DATA
  561. .SPACE $TEXT$
  562. .SUBSPA $LIT$
  563. .align 4
  564. L$C0000
  565. .STRING "Division would overflow\x0a\x00"
  566. .IMPORT abort,CODE
  567. .SPACE $TEXT$
  568. .SUBSPA $CODE$
  569. .align 4
  570. .EXPORT bn_div64,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR
  571. bn_div64
  572. .PROC
  573. .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=8
  574. .ENTRY
  575. stw %r2,-20(0,%r30)
  576. stwm %r8,128(0,%r30)
  577. stw %r7,-124(0,%r30)
  578. stw %r4,-112(0,%r30)
  579. stw %r3,-108(0,%r30)
  580. copy %r26,%r3
  581. copy %r25,%r4
  582. stw %r6,-120(0,%r30)
  583. ldi 0,%r7
  584. stw %r5,-116(0,%r30)
  585. movb,<> %r24,%r5,L$0059
  586. ldi 2,%r6
  587. bl L$0076,0
  588. ldi -1,%r28
  589. L$0059
  590. .CALL ARGW0=GR
  591. bl BN_num_bits_word,%r2
  592. copy %r5,%r26
  593. ldi 32,%r19
  594. comb,= %r19,%r28,L$0060
  595. subi 31,%r28,%r19
  596. mtsar %r19
  597. zvdepi 1,32,%r19
  598. comb,>>= %r19,%r3,L$0060
  599. addil LR'__iob-$global$+32,%r27
  600. ldo RR'__iob-$global$+32(%r1),%r26
  601. ldil LR'L$C0000,%r25
  602. .CALL ARGW0=GR,ARGW1=GR
  603. bl fprintf,%r2
  604. ldo RR'L$C0000(%r25),%r25
  605. .CALL
  606. bl abort,%r2
  607. nop
  608. L$0060
  609. comb,>> %r5,%r3,L$0061
  610. subi 32,%r28,%r28
  611. sub %r3,%r5,%r3
  612. L$0061
  613. comib,= 0,%r28,L$0062
  614. subi 31,%r28,%r19
  615. mtsar %r19
  616. zvdep %r5,32,%r5
  617. zvdep %r3,32,%r21
  618. subi 32,%r28,%r20
  619. mtsar %r20
  620. vshd 0,%r4,%r20
  621. or %r21,%r20,%r3
  622. mtsar %r19
  623. zvdep %r4,32,%r4
  624. L$0062
  625. extru %r5,15,16,%r23
  626. extru %r5,31,16,%r28
  627. L$0063
  628. extru %r3,15,16,%r19
  629. comb,<> %r23,%r19,L$0066
  630. copy %r3,%r26
  631. bl L$0067,0
  632. zdepi -1,31,16,%r29
  633. L$0066
  634. .IMPORT $$divU,MILLICODE
  635. bl $$divU,%r31
  636. copy %r23,%r25
  637. L$0067
  638. stw %r29,-16(0,%r30)
  639. fldws -16(0,%r30),%fr10L
  640. stw %r28,-16(0,%r30)
  641. fldws -16(0,%r30),%fr10R
  642. stw %r23,-16(0,%r30)
  643. xmpyu %fr10L,%fr10R,%fr8
  644. fldws -16(0,%r30),%fr10R
  645. fstws %fr8R,-16(0,%r30)
  646. xmpyu %fr10L,%fr10R,%fr9
  647. ldw -16(0,%r30),%r8
  648. fstws %fr9R,-16(0,%r30)
  649. copy %r8,%r22
  650. ldw -16(0,%r30),%r8
  651. extru %r4,15,16,%r24
  652. copy %r8,%r21
  653. L$0068
  654. sub %r3,%r21,%r20
  655. copy %r20,%r19
  656. depi 0,31,16,%r19
  657. comib,<> 0,%r19,L$0069
  658. zdep %r20,15,16,%r19
  659. addl %r19,%r24,%r19
  660. comb,>>= %r19,%r22,L$0069
  661. sub %r22,%r28,%r22
  662. sub %r21,%r23,%r21
  663. bl L$0068,0
  664. ldo -1(%r29),%r29
  665. L$0069
  666. stw %r29,-16(0,%r30)
  667. fldws -16(0,%r30),%fr10L
  668. stw %r28,-16(0,%r30)
  669. fldws -16(0,%r30),%fr10R
  670. xmpyu %fr10L,%fr10R,%fr8
  671. fstws %fr8R,-16(0,%r30)
  672. ldw -16(0,%r30),%r8
  673. stw %r23,-16(0,%r30)
  674. fldws -16(0,%r30),%fr10R
  675. copy %r8,%r19
  676. xmpyu %fr10L,%fr10R,%fr8
  677. fstws %fr8R,-16(0,%r30)
  678. extru %r19,15,16,%r20
  679. ldw -16(0,%r30),%r8
  680. zdep %r19,15,16,%r19
  681. addl %r8,%r20,%r20
  682. comclr,<<= %r19,%r4,0
  683. addi 1,%r20,%r20
  684. comb,<<= %r20,%r3,L$0074
  685. sub %r4,%r19,%r4
  686. addl %r3,%r5,%r3
  687. ldo -1(%r29),%r29
  688. L$0074
  689. addib,= -1,%r6,L$0064
  690. sub %r3,%r20,%r3
  691. zdep %r29,15,16,%r7
  692. shd %r3,%r4,16,%r3
  693. bl L$0063,0
  694. zdep %r4,15,16,%r4
  695. L$0064
  696. or %r7,%r29,%r28
  697. L$0076
  698. ldw -148(0,%r30),%r2
  699. ldw -124(0,%r30),%r7
  700. ldw -120(0,%r30),%r6
  701. ldw -116(0,%r30),%r5
  702. ldw -112(0,%r30),%r4
  703. ldw -108(0,%r30),%r3
  704. bv 0(%r2)
  705. ldwm -128(0,%r30),%r8
  706. .EXIT
  707. .PROCEND