expf_gen.S 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  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 "expf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin expf
  41. .text
  42. .align 16,0x90
  43. .globl expf
  44. expf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_expf.1:
  49. ..L2:
  50. pushq %rsi
  51. .cfi_def_cfa_offset 16
  52. ..B1.2:
  53. movss LOW_FLOAT_MASK(%rip), %xmm1
  54. movq log2e(%rip), %xmm3
  55. movq $0x4338000000000000, %rax
  56. movd %rax, %xmm4
  57. andps %xmm0, %xmm1
  58. movd %xmm0, %ecx
  59. cvtps2pd %xmm1, %xmm1
  60. andl $2147483647, %ecx
  61. subl $830472192, %ecx
  62. cmpl $288180587, %ecx
  63. jae .L_2TAG_PACKET_0.0.2
  64. movq c2(%rip), %xmm6
  65. mulsd %xmm1, %xmm3
  66. movq %xmm4, %xmm2
  67. addsd %xmm3, %xmm4
  68. movq 8+c2(%rip), %xmm5
  69. movd %xmm4, %eax
  70. subsd %xmm4, %xmm2
  71. movq $0x3ff0000000000000, %rdx
  72. movd %rdx, %xmm1
  73. lea Th(%rip), %r11
  74. xorpd %xmm7, %xmm7
  75. movl %eax, %ecx
  76. andl $255, %eax
  77. movq (%r11,%rax,8), %xmm0
  78. addsd %xmm2, %xmm3
  79. sarl $4, %ecx
  80. andl $-16, %ecx
  81. pinsrw $3, %ecx, %xmm7
  82. mulsd %xmm3, %xmm6
  83. mulsd %xmm3, %xmm5
  84. mulsd %xmm3, %xmm6
  85. addsd %xmm1, %xmm5
  86. paddd %xmm7, %xmm0
  87. addsd %xmm6, %xmm5
  88. mulsd %xmm5, %xmm0
  89. cvtpd2ps %xmm0, %xmm0
  90. jmp ..B1.5
  91. .L_2TAG_PACKET_0.0.2:
  92. addl $830472192, %ecx
  93. cmpl $830472192, %ecx
  94. jb .L_2TAG_PACKET_1.0.2
  95. cmpl $1124073472, %ecx
  96. jae .L_2TAG_PACKET_2.0.2
  97. movq c2(%rip), %xmm6
  98. mulsd %xmm1, %xmm3
  99. movq %xmm4, %xmm2
  100. xorpd %xmm1, %xmm1
  101. addsd %xmm3, %xmm4
  102. movq 8+c2(%rip), %xmm5
  103. movd %xmm4, %eax
  104. subsd %xmm4, %xmm2
  105. movl $16368, %edx
  106. pinsrw $3, %edx, %xmm1
  107. lea Th(%rip), %r11
  108. xorpd %xmm7, %xmm7
  109. movl %eax, %ecx
  110. andl $255, %eax
  111. movq (%r11,%rax,8), %xmm0
  112. addsd %xmm2, %xmm3
  113. sarl $4, %ecx
  114. andl $-16, %ecx
  115. pinsrw $3, %ecx, %xmm7
  116. mulsd %xmm3, %xmm6
  117. mulsd %xmm3, %xmm5
  118. mulsd %xmm3, %xmm6
  119. addsd %xmm1, %xmm5
  120. paddd %xmm7, %xmm0
  121. addsd %xmm6, %xmm5
  122. mulsd %xmm5, %xmm0
  123. cvtpd2ps %xmm0, %xmm0
  124. movd %xmm0, %eax
  125. cmpl $8388608, %eax
  126. jb .L_2TAG_PACKET_3.0.2
  127. cmpl $2139095040, %eax
  128. je .L_2TAG_PACKET_4.0.2
  129. jmp ..B1.5
  130. .L_2TAG_PACKET_2.0.2:
  131. movd %xmm0, %edx
  132. cmpl $2139095040, %ecx
  133. jae .L_2TAG_PACKET_5.0.2
  134. testl $-2147483648, %edx
  135. je .L_2TAG_PACKET_4.0.2
  136. movl $8388608, %eax
  137. movd %eax, %xmm0
  138. mulss %xmm0, %xmm0
  139. .L_2TAG_PACKET_3.0.2:
  140. movl $17, (%rsp)
  141. jmp .L_2TAG_PACKET_6.0.2
  142. .L_2TAG_PACKET_4.0.2:
  143. movl $2130706432, %eax
  144. movd %eax, %xmm0
  145. mulss %xmm0, %xmm0
  146. movl $16, (%rsp)
  147. jmp .L_2TAG_PACKET_6.0.2
  148. .L_2TAG_PACKET_1.0.2:
  149. movl $1065353216, %eax
  150. movd %eax, %xmm1
  151. addss %xmm1, %xmm0
  152. jmp ..B1.5
  153. .L_2TAG_PACKET_5.0.2:
  154. cmpl $-8388608, %edx
  155. je .L_2TAG_PACKET_7.0.2
  156. addss %xmm0, %xmm0
  157. jmp ..B1.5
  158. .L_2TAG_PACKET_7.0.2:
  159. xorps %xmm0, %xmm0
  160. jmp ..B1.5
  161. .L_2TAG_PACKET_6.0.2:
  162. movss %xmm0, 4(%rsp)
  163. ..B1.3:
  164. movss 4(%rsp), %xmm0
  165. .L_2TAG_PACKET_8.0.2:
  166. ..B1.5:
  167. popq %rcx
  168. .cfi_def_cfa_offset 8
  169. ret
  170. .align 16,0x90
  171. .cfi_endproc
  172. .type expf,@function
  173. .size expf,.-expf
  174. .data
  175. # -- End expf
  176. .section .rodata, "a"
  177. .align 16
  178. .align 16
  179. LOW_FLOAT_MASK:
  180. .long 4294967295
  181. .type LOW_FLOAT_MASK,@object
  182. .size LOW_FLOAT_MASK,4
  183. .space 4, 0x00 # pad
  184. .align 8
  185. log2e:
  186. .long 1697350398
  187. .long 1081546055
  188. .type log2e,@object
  189. .size log2e,8
  190. .align 8
  191. c2:
  192. .long 4286760334
  193. .long 1053736893
  194. .long 4277826245
  195. .long 1063661122
  196. .type c2,@object
  197. .size c2,16
  198. .align 8
  199. Th:
  200. .long 0
  201. .long 1072693248
  202. .long 4200250559
  203. .long 1072696090
  204. .long 2851812149
  205. .long 1072698941
  206. .long 339411585
  207. .long 1072701800
  208. .long 1048019041
  209. .long 1072704666
  210. .long 772914124
  211. .long 1072707540
  212. .long 3899555717
  213. .long 1072710421
  214. .long 1928746161
  215. .long 1072713311
  216. .long 3541402996
  217. .long 1072716208
  218. .long 238821257
  219. .long 1072719114
  220. .long 702412510
  221. .long 1072722027
  222. .long 728934454
  223. .long 1072724948
  224. .long 410360776
  225. .long 1072727877
  226. .long 4133881824
  227. .long 1072730813
  228. .long 3402036099
  229. .long 1072733758
  230. .long 2602514713
  231. .long 1072736711
  232. .long 1828292879
  233. .long 1072739672
  234. .long 1172597893
  235. .long 1072742641
  236. .long 728909815
  237. .long 1072745618
  238. .long 590962156
  239. .long 1072748603
  240. .long 852742562
  241. .long 1072751596
  242. .long 1608493509
  243. .long 1072754597
  244. .long 2952712987
  245. .long 1072757606
  246. .long 685187902
  247. .long 1072760624
  248. .long 3490863953
  249. .long 1072763649
  250. .long 2875075254
  251. .long 1072766683
  252. .long 3228316108
  253. .long 1072769725
  254. .long 351405227
  255. .long 1072772776
  256. .long 2930322912
  257. .long 1072775834
  258. .long 2471440686
  259. .long 1072778901
  260. .long 3366293073
  261. .long 1072781976
  262. .long 1416741826
  263. .long 1072785060
  264. .long 1014845819
  265. .long 1072788152
  266. .long 2257959872
  267. .long 1072791252
  268. .long 948735466
  269. .long 1072794361
  270. .long 1480023343
  271. .long 1072797478
  272. .long 3949972341
  273. .long 1072800603
  274. .long 4162030108
  275. .long 1072803737
  276. .long 2214878420
  277. .long 1072806880
  278. .long 2502433899
  279. .long 1072810031
  280. .long 828946858
  281. .long 1072813191
  282. .long 1588871207
  283. .long 1072816359
  284. .long 586995997
  285. .long 1072819536
  286. .long 2218315341
  287. .long 1072822721
  288. .long 2288159958
  289. .long 1072825915
  290. .long 897099801
  291. .long 1072829118
  292. .long 2440944790
  293. .long 1072832329
  294. .long 2725843665
  295. .long 1072835549
  296. .long 1853186616
  297. .long 1072838778
  298. .long 4219606026
  299. .long 1072842015
  300. .long 1337108031
  301. .long 1072845262
  302. .long 1897844341
  303. .long 1072848517
  304. .long 1709341917
  305. .long 1072851781
  306. .long 874372905
  307. .long 1072855054
  308. .long 3790955393
  309. .long 1072858335
  310. .long 1972484976
  311. .long 1072861626
  312. .long 4112506593
  313. .long 1072864925
  314. .long 1724976915
  315. .long 1072868234
  316. .long 3504003472
  317. .long 1072871551
  318. .long 964107055
  319. .long 1072874878
  320. .long 2799960843
  321. .long 1072878213
  322. .long 526652809
  323. .long 1072881558
  324. .long 2839424854
  325. .long 1072884911
  326. .long 1253935211
  327. .long 1072888274
  328. .long 171030293
  329. .long 1072891646
  330. .long 3991843581
  331. .long 1072895026
  332. .long 4232894513
  333. .long 1072898416
  334. .long 1000925746
  335. .long 1072901816
  336. .long 2992903935
  337. .long 1072905224
  338. .long 1726216749
  339. .long 1072908642
  340. .long 1603444721
  341. .long 1072912069
  342. .long 2732492859
  343. .long 1072915505
  344. .long 926591435
  345. .long 1072918951
  346. .long 589198666
  347. .long 1072922406
  348. .long 1829099622
  349. .long 1072925870
  350. .long 460407023
  351. .long 1072929344
  352. .long 887463927
  353. .long 1072932827
  354. .long 3219942644
  355. .long 1072936319
  356. .long 3272845541
  357. .long 1072939821
  358. .long 1156440435
  359. .long 1072943333
  360. .long 1276261410
  361. .long 1072946854
  362. .long 3743175029
  363. .long 1072950384
  364. .long 78413852
  365. .long 1072953925
  366. .long 3278348324
  367. .long 1072957474
  368. .long 569847338
  369. .long 1072961034
  370. .long 654919306
  371. .long 1072964603
  372. .long 3645941911
  373. .long 1072968181
  374. .long 1065662932
  375. .long 1072971770
  376. .long 1617004845
  377. .long 1072975368
  378. .long 1118294578
  379. .long 1072978976
  380. .long 3978100823
  381. .long 1072982593
  382. .long 1720398391
  383. .long 1072986221
  384. .long 3049340112
  385. .long 1072989858
  386. .long 3784486610
  387. .long 1072993505
  388. .long 4040676318
  389. .long 1072997162
  390. .long 3933059031
  391. .long 1073000829
  392. .long 3577096743
  393. .long 1073004506
  394. .long 3088564500
  395. .long 1073008193
  396. .long 2583551245
  397. .long 1073011890
  398. .long 2178460671
  399. .long 1073015597
  400. .long 1990012071
  401. .long 1073019314
  402. .long 2135241198
  403. .long 1073023041
  404. .long 2731501122
  405. .long 1073026778
  406. .long 3896463087
  407. .long 1073030525
  408. .long 1453150082
  409. .long 1073034283
  410. .long 4109806887
  411. .long 1073038050
  412. .long 3395129871
  413. .long 1073041828
  414. .long 3723038930
  415. .long 1073045616
  416. .long 917841882
  417. .long 1073049415
  418. .long 3689071823
  419. .long 1073053223
  420. .long 3566716925
  421. .long 1073057042
  422. .long 671025100
  423. .long 1073060872
  424. .long 3712504873
  425. .long 1073064711
  426. .long 4222122499
  427. .long 1073068561
  428. .long 2321106615
  429. .long 1073072422
  430. .long 2425981843
  431. .long 1073076293
  432. .long 363667784
  433. .long 1073080175
  434. .long 551349105
  435. .long 1073084067
  436. .long 3111574537
  437. .long 1073087969
  438. .long 3872257780
  439. .long 1073091882
  440. .long 2956612997
  441. .long 1073095806
  442. .long 488188413
  443. .long 1073099741
  444. .long 885834528
  445. .long 1073103686
  446. .long 4273770423
  447. .long 1073107641
  448. .long 2186617381
  449. .long 1073111608
  450. .long 3339203574
  451. .long 1073115585
  452. .long 3561793907
  453. .long 1073119573
  454. .long 2979960120
  455. .long 1073123572
  456. .long 1719614413
  457. .long 1073127582
  458. .long 4201977662
  459. .long 1073131602
  460. .long 1963711167
  461. .long 1073135634
  462. .long 3721688645
  463. .long 1073139676
  464. .long 1013258799
  465. .long 1073143730
  466. .long 2555984613
  467. .long 1073147794
  468. .long 4182873220
  469. .long 1073151869
  470. .long 1727278727
  471. .long 1073155956
  472. .long 3907805044
  473. .long 1073160053
  474. .long 2263535754
  475. .long 1073164162
  476. .long 1218806132
  477. .long 1073168282
  478. .long 903334909
  479. .long 1073172413
  480. .long 1447192521
  481. .long 1073176555
  482. .long 2980802057
  483. .long 1073180708
  484. .long 1339972927
  485. .long 1073184873
  486. .long 950803702
  487. .long 1073189049
  488. .long 1944781191
  489. .long 1073193236
  490. .long 158781403
  491. .long 1073197435
  492. .long 19972402
  493. .long 1073201645
  494. .long 1660913392
  495. .long 1073205866
  496. .long 919555682
  497. .long 1073210099
  498. .long 2224145553
  499. .long 1073214343
  500. .long 1413356050
  501. .long 1073218599
  502. .long 2916157145
  503. .long 1073222866
  504. .long 2571947539
  505. .long 1073227145
  506. .long 515457527
  507. .long 1073231436
  508. .long 1176749997
  509. .long 1073235738
  510. .long 396319521
  511. .long 1073240052
  512. .long 2604962541
  513. .long 1073244377
  514. .long 3643909174
  515. .long 1073248714
  516. .long 3649726105
  517. .long 1073253063
  518. .long 2759350287
  519. .long 1073257424
  520. .long 1110089947
  521. .long 1073261797
  522. .long 3134592888
  523. .long 1073266181
  524. .long 380978316
  525. .long 1073270578
  526. .long 1577608921
  527. .long 1073274986
  528. .long 2568320822
  529. .long 1073279406
  530. .long 3492293770
  531. .long 1073283838
  532. .long 194117574
  533. .long 1073288283
  534. .long 1403662306
  535. .long 1073292739
  536. .long 2966275557
  537. .long 1073297207
  538. .long 727685349
  539. .long 1073301688
  540. .long 3418903055
  541. .long 1073306180
  542. .long 2591453363
  543. .long 1073310685
  544. .long 2682146384
  545. .long 1073315202
  546. .long 3833209506
  547. .long 1073319731
  548. .long 1892288442
  549. .long 1073324273
  550. .long 1297350157
  551. .long 1073328827
  552. .long 2191782032
  553. .long 1073333393
  554. .long 424392917
  555. .long 1073337972
  556. .long 434316067
  557. .long 1073342563
  558. .long 2366108318
  559. .long 1073347166
  560. .long 2069751141
  561. .long 1073351782
  562. .long 3985553595
  563. .long 1073356410
  564. .long 3964284211
  565. .long 1073361051
  566. .long 2152073944
  567. .long 1073365705
  568. .long 2990417245
  569. .long 1073370371
  570. .long 2331271250
  571. .long 1073375050
  572. .long 321958744
  573. .long 1073379742
  574. .long 1405169241
  575. .long 1073384446
  576. .long 1434058175
  577. .long 1073389163
  578. .long 557149882
  579. .long 1073393893
  580. .long 3218338682
  581. .long 1073398635
  582. .long 977020788
  583. .long 1073403391
  584. .long 2572866477
  585. .long 1073408159
  586. .long 3861050111
  587. .long 1073412940
  588. .long 697153126
  589. .long 1073417735
  590. .long 1822067026
  591. .long 1073422542
  592. .long 3092190715
  593. .long 1073427362
  594. .long 364333489
  595. .long 1073432196
  596. .long 2380618042
  597. .long 1073437042
  598. .long 703710506
  599. .long 1073441902
  600. .long 4076559943
  601. .long 1073446774
  602. .long 4062661092
  603. .long 1073451660
  604. .long 815859274
  605. .long 1073456560
  606. .long 3080351519
  607. .long 1073461472
  608. .long 2420883922
  609. .long 1073466398
  610. .long 3287523847
  611. .long 1073471337
  612. .long 1540824585
  613. .long 1073476290
  614. .long 1631695677
  615. .long 1073481256
  616. .long 3716502172
  617. .long 1073486235
  618. .long 3657065772
  619. .long 1073491228
  620. .long 1610600570
  621. .long 1073496235
  622. .long 2029714210
  623. .long 1073501255
  624. .long 777507147
  625. .long 1073506289
  626. .long 2307442995
  627. .long 1073511336
  628. .long 2483480501
  629. .long 1073516397
  630. .long 1464976603
  631. .long 1073521472
  632. .long 3706687593
  633. .long 1073526560
  634. .long 778901109
  635. .long 1073531663
  636. .long 1432208378
  637. .long 1073536779
  638. .long 1532734324
  639. .long 1073541909
  640. .long 1242007932
  641. .long 1073547053
  642. .long 721996136
  643. .long 1073552211
  644. .long 135105010
  645. .long 1073557383
  646. .long 3939148246
  647. .long 1073562568
  648. .long 3707479175
  649. .long 1073567768
  650. .long 3898795731
  651. .long 1073572982
  652. .long 382305176
  653. .long 1073578211
  654. .long 1912561781
  655. .long 1073583453
  656. .long 64696965
  657. .long 1073588710
  658. .long 3594158869
  659. .long 1073593980
  660. .long 4076975200
  661. .long 1073599265
  662. .long 1679558232
  663. .long 1073604565
  664. .long 863738719
  665. .long 1073609879
  666. .long 1796832535
  667. .long 1073615207
  668. .long 351641897
  669. .long 1073620550
  670. .long 991358482
  671. .long 1073625907
  672. .long 3884662774
  673. .long 1073631278
  674. .long 610758006
  675. .long 1073636665
  676. .long 4224142467
  677. .long 1073642065
  678. .long 2009970496
  679. .long 1073647481
  680. .long 2728693978
  681. .long 1073652911
  682. .long 2256325230
  683. .long 1073658356
  684. .long 764307441
  685. .long 1073663816
  686. .long 2719515920
  687. .long 1073669290
  688. .long 3999357479
  689. .long 1073674779
  690. .long 481706282
  691. .long 1073680284
  692. .long 929806999
  693. .long 1073685803
  694. .long 1222472308
  695. .long 1073691337
  696. .long 1533953344
  697. .long 1073696886
  698. .long 2038973688
  699. .long 1073702450
  700. .long 2912730644
  701. .long 1073708029
  702. .long 35929225
  703. .long 1073713624
  704. .long 2174652632
  705. .long 1073719233
  706. .long 915592468
  707. .long 1073724858
  708. .long 730821105
  709. .long 1073730498
  710. .long 1797923801
  711. .long 1073736153
  712. .type Th,@object
  713. .size Th,2048
  714. .data
  715. .section .note.GNU-stack, ""
  716. // -- Begin DWARF2 SEGMENT .eh_frame
  717. .section .eh_frame,"a",@progbits
  718. .eh_frame_seg:
  719. .align 1
  720. # End