j0f.S 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  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: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_j0f.1:
  49. ..L2:
  50. subq $56, %rsp
  51. .cfi_def_cfa_offset 64
  52. movd %xmm0, %edx
  53. movss %xmm0, 48(%rsp)
  54. andl $2147483647, %edx
  55. cmpl $2139095040, %edx
  56. jae ..B1.18
  57. ..B1.2:
  58. cmpl $1099154394, %edx
  59. jae ..B1.19
  60. ..B1.3:
  61. cmpl $1081424556, %edx
  62. jae ..B1.14
  63. ..B1.4:
  64. cmpl $1048576000, %edx
  65. jae ..B1.13
  66. ..B1.5:
  67. cmpl $998244352, %edx
  68. jae ..B1.12
  69. ..B1.6:
  70. cmpl $947912704, %edx
  71. jae ..B1.11
  72. ..B1.7:
  73. movss .L_2il0floatpacket.0(%rip), %xmm1
  74. cmpl $838860800, %edx
  75. jae ..B1.9
  76. ..B1.8:
  77. andps .L_2il0floatpacket.1(%rip), %xmm0
  78. subss %xmm0, %xmm1
  79. jmp ..B1.10
  80. ..B1.9:
  81. mulss %xmm0, %xmm0
  82. subss %xmm0, %xmm1
  83. ..B1.10:
  84. movaps %xmm1, %xmm0
  85. addq $56, %rsp
  86. .cfi_def_cfa_offset 8
  87. ret
  88. .cfi_def_cfa_offset 64
  89. ..B1.11:
  90. pxor %xmm0, %xmm0
  91. lea 8+_Q3(%rip), %rax
  92. cvtss2sd 48(%rsp), %xmm0
  93. mulsd %xmm0, %xmm0
  94. lea _Q3(%rip), %rdx
  95. movsd (%rax), %xmm1
  96. mulsd %xmm0, %xmm1
  97. addsd (%rdx), %xmm1
  98. mulsd %xmm0, %xmm1
  99. addsd .L_2il0floatpacket.2(%rip), %xmm1
  100. cvtsd2ss %xmm1, %xmm1
  101. movaps %xmm1, %xmm0
  102. addq $56, %rsp
  103. .cfi_def_cfa_offset 8
  104. ret
  105. .cfi_def_cfa_offset 64
  106. ..B1.12:
  107. pxor %xmm1, %xmm1
  108. lea 24+_Q2(%rip), %rax
  109. cvtss2sd 48(%rsp), %xmm1
  110. mulsd %xmm1, %xmm1
  111. lea 16+_Q2(%rip), %rcx
  112. movaps %xmm1, %xmm0
  113. lea 8+_Q2(%rip), %rdx
  114. mulsd %xmm1, %xmm0
  115. lea _Q2(%rip), %rsi
  116. movsd (%rax), %xmm3
  117. movsd (%rcx), %xmm2
  118. mulsd %xmm0, %xmm3
  119. mulsd %xmm0, %xmm2
  120. addsd (%rdx), %xmm3
  121. addsd (%rsi), %xmm2
  122. mulsd %xmm0, %xmm3
  123. mulsd %xmm1, %xmm2
  124. addsd %xmm2, %xmm3
  125. addsd .L_2il0floatpacket.2(%rip), %xmm3
  126. cvtsd2ss %xmm3, %xmm3
  127. movaps %xmm3, %xmm0
  128. addq $56, %rsp
  129. .cfi_def_cfa_offset 8
  130. ret
  131. .cfi_def_cfa_offset 64
  132. ..B1.13:
  133. pxor %xmm1, %xmm1
  134. lea 112+_Q1(%rip), %rax
  135. cvtss2sd 48(%rsp), %xmm1
  136. andps .L_2il0floatpacket.3(%rip), %xmm1
  137. lea 104+_Q1(%rip), %rdx
  138. lea 72+_Q1(%rip), %rcx
  139. lea 88+_Q1(%rip), %rdi
  140. lea 96+_Q1(%rip), %r11
  141. lea 56+_Q1(%rip), %r8
  142. lea 40+_Q1(%rip), %rsi
  143. lea 24+_Q1(%rip), %r9
  144. movsd (%rdx), %xmm6
  145. lea 32+_Q1(%rip), %rdx
  146. movsd (%rdi), %xmm0
  147. lea 16+_Q1(%rip), %rdi
  148. movsd (%r11), %xmm5
  149. lea 8+_Q1(%rip), %r10
  150. subsd (%rax), %xmm1
  151. lea 64+_Q1(%rip), %rax
  152. movaps %xmm1, %xmm3
  153. mulsd %xmm1, %xmm3
  154. movaps %xmm3, %xmm2
  155. mulsd %xmm3, %xmm2
  156. mulsd %xmm2, %xmm6
  157. mulsd %xmm2, %xmm0
  158. mulsd %xmm2, %xmm5
  159. addsd (%rcx), %xmm6
  160. addsd (%r8), %xmm0
  161. addsd (%rax), %xmm5
  162. mulsd %xmm2, %xmm6
  163. mulsd %xmm2, %xmm0
  164. mulsd %xmm2, %xmm5
  165. addsd (%rsi), %xmm6
  166. addsd (%r9), %xmm0
  167. addsd (%rdx), %xmm5
  168. mulsd %xmm2, %xmm6
  169. mulsd %xmm3, %xmm0
  170. mulsd %xmm2, %xmm5
  171. addsd %xmm0, %xmm6
  172. lea 80+_Q1(%rip), %rcx
  173. lea 48+_Q1(%rip), %rsi
  174. lea _Q1(%rip), %r8
  175. addsd (%r10), %xmm6
  176. movsd (%rcx), %xmm4
  177. mulsd %xmm2, %xmm4
  178. mulsd %xmm1, %xmm6
  179. addsd (%rsi), %xmm4
  180. mulsd %xmm2, %xmm4
  181. addsd (%rdi), %xmm4
  182. mulsd %xmm3, %xmm4
  183. addsd %xmm4, %xmm5
  184. addsd (%r8), %xmm5
  185. addsd %xmm5, %xmm6
  186. cvtsd2ss %xmm6, %xmm6
  187. movaps %xmm6, %xmm0
  188. addq $56, %rsp
  189. .cfi_def_cfa_offset 8
  190. ret
  191. .cfi_def_cfa_offset 64
  192. ..B1.14:
  193. cmpl $1092798087, %edx
  194. jae ..B1.16
  195. ..B1.15:
  196. cmpl $1088454576, %edx
  197. lea _P1(%rip), %rcx
  198. lea _P2(%rip), %rax
  199. jb ..B1.17
  200. movq %rax, %rcx
  201. jmp ..B1.17
  202. ..B1.16:
  203. cmpl $1096101336, %edx
  204. lea _P3(%rip), %rcx
  205. lea _P4(%rip), %rax
  206. jb ..L12
  207. movq %rax, %rcx
  208. ..L12:
  209. ..B1.17:
  210. pxor %xmm3, %xmm3
  211. cvtss2sd 48(%rsp), %xmm3
  212. andps .L_2il0floatpacket.3(%rip), %xmm3
  213. movsd 96(%rcx), %xmm6
  214. movsd 80(%rcx), %xmm0
  215. movsd 88(%rcx), %xmm5
  216. movsd 72(%rcx), %xmm4
  217. subsd 104(%rcx), %xmm3
  218. movaps %xmm3, %xmm1
  219. mulsd %xmm3, %xmm1
  220. movaps %xmm1, %xmm2
  221. mulsd %xmm1, %xmm2
  222. mulsd %xmm2, %xmm6
  223. mulsd %xmm2, %xmm0
  224. mulsd %xmm2, %xmm5
  225. addsd 64(%rcx), %xmm6
  226. mulsd %xmm2, %xmm4
  227. addsd 48(%rcx), %xmm0
  228. addsd 56(%rcx), %xmm5
  229. mulsd %xmm2, %xmm6
  230. addsd 40(%rcx), %xmm4
  231. mulsd %xmm2, %xmm0
  232. mulsd %xmm2, %xmm5
  233. addsd 32(%rcx), %xmm6
  234. mulsd %xmm2, %xmm4
  235. addsd 16(%rcx), %xmm0
  236. addsd 24(%rcx), %xmm5
  237. mulsd %xmm2, %xmm6
  238. addsd 8(%rcx), %xmm4
  239. mulsd %xmm1, %xmm0
  240. mulsd %xmm1, %xmm5
  241. mulsd %xmm3, %xmm4
  242. addsd %xmm0, %xmm6
  243. mulsd %xmm3, %xmm5
  244. addsd (%rcx), %xmm6
  245. addsd %xmm4, %xmm5
  246. addsd %xmm5, %xmm6
  247. cvtsd2ss %xmm6, %xmm6
  248. movaps %xmm6, %xmm0
  249. addq $56, %rsp
  250. .cfi_def_cfa_offset 8
  251. ret
  252. .cfi_def_cfa_offset 64
  253. ..B1.18:
  254. pxor %xmm0, %xmm0
  255. jbe ..L15
  256. movss 48(%rsp), %xmm0
  257. ..L15:
  258. addq $56, %rsp
  259. .cfi_def_cfa_offset 8
  260. ret
  261. .cfi_def_cfa_offset 64
  262. ..B1.19:
  263. pxor %xmm0, %xmm0
  264. lea _val_16_0(%rip), %rax
  265. cvtss2sd 48(%rsp), %xmm0
  266. andps .L_2il0floatpacket.3(%rip), %xmm0
  267. lea (%rsp), %rdi
  268. movsd .L_2il0floatpacket.2(%rip), %xmm1
  269. lea 8(%rsp), %rsi
  270. divsd %xmm0, %xmm1
  271. movsd (%rax), %xmm2
  272. movl $-1, %edx
  273. mulsd %xmm1, %xmm2
  274. movsd %xmm2, 8(%rsi)
  275. mulsd %xmm2, %xmm2
  276. movsd %xmm2, 24(%rsi)
  277. mulsd %xmm2, %xmm2
  278. movsd %xmm1, 16(%rsi)
  279. movsd %xmm2, 32(%rsi)
  280. ..___tag_value_j0f.18:
  281. call __libm_sincos_k32@PLT
  282. ..___tag_value_j0f.19:
  283. ..B1.20:
  284. lea 40+_QP(%rip), %r10
  285. lea 40+_PP(%rip), %rdx
  286. movsd 40(%rsp), %xmm2
  287. lea 24+_QP(%rip), %r11
  288. lea 24+_PP(%rip), %rcx
  289. lea 32+_PP(%rip), %rdi
  290. lea _tonpi(%rip), %rax
  291. lea 16+_PP(%rip), %r8
  292. movsd (%r10), %xmm5
  293. lea 8+_PP(%rip), %rsi
  294. movsd (%rdx), %xmm6
  295. lea 32+_QP(%rip), %rdx
  296. mulsd %xmm2, %xmm5
  297. lea _PP(%rip), %r9
  298. mulsd %xmm2, %xmm6
  299. addsd (%r11), %xmm5
  300. addsd (%rcx), %xmm6
  301. mulsd %xmm2, %xmm5
  302. mulsd %xmm2, %xmm6
  303. movsd (%rdx), %xmm4
  304. lea 16+_QP(%rip), %rcx
  305. mulsd %xmm2, %xmm4
  306. addsd (%rsi), %xmm6
  307. movsd (%rdi), %xmm1
  308. lea _QP(%rip), %rsi
  309. mulsd %xmm2, %xmm1
  310. addsd (%rcx), %xmm4
  311. movsd (%rax), %xmm0
  312. lea 8+_QP(%rip), %rax
  313. mulsd %xmm2, %xmm4
  314. addsd (%r8), %xmm1
  315. mulsd 24(%rsp), %xmm0
  316. addsd (%rax), %xmm5
  317. mulsd %xmm2, %xmm1
  318. addsd (%rsi), %xmm4
  319. sqrtsd %xmm0, %xmm0
  320. addsd (%r9), %xmm1
  321. movsd 32(%rsp), %xmm3
  322. mulsd %xmm3, %xmm5
  323. mulsd %xmm3, %xmm6
  324. addsd %xmm4, %xmm5
  325. addsd %xmm1, %xmm6
  326. mulsd 16(%rsp), %xmm5
  327. mulsd 8(%rsp), %xmm6
  328. mulsd (%rsp), %xmm5
  329. subsd %xmm5, %xmm6
  330. mulsd %xmm6, %xmm0
  331. cvtsd2ss %xmm0, %xmm0
  332. addq $56, %rsp
  333. .cfi_def_cfa_offset 8
  334. ret
  335. .align 16,0x90
  336. .cfi_endproc
  337. .type j0f,@function
  338. .size j0f,.-j0f
  339. .data
  340. # -- End j0f
  341. .section .rodata, "a"
  342. .align 16
  343. .align 16
  344. .L_2il0floatpacket.1:
  345. .long 0x7fffffff,0x00000000,0x00000000,0x00000000
  346. .type .L_2il0floatpacket.1,@object
  347. .size .L_2il0floatpacket.1,16
  348. .align 16
  349. .L_2il0floatpacket.3:
  350. .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
  351. .type .L_2il0floatpacket.3,@object
  352. .size .L_2il0floatpacket.3,16
  353. .align 8
  354. .L_2il0floatpacket.2:
  355. .long 0x00000000,0x3ff00000
  356. .type .L_2il0floatpacket.2,@object
  357. .size .L_2il0floatpacket.2,8
  358. .align 4
  359. .L_2il0floatpacket.0:
  360. .long 0x3f800000
  361. .type .L_2il0floatpacket.0,@object
  362. .size .L_2il0floatpacket.0,4
  363. .align 4
  364. _Q3:
  365. .long 4294966841
  366. .long 3218079743
  367. .long 477219499
  368. .long 1066401791
  369. .type _Q3,@object
  370. .size _Q3,16
  371. .align 4
  372. _Q2:
  373. .long 4294967005
  374. .long 3218079743
  375. .long 4292583532
  376. .long 1066401791
  377. .long 2963922746
  378. .long 3208409541
  379. .long 1698509326
  380. .long 1054632110
  381. .type _Q2,@object
  382. .size _Q2,32
  383. .align 4
  384. _Q1:
  385. .long 569392270
  386. .long 3163659129
  387. .long 911539783
  388. .long 3219168475
  389. .long 3927550863
  390. .long 1069261278
  391. .long 1680954783
  392. .long 1068301032
  393. .long 3247602706
  394. .long 3212950300
  395. .long 1528576945
  396. .long 3210869138
  397. .long 2120930432
  398. .long 1060197251
  399. .long 3147753376
  400. .long 1057418557
  401. .long 3445667889
  402. .long 3201446637
  403. .long 160313185
  404. .long 3198274950
  405. .long 2157358765
  406. .long 1047004568
  407. .long 1405517519
  408. .long 1043512506
  409. .long 3055202941
  410. .long 3187001715
  411. .long 562966967
  412. .long 3183555197
  413. .long 781654848
  414. .long 1073954069
  415. .type _Q1,@object
  416. .size _Q1,120
  417. .align 4
  418. _P1:
  419. .long 2556390964
  420. .long 3162487616
  421. .long 168113101
  422. .long 1070974694
  423. .long 3865632959
  424. .long 3214905202
  425. .long 3384884860
  426. .long 3215663440
  427. .long 3461368592
  428. .long 1064499199
  429. .long 2947775703
  430. .long 1063419441
  431. .long 1964351934
  432. .long 3207001659
  433. .long 1081690493
  434. .long 3204998104
  435. .long 2315304668
  436. .long 1053480462
  437. .long 3655541446
  438. .long 1050880364
  439. .long 988219424
  440. .long 3194139699
  441. .long 2647984383
  442. .long 3191029766
  443. .long 3459760917
  444. .long 1038956170
  445. .long 1529622085
  446. .long 1075188879
  447. .type _P1,@object
  448. .size _P1,112
  449. .align 4
  450. _P2:
  451. .long 2989381656
  452. .long 3164006638
  453. .long 2007135498
  454. .long 3218169721
  455. .long 3461465629
  456. .long 1066405759
  457. .long 1292000183
  458. .long 1067879320
  459. .long 1048188593
  460. .long 3211038307
  461. .long 2811900586
  462. .long 3210797269
  463. .long 275024305
  464. .long 1058896216
  465. .long 2179928921
  466. .long 1057456107
  467. .long 2316750355
  468. .long 3200463196
  469. .long 1626245786
  470. .long 3198355713
  471. .long 2429961783
  472. .long 1046264853
  473. .long 3081665457
  474. .long 1043557342
  475. .long 3760684269
  476. .long 3186121773
  477. .long 1825365706
  478. .long 1075924661
  479. .type _P2,@object
  480. .size _P2,112
  481. .align 4
  482. _P3:
  483. .long 915277891
  484. .long 3163740397
  485. .long 1721892699
  486. .long 1070448958
  487. .long 3433548142
  488. .long 3213111280
  489. .long 3603643349
  490. .long 3215166749
  491. .long 2193444562
  492. .long 1062884841
  493. .long 1036402988
  494. .long 1063136790
  495. .long 2039602830
  496. .long 3205750717
  497. .long 2039806946
  498. .long 3204828766
  499. .long 3757243411
  500. .long 1052487712
  501. .long 2819184679
  502. .long 1050816211
  503. .long 1638789445
  504. .long 3193302656
  505. .long 96077275
  506. .long 3191008024
  507. .long 34207204
  508. .long 1038327735
  509. .long 8549046
  510. .long 1076335940
  511. .type _P3,@object
  512. .size _P3,112
  513. .align 4
  514. _P4:
  515. .long 4010378302
  516. .long 3164933090
  517. .long 260862994
  518. .long 3217715229
  519. .long 793353311
  520. .long 1065112761
  521. .long 2823013001
  522. .long 1067546520
  523. .long 4006575139
  524. .long 3209863700
  525. .long 3390737311
  526. .long 3210433566
  527. .long 1793352299
  528. .long 1057800372
  529. .long 3528876835
  530. .long 1057234714
  531. .long 2505438989
  532. .long 3199512871
  533. .long 2785865938
  534. .long 3198229698
  535. .long 565130724
  536. .long 1045495083
  537. .long 410977742
  538. .long 1043470609
  539. .long 4266013081
  540. .long 3185543354
  541. .long 1056076242
  542. .long 1076747425
  543. .type _P4,@object
  544. .size _P4,112
  545. .align 4
  546. _val_16_0:
  547. .long 0
  548. .long 1076887552
  549. .type _val_16_0,@object
  550. .size _val_16_0,8
  551. .align 4
  552. _QP:
  553. .long 4294921804
  554. .long 3212836863
  555. .long 4153409851
  556. .long 1056096255
  557. .long 2226361937
  558. .long 3196916170
  559. .long 3849695089
  560. .long 1044094312
  561. .long 663042994
  562. .long 3187124278
  563. .long 3336948587
  564. .long 1035486718
  565. .type _QP,@object
  566. .size _QP,48
  567. .align 4
  568. _PP:
  569. .long 4294966288
  570. .long 1072693247
  571. .long 4269912424
  572. .long 3207725055
  573. .long 1780799603
  574. .long 1052554744
  575. .long 2285933488
  576. .long 3194113879
  577. .long 3892950982
  578. .long 1041746526
  579. .long 150212775
  580. .long 3184818833
  581. .type _PP,@object
  582. .size _PP,48
  583. .align 4
  584. _tonpi:
  585. .long 1841940611
  586. .long 1071931184
  587. .type _tonpi,@object
  588. .size _tonpi,8
  589. .data
  590. .section .note.GNU-stack, ""
  591. // -- Begin DWARF2 SEGMENT .eh_frame
  592. .section .eh_frame,"a",@progbits
  593. .eh_frame_seg:
  594. .align 1
  595. # End