exp10_wmt.S 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  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 "exp10_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 exp10
  59. .text
  60. .align 16,0x90
  61. .globl exp10
  62. exp10:
  63. # parameter 1: 8 + %ebp
  64. ..B2.1:
  65. ..L3:
  66. ..B2.2:
  67. pushl %ebp
  68. movl %esp, %ebp
  69. subl $120, %esp
  70. movl %ebx, 64(%esp)
  71. call static_func
  72. movl %eax, %ebx
  73. movsd 128(%esp), %xmm0
  74. unpcklpd %xmm0, %xmm0
  75. movapd 64(%ebx), %xmm1
  76. movapd 48(%ebx), %xmm6
  77. movapd 80(%ebx), %xmm2
  78. movapd 96(%ebx), %xmm3
  79. pextrw $3, %xmm0, %eax
  80. andl $32767, %eax
  81. movl $16500, %edx
  82. subl %eax, %edx
  83. subl $15472, %eax
  84. orl %eax, %edx
  85. cmpl $-2147483648, %edx
  86. jae .L_2TAG_PACKET_0.0.3
  87. mulpd %xmm0, %xmm1
  88. addpd %xmm6, %xmm1
  89. movapd %xmm1, %xmm7
  90. subpd %xmm6, %xmm1
  91. mulpd %xmm1, %xmm2
  92. movapd 112(%ebx), %xmm4
  93. mulpd %xmm1, %xmm3
  94. movapd 1168(%ebx), %xmm1
  95. movapd 128(%ebx), %xmm5
  96. subpd %xmm2, %xmm0
  97. movd %xmm7, %eax
  98. movl %eax, %ecx
  99. andl $63, %ecx
  100. shll $4, %ecx
  101. sarl $6, %eax
  102. movl %eax, %edx
  103. subpd %xmm3, %xmm0
  104. movapd 144(%ebx,%ecx), %xmm2
  105. mulpd %xmm0, %xmm4
  106. mulpd %xmm0, %xmm1
  107. mulpd %xmm0, %xmm0
  108. addpd %xmm4, %xmm5
  109. mulsd %xmm0, %xmm0
  110. addsd %xmm2, %xmm1
  111. unpckhpd %xmm2, %xmm2
  112. movdqa 16(%ebx), %xmm6
  113. pand %xmm6, %xmm7
  114. movdqa 32(%ebx), %xmm6
  115. paddq %xmm6, %xmm7
  116. psllq $46, %xmm7
  117. mulpd %xmm5, %xmm0
  118. addsd %xmm0, %xmm1
  119. orpd %xmm7, %xmm2
  120. unpckhpd %xmm0, %xmm0
  121. addsd %xmm1, %xmm0
  122. addl $894, %edx
  123. cmpl $1916, %edx
  124. ja .L_2TAG_PACKET_1.0.3
  125. mulsd %xmm2, %xmm0
  126. addsd %xmm2, %xmm0
  127. jmp .L_2TAG_PACKET_2.0.3
  128. .L_2TAG_PACKET_1.0.3:
  129. fstcw 24(%esp)
  130. movzwl 24(%esp), %edx
  131. orl $768, %edx
  132. movw %dx, 28(%esp)
  133. fldcw 28(%esp)
  134. movl %eax, %edx
  135. sarl $1, %eax
  136. subl %eax, %edx
  137. movdqa (%ebx), %xmm6
  138. pandn %xmm2, %xmm6
  139. addl $1023, %eax
  140. movd %eax, %xmm3
  141. psllq $52, %xmm3
  142. orpd %xmm3, %xmm6
  143. addl $1023, %edx
  144. movd %edx, %xmm4
  145. psllq $52, %xmm4
  146. movsd %xmm0, 8(%esp)
  147. fldl 8(%esp)
  148. movsd %xmm6, 16(%esp)
  149. fldl 16(%esp)
  150. fmul %st, %st(1)
  151. faddp %st, %st(1)
  152. movsd %xmm4, 8(%esp)
  153. fldl 8(%esp)
  154. fmulp %st, %st(1)
  155. fstpl 8(%esp)
  156. movsd 8(%esp), %xmm0
  157. fldcw 24(%esp)
  158. pextrw $3, %xmm0, %ecx
  159. andl $32752, %ecx
  160. cmpl $32752, %ecx
  161. jae .L_2TAG_PACKET_3.0.3
  162. movl $265, %edx
  163. cmpl $0, %ecx
  164. je .L_2TAG_PACKET_4.0.3
  165. jmp .L_2TAG_PACKET_2.0.3
  166. cmpl $-2147483648, %ecx
  167. jb .L_2TAG_PACKET_3.0.3
  168. jmp .L_2TAG_PACKET_2.0.3
  169. .L_2TAG_PACKET_3.0.3:
  170. movl $166, %edx
  171. .L_2TAG_PACKET_4.0.3:
  172. movsd %xmm0, (%esp)
  173. movsd 128(%esp), %xmm0
  174. subl $32, %esp
  175. lea 128(%esp), %eax
  176. movl %eax, (%esp)
  177. lea 128(%esp), %eax
  178. movl %eax, 4(%esp)
  179. lea 32(%esp), %eax
  180. movl %eax, 8(%esp)
  181. movl %edx, %eax
  182. movl %eax, 12(%esp)
  183. call __libm_error_support
  184. addl $32, %esp
  185. fldl (%esp)
  186. jmp .L_2TAG_PACKET_5.0.3
  187. .L_2TAG_PACKET_6.0.3:
  188. cmpl $2146435072, %eax
  189. jae .L_2TAG_PACKET_7.0.3
  190. movl 132(%esp), %eax
  191. cmpl $-2147483648, %eax
  192. jae .L_2TAG_PACKET_8.0.3
  193. movsd 1208(%ebx), %xmm0
  194. mulsd %xmm0, %xmm0
  195. movl $166, %edx
  196. jmp .L_2TAG_PACKET_4.0.3
  197. .L_2TAG_PACKET_8.0.3:
  198. movsd 1216(%ebx), %xmm0
  199. mulsd %xmm0, %xmm0
  200. movl $265, %edx
  201. jmp .L_2TAG_PACKET_4.0.3
  202. .L_2TAG_PACKET_7.0.3:
  203. movl 128(%esp), %edx
  204. cmpl $2146435072, %eax
  205. ja .L_2TAG_PACKET_9.0.3
  206. cmpl $0, %edx
  207. jne .L_2TAG_PACKET_9.0.3
  208. movl 132(%esp), %eax
  209. cmpl $2146435072, %eax
  210. jne .L_2TAG_PACKET_10.0.3
  211. movsd 1192(%ebx), %xmm0
  212. jmp .L_2TAG_PACKET_2.0.3
  213. .L_2TAG_PACKET_10.0.3:
  214. movsd 1200(%ebx), %xmm0
  215. jmp .L_2TAG_PACKET_2.0.3
  216. .L_2TAG_PACKET_9.0.3:
  217. movsd 128(%esp), %xmm0
  218. addsd %xmm0, %xmm0
  219. jmp .L_2TAG_PACKET_2.0.3
  220. .L_2TAG_PACKET_0.0.3:
  221. movl 132(%esp), %eax
  222. andl $2147483647, %eax
  223. cmpl $1081344000, %eax
  224. jae .L_2TAG_PACKET_6.0.3
  225. movsd 128(%esp), %xmm0
  226. addsd 1184(%ebx), %xmm0
  227. jmp .L_2TAG_PACKET_2.0.3
  228. .L_2TAG_PACKET_2.0.3:
  229. movsd %xmm0, 48(%esp)
  230. fldl 48(%esp)
  231. .L_2TAG_PACKET_5.0.3:
  232. movl 64(%esp), %ebx
  233. movl %ebp, %esp
  234. popl %ebp
  235. ret
  236. ..B2.3:
  237. .align 16,0x90
  238. .type exp10,@function
  239. .size exp10,.-exp10
  240. .data
  241. # -- End exp10
  242. .text
  243. # -- Begin __libm_error_support
  244. .text
  245. .align 16,0x90
  246. __libm_error_support:
  247. # parameter 1: 4 + %esp
  248. # parameter 2: 8 + %esp
  249. # parameter 3: 12 + %esp
  250. # parameter 4: 16 + %esp
  251. ..B3.1:
  252. ..L4:
  253. ret
  254. .align 16,0x90
  255. .type __libm_error_support,@function
  256. .size __libm_error_support,.-__libm_error_support
  257. .data
  258. # -- End __libm_error_support
  259. .section .rodata, "a"
  260. .align 16
  261. .align 16
  262. static_const_table:
  263. .long 0
  264. .long 4293918720
  265. .long 0
  266. .long 4293918720
  267. .long 4294967232
  268. .long 0
  269. .long 4294967232
  270. .long 0
  271. .long 65472
  272. .long 0
  273. .long 65472
  274. .long 0
  275. .long 0
  276. .long 1127743488
  277. .long 0
  278. .long 1127743488
  279. .long 158966641
  280. .long 1080726351
  281. .long 158966641
  282. .long 1080726351
  283. .long 1352531968
  284. .long 1064518675
  285. .long 1352531968
  286. .long 1064518675
  287. .long 824119987
  288. .long 1027055599
  289. .long 824119987
  290. .long 1027055599
  291. .long 3549356600
  292. .long 1071727285
  293. .long 2447043358
  294. .long 1073760005
  295. .long 2974317904
  296. .long 1072872823
  297. .long 3342652200
  298. .long 1074083108
  299. .long 0
  300. .long 0
  301. .long 0
  302. .long 0
  303. .long 235107661
  304. .long 1018002367
  305. .long 1048019040
  306. .long 11418
  307. .long 896005651
  308. .long 1015861842
  309. .long 3541402996
  310. .long 22960
  311. .long 1642514529
  312. .long 1012987726
  313. .long 410360776
  314. .long 34629
  315. .long 1568897900
  316. .long 1016568486
  317. .long 1828292879
  318. .long 46424
  319. .long 1882168529
  320. .long 1010744893
  321. .long 852742562
  322. .long 58348
  323. .long 509852888
  324. .long 1017336174
  325. .long 3490863952
  326. .long 70401
  327. .long 653277307
  328. .long 1017431380
  329. .long 2930322911
  330. .long 82586
  331. .long 1649557430
  332. .long 1017729363
  333. .long 1014845818
  334. .long 94904
  335. .long 1058231231
  336. .long 1015777676
  337. .long 3949972341
  338. .long 107355
  339. .long 1044000607
  340. .long 1016786167
  341. .long 828946858
  342. .long 119943
  343. .long 1151779725
  344. .long 1015705409
  345. .long 2288159958
  346. .long 132667
  347. .long 3819481236
  348. .long 1016499965
  349. .long 1853186616
  350. .long 145530
  351. .long 2552227826
  352. .long 1015039787
  353. .long 1709341917
  354. .long 158533
  355. .long 1829350193
  356. .long 1015216097
  357. .long 4112506593
  358. .long 171677
  359. .long 1913391795
  360. .long 1015756674
  361. .long 2799960843
  362. .long 184965
  363. .long 1303423926
  364. .long 1015238005
  365. .long 171030293
  366. .long 198398
  367. .long 1574172746
  368. .long 1016061241
  369. .long 2992903935
  370. .long 211976
  371. .long 3424156969
  372. .long 1017196428
  373. .long 926591434
  374. .long 225703
  375. .long 1938513547
  376. .long 1017631273
  377. .long 887463926
  378. .long 239579
  379. .long 2804567149
  380. .long 1015390024
  381. .long 1276261410
  382. .long 253606
  383. .long 631083525
  384. .long 1017690182
  385. .long 569847337
  386. .long 267786
  387. .long 1623370770
  388. .long 1011049453
  389. .long 1617004845
  390. .long 282120
  391. .long 3667985273
  392. .long 1013894369
  393. .long 3049340112
  394. .long 296610
  395. .long 3145379760
  396. .long 1014403278
  397. .long 3577096743
  398. .long 311258
  399. .long 2603100681
  400. .long 1017152460
  401. .long 1990012070
  402. .long 326066
  403. .long 3249202951
  404. .long 1017448880
  405. .long 1453150081
  406. .long 341035
  407. .long 419288974
  408. .long 1016280325
  409. .long 917841882
  410. .long 356167
  411. .long 3793507337
  412. .long 1016095713
  413. .long 3712504873
  414. .long 371463
  415. .long 728023093
  416. .long 1016345318
  417. .long 363667784
  418. .long 386927
  419. .long 2582678538
  420. .long 1017123460
  421. .long 2956612996
  422. .long 402558
  423. .long 7592966
  424. .long 1016721543
  425. .long 2186617380
  426. .long 418360
  427. .long 228611441
  428. .long 1016696141
  429. .long 1719614412
  430. .long 434334
  431. .long 2261665670
  432. .long 1017457593
  433. .long 1013258798
  434. .long 450482
  435. .long 544148907
  436. .long 1017323666
  437. .long 3907805043
  438. .long 466805
  439. .long 2383914918
  440. .long 1017143586
  441. .long 1447192520
  442. .long 483307
  443. .long 1176412038
  444. .long 1017267372
  445. .long 1944781190
  446. .long 499988
  447. .long 2882956373
  448. .long 1013312481
  449. .long 919555682
  450. .long 516851
  451. .long 3154077648
  452. .long 1016528543
  453. .long 2571947538
  454. .long 533897
  455. .long 348651999
  456. .long 1016405780
  457. .long 2604962540
  458. .long 551129
  459. .long 3253791412
  460. .long 1015920431
  461. .long 1110089947
  462. .long 568549
  463. .long 1509121860
  464. .long 1014756995
  465. .long 2568320822
  466. .long 586158
  467. .long 2617649212
  468. .long 1017340090
  469. .long 2966275556
  470. .long 603959
  471. .long 553214634
  472. .long 1016457425
  473. .long 2682146383
  474. .long 621954
  475. .long 730975783
  476. .long 1014083580
  477. .long 2191782032
  478. .long 640145
  479. .long 1486499517
  480. .long 1016818996
  481. .long 2069751140
  482. .long 658534
  483. .long 2595788928
  484. .long 1016407932
  485. .long 2990417244
  486. .long 677123
  487. .long 1853053619
  488. .long 1015310724
  489. .long 1434058175
  490. .long 695915
  491. .long 2462790535
  492. .long 1015814775
  493. .long 2572866477
  494. .long 714911
  495. .long 3693944214
  496. .long 1017259110
  497. .long 3092190714
  498. .long 734114
  499. .long 2979333550
  500. .long 1017188654
  501. .long 4076559942
  502. .long 753526
  503. .long 174054861
  504. .long 1014300631
  505. .long 2420883922
  506. .long 773150
  507. .long 816778419
  508. .long 1014197934
  509. .long 3716502172
  510. .long 792987
  511. .long 3507050924
  512. .long 1015341199
  513. .long 777507147
  514. .long 813041
  515. .long 1821514088
  516. .long 1013410604
  517. .long 3706687593
  518. .long 833312
  519. .long 920623539
  520. .long 1016295433
  521. .long 1242007931
  522. .long 853805
  523. .long 2789017511
  524. .long 1014276997
  525. .long 3707479175
  526. .long 874520
  527. .long 3586233004
  528. .long 1015962192
  529. .long 64696965
  530. .long 895462
  531. .long 474650514
  532. .long 1016642419
  533. .long 863738718
  534. .long 916631
  535. .long 1614448851
  536. .long 1014281732
  537. .long 3884662774
  538. .long 938030
  539. .long 2450082086
  540. .long 1016164135
  541. .long 2728693977
  542. .long 959663
  543. .long 1101668360
  544. .long 1015989180
  545. .long 3999357479
  546. .long 981531
  547. .long 835814894
  548. .long 1015702697
  549. .long 1533953344
  550. .long 1003638
  551. .long 1301400989
  552. .long 1014466875
  553. .long 2174652632
  554. .long 1025985
  555. .long 3149223190
  556. .long 1073900465
  557. .long 0
  558. .long 1072693248
  559. .long 0
  560. .long 1072693248
  561. .long 0
  562. .long 2146435072
  563. .long 0
  564. .long 0
  565. .long 4294967295
  566. .long 2146435071
  567. .long 0
  568. .long 1048576
  569. .type static_const_table,@object
  570. .size static_const_table,1224
  571. .data
  572. .section .note.GNU-stack, ""
  573. # End
  574. .globl pow10
  575. .equ pow10, exp10