log2f_wmt.S 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745
  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 "log2f_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 log2f
  59. .text
  60. .align 16,0x90
  61. .globl log2f
  62. log2f:
  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, 40(%esp)
  71. call static_func
  72. movl %eax, %ebx
  73. movss 112(%esp), %xmm0
  74. movl $16384, %ecx
  75. movd %ecx, %xmm4
  76. movl $-32768, %eax
  77. movd %eax, %xmm2
  78. xorpd %xmm3, %xmm3
  79. movl $16368, %edx
  80. pinsrw $3, %edx, %xmm3
  81. xorpd %xmm5, %xmm5
  82. .L_2TAG_PACKET_0.0.3:
  83. movd %xmm0, %edx
  84. rcpss %xmm0, %xmm1
  85. movsd 2080(%ebx), %xmm7
  86. pshuflw $68, %xmm0, %xmm0
  87. paddd %xmm4, %xmm1
  88. subl $8388608, %edx
  89. cmpl $2113929216, %edx
  90. jae .L_2TAG_PACKET_1.0.3
  91. andps %xmm1, %xmm2
  92. cvtps2pd %xmm0, %xmm0
  93. cvtps2pd %xmm2, %xmm1
  94. movd %xmm2, %eax
  95. andl $-8388608, %edx
  96. subl $1056964608, %edx
  97. movl %edx, %ecx
  98. sarl $23, %edx
  99. cvtsi2sdl %edx, %xmm6
  100. mulsd %xmm1, %xmm0
  101. subl $1056964608, %ecx
  102. addl %ecx, %eax
  103. shrl $12, %eax
  104. movsd (%ebx,%eax), %xmm4
  105. subsd %xmm3, %xmm0
  106. movsd 2088(%ebx), %xmm2
  107. movsd 2096(%ebx), %xmm1
  108. mulsd %xmm0, %xmm7
  109. addsd %xmm0, %xmm5
  110. mulsd %xmm0, %xmm0
  111. addsd %xmm4, %xmm6
  112. addsd %xmm7, %xmm1
  113. mulsd %xmm2, %xmm5
  114. mulsd %xmm1, %xmm0
  115. mulsd %xmm2, %xmm0
  116. addsd %xmm6, %xmm5
  117. addsd %xmm0, %xmm5
  118. cvtpd2ps %xmm5, %xmm0
  119. jmp .L_2TAG_PACKET_2.0.3
  120. .L_2TAG_PACKET_1.0.3:
  121. addl $8388608, %edx
  122. js .L_2TAG_PACKET_3.0.3
  123. cmpl $8388608, %edx
  124. jb .L_2TAG_PACKET_4.0.3
  125. cmpl $2139095040, %edx
  126. jae .L_2TAG_PACKET_5.0.3
  127. movl $528482304, %eax
  128. movd %eax, %xmm6
  129. movsd 2064(%ebx), %xmm5
  130. mulss %xmm6, %xmm0
  131. jmp .L_2TAG_PACKET_0.0.3
  132. .L_2TAG_PACKET_5.0.3:
  133. addss %xmm0, %xmm0
  134. jmp .L_2TAG_PACKET_2.0.3
  135. .L_2TAG_PACKET_3.0.3:
  136. cmpl $-2147483648, %edx
  137. je .L_2TAG_PACKET_6.0.3
  138. addl %edx, %edx
  139. cmpl $-16777216, %edx
  140. ja .L_2TAG_PACKET_5.0.3
  141. xorps %xmm0, %xmm0
  142. divss %xmm0, %xmm0
  143. movl $173, %edx
  144. .L_2TAG_PACKET_7.0.3:
  145. movss %xmm0, (%esp)
  146. movss 112(%esp), %xmm0
  147. subl $32, %esp
  148. lea 112(%esp), %eax
  149. movl %eax, (%esp)
  150. lea 112(%esp), %eax
  151. movl %eax, 4(%esp)
  152. lea 32(%esp), %eax
  153. movl %eax, 8(%esp)
  154. movl %edx, %eax
  155. movl %eax, 12(%esp)
  156. call __libm_error_support
  157. addl $32, %esp
  158. flds (%esp)
  159. jmp .L_2TAG_PACKET_8.0.3
  160. .L_2TAG_PACKET_4.0.3:
  161. cmpl $0, %edx
  162. je .L_2TAG_PACKET_6.0.3
  163. movl $1602224128, %eax
  164. movd %eax, %xmm7
  165. mulss %xmm7, %xmm0
  166. movsd 2072(%ebx), %xmm5
  167. jmp .L_2TAG_PACKET_0.0.3
  168. .L_2TAG_PACKET_6.0.3:
  169. movl $-1082130432, %eax
  170. movd %eax, %xmm0
  171. xorps %xmm1, %xmm1
  172. divss %xmm1, %xmm0
  173. movl $172, %edx
  174. jmp .L_2TAG_PACKET_7.0.3
  175. .L_2TAG_PACKET_2.0.3:
  176. movss %xmm0, 24(%esp)
  177. flds 24(%esp)
  178. .L_2TAG_PACKET_8.0.3:
  179. movl 40(%esp), %ebx
  180. movl %ebp, %esp
  181. popl %ebp
  182. ret
  183. ..B2.3:
  184. .align 16,0x90
  185. .type log2f,@function
  186. .size log2f,.-log2f
  187. .data
  188. # -- End log2f
  189. .text
  190. # -- Begin __libm_error_support
  191. .text
  192. .align 16,0x90
  193. __libm_error_support:
  194. # parameter 1: 4 + %esp
  195. # parameter 2: 8 + %esp
  196. # parameter 3: 12 + %esp
  197. # parameter 4: 16 + %esp
  198. ..B3.1:
  199. ..L4:
  200. ret
  201. .align 16,0x90
  202. .type __libm_error_support,@function
  203. .size __libm_error_support,.-__libm_error_support
  204. .data
  205. # -- End __libm_error_support
  206. .section .rodata, "a"
  207. .align 16
  208. .align 16
  209. static_const_table:
  210. .long 0
  211. .long 1072693248
  212. .long 1998916263
  213. .long 1072681452
  214. .long 3173270495
  215. .long 1072669702
  216. .long 2000860199
  217. .long 1072657998
  218. .long 1272047984
  219. .long 1072646339
  220. .long 3794524037
  221. .long 1072634724
  222. .long 3803106495
  223. .long 1072623154
  224. .long 4139350621
  225. .long 1072611628
  226. .long 3366391848
  227. .long 1072600146
  228. .long 63662823
  229. .long 1072588708
  230. .long 1416582474
  231. .long 1072577312
  232. .long 1741478598
  233. .long 1072565959
  234. .long 3960187916
  235. .long 1072554648
  236. .long 2419954872
  237. .long 1072543380
  238. .long 73073096
  239. .long 1072532154
  240. .long 4181694601
  241. .long 1072520968
  242. .long 547806622
  243. .long 1072509825
  244. .long 757656496
  245. .long 1072498722
  246. .long 3526834581
  247. .long 1072487659
  248. .long 3290001261
  249. .long 1072476637
  250. .long 3085585033
  251. .long 1072465655
  252. .long 1670680485
  253. .long 1072454713
  254. .long 2110786378
  255. .long 1072443810
  256. .long 3189678060
  257. .long 1072432946
  258. .long 3704185224
  259. .long 1072422121
  260. .long 2464005749
  261. .long 1072411335
  262. .long 2586490145
  263. .long 1072400587
  264. .long 2906527345
  265. .long 1072389877
  266. .long 2271335546
  267. .long 1072379205
  268. .long 3835256167
  269. .long 1072368570
  270. .long 2174681645
  271. .long 1072357973
  272. .long 467757278
  273. .long 1072347413
  274. .long 1904282206
  275. .long 1072336889
  276. .long 1095613242
  277. .long 1072326402
  278. .long 1254375265
  279. .long 1072315951
  280. .long 1309403273
  281. .long 1072305536
  282. .long 200556308
  283. .long 1072295157
  284. .long 1173533989
  285. .long 1072284813
  286. .long 3189793736
  287. .long 1072274504
  288. .long 926405093
  289. .long 1072264231
  290. .long 1955775707
  291. .long 1072253992
  292. .long 975706757
  293. .long 1072243788
  294. .long 1284091012
  295. .long 1072233618
  296. .long 1893874830
  297. .long 1072223482
  298. .long 1827891621
  299. .long 1072213380
  300. .long 118730237
  301. .long 1072203312
  302. .long 103572845
  303. .long 1072193277
  304. .long 834133047
  305. .long 1072183275
  306. .long 1371497981
  307. .long 1072173306
  308. .long 786005198
  309. .long 1072163370
  310. .long 2452088827
  311. .long 1072153466
  312. .long 1163258553
  313. .long 1072143595
  314. .long 311851589
  315. .long 1072133756
  316. .long 3298982784
  317. .long 1072123948
  318. .long 649529288
  319. .long 1072114173
  320. .long 76790007
  321. .long 1072104429
  322. .long 712572003
  323. .long 1072094716
  324. .long 1697017023
  325. .long 1072085034
  326. .long 2178495145
  327. .long 1072075383
  328. .long 1313500133
  329. .long 1072065763
  330. .long 2561513738
  331. .long 1072056173
  332. .long 800002435
  333. .long 1072046614
  334. .long 3799154139
  335. .long 1072037084
  336. .long 2157008926
  337. .long 1072027585
  338. .long 3659100731
  339. .long 1072018115
  340. .long 3213591115
  341. .long 1072008675
  342. .long 31044775
  343. .long 1071999265
  344. .long 1919304603
  345. .long 1071989883
  346. .long 3808564412
  347. .long 1071980530
  348. .long 636181417
  349. .long 1071971207
  350. .long 231490093
  351. .long 1071961912
  352. .long 1840879012
  353. .long 1071952645
  354. .long 422672785
  355. .long 1071943407
  356. .long 3826917183
  357. .long 1071934196
  358. .long 2730525283
  359. .long 1071925014
  360. .long 701967006
  361. .long 1071915860
  362. .long 1316286934
  363. .long 1071906733
  364. .long 3860057913
  365. .long 1071897633
  366. .long 3331303149
  367. .long 1071888561
  368. .long 3324321351
  369. .long 1071879516
  370. .long 3144709244
  371. .long 1071870498
  372. .long 2104254386
  373. .long 1071861507
  374. .long 3815829096
  375. .long 1071852542
  376. .long 3308416273
  377. .long 1071843604
  378. .long 4206907352
  379. .long 1071834692
  380. .long 1552162950
  381. .long 1071825807
  382. .long 3275780188
  383. .long 1071816947
  384. .long 135253478
  385. .long 1071808114
  386. .long 73645744
  387. .long 1071799306
  388. .long 2449718467
  389. .long 1071790523
  390. .long 2332833768
  391. .long 1071781766
  392. .long 3387792013
  393. .long 1071773034
  394. .long 694899285
  395. .long 1071764328
  396. .long 2224741414
  397. .long 1071755646
  398. .long 3068318658
  399. .long 1071746989
  400. .long 2616854210
  401. .long 1071738357
  402. .long 266767097
  403. .long 1071729750
  404. .long 4009547812
  405. .long 1071721166
  406. .long 366929114
  407. .long 1071712608
  408. .long 1635468980
  409. .long 1071704073
  410. .long 2936821143
  411. .long 1071695562
  412. .long 3692515865
  413. .long 1071687075
  414. .long 3328937712
  415. .long 1071678612
  416. .long 1277271392
  417. .long 1071670173
  418. .long 1268415641
  419. .long 1071661757
  420. .long 2742995963
  421. .long 1071653364
  422. .long 851312691
  423. .long 1071644995
  424. .long 2971350593
  425. .long 1071628625
  426. .long 3905998082
  427. .long 1071611978
  428. .long 3424346780
  429. .long 1071595377
  430. .long 453058438
  431. .long 1071578822
  432. .long 2517515273
  433. .long 1071562311
  434. .long 4266887860
  435. .long 1071545845
  436. .long 358942687
  437. .long 1071529425
  438. .long 2639818283
  439. .long 1071513048
  440. .long 1489227762
  441. .long 1071496716
  442. .long 180106617
  443. .long 1071480428
  444. .long 1993621493
  445. .long 1071464183
  446. .long 1629147435
  447. .long 1071447982
  448. .long 2384050109
  449. .long 1071431824
  450. .long 3268698085
  451. .long 1071415709
  452. .long 3301345460
  453. .long 1071399637
  454. .long 1508048308
  455. .long 1071383608
  456. .long 1217549516
  457. .long 1071367621
  458. .long 1471262833
  459. .long 1071351676
  460. .long 1318159864
  461. .long 1071335773
  462. .long 4109658129
  463. .long 1071319911
  464. .long 319673664
  465. .long 1071304092
  466. .long 1904282206
  467. .long 1071288313
  468. .long 3646937343
  469. .long 1071272575
  470. .long 338264500
  471. .long 1071256879
  472. .long 3955855899
  473. .long 1071241222
  474. .long 714524339
  475. .long 1071225607
  476. .long 2605838414
  477. .long 1071210031
  478. .long 153410875
  479. .long 1071194496
  480. .long 1067533806
  481. .long 1071179000
  482. .long 180337971
  483. .long 1071163544
  484. .long 920560604
  485. .long 1071148127
  486. .long 2428575699
  487. .long 1071132749
  488. .long 3851294344
  489. .long 1071117410
  490. .long 47131309
  491. .long 1071102111
  492. .long 3060776247
  493. .long 1071086849
  494. .long 3468423567
  495. .long 1071071626
  496. .long 442479858
  497. .long 1071056442
  498. .long 1751501034
  499. .long 1071041295
  500. .long 2285293781
  501. .long 1071026186
  502. .long 1234723448
  503. .long 1071011115
  504. .long 2091653508
  505. .long 1070996081
  506. .long 4058951182
  507. .long 1070981084
  508. .long 2050428397
  509. .long 1070966125
  510. .long 3870652645
  511. .long 1070951202
  512. .long 150118312
  513. .long 1070936317
  514. .long 2999895448
  515. .long 1070921467
  516. .long 3061900616
  517. .long 1070906654
  518. .long 3868579735
  519. .long 1070891877
  520. .long 368016775
  521. .long 1070877137
  522. .long 398716067
  523. .long 1070862432
  524. .long 3214712303
  525. .long 1070847762
  526. .long 3780484976
  527. .long 1070833128
  528. .long 1360840737
  529. .long 1070818530
  530. .long 3815829096
  531. .long 1070803966
  532. .long 1830887666
  533. .long 1070789438
  534. .long 3276530156
  535. .long 1070774944
  536. .long 3143525540
  537. .long 1070760485
  538. .long 722718060
  539. .long 1070746061
  540. .long 3899945937
  541. .long 1070731670
  542. .long 3386189576
  543. .long 1070717314
  544. .long 2782295200
  545. .long 1070702992
  546. .long 1399058777
  547. .long 1070688704
  548. .long 2847114277
  549. .long 1070674449
  550. .long 2151986001
  551. .long 1070660228
  552. .long 2933912513
  553. .long 1070646040
  554. .long 227932728
  555. .long 1070631886
  556. .long 1958678199
  557. .long 1070617764
  558. .long 3170525653
  559. .long 1070603675
  560. .long 2119878685
  561. .long 1070583143
  562. .long 2835758645
  563. .long 1070555096
  564. .long 2899780145
  565. .long 1070527114
  566. .long 1026954088
  567. .long 1070499197
  568. .long 236130878
  569. .long 1070471344
  570. .long 3554951635
  571. .long 1070443554
  572. .long 1134865757
  573. .long 1070415829
  574. .long 315822346
  575. .long 1070388167
  576. .long 4151355006
  577. .long 1070360567
  578. .long 2818569420
  579. .long 1070333031
  580. .long 3682837470
  581. .long 1070305557
  582. .long 1232950086
  583. .long 1070278146
  584. .long 2850845811
  585. .long 1070250796
  586. .long 3041732649
  587. .long 1070223508
  588. .long 613883718
  589. .long 1070196282
  590. .long 2973531841
  591. .long 1070169116
  592. .long 354993871
  593. .long 1070142012
  594. .long 180337971
  595. .long 1070114968
  596. .long 1289509543
  597. .long 1070087984
  598. .long 2530196301
  599. .long 1070061060
  600. .long 2757759525
  601. .long 1070034196
  602. .long 835166085
  603. .long 1070007392
  604. .long 4222855792
  605. .long 1069980646
  606. .long 3208871137
  607. .long 1069953960
  608. .long 973562605
  609. .long 1069927333
  610. .long 704621746
  611. .long 1069900764
  612. .long 1302049555
  613. .long 1069874253
  614. .long 1673060149
  615. .long 1069847800
  616. .long 732017834
  617. .long 1069821405
  618. .long 1695342161
  619. .long 1069795067
  620. .long 3491511767
  621. .long 1069768786
  622. .long 761003473
  623. .long 1069742563
  624. .long 1036101224
  625. .long 1069716396
  626. .long 3266000023
  627. .long 1069690285
  628. .long 2111714268
  629. .long 1069664231
  630. .long 830921328
  631. .long 1069638233
  632. .long 2687969258
  633. .long 1069612290
  634. .long 2363885129
  635. .long 1069586403
  636. .long 3136187749
  637. .long 1069560571
  638. .long 3692892517
  639. .long 1069522069
  640. .long 3570253499
  641. .long 1069470625
  642. .long 3908238678
  643. .long 1069419290
  644. .long 2723302721
  645. .long 1069368064
  646. .long 2339434949
  647. .long 1069316946
  648. .long 798118803
  649. .long 1069265936
  650. .long 448161615
  651. .long 1069215033
  652. .long 3650623571
  653. .long 1069164236
  654. .long 4188780490
  655. .long 1069113546
  656. .long 152924137
  657. .long 1069062963
  658. .long 2530196301
  659. .long 1069012484
  660. .long 844750970
  661. .long 1068962111
  662. .long 1812361559
  663. .long 1068911842
  664. .long 3570519722
  665. .long 1068861677
  666. .long 4268273545
  667. .long 1068811616
  668. .long 2066132126
  669. .long 1068761659
  670. .long 3725905754
  671. .long 1068711804
  672. .long 3135775963
  673. .long 1068662052
  674. .long 2785039517
  675. .long 1068612402
  676. .long 879114973
  677. .long 1068562854
  678. .long 4224353950
  679. .long 1068513406
  680. .long 621328030
  681. .long 1068429177
  682. .long 522185727
  683. .long 1068330685
  684. .long 354069551
  685. .long 1068232393
  686. .long 930992923
  687. .long 1068134300
  688. .long 3088087314
  689. .long 1068036405
  690. .long 3386464469
  691. .long 1067938708
  692. .long 2702982241
  693. .long 1067841208
  694. .long 1935110224
  695. .long 1067743904
  696. .long 2000764363
  697. .long 1067646795
  698. .long 3838143225
  699. .long 1067549880
  700. .long 4110598596
  701. .long 1067453159
  702. .long 3297851897
  703. .long 1067262895
  704. .long 3492345695
  705. .long 1067070223
  706. .long 2250192214
  707. .long 1066877934
  708. .long 1645815860
  709. .long 1066686026
  710. .long 3792308805
  711. .long 1066494497
  712. .long 207414749
  713. .long 1066204903
  714. .long 2718921511
  715. .long 1065823355
  716. .long 2393819184
  717. .long 1065442558
  718. .long 3228205918
  719. .long 1064771801
  720. .long 2754502619
  721. .long 1063721742
  722. .long 0
  723. .long 2147483648
  724. .long 0
  725. .long 2147483648
  726. .long 4277811695
  727. .long 1078341186
  728. .long 4277811695
  729. .long 3225824834
  730. .long 1431655765
  731. .long 1070945621
  732. .long 1697350398
  733. .long 1073157447
  734. .long 1107282704
  735. .long 3219128321
  736. .long 354870542
  737. .long 1071369083
  738. .type static_const_table,@object
  739. .size static_const_table,2112
  740. .data
  741. .section .note.GNU-stack, ""
  742. # End