sinf_wmt.S 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  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 "sinf_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 sinf
  59. .text
  60. .align 16,0x90
  61. .globl sinf
  62. sinf:
  63. # parameter 1: 8 + %ebp
  64. ..B2.1:
  65. ..L3:
  66. ..B2.2:
  67. pushl %ebp
  68. movl %esp, %ebp
  69. subl $104, %esp
  70. movl %ebx, 36(%esp)
  71. call static_func
  72. movl %eax, %ebx
  73. movss 112(%esp), %xmm0
  74. movl 112(%esp), %ecx
  75. subl $16, %esp
  76. stmxcsr 4(%esp)
  77. movl 4(%esp), %eax
  78. andl $-24577, %eax
  79. cmpl %eax, 4(%esp)
  80. jne .L_2TAG_PACKET_0.0.2
  81. .L_2TAG_PACKET_1.0.2:
  82. movapd %xmm0, %xmm1
  83. cvtps2pd %xmm1, %xmm1
  84. movsd 1296(%ebx), %xmm2
  85. movl $2147483647, %eax
  86. movl $1241513983, %edx
  87. andl %ecx, %eax
  88. subl %eax, %edx
  89. subl $964689920, %eax
  90. orl %eax, %edx
  91. jl .L_2TAG_PACKET_2.0.2
  92. movsd 1312(%ebx), %xmm4
  93. mulsd %xmm1, %xmm2
  94. movsd 1328(%ebx), %xmm3
  95. movapd %xmm2, %xmm5
  96. addsd %xmm4, %xmm2
  97. movd %xmm2, %ecx
  98. subsd %xmm4, %xmm2
  99. mulsd %xmm3, %xmm1
  100. .L_2TAG_PACKET_3.0.2:
  101. movl $384, %eax
  102. movsd 1344(%ebx), %xmm4
  103. subsd %xmm2, %xmm5
  104. addl %ecx, %ecx
  105. movl %ecx, %edx
  106. shll $24, %ecx
  107. sarl $31, %ecx
  108. andl %edx, %eax
  109. addl %ecx, %edx
  110. xorl %ecx, %edx
  111. addsd %xmm5, %xmm1
  112. andl $254, %edx
  113. movsd (%ebx,%edx,8), %xmm3
  114. movsd 1352(%ebx), %xmm0
  115. pshufd $68, %xmm1, %xmm2
  116. mulsd %xmm1, %xmm1
  117. movsd 8(%ebx,%edx,8), %xmm5
  118. movl %eax, %ecx
  119. addl $128, %ecx
  120. andl $256, %ecx
  121. shll $23, %ecx
  122. mulsd %xmm2, %xmm3
  123. movd %ecx, %xmm2
  124. subsd %xmm1, %xmm0
  125. andl $256, %eax
  126. shll $23, %eax
  127. subsd %xmm1, %xmm4
  128. psllq $32, %xmm2
  129. movd %eax, %xmm1
  130. xorpd %xmm2, %xmm4
  131. mulsd %xmm5, %xmm0
  132. mulsd %xmm4, %xmm3
  133. psllq $32, %xmm1
  134. xorpd %xmm1, %xmm0
  135. addsd %xmm3, %xmm0
  136. movl 4(%esp), %eax
  137. andl $-24577, %eax
  138. cmpl 4(%esp), %eax
  139. je .L_2TAG_PACKET_4.0.2
  140. stmxcsr 8(%esp)
  141. movl 4(%esp), %eax
  142. andl $24576, %eax
  143. orl %eax, 8(%esp)
  144. ldmxcsr 8(%esp)
  145. .L_2TAG_PACKET_4.0.2:
  146. cvtpd2ps %xmm0, %xmm0
  147. movss %xmm0, (%esp)
  148. flds (%esp)
  149. jmp .L_2TAG_PACKET_5.0.2
  150. .L_2TAG_PACKET_2.0.2:
  151. andl $2147483647, %ecx
  152. cmpl $1040187392, %ecx
  153. ja .L_2TAG_PACKET_6.0.2
  154. cvtss2sd %xmm0, %xmm0
  155. mulsd 1280(%ebx), %xmm0
  156. movl 4(%esp), %eax
  157. andl $-24577, %eax
  158. cmpl 4(%esp), %eax
  159. je .L_2TAG_PACKET_7.0.2
  160. stmxcsr 8(%esp)
  161. movl 4(%esp), %eax
  162. andl $24576, %eax
  163. orl %eax, 8(%esp)
  164. ldmxcsr 8(%esp)
  165. .L_2TAG_PACKET_7.0.2:
  166. cvtsd2ss %xmm0, %xmm0
  167. movss %xmm0, (%esp)
  168. flds (%esp)
  169. jmp .L_2TAG_PACKET_5.0.2
  170. .L_2TAG_PACKET_0.0.2:
  171. movl 4(%esp), %eax
  172. andl $-24577, %eax
  173. movl %eax, 8(%esp)
  174. ldmxcsr 8(%esp)
  175. jmp .L_2TAG_PACKET_1.0.2
  176. .L_2TAG_PACKET_6.0.2:
  177. movd %xmm0, %eax
  178. andl $2139095040, %eax
  179. cmpl $2139095040, %eax
  180. je .L_2TAG_PACKET_8.0.2
  181. shrl $23, %ecx
  182. subl $142, %ecx
  183. andl $65528, %ecx
  184. movsd 1040(%ebx,%ecx,2), %xmm3
  185. movsd 1048(%ebx,%ecx,2), %xmm5
  186. movsd 1360(%ebx), %xmm2
  187. xorpd %xmm4, %xmm4
  188. movl $17208, %eax
  189. pinsrw $3, %eax, %xmm4
  190. andpd %xmm3, %xmm2
  191. psllq $40, %xmm3
  192. mulsd %xmm1, %xmm2
  193. mulsd %xmm1, %xmm3
  194. mulsd %xmm5, %xmm1
  195. movapd %xmm2, %xmm0
  196. addsd %xmm3, %xmm2
  197. movapd %xmm2, %xmm5
  198. subsd %xmm2, %xmm0
  199. addsd %xmm4, %xmm2
  200. addsd %xmm0, %xmm3
  201. movd %xmm2, %ecx
  202. subsd %xmm4, %xmm2
  203. addsd %xmm3, %xmm1
  204. jmp .L_2TAG_PACKET_3.0.2
  205. .L_2TAG_PACKET_8.0.2:
  206. movl 4(%esp), %eax
  207. andl $-24577, %eax
  208. cmpl 4(%esp), %eax
  209. je .L_2TAG_PACKET_9.0.2
  210. stmxcsr 8(%esp)
  211. movl 4(%esp), %eax
  212. andl $24576, %eax
  213. orl %eax, 8(%esp)
  214. ldmxcsr 8(%esp)
  215. .L_2TAG_PACKET_9.0.2:
  216. subss %xmm0, %xmm0
  217. movss %xmm0, (%esp)
  218. flds (%esp)
  219. .L_2TAG_PACKET_5.0.2:
  220. addl $16, %esp
  221. movl 36(%esp), %ebx
  222. movl %ebp, %esp
  223. popl %ebp
  224. ret
  225. ..B2.3:
  226. .align 16,0x90
  227. .type sinf,@function
  228. .size sinf,.-sinf
  229. .data
  230. # -- End sinf
  231. .section .rodata, "a"
  232. .align 16
  233. .align 16
  234. static_const_table:
  235. .long 3861233235
  236. .long 1053076412
  237. .long 0
  238. .long 0
  239. .long 3836476539
  240. .long 1053076004
  241. .long 1466910230
  242. .long 1054802127
  243. .long 522802171
  244. .long 1053074781
  245. .long 1693671239
  246. .long 1055850091
  247. .long 1381230637
  248. .long 1053072742
  249. .long 3419039295
  250. .long 1056390099
  251. .long 3096463640
  252. .long 1053069889
  253. .long 3054827835
  254. .long 1056896220
  255. .long 163641427
  256. .long 1053066225
  257. .long 3381119115
  258. .long 1057182863
  259. .long 2063766514
  260. .long 1053061750
  261. .long 544295963
  262. .long 1057434550
  263. .long 3193221610
  264. .long 1053056468
  265. .long 3297207428
  266. .long 1057685321
  267. .long 36665700
  268. .long 1053050383
  269. .long 2811721921
  270. .long 1057935027
  271. .long 4043704933
  272. .long 1053043496
  273. .long 2950925715
  274. .long 1058098350
  275. .long 2964703016
  276. .long 1053035814
  277. .long 2674059679
  278. .long 1058221912
  279. .long 3789723003
  280. .long 1053027340
  281. .long 879820317
  282. .long 1058344717
  283. .long 2671784286
  284. .long 1053018080
  285. .long 1979618421
  286. .long 1058466690
  287. .long 2093526290
  288. .long 1053008039
  289. .long 3945677176
  290. .long 1058587758
  291. .long 2262842797
  292. .long 1052997223
  293. .long 2796081240
  294. .long 1058707849
  295. .long 1097233945
  296. .long 1052985639
  297. .long 1373383079
  298. .long 1058826890
  299. .long 2796885356
  300. .long 1052973293
  301. .long 941816458
  302. .long 1058944809
  303. .long 646746141
  304. .long 1052960194
  305. .long 1372808103
  306. .long 1059061535
  307. .long 2767093429
  308. .long 1052946348
  309. .long 664370609
  310. .long 1059119379
  311. .long 2028347177
  312. .long 1052931765
  313. .long 1369913724
  314. .long 1059176444
  315. .long 1799297257
  316. .long 1052916453
  317. .long 3344537919
  318. .long 1059232808
  319. .long 3039475318
  320. .long 1052900421
  321. .long 2500108843
  322. .long 1059288438
  323. .long 4275292648
  324. .long 1052883679
  325. .long 944109265
  326. .long 1059343300
  327. .long 1575056534
  328. .long 1052866238
  329. .long 2771364651
  330. .long 1059397360
  331. .long 1407782048
  332. .long 1052848107
  333. .long 1264637048
  334. .long 1059450587
  335. .long 3436142021
  336. .long 1052829297
  337. .long 453708735
  338. .long 1059502948
  339. .long 488211833
  340. .long 1052809821
  341. .long 2313428161
  342. .long 1059554411
  343. .long 2993330
  344. .long 1052789689
  345. .long 2550341159
  346. .long 1059604946
  347. .long 755484892
  348. .long 1052767523
  349. .long 3567792879
  350. .long 1059654522
  351. .long 3348027550
  352. .long 1052724710
  353. .long 1659779181
  354. .long 1059703110
  355. .long 2580634211
  356. .long 1052680662
  357. .long 4268074870
  358. .long 1059750679
  359. .long 742418353
  360. .long 1052635405
  361. .long 4288148241
  362. .long 1059797202
  363. .long 3250975870
  364. .long 1052588965
  365. .long 1618129506
  366. .long 1059842651
  367. .long 1401987205
  368. .long 1052541372
  369. .long 3231311734
  370. .long 1059886997
  371. .long 2361617751
  372. .long 1052492653
  373. .long 1772140623
  374. .long 1059930215
  375. .long 3322544997
  376. .long 1052442838
  377. .long 1395127179
  378. .long 1059972278
  379. .long 17970311
  380. .long 1052391958
  381. .long 652328457
  382. .long 1060013161
  383. .long 3823857331
  384. .long 1052340041
  385. .long 1148832537
  386. .long 1060052839
  387. .long 3024934267
  388. .long 1052287121
  389. .long 3311502568
  390. .long 1060091288
  391. .long 1388494065
  392. .long 1052233229
  393. .long 1077921708
  394. .long 1060119411
  395. .long 902054988
  396. .long 1052178397
  397. .long 115411415
  398. .long 1060137373
  399. .long 1689375324
  400. .long 1052122658
  401. .long 3838419993
  402. .long 1060154686
  403. .long 1925003623
  404. .long 1052066046
  405. .long 1813501338
  406. .long 1060171342
  407. .long 2042383238
  408. .long 1052008595
  409. .long 2490283769
  410. .long 1060187329
  411. .long 350661592
  412. .long 1051950340
  413. .long 3162654741
  414. .long 1060202638
  415. .long 1535093810
  416. .long 1051891315
  417. .long 2878576948
  418. .long 1060217260
  419. .long 3681356269
  420. .long 1051831556
  421. .long 2463945945
  422. .long 1060231186
  423. .long 2478530408
  424. .long 1051771100
  425. .long 250409509
  426. .long 1060244408
  427. .long 3726787968
  428. .long 1051698237
  429. .long 687004205
  430. .long 1060256917
  431. .long 2082609563
  432. .long 1051574753
  433. .long 1475857720
  434. .long 1060268706
  435. .long 1666812989
  436. .long 1051450094
  437. .long 2181617495
  438. .long 1060279768
  439. .long 2865853451
  440. .long 1051324335
  441. .long 4249822861
  442. .long 1060290096
  443. .long 321119318
  444. .long 1051197553
  445. .long 2434209605
  446. .long 1060299685
  447. .long 4207787592
  448. .long 1051069822
  449. .long 1992674941
  450. .long 1060308528
  451. .long 1382541649
  452. .long 1050941222
  453. .long 1522351063
  454. .long 1060316620
  455. .long 2429158325
  456. .long 1050811828
  457. .long 1563320407
  458. .long 1060323956
  459. .long 2803392399
  460. .long 1050681719
  461. .long 316258674
  462. .long 1060330532
  463. .long 3917367244
  464. .long 1050428795
  465. .long 2243801771
  466. .long 1060336343
  467. .long 1991825541
  468. .long 1050166188
  469. .long 900924147
  470. .long 1060341387
  471. .long 624330694
  472. .long 1049902623
  473. .long 418831766
  474. .long 1060345660
  475. .long 3087185898
  476. .long 1049638258
  477. .long 2627920248
  478. .long 1060349159
  479. .long 3670374716
  480. .long 1049121932
  481. .long 2769466396
  482. .long 1060351883
  483. .long 3431923622
  484. .long 1048590963
  485. .long 2385983684
  486. .long 1060353830
  487. .long 918535681
  488. .long 1047542708
  489. .long 735532773
  490. .long 1060354999
  491. .long 0
  492. .long 0
  493. .long 3384690142
  494. .long 1060355388
  495. .long 1832810809
  496. .long 1078222640
  497. .long 4036845384
  498. .long 1030771879
  499. .long 1832810809
  500. .long 1078222640
  501. .long 4036845384
  502. .long 1030771879
  503. .long 1916669064
  504. .long 1072155675
  505. .long 660066805
  506. .long 1024797180
  507. .long 3829231700
  508. .long 1062745828
  509. .long 2884172442
  510. .long 1017445907
  511. .long 540874025
  512. .long 1055617650
  513. .long 4198409884
  514. .long 1011844330
  515. .long 2839315448
  516. .long 1046639136
  517. .long 4204424928
  518. .long 1000582120
  519. .long 1329339431
  520. .long 1038229673
  521. .long 1295478839
  522. .long 993391741
  523. .long 658191860
  524. .long 1024797180
  525. .long 3691886121
  526. .long 979325773
  527. .long 1966800710
  528. .long 1020436418
  529. .long 1882642597
  530. .long 977095991
  531. .long 2100977488
  532. .long 1012908661
  533. .long 1840335565
  534. .long 967470816
  535. .long 4198093645
  536. .long 1000582120
  537. .long 3307942521
  538. .long 957055414
  539. .long 2839123165
  540. .long 996851343
  541. .long 1387472776
  542. .long 952638316
  543. .long 2788761024
  544. .long 988712873
  545. .long 3005712498
  546. .long 944467026
  547. .long 3694676832
  548. .long 979325773
  549. .long 1326507024
  550. .long 934847846
  551. .long 221775557
  552. .long 970149340
  553. .long 1133527550
  554. .long 924162364
  555. .long 4286578688
  556. .long 1072693247
  557. .long 0
  558. .long 0
  559. .long 1845493760
  560. .long 1078222640
  561. .long 0
  562. .long 0
  563. .long 0
  564. .long 1127743488
  565. .long 0
  566. .long 0
  567. .long 2908765579
  568. .long 3193641918
  569. .long 0
  570. .long 0
  571. .long 2308576600
  572. .long 1086551075
  573. .long 1646446368
  574. .long 1084878895
  575. .long 4278190080
  576. .long 4294967295
  577. .long 0
  578. .long 0
  579. .type static_const_table,@object
  580. .size static_const_table,1376
  581. .data
  582. .section .note.GNU-stack, ""
  583. # End