j1f.S 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  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 "j1f.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin j1f
  41. .text
  42. .align 16,0x90
  43. .globl j1f
  44. j1f:
  45. # parameter 1: 8 + %ebp
  46. ..B1.1:
  47. ..L1:
  48. pushl %ebp
  49. movl %esp, %ebp
  50. andl $-64, %esp
  51. pushl %esi
  52. pushl %ebx
  53. subl $120, %esp
  54. movl 8(%ebp), %esi
  55. movl %esi, %eax
  56. andl $2147483647, %eax
  57. call ..L2
  58. ..L2:
  59. popl %ebx
  60. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  61. cmpl $2139095040, %eax
  62. jae ..B1.37
  63. ..B1.2:
  64. cmpl $1099993482, %eax
  65. jae ..B1.32
  66. ..B1.3:
  67. cmpl $1075439785, %eax
  68. jae ..B1.19
  69. ..B1.4:
  70. cmpl $1048576000, %eax
  71. jae ..B1.15
  72. ..B1.5:
  73. cmpl $998244352, %eax
  74. jae ..B1.14
  75. ..B1.6:
  76. cmpl $838860800, %eax
  77. jae ..B1.13
  78. ..B1.7:
  79. shrl $31, %esi
  80. cmpl $16777216, %eax
  81. jb ..B1.9
  82. ..B1.8:
  83. flds 8(%ebp)
  84. fmuls .L_2il0floatpacket.1@GOTOFF(%ebx)
  85. flds .L_2il0floatpacket.0@GOTOFF(%ebx)
  86. fmul %st(1), %st
  87. fldl .L_2il0floatpacket.2@GOTOFF(%ebx)
  88. fmulp %st, %st(2)
  89. fsubp %st, %st(1)
  90. fstps 32(%esp)
  91. flds 32(%esp)
  92. fmuls .L_2il0floatpacket.3@GOTOFF(%ebx)
  93. addl $120, %esp
  94. popl %ebx
  95. popl %esi
  96. movl %ebp, %esp
  97. popl %ebp
  98. ret
  99. ..B1.9:
  100. testl %eax, %eax
  101. je ..B1.11
  102. ..B1.10:
  103. flds _small_value_32@GOTOFF(%ebx,%esi,4)
  104. fmuls .L_2il0floatpacket.4@GOTOFF(%ebx)
  105. fsts 32(%esp)
  106. flds 8(%ebp)
  107. fmuls .L_2il0floatpacket.0@GOTOFF(%ebx)
  108. fsubp %st, %st(1)
  109. addl $120, %esp
  110. popl %ebx
  111. popl %esi
  112. movl %ebp, %esp
  113. popl %ebp
  114. ret
  115. ..B1.11:
  116. flds 8(%ebp)
  117. ..B1.12:
  118. addl $120, %esp
  119. popl %ebx
  120. popl %esi
  121. movl %ebp, %esp
  122. popl %ebp
  123. ret
  124. ..B1.13:
  125. flds 8(%ebp)
  126. fmuls .L_2il0floatpacket.0@GOTOFF(%ebx)
  127. fld %st(0)
  128. fmul %st(1), %st
  129. fldl 8+_Q2@GOTOFF(%ebx)
  130. fmul %st(1), %st
  131. faddl _Q2@GOTOFF(%ebx)
  132. fmulp %st, %st(1)
  133. fmul %st(1), %st
  134. faddp %st, %st(1)
  135. addl $120, %esp
  136. popl %ebx
  137. popl %esi
  138. movl %ebp, %esp
  139. popl %ebp
  140. ret
  141. ..B1.14:
  142. flds 8(%ebp)
  143. fmuls .L_2il0floatpacket.0@GOTOFF(%ebx)
  144. fld %st(0)
  145. fmul %st(1), %st
  146. fld %st(0)
  147. fmul %st(1), %st
  148. fldl 24+_Q2@GOTOFF(%ebx)
  149. fmul %st(1), %st
  150. fldl 16+_Q2@GOTOFF(%ebx)
  151. fmul %st(2), %st
  152. fxch %st(1)
  153. faddl 8+_Q2@GOTOFF(%ebx)
  154. fmulp %st, %st(2)
  155. faddl _Q2@GOTOFF(%ebx)
  156. fmulp %st, %st(2)
  157. faddp %st, %st(1)
  158. fmul %st(1), %st
  159. faddp %st, %st(1)
  160. addl $120, %esp
  161. popl %ebx
  162. popl %esi
  163. movl %ebp, %esp
  164. popl %ebp
  165. ret
  166. ..B1.15:
  167. flds 8(%ebp)
  168. testl $-2147483648, %esi
  169. fabs
  170. fld %st(0)
  171. fmul %st(1), %st
  172. fld %st(0)
  173. fmul %st(1), %st
  174. fldl 88+_Q1@GOTOFF(%ebx)
  175. fmul %st(1), %st
  176. fldl 72+_Q1@GOTOFF(%ebx)
  177. fmul %st(2), %st
  178. fxch %st(1)
  179. faddl 56+_Q1@GOTOFF(%ebx)
  180. fmul %st(2), %st
  181. fxch %st(1)
  182. faddl 40+_Q1@GOTOFF(%ebx)
  183. fmul %st(2), %st
  184. fxch %st(1)
  185. faddl 24+_Q1@GOTOFF(%ebx)
  186. fmul %st(2), %st
  187. fxch %st(1)
  188. faddl 8+_Q1@GOTOFF(%ebx)
  189. fmul %st(3), %st
  190. faddp %st, %st(1)
  191. fldl 64+_Q1@GOTOFF(%ebx)
  192. fmul %st(2), %st
  193. fldl 80+_Q1@GOTOFF(%ebx)
  194. fmul %st(3), %st
  195. fxch %st(1)
  196. faddl 32+_Q1@GOTOFF(%ebx)
  197. fmul %st(3), %st
  198. fxch %st(1)
  199. faddl 48+_Q1@GOTOFF(%ebx)
  200. fmulp %st, %st(3)
  201. faddl _Q1@GOTOFF(%ebx)
  202. fmul %st(4), %st
  203. fxch %st(2)
  204. faddl 16+_Q1@GOTOFF(%ebx)
  205. fmulp %st, %st(3)
  206. fxch %st(3)
  207. fmulp %st, %st(2)
  208. faddp %st, %st(1)
  209. faddp %st, %st(1)
  210. je ..B1.18
  211. ..B1.16:
  212. fchs
  213. ..B1.18:
  214. addl $120, %esp
  215. popl %ebx
  216. popl %esi
  217. movl %ebp, %esp
  218. popl %ebp
  219. ret
  220. ..B1.19:
  221. flds 8(%ebp)
  222. andl $-2147483648, %esi
  223. fabs
  224. cmpl $1097786634, %eax
  225. jae ..B1.27
  226. ..B1.20:
  227. cmpl $1091204523, %eax
  228. jae ..B1.24
  229. ..B1.21:
  230. cmpl $1085318267, %eax
  231. jae ..B1.23
  232. ..B1.22:
  233. lea _P1@GOTOFF(%ebx), %eax
  234. jmp ..B1.28
  235. ..B1.23:
  236. lea _P2@GOTOFF(%ebx), %eax
  237. jmp ..B1.28
  238. ..B1.24:
  239. cmpl $1094494752, %eax
  240. jae ..B1.26
  241. ..B1.25:
  242. lea _P3@GOTOFF(%ebx), %eax
  243. jmp ..B1.28
  244. ..B1.26:
  245. lea _P4@GOTOFF(%ebx), %eax
  246. jmp ..B1.28
  247. ..B1.27:
  248. lea _P5@GOTOFF(%ebx), %eax
  249. ..B1.28:
  250. fldl 104(%eax)
  251. testl %esi, %esi
  252. fsubrp %st, %st(1)
  253. fld %st(0)
  254. fmul %st(1), %st
  255. fld %st(0)
  256. fmul %st(1), %st
  257. fldl 96(%eax)
  258. fmul %st(1), %st
  259. fldl 80(%eax)
  260. fmul %st(2), %st
  261. fxch %st(1)
  262. faddl 64(%eax)
  263. fmul %st(2), %st
  264. fxch %st(1)
  265. faddl 48(%eax)
  266. fmul %st(2), %st
  267. fxch %st(1)
  268. faddl 32(%eax)
  269. fmul %st(2), %st
  270. fxch %st(1)
  271. faddl 16(%eax)
  272. fmul %st(3), %st
  273. faddp %st, %st(1)
  274. fldl 72(%eax)
  275. fmul %st(2), %st
  276. fxch %st(1)
  277. faddl (%eax)
  278. fxch %st(1)
  279. faddl 40(%eax)
  280. fmul %st(2), %st
  281. fldl 88(%eax)
  282. fmul %st(3), %st
  283. fxch %st(1)
  284. faddl 8(%eax)
  285. fmul %st(5), %st
  286. fxch %st(1)
  287. faddl 56(%eax)
  288. fmulp %st, %st(3)
  289. fxch %st(2)
  290. faddl 24(%eax)
  291. fmulp %st, %st(3)
  292. fxch %st(3)
  293. fmulp %st, %st(2)
  294. faddp %st, %st(1)
  295. faddp %st, %st(1)
  296. je ..B1.31
  297. ..B1.29:
  298. fchs
  299. ..B1.31:
  300. addl $120, %esp
  301. popl %ebx
  302. popl %esi
  303. movl %ebp, %esp
  304. popl %ebp
  305. ret
  306. ..B1.32:
  307. flds 8(%ebp)
  308. lea 40(%esp), %eax
  309. fabs
  310. lea 48(%esp), %edx
  311. fld1
  312. fdiv %st(1), %st
  313. andl $-2147483648, %esi
  314. fstl 16(%eax)
  315. fldl _val_16_0@GOTOFF(%ebx)
  316. fmulp %st, %st(1)
  317. fstl 24(%eax)
  318. fmul %st(0), %st
  319. fstl 32(%eax)
  320. fmul %st(0), %st
  321. fxch %st(1)
  322. fstpl (%esp)
  323. movl %eax, 8(%esp)
  324. movl %edx, 12(%esp)
  325. movl $-3, 16(%esp)
  326. fstpl 40(%eax)
  327. call __libm_sincos_k32
  328. ..B1.33:
  329. fldl 80(%esp)
  330. testl %esi, %esi
  331. fldl 72(%esp)
  332. fldl _tonpi@GOTOFF(%ebx)
  333. fmull 56(%esp)
  334. fsqrt
  335. fldl 40+_PP@GOTOFF(%ebx)
  336. fmul %st(3), %st
  337. fldl 32+_PP@GOTOFF(%ebx)
  338. fmul %st(4), %st
  339. fxch %st(1)
  340. faddl 24+_PP@GOTOFF(%ebx)
  341. fmul %st(4), %st
  342. fxch %st(1)
  343. faddl 16+_PP@GOTOFF(%ebx)
  344. fmul %st(4), %st
  345. fxch %st(1)
  346. faddl 8+_PP@GOTOFF(%ebx)
  347. fmul %st(3), %st
  348. fxch %st(1)
  349. faddl _PP@GOTOFF(%ebx)
  350. faddp %st, %st(1)
  351. fldl 40+_QP@GOTOFF(%ebx)
  352. fmul %st(4), %st
  353. fxch %st(1)
  354. fmull 48(%esp)
  355. fxch %st(1)
  356. faddl 24+_QP@GOTOFF(%ebx)
  357. fmul %st(4), %st
  358. fldl 32+_QP@GOTOFF(%ebx)
  359. fmul %st(5), %st
  360. fxch %st(1)
  361. faddl 8+_QP@GOTOFF(%ebx)
  362. fmulp %st, %st(4)
  363. faddl 16+_QP@GOTOFF(%ebx)
  364. fmulp %st, %st(4)
  365. fxch %st(3)
  366. faddl _QP@GOTOFF(%ebx)
  367. faddp %st, %st(2)
  368. fxch %st(1)
  369. fmull 64(%esp)
  370. fmull 40(%esp)
  371. fsubrp %st, %st(2)
  372. fmulp %st, %st(1)
  373. je ..B1.36
  374. ..B1.34:
  375. fchs
  376. ..B1.36:
  377. addl $120, %esp
  378. popl %ebx
  379. popl %esi
  380. movl %ebp, %esp
  381. popl %ebp
  382. ret
  383. ..B1.37:
  384. ja ..B1.39
  385. ..B1.38:
  386. shrl $31, %esi
  387. flds _zeros@GOTOFF(%ebx,%esi,4)
  388. addl $120, %esp
  389. popl %ebx
  390. popl %esi
  391. movl %ebp, %esp
  392. popl %ebp
  393. ret
  394. ..B1.39:
  395. flds 8(%ebp)
  396. ..B1.40:
  397. addl $120, %esp
  398. popl %ebx
  399. popl %esi
  400. movl %ebp, %esp
  401. popl %ebp
  402. ret
  403. .align 16,0x90
  404. .type j1f,@function
  405. .size j1f,.-j1f
  406. .data
  407. # -- End j1f
  408. .section .rodata, "a"
  409. .align 8
  410. .align 8
  411. .L_2il0floatpacket.2:
  412. .long 0x00000000,0x3e500000
  413. .type .L_2il0floatpacket.2,@object
  414. .size .L_2il0floatpacket.2,8
  415. .align 4
  416. .L_2il0floatpacket.0:
  417. .long 0x3f000000
  418. .type .L_2il0floatpacket.0,@object
  419. .size .L_2il0floatpacket.0,4
  420. .align 4
  421. .L_2il0floatpacket.1:
  422. .long 0x4d800000
  423. .type .L_2il0floatpacket.1,@object
  424. .size .L_2il0floatpacket.1,4
  425. .align 4
  426. .L_2il0floatpacket.3:
  427. .long 0x31800000
  428. .type .L_2il0floatpacket.3,@object
  429. .size .L_2il0floatpacket.3,4
  430. .align 4
  431. .L_2il0floatpacket.4:
  432. .long 0x0d800000
  433. .type .L_2il0floatpacket.4,@object
  434. .size .L_2il0floatpacket.4,4
  435. .align 4
  436. _small_value_32:
  437. .long 226492416
  438. .long 2373976064
  439. .type _small_value_32,@object
  440. .size _small_value_32,8
  441. .align 4
  442. _Q2:
  443. .long 4294942533
  444. .long 3219128319
  445. .long 1380922587
  446. .long 1068848469
  447. .long 4229217063
  448. .long 3212603831
  449. .long 2485211372
  450. .long 1060546867
  451. .type _Q2,@object
  452. .size _Q2,32
  453. .align 4
  454. _Q1:
  455. .long 4294875887
  456. .long 1071644671
  457. .long 4170968197
  458. .long 1038133990
  459. .long 82133904
  460. .long 3215982592
  461. .long 2332230043
  462. .long 1043853917
  463. .long 2564340116
  464. .long 1063605580
  465. .long 220691470
  466. .long 1046506888
  467. .long 254563561
  468. .long 3205265147
  469. .long 694808779
  470. .long 1046622203
  471. .long 4019568744
  472. .long 1051070668
  473. .long 1556554770
  474. .long 1044540217
  475. .long 1786312313
  476. .long 3191946521
  477. .long 1750363188
  478. .long 1039907362
  479. .type _Q1,@object
  480. .size _Q1,96
  481. .align 4
  482. _P1:
  483. .long 3288017007
  484. .long 3163666881
  485. .long 1479173198
  486. .long 3218720463
  487. .long 2681037136
  488. .long 1068165283
  489. .long 482223942
  490. .long 1068193949
  491. .long 1641242500
  492. .long 3212130132
  493. .long 3602486439
  494. .long 3210890035
  495. .long 1295520927
  496. .long 1059513544
  497. .long 2893642677
  498. .long 1057503730
  499. .long 2144568350
  500. .long 3200875225
  501. .long 914896231
  502. .long 3198366754
  503. .long 1774974526
  504. .long 1046581392
  505. .long 3090631217
  506. .long 1043566169
  507. .long 3310618599
  508. .long 3186783429
  509. .long 1974431497
  510. .long 1074702165
  511. .type _P1,@object
  512. .size _P1,112
  513. .align 4
  514. _P2:
  515. .long 216484910
  516. .long 1015040375
  517. .long 3011708428
  518. .long 1070806296
  519. .long 3332724636
  520. .long 3214272269
  521. .long 3160644008
  522. .long 3215461507
  523. .long 2925435221
  524. .long 1063888050
  525. .long 725350898
  526. .long 1063337916
  527. .long 297499451
  528. .long 3206574940
  529. .long 3278099830
  530. .long 3204945545
  531. .long 2222993240
  532. .long 1053042193
  533. .long 2059286351
  534. .long 1050869046
  535. .long 306569625
  536. .long 3193793299
  537. .long 95256688
  538. .long 3191038309
  539. .long 616794992
  540. .long 1039029534
  541. .long 4088689232
  542. .long 1075580917
  543. .type _P2,@object
  544. .size _P2,112
  545. .align 4
  546. _P3:
  547. .long 1314465059
  548. .long 1017127215
  549. .long 1413823668
  550. .long 3218077268
  551. .long 4087546795
  552. .long 1065951807
  553. .long 3559351807
  554. .long 1067757765
  555. .long 338531188
  556. .long 3210711466
  557. .long 2516776276
  558. .long 3210695105
  559. .long 1548953411
  560. .long 1058452686
  561. .long 3819184955
  562. .long 1057373236
  563. .long 1262833741
  564. .long 3200137243
  565. .long 325214128
  566. .long 3198310046
  567. .long 1253465703
  568. .long 1045913252
  569. .long 3453826356
  570. .long 1043528319
  571. .long 2667154656
  572. .long 3186140571
  573. .long 3502111785
  574. .long 1076123856
  575. .type _P3,@object
  576. .size _P3,112
  577. .align 4
  578. _P4:
  579. .long 1657852450
  580. .long 3163577804
  581. .long 2020212262
  582. .long 1070330675
  583. .long 774106997
  584. .long 3212888122
  585. .long 2119717923
  586. .long 3215085957
  587. .long 2098754573
  588. .long 1062575793
  589. .long 2137093530
  590. .long 1063017421
  591. .long 2437037263
  592. .long 3205513537
  593. .long 2698759453
  594. .long 3204752976
  595. .long 1998212634
  596. .long 1052165362
  597. .long 2817762251
  598. .long 1050764623
  599. .long 357372240
  600. .long 3193071576
  601. .long 3891599306
  602. .long 3190966182
  603. .long 2865549426
  604. .long 1038348895
  605. .long 4077970850
  606. .long 1076536762
  607. .type _P4,@object
  608. .size _P4,112
  609. .align 4
  610. _P5:
  611. .long 1537387514
  612. .long 3166104464
  613. .long 4237757176
  614. .long 3217630662
  615. .long 789391682
  616. .long 1064857043
  617. .long 3122547501
  618. .long 1067488355
  619. .long 3303098147
  620. .long 3209681410
  621. .long 2944525948
  622. .long 3210343613
  623. .long 1468487066
  624. .long 1057519518
  625. .long 285546763
  626. .long 1057172625
  627. .long 830693909
  628. .long 3199311383
  629. .long 1284260698
  630. .long 3198182585
  631. .long 1823688212
  632. .long 1045254801
  633. .long 1962790020
  634. .long 1043427779
  635. .long 1867031598
  636. .long 3185590079
  637. .long 906299589
  638. .long 1076918395
  639. .type _P5,@object
  640. .size _P5,112
  641. .align 4
  642. _val_16_0:
  643. .long 0
  644. .long 1076887552
  645. .type _val_16_0,@object
  646. .size _val_16_0,8
  647. .align 4
  648. _tonpi:
  649. .long 1841940611
  650. .long 1071931184
  651. .type _tonpi,@object
  652. .size _tonpi,8
  653. .align 4
  654. _PP:
  655. .long 551
  656. .long 1072693248
  657. .long 4267608614
  658. .long 1061027839
  659. .long 3690881252
  660. .long 3200414971
  661. .long 3933039373
  662. .long 1046848465
  663. .long 3246008603
  664. .long 3189439465
  665. .long 1689113401
  666. .long 1037483563
  667. .type _PP,@object
  668. .size _PP,48
  669. .align 4
  670. _QP:
  671. .long 4294954956
  672. .long 1066926079
  673. .long 4141388976
  674. .long 3204071423
  675. .long 1500123100
  676. .long 1049740228
  677. .long 3264213437
  678. .long 3191856517
  679. .long 1489731078
  680. .long 1039824630
  681. .long 1807021260
  682. .long 3183130166
  683. .type _QP,@object
  684. .size _QP,48
  685. .align 4
  686. _zeros:
  687. .long 0
  688. .long 2147483648
  689. .type _zeros,@object
  690. .size _zeros,8
  691. .data
  692. .hidden __libm_sincos_k32
  693. .section .note.GNU-stack, ""
  694. # End