exp_wmt.S 13 KB

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