expl.S 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  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 "expl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin expl
  41. .text
  42. .align 16,0x90
  43. .globl expl
  44. expl:
  45. # parameter 1: 96 + %rsp
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_expl.1:
  49. ..L2:
  50. subq $88, %rsp
  51. .cfi_def_cfa_offset 96
  52. xorb %dil, %dil
  53. ..B1.2:
  54. fnstcw 82(%rsp)
  55. ..B1.3:
  56. movb 105(%rsp), %al
  57. lea _ranges(%rip), %r8
  58. andb $-128, %al
  59. shrb $7, %al
  60. movzbl %al, %esi
  61. movq %rsi, %rcx
  62. shlq $4, %rcx
  63. movzwl 104(%rsp), %eax
  64. andl $32767, %eax
  65. movzwl 8(%rcx,%r8), %edx
  66. andl $32767, %edx
  67. cmpl %edx, %eax
  68. jl ..B1.8
  69. ..B1.4:
  70. jne ..B1.31
  71. ..B1.5:
  72. movl 100(%rsp), %edx
  73. cmpl 4(%rcx,%r8), %edx
  74. jb ..B1.8
  75. ..B1.6:
  76. jne ..B1.31
  77. ..B1.7:
  78. movl 96(%rsp), %edx
  79. cmpl (%rcx,%r8), %edx
  80. jae ..B1.31
  81. ..B1.8:
  82. movzwl 82(%rsp), %r8d
  83. cmpl $16363, %eax
  84. jge ..B1.19
  85. ..B1.9:
  86. movl %r8d, %edx
  87. andl $768, %edx
  88. cmpl $768, %edx
  89. je ..B1.13
  90. ..B1.10:
  91. orl $-64768, %r8d
  92. movw %r8w, 80(%rsp)
  93. ..B1.11:
  94. fldcw 80(%rsp)
  95. ..B1.12:
  96. movzwl 104(%rsp), %eax
  97. movb $1, %dil
  98. andl $32767, %eax
  99. ..B1.13:
  100. fldt 96(%rsp)
  101. cmpl $16316, %eax
  102. fstpt 16(%rsp)
  103. jge ..B1.15
  104. ..B1.14:
  105. fldt .L_2il0floatpacket.0(%rip)
  106. fldt 16(%rsp)
  107. faddp %st, %st(1)
  108. fstpt 16(%rsp)
  109. jmp ..B1.16
  110. ..B1.15:
  111. fldt 16(%rsp)
  112. lea 16+_P1(%rip), %rax
  113. fldt .L_2il0floatpacket.0(%rip)
  114. lea _P1(%rip), %rdx
  115. fldt (%rax)
  116. fmul %st(2), %st
  117. fldt (%rdx)
  118. faddp %st, %st(1)
  119. fmul %st(2), %st
  120. fmul %st(2), %st
  121. faddp %st, %st(2)
  122. faddp %st, %st(1)
  123. fstpt 16(%rsp)
  124. ..B1.16:
  125. testb %dil, %dil
  126. je ..B1.18
  127. ..B1.17:
  128. fldcw 82(%rsp)
  129. ..B1.18:
  130. fldt 16(%rsp)
  131. addq $88, %rsp
  132. .cfi_def_cfa_offset 8
  133. ret
  134. .cfi_def_cfa_offset 96
  135. ..B1.19:
  136. movl %r8d, %eax
  137. andl $768, %eax
  138. cmpl $768, %eax
  139. je ..B1.23
  140. ..B1.20:
  141. orl $-64768, %r8d
  142. movw %r8w, 80(%rsp)
  143. ..B1.21:
  144. fldcw 80(%rsp)
  145. ..B1.22:
  146. movb $1, %dil
  147. ..B1.23:
  148. fldt .L_2il0floatpacket.0(%rip)
  149. lea _TWO_63H(%rip), %r8
  150. fstpt 48(%rsp)
  151. lea _TWO_32H(%rip), %r9
  152. fldt 96(%rsp)
  153. lea SC2_BIAS(%rip), %r10
  154. fldt .L_2il0floatpacket.1(%rip)
  155. fmul %st(1), %st
  156. fldl (%r8)
  157. movzwl 8+.L_2il0floatpacket.0(%rip), %r8d
  158. fadd %st, %st(1)
  159. fxch %st(1)
  160. fstpt 64(%rsp)
  161. fldt 64(%rsp)
  162. andl $-32768, %r8d
  163. movl 64(%rsp), %edx
  164. fsubp %st, %st(1)
  165. fldt .L_2il0floatpacket.2(%rip)
  166. fmul %st(1), %st
  167. movsbq %dl, %rax
  168. fsubr %st(2), %st
  169. fld %st(0)
  170. movl %eax, %r11d
  171. fldt .L_2il0floatpacket.3(%rip)
  172. negl %r11d
  173. fmulp %st, %st(3)
  174. addl %edx, %r11d
  175. shrl $8, %r11d
  176. addl $4196735, %edx
  177. addl (%r10,%rsi,4), %r11d
  178. lea 64+_P(%rip), %rsi
  179. andl $32767, %r11d
  180. lea 16+_P(%rip), %r10
  181. orl %r11d, %r8d
  182. fsub %st(2), %st
  183. fldl (%r9)
  184. lea 48+_P(%rip), %r9
  185. movw %r8w, 56(%rsp)
  186. lea _P(%rip), %r8
  187. shlq $4, %rax
  188. fadd %st, %st(1)
  189. fxch %st(1)
  190. fstpt 16(%rsp)
  191. fldt 16(%rsp)
  192. cmpl $3070, %edx
  193. movq __libm_expl_table_256@GOTPCREL(%rip), %r11
  194. fsubp %st, %st(1)
  195. fsubr %st, %st(1)
  196. fxch %st(2)
  197. fsubrp %st, %st(1)
  198. fld %st(1)
  199. fadd %st(1), %st
  200. fld %st(0)
  201. fmul %st(1), %st
  202. fldt (%rsi)
  203. lea 32+_P(%rip), %rsi
  204. fmul %st(1), %st
  205. fldt (%rsi)
  206. faddp %st, %st(1)
  207. fmul %st(1), %st
  208. fldt (%r8)
  209. faddp %st, %st(1)
  210. fmul %st(1), %st
  211. fldt (%r9)
  212. fmul %st(2), %st
  213. fldt (%r10)
  214. faddp %st, %st(1)
  215. fmulp %st, %st(2)
  216. fxch %st(2)
  217. fmulp %st, %st(1)
  218. faddp %st, %st(1)
  219. faddp %st, %st(1)
  220. fldl 2048(%r11,%rax)
  221. fld %st(0)
  222. fmul %st(2), %st
  223. fxch %st(2)
  224. fadd %st(3), %st
  225. fxch %st(1)
  226. fmul %st, %st(3)
  227. fld %st(0)
  228. fadd %st(4), %st
  229. fsubr %st, %st(1)
  230. fxch %st(4)
  231. faddp %st, %st(1)
  232. fxch %st(1)
  233. fmull 2056(%r11,%rax)
  234. faddp %st, %st(2)
  235. faddl 2056(%r11,%rax)
  236. faddp %st, %st(1)
  237. ja ..B1.26
  238. ..B1.24:
  239. lea _expbut(%rip), %rax
  240. fldt (%rax)
  241. fcomip %st(3), %st
  242. jbe ..B1.26
  243. ..B1.25:
  244. fstp %st(2)
  245. fld %st(0)
  246. lea _TWO_12H(%rip), %rax
  247. lea _SC2(%rip), %rdx
  248. fadd %st(2), %st
  249. fldl (%rax)
  250. fmul %st(1), %st
  251. fadd %st, %st(1)
  252. fxch %st(1)
  253. fstpt 16(%rsp)
  254. fldt 16(%rsp)
  255. fsubp %st, %st(1)
  256. fsubr %st, %st(1)
  257. fxch %st(2)
  258. faddp %st, %st(1)
  259. fldt (%rcx,%rdx)
  260. fldt 48(%rsp)
  261. fmul %st, %st(3)
  262. fxch %st(1)
  263. fmul %st, %st(3)
  264. fxch %st(1)
  265. fmulp %st, %st(2)
  266. fmulp %st, %st(1)
  267. faddp %st, %st(1)
  268. fstpt 32(%rsp)
  269. jmp ..B1.27
  270. ..B1.26:
  271. fstp %st(2)
  272. lea _SC2(%rip), %rax
  273. faddp %st, %st(1)
  274. fldt 48(%rsp)
  275. fmulp %st, %st(1)
  276. fldt (%rcx,%rax)
  277. fmulp %st, %st(1)
  278. fstpt 32(%rsp)
  279. ..B1.27:
  280. fldt 32(%rsp)
  281. lea _minnorm(%rip), %rax
  282. fldt (%rax)
  283. fcomip %st(1), %st
  284. fstp %st(0)
  285. ja ..B1.42
  286. ..B1.28:
  287. testb %dil, %dil
  288. je ..B1.30
  289. ..B1.29:
  290. fldt 16(%rsp)
  291. fstpt 64(%rsp)
  292. ..B1.49:
  293. fldcw 82(%rsp)
  294. ..B1.30:
  295. fldt 32(%rsp)
  296. addq $88, %rsp
  297. .cfi_def_cfa_offset 8
  298. ret
  299. .cfi_def_cfa_offset 96
  300. ..B1.31:
  301. movzwl 82(%rsp), %ecx
  302. movl %ecx, %edx
  303. andl $768, %edx
  304. cmpl $768, %edx
  305. je ..B1.35
  306. ..B1.32:
  307. orl $-64768, %ecx
  308. movw %cx, 80(%rsp)
  309. ..B1.33:
  310. fldcw 80(%rsp)
  311. ..B1.34:
  312. movzwl 104(%rsp), %eax
  313. movb $1, %dil
  314. andl $32767, %eax
  315. ..B1.35:
  316. cmpl $32767, %eax
  317. je ..B1.43
  318. ..B1.36:
  319. testq %rsi, %rsi
  320. je ..B1.38
  321. ..B1.37:
  322. lea _small_value_80(%rip), %rax
  323. fldt (%rax)
  324. fmul %st(0), %st
  325. fstpt 16(%rsp)
  326. jmp ..B1.39
  327. ..B1.38:
  328. lea _large_value_80(%rip), %rax
  329. fldt (%rax)
  330. fmul %st(0), %st
  331. fstpt 16(%rsp)
  332. ..B1.39:
  333. testb %dil, %dil
  334. je ..B1.41
  335. ..B1.40:
  336. fldcw 82(%rsp)
  337. ..B1.41:
  338. fldt 16(%rsp)
  339. addq $88, %rsp
  340. .cfi_def_cfa_offset 8
  341. ret
  342. .cfi_def_cfa_offset 96
  343. ..B1.42:
  344. lea _small_value_80(%rip), %rax
  345. fldt (%rax)
  346. fmul %st(0), %st
  347. fstpt (%rsp)
  348. jmp ..B1.28
  349. ..B1.43:
  350. cmpl $-2147483648, 100(%rsp)
  351. jne ..B1.46
  352. ..B1.44:
  353. cmpl $0, 96(%rsp)
  354. jne ..B1.46
  355. ..B1.45:
  356. lea _inf_zeros(%rip), %rax
  357. fldl (%rax,%rsi,8)
  358. fstpt 16(%rsp)
  359. jmp ..B1.39
  360. ..B1.46:
  361. fldt 96(%rsp)
  362. fstpt 16(%rsp)
  363. jmp ..B1.39
  364. .align 16,0x90
  365. .cfi_endproc
  366. .type expl,@function
  367. .size expl,.-expl
  368. .data
  369. # -- End expl
  370. .section .rodata, "a"
  371. .align 16
  372. .align 16
  373. .L_2il0floatpacket.0:
  374. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00
  375. .type .L_2il0floatpacket.0,@object
  376. .size .L_2il0floatpacket.0,16
  377. .align 16
  378. .L_2il0floatpacket.1:
  379. .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00,0x00,0x00,0x00,0x00
  380. .type .L_2il0floatpacket.1,@object
  381. .size .L_2il0floatpacket.1,16
  382. .align 16
  383. .L_2il0floatpacket.2:
  384. .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00,0x00,0x00,0x00,0x00
  385. .type .L_2il0floatpacket.2,@object
  386. .size .L_2il0floatpacket.2,16
  387. .align 16
  388. .L_2il0floatpacket.3:
  389. .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00,0x00,0x00,0x00,0x00
  390. .type .L_2il0floatpacket.3,@object
  391. .size .L_2il0floatpacket.3,16
  392. .align 4
  393. _TWO_63H:
  394. .long 0
  395. .long 1139277824
  396. .type _TWO_63H,@object
  397. .size _TWO_63H,8
  398. .align 4
  399. _TWO_32H:
  400. .long 0
  401. .long 1106771968
  402. .type _TWO_32H,@object
  403. .size _TWO_32H,8
  404. .align 4
  405. SC2_BIAS:
  406. .long 8191
  407. .long 24575
  408. .type SC2_BIAS,@object
  409. .size SC2_BIAS,8
  410. .align 4
  411. _TWO_12H:
  412. .long 0
  413. .long 1085800448
  414. .type _TWO_12H,@object
  415. .size _TWO_12H,8
  416. .align 4
  417. _inf_zeros:
  418. .long 0
  419. .long 2146435072
  420. .long 0
  421. .long 0
  422. .type _inf_zeros,@object
  423. .size _inf_zeros,16
  424. .align 2
  425. _ranges:
  426. .word 31148
  427. .word 53711
  428. .word 6135
  429. .word 45426
  430. .word 16396
  431. .word 0
  432. .word 0
  433. .word 0
  434. .word 488
  435. .word 27074
  436. .word 50247
  437. .word 45600
  438. .word 16396
  439. .word 0
  440. .word 0
  441. .word 0
  442. .type _ranges,@object
  443. .size _ranges,32
  444. .align 2
  445. _P1:
  446. .word 43691
  447. .word 10
  448. .word 0
  449. .word 32768
  450. .word 16382
  451. .word 0
  452. .word 0
  453. .word 0
  454. .word 30584
  455. .word 43703
  456. .word 43690
  457. .word 43690
  458. .word 16380
  459. .word 0
  460. .word 0
  461. .word 0
  462. .type _P1,@object
  463. .size _P1,32
  464. .align 2
  465. _P:
  466. .word 0
  467. .word 0
  468. .word 0
  469. .word 32768
  470. .word 16382
  471. .word 0
  472. .word 0
  473. .word 0
  474. .word 10558
  475. .word 43680
  476. .word 43690
  477. .word 43690
  478. .word 16380
  479. .word 0
  480. .word 0
  481. .word 0
  482. .word 59664
  483. .word 43680
  484. .word 43690
  485. .word 43690
  486. .word 16378
  487. .word 0
  488. .word 0
  489. .word 0
  490. .word 56450
  491. .word 15979
  492. .word 35652
  493. .word 34952
  494. .word 16376
  495. .word 0
  496. .word 0
  497. .word 0
  498. .word 7105
  499. .word 47411
  500. .word 25657
  501. .word 46603
  502. .word 16373
  503. .word 0
  504. .word 0
  505. .word 0
  506. .type _P,@object
  507. .size _P,80
  508. .align 2
  509. _expbut:
  510. .word 60207
  511. .word 4624
  512. .word 35943
  513. .word 45420
  514. .word 49164
  515. .word 0
  516. .word 0
  517. .word 0
  518. .type _expbut,@object
  519. .size _expbut,16
  520. .align 2
  521. _SC2:
  522. .word 0
  523. .word 0
  524. .word 0
  525. .word 32768
  526. .word 24575
  527. .word 0
  528. .word 0
  529. .word 0
  530. .word 0
  531. .word 0
  532. .word 0
  533. .word 32768
  534. .word 8191
  535. .word 0
  536. .word 0
  537. .word 0
  538. .type _SC2,@object
  539. .size _SC2,32
  540. .align 2
  541. _minnorm:
  542. .word 0
  543. .word 0
  544. .word 0
  545. .word 32768
  546. .word 1
  547. .word 0
  548. .word 0
  549. .word 0
  550. .type _minnorm,@object
  551. .size _minnorm,16
  552. .align 2
  553. _small_value_80:
  554. .word 0
  555. .word 0
  556. .word 0
  557. .word 32768
  558. .word 6383
  559. .word 0
  560. .word 0
  561. .word 0
  562. .word 0
  563. .word 0
  564. .word 0
  565. .word 32768
  566. .word 39151
  567. .word 0
  568. .word 0
  569. .word 0
  570. .type _small_value_80,@object
  571. .size _small_value_80,32
  572. .align 2
  573. _large_value_80:
  574. .word 0
  575. .word 0
  576. .word 0
  577. .word 32768
  578. .word 26383
  579. .word 0
  580. .word 0
  581. .word 0
  582. .word 0
  583. .word 0
  584. .word 0
  585. .word 32768
  586. .word 59151
  587. .word 0
  588. .word 0
  589. .word 0
  590. .type _large_value_80,@object
  591. .size _large_value_80,32
  592. .data
  593. .section .note.GNU-stack, ""
  594. // -- Begin DWARF2 SEGMENT .eh_frame
  595. .section .eh_frame,"a",@progbits
  596. .eh_frame_seg:
  597. .align 1
  598. # End