pa-risc2.s.old 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  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=64,CALLS,SAVE_RP,ENTRY_GR=4
  17. .ENTRY
  18. stw %r2,-20(0,%r30)
  19. stwm %r4,64(0,%r30)
  20. copy %r24,%r31
  21. stw %r3,-60(0,%r30)
  22. ldi 0,%r20
  23. ldo 12(%r26),%r2
  24. stw %r23,-16(0,%r30)
  25. copy %r25,%r3
  26. ldo 12(%r3),%r1
  27. fldws -16(0,%r30),%fr8L
  28. L$0010
  29. copy %r20,%r25
  30. ldi 0,%r24
  31. fldws 0(0,%r3),%fr9L
  32. ldw 0(0,%r26),%r19
  33. xmpyu %fr8L,%fr9L,%fr9
  34. fstds %fr9,-16(0,%r30)
  35. copy %r19,%r23
  36. ldw -16(0,%r30),%r28
  37. ldw -12(0,%r30),%r29
  38. ldi 0,%r22
  39. add %r23,%r29,%r29
  40. addc %r22,%r28,%r28
  41. add %r25,%r29,%r29
  42. addc %r24,%r28,%r28
  43. copy %r28,%r21
  44. ldi 0,%r20
  45. copy %r21,%r20
  46. addib,= -1,%r31,L$0011
  47. stw %r29,0(0,%r26)
  48. copy %r20,%r25
  49. ldi 0,%r24
  50. fldws -8(0,%r1),%fr9L
  51. ldw -8(0,%r2),%r19
  52. xmpyu %fr8L,%fr9L,%fr9
  53. fstds %fr9,-16(0,%r30)
  54. copy %r19,%r23
  55. ldw -16(0,%r30),%r28
  56. ldw -12(0,%r30),%r29
  57. ldi 0,%r22
  58. add %r23,%r29,%r29
  59. addc %r22,%r28,%r28
  60. add %r25,%r29,%r29
  61. addc %r24,%r28,%r28
  62. copy %r28,%r21
  63. ldi 0,%r20
  64. copy %r21,%r20
  65. addib,= -1,%r31,L$0011
  66. stw %r29,-8(0,%r2)
  67. copy %r20,%r25
  68. ldi 0,%r24
  69. fldws -4(0,%r1),%fr9L
  70. ldw -4(0,%r2),%r19
  71. xmpyu %fr8L,%fr9L,%fr9
  72. fstds %fr9,-16(0,%r30)
  73. copy %r19,%r23
  74. ldw -16(0,%r30),%r28
  75. ldw -12(0,%r30),%r29
  76. ldi 0,%r22
  77. add %r23,%r29,%r29
  78. addc %r22,%r28,%r28
  79. add %r25,%r29,%r29
  80. addc %r24,%r28,%r28
  81. copy %r28,%r21
  82. ldi 0,%r20
  83. copy %r21,%r20
  84. addib,= -1,%r31,L$0011
  85. stw %r29,-4(0,%r2)
  86. copy %r20,%r25
  87. ldi 0,%r24
  88. fldws 0(0,%r1),%fr9L
  89. ldw 0(0,%r2),%r19
  90. xmpyu %fr8L,%fr9L,%fr9
  91. fstds %fr9,-16(0,%r30)
  92. copy %r19,%r23
  93. ldw -16(0,%r30),%r28
  94. ldw -12(0,%r30),%r29
  95. ldi 0,%r22
  96. add %r23,%r29,%r29
  97. addc %r22,%r28,%r28
  98. add %r25,%r29,%r29
  99. addc %r24,%r28,%r28
  100. copy %r28,%r21
  101. ldi 0,%r20
  102. copy %r21,%r20
  103. addib,= -1,%r31,L$0011
  104. stw %r29,0(0,%r2)
  105. ldo 16(%r1),%r1
  106. ldo 16(%r3),%r3
  107. ldo 16(%r2),%r2
  108. bl L$0010,0
  109. ldo 16(%r26),%r26
  110. L$0011
  111. copy %r20,%r28
  112. ldw -84(0,%r30),%r2
  113. ldw -60(0,%r30),%r3
  114. bv 0(%r2)
  115. ldwm -64(0,%r30),%r4
  116. .EXIT
  117. .PROCEND
  118. .align 4
  119. .EXPORT bn_mul_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
  120. bn_mul_words
  121. .PROC
  122. .CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3
  123. .ENTRY
  124. stw %r2,-20(0,%r30)
  125. copy %r25,%r2
  126. stwm %r4,64(0,%r30)
  127. copy %r24,%r19
  128. ldi 0,%r28
  129. stw %r23,-16(0,%r30)
  130. ldo 12(%r26),%r31
  131. ldo 12(%r2),%r29
  132. fldws -16(0,%r30),%fr8L
  133. L$0026
  134. fldws 0(0,%r2),%fr9L
  135. xmpyu %fr8L,%fr9L,%fr9
  136. fstds %fr9,-16(0,%r30)
  137. copy %r28,%r21
  138. ldi 0,%r20
  139. ldw -16(0,%r30),%r24
  140. ldw -12(0,%r30),%r25
  141. add %r21,%r25,%r25
  142. addc %r20,%r24,%r24
  143. copy %r24,%r23
  144. ldi 0,%r22
  145. copy %r23,%r28
  146. addib,= -1,%r19,L$0027
  147. stw %r25,0(0,%r26)
  148. fldws -8(0,%r29),%fr9L
  149. xmpyu %fr8L,%fr9L,%fr9
  150. fstds %fr9,-16(0,%r30)
  151. copy %r28,%r21
  152. ldi 0,%r20
  153. ldw -16(0,%r30),%r24
  154. ldw -12(0,%r30),%r25
  155. add %r21,%r25,%r25
  156. addc %r20,%r24,%r24
  157. copy %r24,%r23
  158. ldi 0,%r22
  159. copy %r23,%r28
  160. addib,= -1,%r19,L$0027
  161. stw %r25,-8(0,%r31)
  162. fldws -4(0,%r29),%fr9L
  163. xmpyu %fr8L,%fr9L,%fr9
  164. fstds %fr9,-16(0,%r30)
  165. copy %r28,%r21
  166. ldi 0,%r20
  167. ldw -16(0,%r30),%r24
  168. ldw -12(0,%r30),%r25
  169. add %r21,%r25,%r25
  170. addc %r20,%r24,%r24
  171. copy %r24,%r23
  172. ldi 0,%r22
  173. copy %r23,%r28
  174. addib,= -1,%r19,L$0027
  175. stw %r25,-4(0,%r31)
  176. fldws 0(0,%r29),%fr9L
  177. xmpyu %fr8L,%fr9L,%fr9
  178. fstds %fr9,-16(0,%r30)
  179. copy %r28,%r21
  180. ldi 0,%r20
  181. ldw -16(0,%r30),%r24
  182. ldw -12(0,%r30),%r25
  183. add %r21,%r25,%r25
  184. addc %r20,%r24,%r24
  185. copy %r24,%r23
  186. ldi 0,%r22
  187. copy %r23,%r28
  188. addib,= -1,%r19,L$0027
  189. stw %r25,0(0,%r31)
  190. ldo 16(%r29),%r29
  191. ldo 16(%r2),%r2
  192. ldo 16(%r31),%r31
  193. bl L$0026,0
  194. ldo 16(%r26),%r26
  195. L$0027
  196. ldw -84(0,%r30),%r2
  197. bv 0(%r2)
  198. ldwm -64(0,%r30),%r4
  199. .EXIT
  200. .PROCEND
  201. .align 4
  202. .EXPORT bn_sqr_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR
  203. bn_sqr_words
  204. .PROC
  205. .CALLINFO FRAME=0,NO_CALLS
  206. .ENTRY
  207. ldo 28(%r26),%r19
  208. ldo 12(%r25),%r28
  209. L$0042
  210. fldws 0(0,%r25),%fr8L
  211. fldws 0(0,%r25),%fr8R
  212. xmpyu %fr8L,%fr8R,%fr8
  213. fstds %fr8,-16(0,%r30)
  214. ldw -16(0,%r30),%r22
  215. ldw -12(0,%r30),%r23
  216. stw %r23,0(0,%r26)
  217. copy %r22,%r21
  218. ldi 0,%r20
  219. addib,= -1,%r24,L$0049
  220. stw %r21,-24(0,%r19)
  221. fldws -8(0,%r28),%fr8L
  222. fldws -8(0,%r28),%fr8R
  223. xmpyu %fr8L,%fr8R,%fr8
  224. fstds %fr8,-16(0,%r30)
  225. ldw -16(0,%r30),%r22
  226. ldw -12(0,%r30),%r23
  227. stw %r23,-20(0,%r19)
  228. copy %r22,%r21
  229. ldi 0,%r20
  230. addib,= -1,%r24,L$0049
  231. stw %r21,-16(0,%r19)
  232. fldws -4(0,%r28),%fr8L
  233. fldws -4(0,%r28),%fr8R
  234. xmpyu %fr8L,%fr8R,%fr8
  235. fstds %fr8,-16(0,%r30)
  236. ldw -16(0,%r30),%r22
  237. ldw -12(0,%r30),%r23
  238. stw %r23,-12(0,%r19)
  239. copy %r22,%r21
  240. ldi 0,%r20
  241. addib,= -1,%r24,L$0049
  242. stw %r21,-8(0,%r19)
  243. fldws 0(0,%r28),%fr8L
  244. fldws 0(0,%r28),%fr8R
  245. xmpyu %fr8L,%fr8R,%fr8
  246. fstds %fr8,-16(0,%r30)
  247. ldw -16(0,%r30),%r22
  248. ldw -12(0,%r30),%r23
  249. stw %r23,-4(0,%r19)
  250. copy %r22,%r21
  251. ldi 0,%r20
  252. addib,= -1,%r24,L$0049
  253. stw %r21,0(0,%r19)
  254. ldo 16(%r28),%r28
  255. ldo 16(%r25),%r25
  256. ldo 32(%r19),%r19
  257. bl L$0042,0
  258. ldo 32(%r26),%r26
  259. L$0049
  260. bv,n 0(%r2)
  261. .EXIT
  262. .PROCEND
  263. .IMPORT BN_num_bits_word,CODE
  264. .IMPORT fprintf,CODE
  265. .IMPORT __iob,DATA
  266. .SPACE $TEXT$
  267. .SUBSPA $LIT$
  268. .align 4
  269. L$C0000
  270. .STRING "Division would overflow (%d)\x0a\x00"
  271. .IMPORT abort,CODE
  272. .SPACE $TEXT$
  273. .SUBSPA $CODE$
  274. .align 4
  275. .EXPORT bn_div64,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR
  276. bn_div64
  277. .PROC
  278. .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=8
  279. .ENTRY
  280. stw %r2,-20(0,%r30)
  281. stwm %r8,128(0,%r30)
  282. stw %r7,-124(0,%r30)
  283. stw %r4,-112(0,%r30)
  284. stw %r3,-108(0,%r30)
  285. copy %r26,%r3
  286. copy %r25,%r4
  287. stw %r6,-120(0,%r30)
  288. ldi 0,%r7
  289. stw %r5,-116(0,%r30)
  290. movb,<> %r24,%r5,L$0051
  291. ldi 2,%r6
  292. bl L$0068,0
  293. ldi -1,%r28
  294. L$0051
  295. .CALL ARGW0=GR
  296. bl BN_num_bits_word,%r2
  297. copy %r5,%r26
  298. copy %r28,%r24
  299. ldi 32,%r19
  300. comb,= %r19,%r24,L$0052
  301. subi 31,%r24,%r19
  302. mtsar %r19
  303. zvdepi 1,32,%r19
  304. comb,>>= %r19,%r3,L$0052
  305. addil LR'__iob-$global$+32,%r27
  306. ldo RR'__iob-$global$+32(%r1),%r26
  307. ldil LR'L$C0000,%r25
  308. .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR
  309. bl fprintf,%r2
  310. ldo RR'L$C0000(%r25),%r25
  311. .CALL
  312. bl abort,%r2
  313. nop
  314. L$0052
  315. comb,>> %r5,%r3,L$0053
  316. subi 32,%r24,%r24
  317. sub %r3,%r5,%r3
  318. L$0053
  319. comib,= 0,%r24,L$0054
  320. subi 31,%r24,%r19
  321. mtsar %r19
  322. zvdep %r5,32,%r5
  323. zvdep %r3,32,%r21
  324. subi 32,%r24,%r20
  325. mtsar %r20
  326. vshd 0,%r4,%r20
  327. or %r21,%r20,%r3
  328. mtsar %r19
  329. zvdep %r4,32,%r4
  330. L$0054
  331. extru %r5,15,16,%r23
  332. extru %r5,31,16,%r28
  333. L$0055
  334. extru %r3,15,16,%r19
  335. comb,<> %r23,%r19,L$0058
  336. copy %r3,%r26
  337. bl L$0059,0
  338. zdepi -1,31,16,%r29
  339. L$0058
  340. .IMPORT $$divU,MILLICODE
  341. bl $$divU,%r31
  342. copy %r23,%r25
  343. L$0059
  344. stw %r29,-16(0,%r30)
  345. fldws -16(0,%r30),%fr10L
  346. stw %r28,-16(0,%r30)
  347. fldws -16(0,%r30),%fr10R
  348. stw %r23,-16(0,%r30)
  349. xmpyu %fr10L,%fr10R,%fr8
  350. fldws -16(0,%r30),%fr10R
  351. fstws %fr8R,-16(0,%r30)
  352. xmpyu %fr10L,%fr10R,%fr9
  353. ldw -16(0,%r30),%r8
  354. fstws %fr9R,-16(0,%r30)
  355. copy %r8,%r22
  356. ldw -16(0,%r30),%r8
  357. extru %r4,15,16,%r24
  358. copy %r8,%r21
  359. L$0060
  360. sub %r3,%r21,%r20
  361. copy %r20,%r19
  362. depi 0,31,16,%r19
  363. comib,<> 0,%r19,L$0061
  364. zdep %r20,15,16,%r19
  365. addl %r19,%r24,%r19
  366. comb,>>= %r19,%r22,L$0061
  367. sub %r22,%r28,%r22
  368. sub %r21,%r23,%r21
  369. bl L$0060,0
  370. ldo -1(%r29),%r29
  371. L$0061
  372. stw %r29,-16(0,%r30)
  373. fldws -16(0,%r30),%fr10L
  374. stw %r28,-16(0,%r30)
  375. fldws -16(0,%r30),%fr10R
  376. xmpyu %fr10L,%fr10R,%fr8
  377. fstws %fr8R,-16(0,%r30)
  378. ldw -16(0,%r30),%r8
  379. stw %r23,-16(0,%r30)
  380. fldws -16(0,%r30),%fr10R
  381. copy %r8,%r19
  382. xmpyu %fr10L,%fr10R,%fr8
  383. fstws %fr8R,-16(0,%r30)
  384. extru %r19,15,16,%r20
  385. ldw -16(0,%r30),%r8
  386. zdep %r19,15,16,%r19
  387. addl %r8,%r20,%r20
  388. comclr,<<= %r19,%r4,0
  389. addi 1,%r20,%r20
  390. comb,<<= %r20,%r3,L$0066
  391. sub %r4,%r19,%r4
  392. addl %r3,%r5,%r3
  393. ldo -1(%r29),%r29
  394. L$0066
  395. addib,= -1,%r6,L$0056
  396. sub %r3,%r20,%r3
  397. zdep %r29,15,16,%r7
  398. shd %r3,%r4,16,%r3
  399. bl L$0055,0
  400. zdep %r4,15,16,%r4
  401. L$0056
  402. or %r7,%r29,%r28
  403. L$0068
  404. ldw -148(0,%r30),%r2
  405. ldw -124(0,%r30),%r7
  406. ldw -120(0,%r30),%r6
  407. ldw -116(0,%r30),%r5
  408. ldw -112(0,%r30),%r4
  409. ldw -108(0,%r30),%r3
  410. bv 0(%r2)
  411. ldwm -128(0,%r30),%r8
  412. .EXIT
  413. .PROCEND