sincosf_wmt.S 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  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 "sincosf_wmt.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin static_func
  41. .text
  42. .align 16,0x90
  43. static_func:
  44. ..B1.1:
  45. ..L1:
  46. call ..L2
  47. ..L2:
  48. popl %eax
  49. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
  50. lea static_const_table@GOTOFF(%eax), %eax
  51. ret
  52. .align 16,0x90
  53. .type static_func,@function
  54. .size static_func,.-static_func
  55. .data
  56. # -- End static_func
  57. .text
  58. # -- Begin sincosf
  59. .text
  60. .align 16,0x90
  61. .globl sincosf
  62. sincosf:
  63. # parameter 1: 8 + %ebp
  64. # parameter 2: 12 + %ebp
  65. # parameter 3: 16 + %ebp
  66. ..B2.1:
  67. ..L3:
  68. ..B2.2:
  69. pushl %ebp
  70. movl %esp, %ebp
  71. subl $136, %esp
  72. movl %ebx, 80(%esp)
  73. call static_func
  74. movl %eax, %ebx
  75. movss 144(%esp), %xmm0
  76. movl 144(%esp), %ecx
  77. movl 148(%esp), %eax
  78. movl %eax, 32(%esp)
  79. movl 152(%esp), %eax
  80. movl %eax, 36(%esp)
  81. movaps %xmm0, %xmm1
  82. cvtps2pd %xmm1, %xmm1
  83. movsd 1360(%ebx), %xmm2
  84. movl $2147483647, %eax
  85. movl $1241513983, %edx
  86. andl %ecx, %eax
  87. subl %eax, %edx
  88. subl $964689920, %eax
  89. orl %eax, %edx
  90. jl .L_2TAG_PACKET_0.0.2
  91. movsd 1376(%ebx), %xmm4
  92. mulsd %xmm1, %xmm2
  93. movsd 1392(%ebx), %xmm3
  94. movapd %xmm2, %xmm5
  95. addsd %xmm4, %xmm2
  96. movd %xmm2, %ecx
  97. subsd %xmm4, %xmm2
  98. mulsd %xmm3, %xmm1
  99. .L_2TAG_PACKET_1.0.2:
  100. movl $256, %eax
  101. movapd 1040(%ebx), %xmm4
  102. subsd %xmm2, %xmm5
  103. addl %ecx, %ecx
  104. movl %ecx, %edx
  105. shll $24, %ecx
  106. sarl $31, %ecx
  107. andl %edx, %eax
  108. addl %ecx, %edx
  109. xorl %ecx, %edx
  110. addsd %xmm5, %xmm1
  111. movsd 1440(%ebx), %xmm6
  112. andl $254, %edx
  113. movapd (%ebx,%edx,8), %xmm3
  114. pshufd $68, %xmm1, %xmm2
  115. shrl $4, %eax
  116. movapd 1072(%ebx,%eax), %xmm7
  117. movapd 1056(%ebx), %xmm5
  118. mulpd %xmm2, %xmm2
  119. mulsd %xmm6, %xmm1
  120. andl $1, %ecx
  121. movd %ecx, %xmm0
  122. psllq $63, %xmm0
  123. xorpd %xmm0, %xmm3
  124. xorpd %xmm7, %xmm3
  125. mulpd %xmm4, %xmm2
  126. pshufd $78, %xmm3, %xmm6
  127. mulsd %xmm1, %xmm3
  128. addpd %xmm2, %xmm5
  129. mulsd %xmm1, %xmm6
  130. mulpd %xmm5, %xmm3
  131. mulpd %xmm5, %xmm6
  132. pshufd $238, %xmm3, %xmm0
  133. pshufd $238, %xmm6, %xmm1
  134. addsd %xmm3, %xmm0
  135. subsd %xmm6, %xmm1
  136. cvtpd2ps %xmm0, %xmm0
  137. cvtpd2ps %xmm1, %xmm1
  138. movl 32(%esp), %eax
  139. movss %xmm0, (%eax)
  140. movl 36(%esp), %edx
  141. movss %xmm1, (%edx)
  142. jmp .L_2TAG_PACKET_2.0.2
  143. .L_2TAG_PACKET_0.0.2:
  144. andl $2147483647, %ecx
  145. cmpl $1040187392, %ecx
  146. ja .L_2TAG_PACKET_3.0.2
  147. cvtss2sd %xmm0, %xmm0
  148. mulsd 1344(%ebx), %xmm0
  149. cvtsd2ss %xmm0, %xmm0
  150. movl 32(%esp), %eax
  151. movss %xmm0, (%eax)
  152. movl 36(%esp), %edx
  153. movl $1065353216, %ecx
  154. movl %ecx, (%edx)
  155. jmp .L_2TAG_PACKET_2.0.2
  156. .L_2TAG_PACKET_3.0.2:
  157. movd %xmm0, %eax
  158. andl $2139095040, %eax
  159. cmpl $2139095040, %eax
  160. je .L_2TAG_PACKET_4.0.2
  161. shrl $23, %ecx
  162. subl $142, %ecx
  163. andl $65528, %ecx
  164. movsd 1104(%ebx,%ecx,2), %xmm3
  165. movsd 1112(%ebx,%ecx,2), %xmm5
  166. movsd 1424(%ebx), %xmm2
  167. xorpd %xmm4, %xmm4
  168. movl $17208, %eax
  169. pinsrw $3, %eax, %xmm4
  170. andpd %xmm3, %xmm2
  171. psllq $40, %xmm3
  172. mulsd %xmm1, %xmm2
  173. mulsd %xmm1, %xmm3
  174. mulsd %xmm5, %xmm1
  175. movapd %xmm2, %xmm0
  176. addsd %xmm3, %xmm2
  177. movapd %xmm2, %xmm5
  178. subsd %xmm2, %xmm0
  179. addsd %xmm4, %xmm2
  180. addsd %xmm0, %xmm3
  181. movd %xmm2, %ecx
  182. subsd %xmm4, %xmm2
  183. addsd %xmm3, %xmm1
  184. jmp .L_2TAG_PACKET_1.0.2
  185. .L_2TAG_PACKET_4.0.2:
  186. subss %xmm0, %xmm0
  187. movl 32(%esp), %eax
  188. movss %xmm0, (%eax)
  189. movl 36(%esp), %edx
  190. movss %xmm0, (%edx)
  191. .L_2TAG_PACKET_2.0.2:
  192. movl 80(%esp), %ebx
  193. movl %ebp, %esp
  194. popl %ebp
  195. ret
  196. ..B2.3:
  197. .align 16,0x90
  198. .type sincosf,@function
  199. .size sincosf,.-sincosf
  200. .data
  201. # -- End sincosf
  202. .section .rodata, "a"
  203. .align 16
  204. .align 16
  205. static_const_table:
  206. .long 0
  207. .long 1072693248
  208. .long 0
  209. .long 0
  210. .long 1619315981
  211. .long 1072692616
  212. .long 4154680958
  213. .long 1067000149
  214. .long 3816385918
  215. .long 1072690721
  216. .long 4044216340
  217. .long 1068048229
  218. .long 2902558778
  219. .long 1072687565
  220. .long 2462980598
  221. .long 1068684576
  222. .long 2748392742
  223. .long 1072683149
  224. .long 3156849708
  225. .long 1069094822
  226. .long 1893834707
  227. .long 1072677476
  228. .long 1453945614
  229. .long 1069504078
  230. .long 2131272983
  231. .long 1072670549
  232. .long 1854824762
  233. .long 1069729808
  234. .long 4201728937
  235. .long 1072662372
  236. .long 1149976518
  237. .long 1069933076
  238. .long 3489094832
  239. .long 1072652951
  240. .long 1013556747
  241. .long 1070135480
  242. .long 2892293513
  243. .long 1072642291
  244. .long 1786662755
  245. .long 1070336898
  246. .long 4220661975
  247. .long 1072630398
  248. .long 2065784603
  249. .long 1070537209
  250. .long 3882371427
  251. .long 1072617280
  252. .long 1655830135
  253. .long 1070666194
  254. .long 1455828442
  255. .long 1072602945
  256. .long 785751814
  257. .long 1070765062
  258. .long 3964199186
  259. .long 1072587400
  260. .long 2484561409
  261. .long 1070863196
  262. .long 83265253
  263. .long 1072570657
  264. .long 1974149085
  265. .long 1070960538
  266. .long 3066872380
  267. .long 1072552723
  268. .long 821708191
  269. .long 1071057029
  270. .long 3476196678
  271. .long 1072533611
  272. .long 2796464483
  273. .long 1071152610
  274. .long 3511535930
  275. .long 1072513332
  276. .long 1135144330
  277. .long 1071247225
  278. .long 4097623923
  279. .long 1072491898
  280. .long 165764288
  281. .long 1071340816
  282. .long 557060597
  283. .long 1072469323
  284. .long 2570175582
  285. .long 1071433326
  286. .long 4051746225
  287. .long 1072445618
  288. .long 939980347
  289. .long 1071524701
  290. .long 2892993834
  291. .long 1072420800
  292. .long 3690502842
  293. .long 1071614884
  294. .long 1159294526
  295. .long 1072394883
  296. .long 2569207790
  297. .long 1071674247
  298. .long 1477771776
  299. .long 1072367882
  300. .long 1411074851
  301. .long 1071718067
  302. .long 688824739
  303. .long 1072339814
  304. .long 967731400
  305. .long 1071761211
  306. .long 2688952194
  307. .long 1072310695
  308. .long 1289556703
  309. .long 1071803653
  310. .long 1207142209
  311. .long 1072280544
  312. .long 4242632757
  313. .long 1071845367
  314. .long 1234330619
  315. .long 1072249378
  316. .long 689983673
  317. .long 1071886330
  318. .long 1796544321
  319. .long 1072217216
  320. .long 621354454
  321. .long 1071926515
  322. .long 201299822
  323. .long 1072184078
  324. .long 3152274921
  325. .long 1071965898
  326. .long 577417135
  327. .long 1072149983
  328. .long 881650848
  329. .long 1072004457
  330. .long 938475414
  331. .long 1072114952
  332. .long 1427975391
  333. .long 1072042167
  334. .long 1719614413
  335. .long 1072079006
  336. .long 1719614413
  337. .long 1072079006
  338. .long 1427975391
  339. .long 1072042167
  340. .long 938475414
  341. .long 1072114952
  342. .long 881650848
  343. .long 1072004457
  344. .long 577417135
  345. .long 1072149983
  346. .long 3152274921
  347. .long 1071965898
  348. .long 201299822
  349. .long 1072184078
  350. .long 621354454
  351. .long 1071926515
  352. .long 1796544321
  353. .long 1072217216
  354. .long 689983673
  355. .long 1071886330
  356. .long 1234330619
  357. .long 1072249378
  358. .long 4242632757
  359. .long 1071845367
  360. .long 1207142209
  361. .long 1072280544
  362. .long 1289556703
  363. .long 1071803653
  364. .long 2688952194
  365. .long 1072310695
  366. .long 967731400
  367. .long 1071761211
  368. .long 688824739
  369. .long 1072339814
  370. .long 1411074851
  371. .long 1071718067
  372. .long 1477771776
  373. .long 1072367882
  374. .long 2569207790
  375. .long 1071674247
  376. .long 1159294526
  377. .long 1072394883
  378. .long 3690502842
  379. .long 1071614884
  380. .long 2892993834
  381. .long 1072420800
  382. .long 939980347
  383. .long 1071524701
  384. .long 4051746225
  385. .long 1072445618
  386. .long 2570175582
  387. .long 1071433326
  388. .long 557060597
  389. .long 1072469323
  390. .long 165764288
  391. .long 1071340816
  392. .long 4097623923
  393. .long 1072491898
  394. .long 1135144330
  395. .long 1071247225
  396. .long 3511535930
  397. .long 1072513332
  398. .long 2796464483
  399. .long 1071152610
  400. .long 3476196678
  401. .long 1072533611
  402. .long 821708191
  403. .long 1071057029
  404. .long 3066872380
  405. .long 1072552723
  406. .long 1974149085
  407. .long 1070960538
  408. .long 83265253
  409. .long 1072570657
  410. .long 2484561409
  411. .long 1070863196
  412. .long 3964199186
  413. .long 1072587400
  414. .long 785751814
  415. .long 1070765062
  416. .long 1455828442
  417. .long 1072602945
  418. .long 1655830135
  419. .long 1070666194
  420. .long 3882371427
  421. .long 1072617280
  422. .long 2065784603
  423. .long 1070537209
  424. .long 4220661975
  425. .long 1072630398
  426. .long 1786662755
  427. .long 1070336898
  428. .long 2892293513
  429. .long 1072642291
  430. .long 1013556747
  431. .long 1070135480
  432. .long 3489094832
  433. .long 1072652951
  434. .long 1149976518
  435. .long 1069933076
  436. .long 4201728937
  437. .long 1072662372
  438. .long 1854824762
  439. .long 1069729808
  440. .long 2131272983
  441. .long 1072670549
  442. .long 1453945614
  443. .long 1069504078
  444. .long 1893834707
  445. .long 1072677476
  446. .long 3156849708
  447. .long 1069094822
  448. .long 2748392742
  449. .long 1072683149
  450. .long 2462980598
  451. .long 1068684576
  452. .long 2902558778
  453. .long 1072687565
  454. .long 4044216340
  455. .long 1068048229
  456. .long 3816385918
  457. .long 1072690721
  458. .long 4154680958
  459. .long 1067000149
  460. .long 1619315981
  461. .long 1072692616
  462. .long 0
  463. .long 0
  464. .long 0
  465. .long 1072693248
  466. .long 1649608659
  467. .long 3206173094
  468. .long 3384690142
  469. .long 3207839036
  470. .long 0
  471. .long 1072693248
  472. .long 0
  473. .long 1072693248
  474. .long 0
  475. .long 0
  476. .long 0
  477. .long 0
  478. .long 0
  479. .long 2147483648
  480. .long 0
  481. .long 2147483648
  482. .long 1832810809
  483. .long 1078222640
  484. .long 4036845384
  485. .long 1030771879
  486. .long 1832810809
  487. .long 1078222640
  488. .long 4036845384
  489. .long 1030771879
  490. .long 1916669064
  491. .long 1072155675
  492. .long 660066805
  493. .long 1024797180
  494. .long 3829231700
  495. .long 1062745828
  496. .long 2884172442
  497. .long 1017445907
  498. .long 540874025
  499. .long 1055617650
  500. .long 4198409884
  501. .long 1011844330
  502. .long 2839315448
  503. .long 1046639136
  504. .long 4204424928
  505. .long 1000582120
  506. .long 1329339431
  507. .long 1038229673
  508. .long 1295478839
  509. .long 993391741
  510. .long 658191860
  511. .long 1024797180
  512. .long 3691886121
  513. .long 979325773
  514. .long 1966800710
  515. .long 1020436418
  516. .long 1882642597
  517. .long 977095991
  518. .long 2100977488
  519. .long 1012908661
  520. .long 1840335565
  521. .long 967470816
  522. .long 4198093645
  523. .long 1000582120
  524. .long 3307942521
  525. .long 957055414
  526. .long 2839123165
  527. .long 996851343
  528. .long 1387472776
  529. .long 952638316
  530. .long 2788761024
  531. .long 988712873
  532. .long 3005712498
  533. .long 944467026
  534. .long 3694676832
  535. .long 979325773
  536. .long 1326507024
  537. .long 934847846
  538. .long 221775557
  539. .long 970149340
  540. .long 1133527550
  541. .long 924162364
  542. .long 4286578688
  543. .long 1072693247
  544. .long 4286578688
  545. .long 1072693247
  546. .long 1845493760
  547. .long 1078222640
  548. .long 1845493760
  549. .long 1078222640
  550. .long 0
  551. .long 1127743488
  552. .long 0
  553. .long 1127743488
  554. .long 2908765579
  555. .long 3193641918
  556. .long 2908765579
  557. .long 3193641918
  558. .long 2308576600
  559. .long 1086551075
  560. .long 1646446368
  561. .long 1084878895
  562. .long 4278190080
  563. .long 4294967295
  564. .long 0
  565. .long 0
  566. .long 1413754136
  567. .long 1067000315
  568. .long 1413754136
  569. .long 1067000315
  570. .type static_const_table,@object
  571. .size static_const_table,1456
  572. .data
  573. .section .note.GNU-stack, ""
  574. # End