j0f.S 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. /*
  2. * Math library
  3. *
  4. * Copyright (C) 2016 Intel Corporation. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * * Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in
  14. * the documentation and/or other materials provided with the
  15. * distribution.
  16. * * Neither the name of Intel Corporation nor the names of its
  17. * contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. *
  33. * Author Name <jingwei.zhang@intel.com>
  34. * History:
  35. * 03-14-2016 Initial version. numerics svn rev. 12864
  36. */
  37. .file "j0f.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin j0f
  41. .text
  42. .align 16,0x90
  43. .globl j0f
  44. j0f:
  45. # parameter 1: 8 + %ebp
  46. ..B1.1:
  47. ..L1:
  48. pushl %ebp
  49. movl %esp, %ebp
  50. andl $-64, %esp
  51. pushl %ebx
  52. subl $124, %esp
  53. movl 8(%ebp), %eax
  54. andl $2147483647, %eax
  55. cmpl $2139095040, %eax
  56. jae ..B1.24
  57. ..B1.2:
  58. call ..L2
  59. ..L2:
  60. popl %ebx
  61. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  62. cmpl $1099154394, %eax
  63. jae ..B1.22
  64. ..B1.3:
  65. cmpl $1081424556, %eax
  66. jae ..B1.14
  67. ..B1.4:
  68. cmpl $1048576000, %eax
  69. jae ..B1.13
  70. ..B1.5:
  71. cmpl $998244352, %eax
  72. jae ..B1.12
  73. ..B1.6:
  74. cmpl $947912704, %eax
  75. jae ..B1.11
  76. ..B1.7:
  77. flds 8(%ebp)
  78. cmpl $838860800, %eax
  79. fld1
  80. jae ..B1.9
  81. ..B1.8:
  82. fxch %st(1)
  83. fabs
  84. fsubrp %st, %st(1)
  85. addl $124, %esp
  86. popl %ebx
  87. movl %ebp, %esp
  88. popl %ebp
  89. ret
  90. ..B1.9:
  91. fxch %st(1)
  92. fmul %st(0), %st
  93. fsubrp %st, %st(1)
  94. ..B1.10:
  95. addl $124, %esp
  96. popl %ebx
  97. movl %ebp, %esp
  98. popl %ebp
  99. ret
  100. ..B1.11:
  101. flds 8(%ebp)
  102. fmul %st(0), %st
  103. fld1
  104. fldl 8+_Q3@GOTOFF(%ebx)
  105. fmul %st(2), %st
  106. faddl _Q3@GOTOFF(%ebx)
  107. fmulp %st, %st(2)
  108. faddp %st, %st(1)
  109. addl $124, %esp
  110. popl %ebx
  111. movl %ebp, %esp
  112. popl %ebp
  113. ret
  114. ..B1.12:
  115. flds 8(%ebp)
  116. fmul %st(0), %st
  117. fld %st(0)
  118. fmul %st(1), %st
  119. fld1
  120. fldl 24+_Q2@GOTOFF(%ebx)
  121. fmul %st(2), %st
  122. fldl 16+_Q2@GOTOFF(%ebx)
  123. fmul %st(3), %st
  124. fxch %st(1)
  125. faddl 8+_Q2@GOTOFF(%ebx)
  126. fmulp %st, %st(3)
  127. faddl _Q2@GOTOFF(%ebx)
  128. fmulp %st, %st(3)
  129. fxch %st(2)
  130. faddp %st, %st(1)
  131. faddp %st, %st(1)
  132. addl $124, %esp
  133. popl %ebx
  134. movl %ebp, %esp
  135. popl %ebp
  136. ret
  137. ..B1.13:
  138. flds 8(%ebp)
  139. fabs
  140. fldl 104+_Q1@GOTOFF(%ebx)
  141. fldl 88+_Q1@GOTOFF(%ebx)
  142. fldl 96+_Q1@GOTOFF(%ebx)
  143. fldl 80+_Q1@GOTOFF(%ebx)
  144. fxch %st(4)
  145. fsubl 112+_Q1@GOTOFF(%ebx)
  146. fld %st(0)
  147. fmul %st(1), %st
  148. fld %st(0)
  149. fmul %st(1), %st
  150. fmul %st, %st(5)
  151. fmul %st, %st(4)
  152. fmul %st, %st(3)
  153. fmul %st, %st(6)
  154. fxch %st(5)
  155. faddl 72+_Q1@GOTOFF(%ebx)
  156. fmul %st(5), %st
  157. fxch %st(4)
  158. faddl 56+_Q1@GOTOFF(%ebx)
  159. fmul %st(5), %st
  160. fxch %st(4)
  161. faddl 40+_Q1@GOTOFF(%ebx)
  162. fmul %st(5), %st
  163. fxch %st(4)
  164. faddl 24+_Q1@GOTOFF(%ebx)
  165. fmul %st(1), %st
  166. faddp %st, %st(4)
  167. fxch %st(2)
  168. faddl 64+_Q1@GOTOFF(%ebx)
  169. fmul %st(4), %st
  170. fxch %st(3)
  171. faddl 8+_Q1@GOTOFF(%ebx)
  172. fmulp %st, %st(1)
  173. fxch %st(2)
  174. faddl 32+_Q1@GOTOFF(%ebx)
  175. fmul %st(3), %st
  176. fxch %st(4)
  177. faddl 48+_Q1@GOTOFF(%ebx)
  178. fmulp %st, %st(3)
  179. fxch %st(2)
  180. faddl 16+_Q1@GOTOFF(%ebx)
  181. fmulp %st, %st(2)
  182. fxch %st(1)
  183. faddp %st, %st(2)
  184. fxch %st(1)
  185. faddl _Q1@GOTOFF(%ebx)
  186. faddp %st, %st(1)
  187. addl $124, %esp
  188. popl %ebx
  189. movl %ebp, %esp
  190. popl %ebp
  191. ret
  192. ..B1.14:
  193. cmpl $1092798087, %eax
  194. jae ..B1.18
  195. ..B1.15:
  196. cmpl $1088454576, %eax
  197. jae ..B1.17
  198. ..B1.16:
  199. lea _P1@GOTOFF(%ebx), %eax
  200. jmp ..B1.21
  201. ..B1.17:
  202. lea _P2@GOTOFF(%ebx), %eax
  203. jmp ..B1.21
  204. ..B1.18:
  205. cmpl $1096101336, %eax
  206. jae ..B1.20
  207. ..B1.19:
  208. lea _P3@GOTOFF(%ebx), %eax
  209. jmp ..B1.21
  210. ..B1.20:
  211. lea _P4@GOTOFF(%ebx), %eax
  212. ..B1.21:
  213. flds 8(%ebp)
  214. fabs
  215. fldl 96(%eax)
  216. fldl 80(%eax)
  217. fldl 88(%eax)
  218. fldl 72(%eax)
  219. fxch %st(4)
  220. fsubl 104(%eax)
  221. fld %st(0)
  222. fmul %st(1), %st
  223. fld %st(0)
  224. fmul %st(1), %st
  225. fmul %st, %st(5)
  226. fmul %st, %st(4)
  227. fmul %st, %st(3)
  228. fmul %st, %st(6)
  229. fxch %st(5)
  230. faddl 64(%eax)
  231. fmul %st(5), %st
  232. fxch %st(4)
  233. faddl 48(%eax)
  234. fmul %st(5), %st
  235. fxch %st(4)
  236. faddl 32(%eax)
  237. fmul %st(5), %st
  238. fxch %st(4)
  239. faddl 16(%eax)
  240. fmul %st(1), %st
  241. faddp %st, %st(4)
  242. fxch %st(2)
  243. faddl 56(%eax)
  244. fmul %st(4), %st
  245. fxch %st(3)
  246. faddl (%eax)
  247. fxch %st(5)
  248. faddl 40(%eax)
  249. fmulp %st, %st(4)
  250. fxch %st(2)
  251. faddl 24(%eax)
  252. fmulp %st, %st(1)
  253. fmul %st(1), %st
  254. fxch %st(2)
  255. faddl 8(%eax)
  256. fmulp %st, %st(1)
  257. faddp %st, %st(1)
  258. faddp %st, %st(1)
  259. addl $124, %esp
  260. popl %ebx
  261. movl %ebp, %esp
  262. popl %ebp
  263. ret
  264. ..B1.22:
  265. flds 8(%ebp)
  266. lea 32(%esp), %eax
  267. fabs
  268. lea 40(%esp), %edx
  269. fld1
  270. fdiv %st(1), %st
  271. fstl 16(%eax)
  272. fldl _val_16_0@GOTOFF(%ebx)
  273. fmulp %st, %st(1)
  274. fstl 24(%eax)
  275. fmul %st(0), %st
  276. fstl 32(%eax)
  277. fmul %st(0), %st
  278. fxch %st(1)
  279. fstpl (%esp)
  280. movl %eax, 8(%esp)
  281. movl %edx, 12(%esp)
  282. movl $-1, 16(%esp)
  283. fstpl 40(%eax)
  284. call __libm_sincos_k32
  285. ..B1.23:
  286. fldl 72(%esp)
  287. fldl 64(%esp)
  288. fldl _tonpi@GOTOFF(%ebx)
  289. fmull 48(%esp)
  290. fsqrt
  291. fldl 40+_PP@GOTOFF(%ebx)
  292. fmul %st(3), %st
  293. fldl 32+_PP@GOTOFF(%ebx)
  294. fmul %st(4), %st
  295. fxch %st(1)
  296. faddl 24+_PP@GOTOFF(%ebx)
  297. fmul %st(4), %st
  298. fxch %st(1)
  299. faddl 16+_PP@GOTOFF(%ebx)
  300. fmul %st(4), %st
  301. fxch %st(1)
  302. faddl 8+_PP@GOTOFF(%ebx)
  303. fmul %st(3), %st
  304. fxch %st(1)
  305. faddl _PP@GOTOFF(%ebx)
  306. faddp %st, %st(1)
  307. fldl 40+_QP@GOTOFF(%ebx)
  308. fmul %st(4), %st
  309. fxch %st(1)
  310. fmull 40(%esp)
  311. fxch %st(1)
  312. faddl 24+_QP@GOTOFF(%ebx)
  313. fmul %st(4), %st
  314. fldl 32+_QP@GOTOFF(%ebx)
  315. fmul %st(5), %st
  316. fxch %st(1)
  317. faddl 8+_QP@GOTOFF(%ebx)
  318. fmulp %st, %st(4)
  319. faddl 16+_QP@GOTOFF(%ebx)
  320. fmulp %st, %st(4)
  321. fxch %st(3)
  322. faddl _QP@GOTOFF(%ebx)
  323. faddp %st, %st(2)
  324. fxch %st(1)
  325. fmull 56(%esp)
  326. fmull 32(%esp)
  327. fsubrp %st, %st(2)
  328. fmulp %st, %st(1)
  329. addl $124, %esp
  330. popl %ebx
  331. movl %ebp, %esp
  332. popl %ebp
  333. ret
  334. ..B1.24:
  335. ja ..B1.26
  336. ..B1.25:
  337. fldz
  338. addl $124, %esp
  339. popl %ebx
  340. movl %ebp, %esp
  341. popl %ebp
  342. ret
  343. ..B1.26:
  344. flds 8(%ebp)
  345. ..B1.27:
  346. addl $124, %esp
  347. popl %ebx
  348. movl %ebp, %esp
  349. popl %ebp
  350. ret
  351. .align 16,0x90
  352. .type j0f,@function
  353. .size j0f,.-j0f
  354. .data
  355. # -- End j0f
  356. .section .rodata, "a"
  357. .align 4
  358. .align 4
  359. _Q3:
  360. .long 4294966841
  361. .long 3218079743
  362. .long 477219499
  363. .long 1066401791
  364. .type _Q3,@object
  365. .size _Q3,16
  366. .align 4
  367. _Q2:
  368. .long 4294967005
  369. .long 3218079743
  370. .long 4292583532
  371. .long 1066401791
  372. .long 2963922746
  373. .long 3208409541
  374. .long 1698509326
  375. .long 1054632110
  376. .type _Q2,@object
  377. .size _Q2,32
  378. .align 4
  379. _Q1:
  380. .long 569392270
  381. .long 3163659129
  382. .long 911539783
  383. .long 3219168475
  384. .long 3927550863
  385. .long 1069261278
  386. .long 1680954783
  387. .long 1068301032
  388. .long 3247602706
  389. .long 3212950300
  390. .long 1528576945
  391. .long 3210869138
  392. .long 2120930432
  393. .long 1060197251
  394. .long 3147753376
  395. .long 1057418557
  396. .long 3445667889
  397. .long 3201446637
  398. .long 160313185
  399. .long 3198274950
  400. .long 2157358765
  401. .long 1047004568
  402. .long 1405517519
  403. .long 1043512506
  404. .long 3055202941
  405. .long 3187001715
  406. .long 562966967
  407. .long 3183555197
  408. .long 781654848
  409. .long 1073954069
  410. .type _Q1,@object
  411. .size _Q1,120
  412. .align 4
  413. _P1:
  414. .long 2556390964
  415. .long 3162487616
  416. .long 168113101
  417. .long 1070974694
  418. .long 3865632959
  419. .long 3214905202
  420. .long 3384884860
  421. .long 3215663440
  422. .long 3461368592
  423. .long 1064499199
  424. .long 2947775703
  425. .long 1063419441
  426. .long 1964351934
  427. .long 3207001659
  428. .long 1081690493
  429. .long 3204998104
  430. .long 2315304668
  431. .long 1053480462
  432. .long 3655541446
  433. .long 1050880364
  434. .long 988219424
  435. .long 3194139699
  436. .long 2647984383
  437. .long 3191029766
  438. .long 3459760917
  439. .long 1038956170
  440. .long 1529622085
  441. .long 1075188879
  442. .type _P1,@object
  443. .size _P1,112
  444. .align 4
  445. _P2:
  446. .long 2989381656
  447. .long 3164006638
  448. .long 2007135498
  449. .long 3218169721
  450. .long 3461465629
  451. .long 1066405759
  452. .long 1292000183
  453. .long 1067879320
  454. .long 1048188593
  455. .long 3211038307
  456. .long 2811900586
  457. .long 3210797269
  458. .long 275024305
  459. .long 1058896216
  460. .long 2179928921
  461. .long 1057456107
  462. .long 2316750355
  463. .long 3200463196
  464. .long 1626245786
  465. .long 3198355713
  466. .long 2429961783
  467. .long 1046264853
  468. .long 3081665457
  469. .long 1043557342
  470. .long 3760684269
  471. .long 3186121773
  472. .long 1825365706
  473. .long 1075924661
  474. .type _P2,@object
  475. .size _P2,112
  476. .align 4
  477. _P3:
  478. .long 915277891
  479. .long 3163740397
  480. .long 1721892699
  481. .long 1070448958
  482. .long 3433548142
  483. .long 3213111280
  484. .long 3603643349
  485. .long 3215166749
  486. .long 2193444562
  487. .long 1062884841
  488. .long 1036402988
  489. .long 1063136790
  490. .long 2039602830
  491. .long 3205750717
  492. .long 2039806946
  493. .long 3204828766
  494. .long 3757243411
  495. .long 1052487712
  496. .long 2819184679
  497. .long 1050816211
  498. .long 1638789445
  499. .long 3193302656
  500. .long 96077275
  501. .long 3191008024
  502. .long 34207204
  503. .long 1038327735
  504. .long 8549046
  505. .long 1076335940
  506. .type _P3,@object
  507. .size _P3,112
  508. .align 4
  509. _P4:
  510. .long 4010378302
  511. .long 3164933090
  512. .long 260862994
  513. .long 3217715229
  514. .long 793353311
  515. .long 1065112761
  516. .long 2823013001
  517. .long 1067546520
  518. .long 4006575139
  519. .long 3209863700
  520. .long 3390737311
  521. .long 3210433566
  522. .long 1793352299
  523. .long 1057800372
  524. .long 3528876835
  525. .long 1057234714
  526. .long 2505438989
  527. .long 3199512871
  528. .long 2785865938
  529. .long 3198229698
  530. .long 565130724
  531. .long 1045495083
  532. .long 410977742
  533. .long 1043470609
  534. .long 4266013081
  535. .long 3185543354
  536. .long 1056076242
  537. .long 1076747425
  538. .type _P4,@object
  539. .size _P4,112
  540. .align 4
  541. _val_16_0:
  542. .long 0
  543. .long 1076887552
  544. .type _val_16_0,@object
  545. .size _val_16_0,8
  546. .align 4
  547. _tonpi:
  548. .long 1841940611
  549. .long 1071931184
  550. .type _tonpi,@object
  551. .size _tonpi,8
  552. .align 4
  553. _PP:
  554. .long 4294966288
  555. .long 1072693247
  556. .long 4269912424
  557. .long 3207725055
  558. .long 1780799603
  559. .long 1052554744
  560. .long 2285933488
  561. .long 3194113879
  562. .long 3892950982
  563. .long 1041746526
  564. .long 150212775
  565. .long 3184818833
  566. .type _PP,@object
  567. .size _PP,48
  568. .align 4
  569. _QP:
  570. .long 4294921804
  571. .long 3212836863
  572. .long 4153409851
  573. .long 1056096255
  574. .long 2226361937
  575. .long 3196916170
  576. .long 3849695089
  577. .long 1044094312
  578. .long 663042994
  579. .long 3187124278
  580. .long 3336948587
  581. .long 1035486718
  582. .type _QP,@object
  583. .size _QP,48
  584. .data
  585. .hidden __libm_sincos_k32
  586. .section .note.GNU-stack, ""
  587. # End