sinf_gen.S 12 KB

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