libm_log_k64.S 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  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 "libm_log_k64.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin __libm_log_k64
  41. .text
  42. .align 16,0x90
  43. .globl __libm_log_k64
  44. __libm_log_k64:
  45. # parameter 1: %xmm0
  46. # parameter 2: %xmm1
  47. # parameter 3: %rdi
  48. ..B1.1:
  49. .cfi_startproc
  50. ..___tag_value___libm_log_k64.1:
  51. ..L2:
  52. movaps %xmm1, %xmm6
  53. movsd %xmm0, -24(%rsp)
  54. movzwl -18(%rsp), %esi
  55. andl $32752, %esi
  56. shrl $4, %esi
  57. cmpl $2047, %esi
  58. jge ..B1.12
  59. ..B1.2:
  60. testl %esi, %esi
  61. jne ..B1.6
  62. ..B1.3:
  63. testl $1048575, -20(%rsp)
  64. jne ..B1.6
  65. ..B1.4:
  66. cmpl $0, -24(%rsp)
  67. jne ..B1.6
  68. ..B1.5:
  69. lea 1640+_libm_log_k64_table(%rip), %rax
  70. lea 1624+_libm_log_k64_table(%rip), %rcx
  71. movq (%rax), %rdx
  72. movq (%rcx), %rsi
  73. movq %rdx, (%rdi)
  74. movq %rsi, 8(%rdi)
  75. ret
  76. ..B1.6:
  77. testb $-128, -17(%rsp)
  78. jne ..B1.11
  79. ..B1.7:
  80. movsd -24(%rsp), %xmm4
  81. testl %esi, %esi
  82. jne ..B1.9
  83. ..B1.8:
  84. lea 1656+_libm_log_k64_table(%rip), %rax
  85. pxor %xmm9, %xmm9
  86. movsd (%rax), %xmm0
  87. mulsd %xmm0, %xmm4
  88. mulsd %xmm0, %xmm6
  89. movsd %xmm4, -24(%rsp)
  90. movzwl -18(%rsp), %esi
  91. andl $32752, %esi
  92. shrl $4, %esi
  93. addl $-1076, %esi
  94. cvtsi2sd %esi, %xmm9
  95. jmp ..B1.10
  96. ..B1.9:
  97. addl $-1023, %esi
  98. pxor %xmm9, %xmm9
  99. cvtsi2sd %esi, %xmm9
  100. ..B1.10:
  101. lea 1616+_libm_log_k64_table(%rip), %rcx
  102. negl %esi
  103. addl $1023, %esi
  104. lea 1664+_libm_log_k64_table(%rip), %rax
  105. andl $2047, %esi
  106. lea _libm_log_k64_table(%rip), %r11
  107. shll $4, %esi
  108. lea 1672+_libm_log_k64_table(%rip), %rdx
  109. movzwl 6(%rcx), %r8d
  110. movsd (%rcx), %xmm5
  111. andl $-32753, %r8d
  112. movsd %xmm5, -16(%rsp)
  113. orl %esi, %r8d
  114. movw %r8w, -10(%rsp)
  115. lea 1680+_libm_log_k64_table(%rip), %rsi
  116. movsd (%rax), %xmm7
  117. lea 1688+_libm_log_k64_table(%rip), %rax
  118. movsd -16(%rsp), %xmm1
  119. lea 1600+_libm_log_k64_table(%rip), %rcx
  120. movsd (%rdx), %xmm0
  121. lea 1608+_libm_log_k64_table(%rip), %rdx
  122. movsd (%rsi), %xmm2
  123. lea 1592+_libm_log_k64_table(%rip), %rsi
  124. movsd (%rax), %xmm3
  125. lea 1584+_libm_log_k64_table(%rip), %r8
  126. movaps %xmm3, %xmm8
  127. lea 1560+_libm_log_k64_table(%rip), %rax
  128. mulsd %xmm1, %xmm4
  129. mulsd %xmm1, %xmm6
  130. mulsd %xmm9, %xmm7
  131. addsd %xmm4, %xmm8
  132. mulsd %xmm0, %xmm9
  133. addsd %xmm4, %xmm2
  134. subsd %xmm3, %xmm8
  135. movsd %xmm2, -8(%rsp)
  136. subsd %xmm8, %xmm4
  137. movl -8(%rsp), %r9d
  138. addsd %xmm4, %xmm6
  139. andl $127, %r9d
  140. movsd %xmm8, -24(%rsp)
  141. movsd (%rdx), %xmm4
  142. lea (%r9,%r9,2), %r10d
  143. lea 1576+_libm_log_k64_table(%rip), %r9
  144. movsd (%r11,%r10,8), %xmm10
  145. mulsd %xmm10, %xmm8
  146. addsd 8(%r11,%r10,8), %xmm7
  147. addsd 16(%r11,%r10,8), %xmm9
  148. mulsd %xmm6, %xmm10
  149. subsd %xmm5, %xmm8
  150. movaps %xmm8, %xmm6
  151. lea 1568+_libm_log_k64_table(%rip), %r11
  152. addsd %xmm10, %xmm6
  153. addsd %xmm9, %xmm10
  154. addsd %xmm7, %xmm8
  155. mulsd %xmm6, %xmm4
  156. movsd %xmm8, (%rdi)
  157. addsd (%rcx), %xmm4
  158. mulsd %xmm6, %xmm4
  159. addsd (%rsi), %xmm4
  160. mulsd %xmm6, %xmm4
  161. addsd (%r8), %xmm4
  162. mulsd %xmm6, %xmm4
  163. addsd (%r9), %xmm4
  164. mulsd %xmm6, %xmm4
  165. addsd (%r11), %xmm4
  166. mulsd %xmm6, %xmm4
  167. mulsd %xmm6, %xmm6
  168. addsd (%rax), %xmm4
  169. mulsd %xmm4, %xmm6
  170. addsd %xmm6, %xmm10
  171. movsd %xmm10, 8(%rdi)
  172. ret
  173. ..B1.11:
  174. lea 1648+_libm_log_k64_table(%rip), %rax
  175. movq (%rax), %rdx
  176. movq %rdx, (%rdi)
  177. movq %rdx, 8(%rdi)
  178. ret
  179. ..B1.12:
  180. lea 1632+_libm_log_k64_table(%rip), %rax
  181. lea 1624+_libm_log_k64_table(%rip), %rdx
  182. movsd -24(%rsp), %xmm0
  183. movq (%rdx), %rcx
  184. movq %rcx, 8(%rdi)
  185. addsd (%rax), %xmm0
  186. movsd %xmm0, (%rdi)
  187. ..B1.13:
  188. ret
  189. .align 16,0x90
  190. .cfi_endproc
  191. .type __libm_log_k64,@function
  192. .size __libm_log_k64,.-__libm_log_k64
  193. .data
  194. # -- End __libm_log_k64
  195. .section .rodata, "a"
  196. .align 16
  197. .align 16
  198. _libm_log_k64_table:
  199. .long 0
  200. .long 1072693248
  201. .long 0
  202. .long 0
  203. .long 0
  204. .long 0
  205. .long 0
  206. .long 1072660480
  207. .long 1486880768
  208. .long 1066410070
  209. .long 1813744607
  210. .long 3179892593
  211. .long 0
  212. .long 1072629760
  213. .long 377487360
  214. .long 1067416219
  215. .long 919019713
  216. .long 3179241129
  217. .long 0
  218. .long 1072599040
  219. .long 1513619456
  220. .long 1067944025
  221. .long 874573033
  222. .long 3178512940
  223. .long 0
  224. .long 1072570368
  225. .long 3221749760
  226. .long 1068427825
  227. .long 4181665006
  228. .long 3177478212
  229. .long 0
  230. .long 1072541696
  231. .long 4162322432
  232. .long 1068708823
  233. .long 627020255
  234. .long 1028629941
  235. .long 0
  236. .long 1072513024
  237. .long 183107584
  238. .long 1068957907
  239. .long 2376703469
  240. .long 1030233118
  241. .long 0
  242. .long 1072486400
  243. .long 1053425664
  244. .long 1069192557
  245. .long 696277142
  246. .long 1030474863
  247. .long 0
  248. .long 1072459776
  249. .long 3996123136
  250. .long 1069430535
  251. .long 2630798680
  252. .long 1028792016
  253. .long 0
  254. .long 1072435200
  255. .long 3452764160
  256. .long 1069600382
  257. .long 624954044
  258. .long 3177101741
  259. .long 0
  260. .long 1072409600
  261. .long 207650816
  262. .long 1069717971
  263. .long 3272735636
  264. .long 3175176575
  265. .long 0
  266. .long 1072386048
  267. .long 2647228416
  268. .long 1069827627
  269. .long 3594228712
  270. .long 1029303785
  271. .long 0
  272. .long 1072362496
  273. .long 2712010752
  274. .long 1069938736
  275. .long 3653242769
  276. .long 3176839013
  277. .long 0
  278. .long 1072338944
  279. .long 374439936
  280. .long 1070051337
  281. .long 4072775574
  282. .long 3176577495
  283. .long 0
  284. .long 1072316416
  285. .long 3707174912
  286. .long 1070160474
  287. .long 1486946159
  288. .long 1023930920
  289. .long 0
  290. .long 1072294912
  291. .long 1443954688
  292. .long 1070265993
  293. .long 293532967
  294. .long 3176278277
  295. .long 0
  296. .long 1072273408
  297. .long 127762432
  298. .long 1070372856
  299. .long 3404145447
  300. .long 3177023955
  301. .long 0
  302. .long 1072252928
  303. .long 2053832704
  304. .long 1070475911
  305. .long 1575076358
  306. .long 1029048544
  307. .long 0
  308. .long 1072232448
  309. .long 3194093568
  310. .long 1070580248
  311. .long 1864169120
  312. .long 1026866084
  313. .long 0
  314. .long 1072212992
  315. .long 3917201408
  316. .long 1070638340
  317. .long 2362145246
  318. .long 3175606197
  319. .long 0
  320. .long 1072193536
  321. .long 3417112576
  322. .long 1070689116
  323. .long 70087871
  324. .long 3174183577
  325. .long 0
  326. .long 1072175104
  327. .long 4226777088
  328. .long 1070737793
  329. .long 1620410586
  330. .long 3174700065
  331. .long 0
  332. .long 1072156672
  333. .long 3168870400
  334. .long 1070787042
  335. .long 311238082
  336. .long 1025781772
  337. .long 0
  338. .long 1072139264
  339. .long 2150580224
  340. .long 1070834092
  341. .long 1664262457
  342. .long 3175299224
  343. .long 0
  344. .long 1072120832
  345. .long 4095672320
  346. .long 1070884491
  347. .long 1657121015
  348. .long 3174674199
  349. .long 0
  350. .long 1072104448
  351. .long 2595577856
  352. .long 1070929805
  353. .long 2014006823
  354. .long 3175423830
  355. .long 0
  356. .long 1072087040
  357. .long 3747176448
  358. .long 1070978493
  359. .long 144991708
  360. .long 3171552042
  361. .long 0
  362. .long 1072070656
  363. .long 1050435584
  364. .long 1071024840
  365. .long 3386227432
  366. .long 1027876916
  367. .long 0
  368. .long 1072055296
  369. .long 255516672
  370. .long 1071068760
  371. .long 2637594316
  372. .long 1028049573
  373. .long 0
  374. .long 1072038912
  375. .long 1640783872
  376. .long 1071116120
  377. .long 893247007
  378. .long 1028452162
  379. .long 0
  380. .long 1072023552
  381. .long 2940411904
  382. .long 1071161011
  383. .long 813240633
  384. .long 1027664048
  385. .long 0
  386. .long 1072009216
  387. .long 882917376
  388. .long 1071203348
  389. .long 2376597551
  390. .long 3175828767
  391. .long 0
  392. .long 1071993856
  393. .long 213966848
  394. .long 1071249188
  395. .long 2977204125
  396. .long 1028350609
  397. .long 0
  398. .long 1071979520
  399. .long 2921504768
  400. .long 1071292428
  401. .long 523218347
  402. .long 1028007004
  403. .long 0
  404. .long 1071965184
  405. .long 3186655232
  406. .long 1071336119
  407. .long 2352907891
  408. .long 1026967097
  409. .long 0
  410. .long 1071951872
  411. .long 2653364224
  412. .long 1071377101
  413. .long 2453418583
  414. .long 3174349512
  415. .long 0
  416. .long 1071938560
  417. .long 3759783936
  418. .long 1071418487
  419. .long 3685870403
  420. .long 3175415611
  421. .long 0
  422. .long 1071925248
  423. .long 2468364288
  424. .long 1071460286
  425. .long 1578908842
  426. .long 3175510517
  427. .long 0
  428. .long 1071911936
  429. .long 81903616
  430. .long 1071502506
  431. .long 770710269
  432. .long 1026742353
  433. .long 0
  434. .long 1071899648
  435. .long 2799321088
  436. .long 1071541858
  437. .long 3822266185
  438. .long 1028434427
  439. .long 0
  440. .long 1071886336
  441. .long 2142265344
  442. .long 1071584911
  443. .long 175901806
  444. .long 3173871540
  445. .long 0
  446. .long 1071874048
  447. .long 2944024576
  448. .long 1071625048
  449. .long 2747360403
  450. .long 1027672159
  451. .long 0
  452. .long 1071862784
  453. .long 3434301440
  454. .long 1071653426
  455. .long 4194662196
  456. .long 3173893003
  457. .long 0
  458. .long 1071850496
  459. .long 1547755520
  460. .long 1071673870
  461. .long 4248764681
  462. .long 3172759087
  463. .long 0
  464. .long 1071839232
  465. .long 4246986752
  466. .long 1071692786
  467. .long 2840205638
  468. .long 3174430911
  469. .long 0
  470. .long 1071826944
  471. .long 3418390528
  472. .long 1071713619
  473. .long 3041880823
  474. .long 1025440860
  475. .long 0
  476. .long 1071816704
  477. .long 4143093760
  478. .long 1071731139
  479. .long 2727587401
  480. .long 3173965207
  481. .long 0
  482. .long 1071805440
  483. .long 3121326080
  484. .long 1071750582
  485. .long 3173887692
  486. .long 3174190163
  487. .long 0
  488. .long 1071794176
  489. .long 1852893184
  490. .long 1071770207
  491. .long 3951060252
  492. .long 1027348295
  493. .long 0
  494. .long 1071783936
  495. .long 3636379648
  496. .long 1071788208
  497. .long 1684924001
  498. .long 3174777086
  499. .long 0
  500. .long 1071773696
  501. .long 516505600
  502. .long 1071806366
  503. .long 429181199
  504. .long 3173211033
  505. .long 0
  506. .long 1071763456
  507. .long 4186185728
  508. .long 1071824681
  509. .long 2044904577
  510. .long 3174967132
  511. .long 0
  512. .long 1071753216
  513. .long 877596672
  514. .long 1071843159
  515. .long 1396318105
  516. .long 3173959727
  517. .long 0
  518. .long 1071742976
  519. .long 2912784384
  520. .long 1071861800
  521. .long 448136789
  522. .long 3174814192
  523. .long 0
  524. .long 1071733760
  525. .long 3722825728
  526. .long 1071878720
  527. .long 714165913
  528. .long 3173439560
  529. .long 0
  530. .long 1071723520
  531. .long 2522374144
  532. .long 1071897682
  533. .long 3227240353
  534. .long 3173394323
  535. .long 0
  536. .long 1071714304
  537. .long 4165410816
  538. .long 1071914895
  539. .long 1365684961
  540. .long 3174365060
  541. .long 0
  542. .long 1071705088
  543. .long 3477135360
  544. .long 1071932251
  545. .long 368482985
  546. .long 3174140821
  547. .long 0
  548. .long 1071695872
  549. .long 2079455232
  550. .long 1071949752
  551. .long 1320576317
  552. .long 1026822714
  553. .long 0
  554. .long 1071687680
  555. .long 851795968
  556. .long 1071965432
  557. .long 3702467026
  558. .long 1025224125
  559. .long 0
  560. .long 1071678464
  561. .long 647743488
  562. .long 1071983213
  563. .long 772992109
  564. .long 3174038459
  565. .long 0
  566. .long 1071670272
  567. .long 26537984
  568. .long 1071999146
  569. .long 2360214276
  570. .long 3174861275
  571. .long 0
  572. .long 1071661056
  573. .long 1547061248
  574. .long 1072017216
  575. .long 2886781435
  576. .long 1026423395
  577. .long 0
  578. .long 1071652864
  579. .long 2854492160
  580. .long 1072033410
  581. .long 215631550
  582. .long 1025638968
  583. .long 0
  584. .long 1071644672
  585. .long 4277811200
  586. .long 1072049730
  587. .long 2479318832
  588. .long 1026487127
  589. .long 0
  590. .long 3219128320
  591. .long 1431655955
  592. .long 1070945621
  593. .long 610
  594. .long 3218079744
  595. .long 2545118337
  596. .long 1070176665
  597. .long 1378399119
  598. .long 3217380693
  599. .long 612435357
  600. .long 1069697472
  601. .long 94536557
  602. .long 3217031348
  603. .long 0
  604. .long 1072693248
  605. .long 0
  606. .long 0
  607. .long 0
  608. .long 2146435072
  609. .long 0
  610. .long 4293918720
  611. .long 0
  612. .long 4294443008
  613. .long 0
  614. .long 1128267776
  615. .long 4277811200
  616. .long 1072049730
  617. .long 2479318832
  618. .long 1026487127
  619. .long 64
  620. .long 1120927744
  621. .long 0
  622. .long 1094713344
  623. .type _libm_log_k64_table,@object
  624. .size _libm_log_k64_table,1696
  625. .data
  626. .section .note.GNU-stack, ""
  627. // -- Begin DWARF2 SEGMENT .eh_frame
  628. .section .eh_frame,"a",@progbits
  629. .eh_frame_seg:
  630. .align 1
  631. # End