csinhl.S 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  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 "csinhl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin csinhl
  41. .text
  42. .align 16,0x90
  43. .globl csinhl
  44. csinhl:
  45. # parameter 1: 12 + %ebp
  46. ..B1.1:
  47. ..L1:
  48. pushl %ebp
  49. movl %esp, %ebp
  50. andl $-64, %esp
  51. pushl %esi
  52. pushl %edi
  53. pushl %ebx
  54. subl $308, %esp
  55. call ..L2
  56. ..L2:
  57. popl %ebx
  58. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  59. movl %gs:20, %edx
  60. movl 8(%ebp), %esi
  61. xorl %esp, %edx
  62. fldt .L_2il0floatpacket.6@GOTOFF(%ebx)
  63. movl %edx, 244(%esp)
  64. fstpt 112(%esp)
  65. fldt 112(%esp)
  66. fstpt 220(%esp)
  67. fldt 220(%esp)
  68. fstpt 232(%esp)
  69. ..B1.2:
  70. fnstcw 62(%esp)
  71. ..B1.3:
  72. movzwl 62(%esp), %ecx
  73. movl %ecx, %edx
  74. andl $768, %edx
  75. cmpl $768, %edx
  76. je ..B1.59
  77. ..B1.4:
  78. orl $-64768, %ecx
  79. movw %cx, 60(%esp)
  80. ..B1.5:
  81. fldcw 60(%esp)
  82. ..B1.6:
  83. movl $1, %edi
  84. ..B1.7:
  85. movzwl 20(%ebp), %edx
  86. andl $32767, %edx
  87. cmpl $32767, %edx
  88. jge ..B1.33
  89. ..B1.8:
  90. testl %edx, %edx
  91. jle ..B1.52
  92. ..B1.9:
  93. movzwl 32(%ebp), %ecx
  94. andl $32767, %ecx
  95. cmpl $32767, %ecx
  96. jge ..B1.33
  97. ..B1.10:
  98. testl %ecx, %ecx
  99. jle ..B1.50
  100. ..B1.11:
  101. cmpl $16398, %edx
  102. jl ..B1.19
  103. ..B1.12:
  104. fldt _CONSTANTS@GOTOFF(%ebx)
  105. fmul %st(0), %st
  106. fldt 12(%ebp)
  107. fmul %st(1), %st
  108. fstpt (%esp)
  109. fldt 24(%ebp)
  110. fstpt 16(%esp)
  111. fldt 16(%esp)
  112. addl $-16, %esp
  113. fstpt (%esp)
  114. fstpt 48(%esp)
  115. movl %ecx, 28(%esp)
  116. call cosl@PLT
  117. ..B1.62:
  118. fldt 48(%esp)
  119. movl 28(%esp), %ecx
  120. addl $16, %esp
  121. fldt (%esp)
  122. testl %ecx, %ecx
  123. fmulp %st, %st(2)
  124. fxch %st(1)
  125. fstpt 220(%esp)
  126. jle ..B1.14
  127. ..B1.13:
  128. addl $-16, %esp
  129. fldt 32(%esp)
  130. fstpt (%esp)
  131. fstpt 48(%esp)
  132. call sinl@PLT
  133. ..B1.63:
  134. fldt 48(%esp)
  135. addl $16, %esp
  136. fmulp %st, %st(1)
  137. jmp ..B1.15
  138. ..B1.14:
  139. fldt 16(%esp)
  140. fmulp %st, %st(1)
  141. ..B1.15:
  142. fstpt 232(%esp)
  143. testl %edi, %edi
  144. je ..B1.17
  145. ..B1.16:
  146. fldcw 62(%esp)
  147. ..B1.17:
  148. movl 220(%esp), %edx
  149. movl %edx, (%esi)
  150. movl 232(%esp), %edx
  151. movl %edx, 12(%esi)
  152. movl 236(%esp), %edx
  153. movl %edx, 16(%esi)
  154. movl 224(%esp), %ecx
  155. movl 228(%esp), %edi
  156. movl 240(%esp), %edx
  157. movl %ecx, 4(%esi)
  158. movl %edi, 8(%esi)
  159. movl %edx, 20(%esi)
  160. movl 244(%esp), %edx
  161. xorl %esp, %edx
  162. cmpl %gs:20, %edx
  163. jne ..B1.49
  164. ..B1.18:
  165. movl %esi, %eax
  166. addl $308, %esp
  167. popl %ebx
  168. popl %edi
  169. popl %esi
  170. movl %ebp, %esp
  171. popl %ebp
  172. ret $4
  173. ..B1.19:
  174. fldt 12(%ebp)
  175. addl $-16, %esp
  176. lea 164(%esp), %edx
  177. fstpt (%esp)
  178. movl %edx, 12(%esp)
  179. call __libm_coshl_k80
  180. ..B1.64:
  181. addl $16, %esp
  182. ..B1.20:
  183. fldt 36+_CONSTANTS@GOTOFF(%ebx)
  184. movzwl 20(%ebp), %ecx
  185. fadd %st, %st(1)
  186. fxch %st(1)
  187. fstpt (%esp)
  188. andl $32767, %ecx
  189. fldt 148(%esp)
  190. cmpl $16183, %ecx
  191. fld %st(0)
  192. fldt 160(%esp)
  193. movl (%esp), %edx
  194. fadd %st, %st(1)
  195. fld %st(1)
  196. fxch %st(2)
  197. fsub %st, %st(3)
  198. movl %edx, 28(%esp)
  199. fxch %st(3)
  200. fsubrp %st, %st(1)
  201. fldt .L_2il0floatpacket.7@GOTOFF(%ebx)
  202. fld %st(0)
  203. fmul %st(4), %st
  204. fsub %st, %st(3)
  205. fsubp %st, %st(3)
  206. fxch %st(2)
  207. fstpt 16(%esp)
  208. fldt 16(%esp)
  209. fsubrp %st, %st(3)
  210. faddp %st, %st(2)
  211. jge ..B1.22
  212. ..B1.21:
  213. fstp %st(2)
  214. fldt 12(%ebp)
  215. lea 184(%esp), %eax
  216. fldt 24+_CONSTANTS@GOTOFF(%ebx)
  217. fmulp %st, %st(1)
  218. fstpt -12(%eax)
  219. fldt -72(%eax)
  220. movzwl -4(%eax), %ecx
  221. movl %ecx, %edx
  222. andl $32767, %edx
  223. andl $-32768, %ecx
  224. addl $-16639, %edx
  225. orl $-49153, %ecx
  226. fstpt (%eax)
  227. movl %edx, 44(%esp)
  228. movw %cx, -4(%eax)
  229. jmp ..B1.24
  230. ..B1.22:
  231. fldt 12(%ebp)
  232. addl $-16, %esp
  233. lea 188(%esp), %edx
  234. fstpt (%esp)
  235. movl %edx, 12(%esp)
  236. fxch %st(2)
  237. fstpt 16(%esp)
  238. fstpt 48(%esp)
  239. fstpt -124(%edx)
  240. call __libm_sinhl_k80
  241. ..B1.65:
  242. fldt 64(%esp)
  243. fldt 48(%esp)
  244. fldt 16(%esp)
  245. addl $16, %esp
  246. ..B1.23:
  247. faddp %st, %st(3)
  248. fxch %st(2)
  249. fstpt (%esp)
  250. lea 184(%esp), %eax
  251. movl (%esp), %edx
  252. movl %edx, 44(%esp)
  253. fxch %st(1)
  254. ..B1.24:
  255. fldt 172(%esp)
  256. fld %st(0)
  257. fld %st(3)
  258. fldt (%eax)
  259. fadd %st, %st(2)
  260. fxch %st(1)
  261. fmul %st(2), %st
  262. fld %st(2)
  263. fsubr %st(1), %st
  264. fsubrp %st, %st(1)
  265. fstpt 64(%esp)
  266. fldt 64(%esp)
  267. addl $-16, %esp
  268. fxch %st(2)
  269. fsub %st, %st(3)
  270. fxch %st(3)
  271. fsubrp %st, %st(1)
  272. fxch %st(1)
  273. fsubrp %st, %st(2)
  274. faddp %st, %st(1)
  275. fldt 24(%ebp)
  276. fstpt (%esp)
  277. lea 212(%esp), %edx
  278. movl %edx, 12(%esp)
  279. fstpt -100(%edx)
  280. fstpt 48(%esp)
  281. fstpt 64(%esp)
  282. call __libm_cosl_k80
  283. ..B1.66:
  284. fldt 64(%esp)
  285. fxch %st(1)
  286. fstpt 96(%esp)
  287. fldt 48(%esp)
  288. fldt 112(%esp)
  289. addl $16, %esp
  290. ..B1.25:
  291. fldt 196(%esp)
  292. fld %st(0)
  293. fldt 208(%esp)
  294. movzwl 32(%ebp), %edx
  295. fadd %st, %st(1)
  296. fld %st(1)
  297. andl $32767, %edx
  298. cmpl $16183, %edx
  299. fxch %st(2)
  300. fsub %st, %st(3)
  301. fxch %st(3)
  302. fsubrp %st, %st(1)
  303. fld %st(5)
  304. fmul %st(3), %st
  305. fsub %st, %st(2)
  306. fsubp %st, %st(2)
  307. fxch %st(1)
  308. fsubr %st, %st(2)
  309. fxch %st(1)
  310. faddp %st, %st(2)
  311. fldt 80(%esp)
  312. fmul %st, %st(1)
  313. fmulp %st, %st(2)
  314. fxch %st(1)
  315. fstpt 80(%esp)
  316. fldt 12+_CONSTANTS@GOTOFF(%ebx)
  317. faddp %st, %st(1)
  318. jge ..B1.27
  319. ..B1.26:
  320. fldt 24(%ebp)
  321. fldt 24+_CONSTANTS@GOTOFF(%ebx)
  322. fmulp %st, %st(1)
  323. fstpt 124(%esp)
  324. fldt 112(%esp)
  325. movzwl 132(%esp), %ecx
  326. movl %ecx, %edx
  327. andl $-32768, %ecx
  328. andl $32767, %edx
  329. orl $-49153, %ecx
  330. addl $-16639, %edx
  331. movw %cx, 132(%esp)
  332. fstpt 136(%esp)
  333. fldt 124(%esp)
  334. movl %edx, 12(%esp)
  335. jmp ..B1.29
  336. ..B1.27:
  337. fldt 24(%ebp)
  338. addl $-16, %esp
  339. lea 140(%esp), %edx
  340. fstpt (%esp)
  341. movl %edx, 12(%esp)
  342. fxch %st(1)
  343. fstpt -28(%edx)
  344. fstpt 16(%esp)
  345. fstpt -92(%edx)
  346. fstpt -76(%edx)
  347. call __libm_sinl_k80
  348. ..B1.67:
  349. fldt 64(%esp)
  350. fldt 48(%esp)
  351. fldt 16(%esp)
  352. fldt 112(%esp)
  353. addl $16, %esp
  354. ..B1.28:
  355. fldt 124(%esp)
  356. fmul %st(5), %st
  357. fstpt 124(%esp)
  358. fldt 124(%esp)
  359. fldt 136(%esp)
  360. fmulp %st, %st(6)
  361. fxch %st(5)
  362. fstpt 112(%esp)
  363. fldt 112(%esp)
  364. fstpt 136(%esp)
  365. movl $0, 12(%esp)
  366. fxch %st(2)
  367. fxch %st(3)
  368. fxch %st(4)
  369. ..B1.29:
  370. fldt 112(%esp)
  371. fld %st(1)
  372. fadd %st(1), %st
  373. fmul %st, %st(6)
  374. fsub %st, %st(2)
  375. fxch %st(2)
  376. fsubrp %st, %st(1)
  377. fld %st(1)
  378. fsubr %st(6), %st
  379. fsubrp %st, %st(6)
  380. fxch %st(1)
  381. fsub %st(5), %st
  382. faddp %st, %st(1)
  383. fstpt (%esp)
  384. fld %st(1)
  385. fldt 64(%esp)
  386. fld %st(0)
  387. fmul %st(3), %st
  388. fxch %st(4)
  389. fmulp %st, %st(3)
  390. fldt 80(%esp)
  391. addl $-32, %esp
  392. fmul %st, %st(2)
  393. fmulp %st, %st(1)
  394. faddp %st, %st(1)
  395. faddp %st, %st(1)
  396. fxch %st(1)
  397. fstpt (%esp)
  398. fstpt 12(%esp)
  399. movl 76(%esp), %edx
  400. movl %edx, 24(%esp)
  401. fstpt 64(%esp)
  402. fstpt 80(%esp)
  403. call __libm_scalbl_k80
  404. ..B1.68:
  405. fldt 80(%esp)
  406. fldt 64(%esp)
  407. addl $32, %esp
  408. ..B1.30:
  409. fldt 16(%esp)
  410. fld %st(0)
  411. fmul %st(3), %st
  412. fld %st(2)
  413. fxch %st(3)
  414. fmulp %st, %st(4)
  415. fxch %st(4)
  416. fstpt 220(%esp)
  417. fldt (%esp)
  418. addl $-32, %esp
  419. fmul %st, %st(2)
  420. fmulp %st, %st(1)
  421. faddp %st, %st(1)
  422. faddp %st, %st(1)
  423. fxch %st(1)
  424. fstpt (%esp)
  425. fstpt 12(%esp)
  426. movl 60(%esp), %edx
  427. addl 44(%esp), %edx
  428. movl %edx, 24(%esp)
  429. call __libm_scalbl_k80
  430. ..B1.69:
  431. addl $32, %esp
  432. ..B1.31:
  433. fstpt 232(%esp)
  434. jmp ..B1.45
  435. ..B1.33:
  436. movl 28(%ebp), %ecx
  437. ..B1.34:
  438. testl %ecx, %ecx
  439. jne ..B1.37
  440. ..B1.78:
  441. cmpl $0, 24(%ebp)
  442. ..B1.35:
  443. jne ..B1.37
  444. ..B1.36:
  445. fldt 12(%ebp)
  446. addl $-16, %esp
  447. fstpt (%esp)
  448. call sinhl@PLT
  449. ..B1.70:
  450. fldt 24(%ebp)
  451. addl $16, %esp
  452. fstpt 232(%esp)
  453. fstpt 220(%esp)
  454. jmp ..B1.45
  455. ..B1.37:
  456. movzwl 32(%ebp), %ecx
  457. andl $32767, %ecx
  458. movl %ecx, 12(%esp)
  459. cmpl $32767, %ecx
  460. jge ..B1.40
  461. ..B1.38:
  462. fldt 12(%ebp)
  463. fstpt 32(%esp)
  464. fldt 32(%esp)
  465. addl $-16, %esp
  466. fstpt (%esp)
  467. call sinhl@PLT
  468. ..B1.72:
  469. fstpt 16(%esp)
  470. addl $16, %esp
  471. fldt 24(%ebp)
  472. fstpt 16(%esp)
  473. fldt 16(%esp)
  474. addl $-16, %esp
  475. fstpt (%esp)
  476. call cosl@PLT
  477. ..B1.71:
  478. addl $16, %esp
  479. fldt (%esp)
  480. fmulp %st, %st(1)
  481. fstpt 220(%esp)
  482. cmpl $0, 12(%esp)
  483. jle ..B1.55
  484. ..B1.39:
  485. addl $-16, %esp
  486. fldt 48(%esp)
  487. fstpt (%esp)
  488. call coshl@PLT
  489. ..B1.74:
  490. fstpt 16(%esp)
  491. fldt 32(%esp)
  492. fstpt (%esp)
  493. call sinl@PLT
  494. ..B1.73:
  495. addl $16, %esp
  496. fldt (%esp)
  497. fmulp %st, %st(1)
  498. fstpt 232(%esp)
  499. jmp ..B1.45
  500. ..B1.40:
  501. fldt 24(%ebp)
  502. addl $-16, %esp
  503. fstpt (%esp)
  504. movl %edx, 16(%esp)
  505. call sinl@PLT
  506. ..B1.75:
  507. movl 16(%esp), %edx
  508. addl $16, %esp
  509. fstpt 232(%esp)
  510. fldt 232(%esp)
  511. cmpl $32767, %edx
  512. je ..B1.43
  513. ..B1.41:
  514. cmpl $0, 16(%ebp)
  515. jne ..B1.44
  516. ..B1.42:
  517. cmpl $0, 12(%ebp)
  518. jne ..B1.44
  519. ..B1.43:
  520. fstp %st(0)
  521. fldt 12(%ebp)
  522. addl $-16, %esp
  523. fstpt (%esp)
  524. call sinhl@PLT
  525. ..B1.76:
  526. addl $16, %esp
  527. fstpt 220(%esp)
  528. jmp ..B1.45
  529. ..B1.44:
  530. fldt 12(%ebp)
  531. fmulp %st, %st(1)
  532. fstpt 220(%esp)
  533. ..B1.45:
  534. testl %edi, %edi
  535. je ..B1.47
  536. ..B1.46:
  537. fldcw 62(%esp)
  538. ..B1.47:
  539. movl 220(%esp), %edx
  540. movl %edx, (%esi)
  541. movl 232(%esp), %edx
  542. movl %edx, 12(%esi)
  543. movl 236(%esp), %edx
  544. movl %edx, 16(%esi)
  545. movl 224(%esp), %ecx
  546. movl 228(%esp), %edi
  547. movl 240(%esp), %edx
  548. movl %ecx, 4(%esi)
  549. movl %edi, 8(%esi)
  550. movl %edx, 20(%esi)
  551. movl 244(%esp), %edx
  552. xorl %esp, %edx
  553. cmpl %gs:20, %edx
  554. jne ..B1.49
  555. ..B1.48:
  556. movl %esi, %eax
  557. addl $308, %esp
  558. popl %ebx
  559. popl %edi
  560. popl %esi
  561. movl %ebp, %esp
  562. popl %ebp
  563. ret $4
  564. ..B1.49:
  565. call __stack_chk_fail@PLT
  566. ..B1.50:
  567. cmpl $0, 28(%ebp)
  568. jne ..B1.11
  569. ..B1.51:
  570. cmpl $0, 24(%ebp)
  571. jne ..B1.11
  572. jmp ..B1.35
  573. ..B1.52:
  574. cmpl $0, 16(%ebp)
  575. jne ..B1.9
  576. ..B1.53:
  577. cmpl $0, 12(%ebp)
  578. jne ..B1.9
  579. jmp ..B1.33
  580. ..B1.55:
  581. cmpl $0, 16(%ebp)
  582. jne ..B1.57
  583. ..B1.56:
  584. cmpl $0, 12(%ebp)
  585. je ..B1.39
  586. ..B1.57:
  587. addl $-16, %esp
  588. fldt 48(%esp)
  589. fstpt (%esp)
  590. call coshl@PLT
  591. ..B1.77:
  592. addl $16, %esp
  593. fldt 16(%esp)
  594. fmulp %st, %st(1)
  595. fstpt 232(%esp)
  596. jmp ..B1.45
  597. ..B1.59:
  598. xorl %edi, %edi
  599. jmp ..B1.7
  600. .align 16,0x90
  601. .type csinhl,@function
  602. .size csinhl,.-csinhl
  603. .data
  604. # -- End csinhl
  605. .section .rodata, "a"
  606. .align 16
  607. .align 16
  608. .L_2il0floatpacket.6:
  609. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  610. .type .L_2il0floatpacket.6,@object
  611. .size .L_2il0floatpacket.6,12
  612. .space 4, 0x00 # pad
  613. .align 16
  614. .L_2il0floatpacket.7:
  615. .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00
  616. .type .L_2il0floatpacket.7,@object
  617. .size .L_2il0floatpacket.7,12
  618. .space 4, 0x00 # pad
  619. .align 16
  620. _CONSTANTS:
  621. .word 0
  622. .word 0
  623. .word 0
  624. .word 32768
  625. .word 32766
  626. .word 0
  627. .word 0
  628. .word 0
  629. .word 0
  630. .word 32768
  631. .word 1
  632. .word 0
  633. .word 0
  634. .word 0
  635. .word 0
  636. .word 32768
  637. .word 16639
  638. .word 0
  639. .word 0
  640. .word 0
  641. .word 0
  642. .word 49152
  643. .word 16446
  644. .word 0
  645. .type _CONSTANTS,@object
  646. .size _CONSTANTS,48
  647. .data
  648. .hidden __libm_sinl_k80
  649. .hidden __libm_cosl_k80
  650. .hidden __libm_sinhl_k80
  651. .hidden __libm_coshl_k80
  652. .hidden __libm_scalbl_k80
  653. .section .note.GNU-stack, ""
  654. # End