libm_sinl_k80.S 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  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_sinl_k80.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin __libm_sinl_k80
  41. .text
  42. .align 16,0x90
  43. .hidden __libm_sinl_k80
  44. .globl __libm_sinl_k80
  45. __libm_sinl_k80:
  46. # parameter 1: 8 + %ebp
  47. # parameter 2: 20 + %ebp
  48. ..B1.1:
  49. ..L1:
  50. pushl %ebp
  51. movl %esp, %ebp
  52. andl $-64, %esp
  53. pushl %esi
  54. pushl %edi
  55. pushl %ebx
  56. subl $180, %esp
  57. movl %gs:20, %eax
  58. xorl %esp, %eax
  59. movl %eax, 144(%esp)
  60. movzwl 16(%ebp), %eax
  61. andl $32767, %eax
  62. call ..L2
  63. ..L2:
  64. popl %ebx
  65. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  66. cmpl $16378, %eax
  67. movl 20(%ebp), %edi
  68. jge ..B1.13
  69. ..B1.2:
  70. fldt 8(%ebp)
  71. cmpl $16372, %eax
  72. jge ..B1.11
  73. ..B1.3:
  74. cmpl $16364, %eax
  75. jge ..B1.9
  76. ..B1.4:
  77. fstpt (%edi)
  78. fldt (%edi)
  79. cmpl $16308, %eax
  80. jge ..B1.6
  81. ..B1.5:
  82. fstp %st(0)
  83. fldl _zeros@GOTOFF(%ebx)
  84. fstpt 12(%edi)
  85. fldl _ones@GOTOFF(%ebx)
  86. jmp ..B1.7
  87. ..B1.6:
  88. fldt _SP3@GOTOFF(%ebx)
  89. fmul %st(1), %st
  90. fmul %st(1), %st
  91. fmulp %st, %st(1)
  92. fstpt 12(%edi)
  93. fldl _ones@GOTOFF(%ebx)
  94. ..B1.7:
  95. movl 144(%esp), %eax
  96. xorl %esp, %eax
  97. cmpl %gs:20, %eax
  98. jne ..B1.23
  99. ..B1.8:
  100. addl $180, %esp
  101. popl %ebx
  102. popl %edi
  103. popl %esi
  104. movl %ebp, %esp
  105. popl %ebp
  106. ret
  107. ..B1.9:
  108. fldt 12+_SP2@GOTOFF(%ebx)
  109. fld %st(1)
  110. fmul %st(2), %st
  111. fmul %st, %st(1)
  112. fxch %st(2)
  113. fstpt (%edi)
  114. fldt (%edi)
  115. fldt _SP2@GOTOFF(%ebx)
  116. faddp %st, %st(2)
  117. fxch %st(2)
  118. fmulp %st, %st(1)
  119. fmulp %st, %st(1)
  120. fstpt 12(%edi)
  121. fldl _ones@GOTOFF(%ebx)
  122. movl 144(%esp), %eax
  123. xorl %esp, %eax
  124. cmpl %gs:20, %eax
  125. jne ..B1.23
  126. ..B1.10:
  127. addl $180, %esp
  128. popl %ebx
  129. popl %edi
  130. popl %esi
  131. movl %ebp, %esp
  132. popl %ebp
  133. ret
  134. ..B1.11:
  135. fldt 36+_SP1@GOTOFF(%ebx)
  136. fld %st(1)
  137. fmul %st(2), %st
  138. fld %st(0)
  139. fmul %st(1), %st
  140. fmul %st, %st(2)
  141. fxch %st(3)
  142. fstpt (%edi)
  143. fldt (%edi)
  144. fldt 12+_SP1@GOTOFF(%ebx)
  145. faddp %st, %st(3)
  146. fxch %st(2)
  147. fmul %st(3), %st
  148. fldt 24+_SP1@GOTOFF(%ebx)
  149. fmulp %st, %st(4)
  150. fldt _SP1@GOTOFF(%ebx)
  151. faddp %st, %st(4)
  152. fxch %st(1)
  153. fmulp %st, %st(3)
  154. faddp %st, %st(2)
  155. fmulp %st, %st(1)
  156. fstpt 12(%edi)
  157. fldl _ones@GOTOFF(%ebx)
  158. movl 144(%esp), %eax
  159. xorl %esp, %eax
  160. cmpl %gs:20, %eax
  161. jne ..B1.23
  162. ..B1.12:
  163. addl $180, %esp
  164. popl %ebx
  165. popl %edi
  166. popl %esi
  167. movl %ebp, %esp
  168. popl %ebp
  169. ret
  170. ..B1.13:
  171. cmpl $16382, %eax
  172. jge ..B1.15
  173. ..B1.14:
  174. fldt 8(%ebp)
  175. xorl %edx, %edx
  176. fldl _TWO_52H@GOTOFF(%ebx)
  177. movzbl 17(%ebp), %esi
  178. andl $128, %esi
  179. shrl $7, %esi
  180. fxch %st(1)
  181. fmull _ones@GOTOFF(%ebx,%esi,8)
  182. fmul %st, %st(1)
  183. fld %st(1)
  184. fadd %st(1), %st
  185. fstpt 32(%esp)
  186. fstpt 112(%esp)
  187. fldt 112(%esp)
  188. fstpt 8(%ebp)
  189. fldt 8(%ebp)
  190. fldt 32(%esp)
  191. fsubp %st, %st(2)
  192. fld %st(1)
  193. fsubrp %st, %st(1)
  194. jmp ..B1.18
  195. ..B1.15:
  196. je ..B1.27
  197. ..B1.16:
  198. fldt 8(%ebp)
  199. lea 128(%esp), %eax
  200. movzbl 17(%ebp), %esi
  201. andl $128, %esi
  202. shrl $7, %esi
  203. fmull _ones@GOTOFF(%ebx,%esi,8)
  204. fstpt (%esp)
  205. fldt (%esp)
  206. movl $0, 12(%esp)
  207. fstpt 8(%ebp)
  208. movl %eax, 16(%esp)
  209. call __libm_reduce_pi04l
  210. ..B1.32:
  211. movl %eax, %edx
  212. ..B1.17:
  213. fldl 128(%esp)
  214. lea 1(%edx), %eax
  215. fldl _TWO_52H@GOTOFF(%ebx)
  216. fmul %st(1), %st
  217. fld %st(0)
  218. shrl $2, %eax
  219. fadd %st(2), %st
  220. fstpt 32(%esp)
  221. xorl %eax, %esi
  222. fldt 32(%esp)
  223. andl $1, %esi
  224. fsubp %st, %st(1)
  225. fld %st(0)
  226. fxch %st(1)
  227. fsubr %st, %st(2)
  228. fxch %st(2)
  229. faddl 136(%esp)
  230. fadd %st, %st(1)
  231. fxch %st(1)
  232. fstpt 112(%esp)
  233. ..B1.18:
  234. fldt 112(%esp)
  235. fld %st(2)
  236. fmul %st(2), %st
  237. fld %st(2)
  238. fmulp %st, %st(2)
  239. incl %edx
  240. faddp %st, %st(1)
  241. fstpt 48(%esp)
  242. fldt 48(%esp)
  243. fld %st(2)
  244. fmul %st(3), %st
  245. testb $2, %dl
  246. fld %st(0)
  247. fadd %st(2), %st
  248. fstpt 80(%esp)
  249. fldt 80(%esp)
  250. fld %st(1)
  251. fmul %st(3), %st
  252. fxch %st(1)
  253. fmulp %st, %st(3)
  254. faddp %st, %st(2)
  255. fxch %st(1)
  256. fstpt 64(%esp)
  257. fldt 64(%esp)
  258. fxch %st(1)
  259. fstpt 96(%esp)
  260. fldt 96(%esp)
  261. fmul %st(0), %st
  262. fld %st(0)
  263. faddp %st, %st(2)
  264. fldl _TWO_53H@GOTOFF(%ebx)
  265. je ..B1.20
  266. ..B1.19:
  267. fstp %st(3)
  268. fstp %st(3)
  269. fldt 84+_CP@GOTOFF(%ebx)
  270. fmul %st(1), %st
  271. fldt 60+_CP@GOTOFF(%ebx)
  272. faddp %st, %st(1)
  273. fmul %st(1), %st
  274. fldt 36+_CP@GOTOFF(%ebx)
  275. faddp %st, %st(1)
  276. fmul %st(1), %st
  277. fldt 12+_CP@GOTOFF(%ebx)
  278. faddp %st, %st(1)
  279. fmul %st(1), %st
  280. fldt 72+_CP@GOTOFF(%ebx)
  281. fldt 96+_CP@GOTOFF(%ebx)
  282. fmul %st(3), %st
  283. faddp %st, %st(1)
  284. fmul %st(2), %st
  285. fldt 48+_CP@GOTOFF(%ebx)
  286. faddp %st, %st(1)
  287. fmul %st(2), %st
  288. fldt 24+_CP@GOTOFF(%ebx)
  289. faddp %st, %st(1)
  290. fmulp %st, %st(2)
  291. fldt _CP@GOTOFF(%ebx)
  292. faddp %st, %st(2)
  293. fldt 80(%esp)
  294. fmulp %st, %st(2)
  295. faddp %st, %st(1)
  296. fldt 64(%esp)
  297. fldt 48(%esp)
  298. fldt 96(%esp)
  299. fldt 120+_CP@GOTOFF(%ebx)
  300. fmul %st, %st(3)
  301. fxch %st(3)
  302. faddp %st, %st(4)
  303. fxch %st(2)
  304. fmulp %st, %st(5)
  305. fldt 108+_CP@GOTOFF(%ebx)
  306. fmul %st, %st(2)
  307. fxch %st(2)
  308. faddp %st, %st(5)
  309. fld %st(4)
  310. fxch %st(2)
  311. fmulp %st, %st(1)
  312. faddp %st, %st(2)
  313. fadd %st(1), %st
  314. fmul %st, %st(2)
  315. fadd %st(2), %st
  316. fstpt 32(%esp)
  317. fldt 32(%esp)
  318. fsubp %st, %st(2)
  319. fxch %st(1)
  320. fsubr %st, %st(2)
  321. fxch %st(2)
  322. faddp %st, %st(1)
  323. fld %st(1)
  324. fldl _ones@GOTOFF(%ebx)
  325. fld %st(0)
  326. fxch %st(1)
  327. fadd %st, %st(2)
  328. fxch %st(1)
  329. fsub %st(2), %st
  330. faddp %st, %st(4)
  331. fxch %st(2)
  332. faddp %st, %st(3)
  333. fldl _ones@GOTOFF(%ebx,%esi,8)
  334. fmul %st, %st(1)
  335. fxch %st(1)
  336. fstpt (%edi)
  337. fmulp %st, %st(2)
  338. fxch %st(1)
  339. fstpt 12(%edi)
  340. jmp ..B1.21
  341. ..B1.20:
  342. fldt 84+_SP@GOTOFF(%ebx)
  343. fmul %st(3), %st
  344. fldt 60+_SP@GOTOFF(%ebx)
  345. faddp %st, %st(1)
  346. fmul %st(3), %st
  347. fldt 36+_SP@GOTOFF(%ebx)
  348. faddp %st, %st(1)
  349. fmul %st(3), %st
  350. fldt 12+_SP@GOTOFF(%ebx)
  351. faddp %st, %st(1)
  352. fmul %st(3), %st
  353. fldt 72+_SP@GOTOFF(%ebx)
  354. fldt 96+_SP@GOTOFF(%ebx)
  355. fmul %st(5), %st
  356. faddp %st, %st(1)
  357. fmul %st(4), %st
  358. fldt 48+_SP@GOTOFF(%ebx)
  359. faddp %st, %st(1)
  360. fmul %st(4), %st
  361. fldt 24+_SP@GOTOFF(%ebx)
  362. faddp %st, %st(1)
  363. fmulp %st, %st(4)
  364. fldt _SP@GOTOFF(%ebx)
  365. faddp %st, %st(4)
  366. fldt 80(%esp)
  367. fmulp %st, %st(4)
  368. faddp %st, %st(3)
  369. fldt 64(%esp)
  370. fldt 48(%esp)
  371. fldt 120+_SP@GOTOFF(%ebx)
  372. fmul %st, %st(2)
  373. fxch %st(2)
  374. faddp %st, %st(5)
  375. fxch %st(1)
  376. fmulp %st, %st(3)
  377. fldt 108+_SP@GOTOFF(%ebx)
  378. fmul %st, %st(1)
  379. fxch %st(1)
  380. faddp %st, %st(4)
  381. fldt 96(%esp)
  382. fmulp %st, %st(1)
  383. faddp %st, %st(2)
  384. fld %st(1)
  385. fadd %st(3), %st
  386. fmul %st, %st(1)
  387. fadd %st(1), %st
  388. fstpt 32(%esp)
  389. fldt 32(%esp)
  390. fsubp %st, %st(1)
  391. fsubr %st, %st(1)
  392. fxch %st(1)
  393. faddp %st, %st(2)
  394. fld %st(2)
  395. fmul %st(1), %st
  396. fxch %st(1)
  397. fmul %st(4), %st
  398. fldt 112(%esp)
  399. fmulp %st, %st(3)
  400. fxch %st(2)
  401. faddp %st, %st(1)
  402. faddp %st, %st(2)
  403. fld %st(2)
  404. fadd %st(1), %st
  405. fsubr %st, %st(3)
  406. fxch %st(1)
  407. faddp %st, %st(3)
  408. fxch %st(2)
  409. faddp %st, %st(1)
  410. fldl _ones@GOTOFF(%ebx,%esi,8)
  411. fmul %st, %st(2)
  412. fxch %st(2)
  413. fstpt (%edi)
  414. fmulp %st, %st(1)
  415. fstpt 12(%edi)
  416. fldl _ones@GOTOFF(%ebx)
  417. ..B1.21:
  418. movl 144(%esp), %eax
  419. xorl %esp, %eax
  420. cmpl %gs:20, %eax
  421. jne ..B1.23
  422. ..B1.22:
  423. addl $180, %esp
  424. popl %ebx
  425. popl %edi
  426. popl %esi
  427. movl %ebp, %esp
  428. popl %ebp
  429. ret
  430. ..B1.23:
  431. fstp %st(0)
  432. call __stack_chk_fail@PLT
  433. ..B1.27:
  434. movl 12(%ebp), %eax
  435. cmpl $-921707870, %eax
  436. jb ..B1.14
  437. ..B1.28:
  438. jne ..B1.16
  439. ..B1.29:
  440. cmpl $560513589, 8(%ebp)
  441. jbe ..B1.14
  442. jmp ..B1.16
  443. .align 16,0x90
  444. .type __libm_sinl_k80,@function
  445. .size __libm_sinl_k80,.-__libm_sinl_k80
  446. .data
  447. # -- End __libm_sinl_k80
  448. .section .rodata, "a"
  449. .align 4
  450. .align 4
  451. _zeros:
  452. .long 0
  453. .long 0
  454. .long 0
  455. .long 2147483648
  456. .type _zeros,@object
  457. .size _zeros,16
  458. .align 4
  459. _ones:
  460. .long 0
  461. .long 1072693248
  462. .long 0
  463. .long 3220176896
  464. .type _ones,@object
  465. .size _ones,16
  466. .align 4
  467. _TWO_52H:
  468. .long 0
  469. .long 1127743488
  470. .type _TWO_52H,@object
  471. .size _TWO_52H,8
  472. .align 4
  473. _TWO_53H:
  474. .long 0
  475. .long 1128792064
  476. .type _TWO_53H,@object
  477. .size _TWO_53H,8
  478. .align 2
  479. _SP3:
  480. .word 17476
  481. .word 43656
  482. .word 43690
  483. .word 43690
  484. .word 49148
  485. .word 0
  486. .type _SP3,@object
  487. .size _SP3,12
  488. .align 2
  489. _SP2:
  490. .word 43210
  491. .word 43690
  492. .word 43690
  493. .word 43690
  494. .word 49148
  495. .word 0
  496. .word 1587
  497. .word 57422
  498. .word 34932
  499. .word 34952
  500. .word 16376
  501. .word 0
  502. .type _SP2,@object
  503. .size _SP2,24
  504. .align 2
  505. _SP1:
  506. .word 43690
  507. .word 43690
  508. .word 43690
  509. .word 43690
  510. .word 49148
  511. .word 0
  512. .word 12518
  513. .word 34952
  514. .word 34952
  515. .word 34952
  516. .word 16376
  517. .word 0
  518. .word 43088
  519. .word 7396
  520. .word 207
  521. .word 53261
  522. .word 49138
  523. .word 0
  524. .word 55827
  525. .word 48618
  526. .word 3602
  527. .word 47342
  528. .word 16364
  529. .word 0
  530. .type _SP1,@object
  531. .size _SP1,48
  532. .align 2
  533. _CP:
  534. .word 51631
  535. .word 16464
  536. .word 16497
  537. .word 44012
  538. .word 16306
  539. .word 0
  540. .word 43685
  541. .word 43690
  542. .word 43690
  543. .word 43690
  544. .word 16372
  545. .word 0
  546. .word 46557
  547. .word 2912
  548. .word 24758
  549. .word 46603
  550. .word 49141
  551. .word 0
  552. .word 28380
  553. .word 3328
  554. .word 208
  555. .word 53261
  556. .word 16367
  557. .word 0
  558. .word 23816
  559. .word 50302
  560. .word 32187
  561. .word 37874
  562. .word 49129
  563. .word 0
  564. .word 49866
  565. .word 64527
  566. .word 51070
  567. .word 36726
  568. .word 16354
  569. .word 0
  570. .word 65056
  571. .word 3638
  572. .word 41889
  573. .word 51659
  574. .word 49114
  575. .word 0
  576. .word 13834
  577. .word 11317
  578. .word 33607
  579. .word 55101
  580. .word 16338
  581. .word 0
  582. .word 40709
  583. .word 42374
  584. .word 64411
  585. .word 45709
  586. .word 49098
  587. .word 0
  588. .word 0
  589. .word 0
  590. .word 0
  591. .word 32768
  592. .word 49150
  593. .word 0
  594. .word 0
  595. .word 0
  596. .word 0
  597. .word 43008
  598. .word 16378
  599. .word 0
  600. .type _CP,@object
  601. .size _CP,132
  602. .align 2
  603. _SP:
  604. .word 43691
  605. .word 43690
  606. .word 43690
  607. .word 43690
  608. .word 49136
  609. .word 0
  610. .word 34948
  611. .word 34952
  612. .word 34952
  613. .word 34952
  614. .word 16368
  615. .word 0
  616. .word 53243
  617. .word 3328
  618. .word 208
  619. .word 53261
  620. .word 49138
  621. .word 0
  622. .word 30577
  623. .word 46649
  624. .word 7466
  625. .word 47343
  626. .word 16364
  627. .word 0
  628. .word 11760
  629. .word 43464
  630. .word 11071
  631. .word 55090
  632. .word 49125
  633. .word 0
  634. .word 47000
  635. .word 43232
  636. .word 12444
  637. .word 45202
  638. .word 16350
  639. .word 0
  640. .word 52983
  641. .word 47009
  642. .word 40440
  643. .word 55103
  644. .word 49110
  645. .word 0
  646. .word 35433
  647. .word 14927
  648. .word 40941
  649. .word 51860
  650. .word 16334
  651. .word 0
  652. .word 1340
  653. .word 16361
  654. .word 50747
  655. .word 38523
  656. .word 49094
  657. .word 0
  658. .word 0
  659. .word 0
  660. .word 0
  661. .word 43680
  662. .word 49148
  663. .word 0
  664. .word 0
  665. .word 0
  666. .word 0
  667. .word 34816
  668. .word 16376
  669. .word 0
  670. .type _SP,@object
  671. .size _SP,132
  672. .data
  673. .hidden __libm_reduce_pi04l
  674. .section .note.GNU-stack, ""
  675. # End