catanhf.S 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  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 "catanhf.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin catanhf
  41. .text
  42. .align 16,0x90
  43. .globl catanhf
  44. catanhf:
  45. # parameter 1: 8 + %ebp
  46. ..B1.1:
  47. ..L1:
  48. pushl %ebp
  49. movl %esp, %ebp
  50. andl $-64, %esp
  51. pushl %edi
  52. pushl %ebx
  53. subl $120, %esp
  54. xorl %edi, %edi
  55. movzwl 10(%ebp), %eax
  56. andl $32640, %eax
  57. shrl $7, %eax
  58. call ..L2
  59. ..L2:
  60. popl %ebx
  61. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  62. cmpl $255, %eax
  63. movl %edi, 108(%esp)
  64. movl %edi, 112(%esp)
  65. jge ..B1.11
  66. ..B1.2:
  67. testl %eax, %eax
  68. jle ..B1.53
  69. ..B1.3:
  70. movzwl 14(%ebp), %edx
  71. andl $32640, %edx
  72. shrl $7, %edx
  73. cmpl $255, %edx
  74. jge ..B1.12
  75. ..B1.4:
  76. testl %edx, %edx
  77. jle ..B1.52
  78. ..B1.5:
  79. flds 8(%ebp)
  80. fsts 100(%esp)
  81. fld1
  82. fsts 96(%esp)
  83. fxch %st(1)
  84. fmul %st(0), %st
  85. fstl 32(%esp)
  86. fsubrp %st, %st(1)
  87. flds 12(%ebp)
  88. fld %st(0)
  89. fmul %st(1), %st
  90. fstl 72(%esp)
  91. fsubrp %st, %st(2)
  92. fxch %st(1)
  93. fstpl 40(%esp)
  94. fldl 40(%esp)
  95. fabs
  96. fldl .L_2il0floatpacket.6@GOTOFF(%ebx)
  97. fstl 80(%esp)
  98. fcompp
  99. fnstsw %ax
  100. sahf
  101. jbe ..B1.7
  102. ..B1.6:
  103. flds 100(%esp)
  104. fadds 96(%esp)
  105. fstl 88(%esp)
  106. fstpl 8(%esp)
  107. fstl (%esp)
  108. fstpl 16(%esp)
  109. call atan2@PLT
  110. ..B1.74:
  111. fldl 16(%esp)
  112. fchs
  113. fxch %st(1)
  114. fstpl 48(%esp)
  115. flds 96(%esp)
  116. fsubs 100(%esp)
  117. fstl 8(%esp)
  118. fxch %st(1)
  119. fstpl (%esp)
  120. fstpl 24(%esp)
  121. call atan2@PLT
  122. ..B1.73:
  123. fldl 24(%esp)
  124. fxch %st(1)
  125. fstpl 56(%esp)
  126. fldl 48(%esp)
  127. fldl 56(%esp)
  128. fsubrp %st, %st(1)
  129. fldl .L_2il0floatpacket.7@GOTOFF(%ebx)
  130. fmul %st, %st(1)
  131. fxch %st(1)
  132. fstps 112(%esp)
  133. fxch %st(1)
  134. jmp ..B1.8
  135. ..B1.7:
  136. fldl 40(%esp)
  137. fstpl 8(%esp)
  138. fldl .L_2il0floatpacket.8@GOTOFF(%ebx)
  139. fmulp %st, %st(1)
  140. fstpl (%esp)
  141. call atan2@PLT
  142. ..B1.75:
  143. fldl .L_2il0floatpacket.7@GOTOFF(%ebx)
  144. fmul %st, %st(1)
  145. fxch %st(1)
  146. fstps 112(%esp)
  147. flds 100(%esp)
  148. fld %st(0)
  149. flds 96(%esp)
  150. fadd %st, %st(1)
  151. fxch %st(1)
  152. fstpl 88(%esp)
  153. fsubp %st, %st(1)
  154. ..B1.8:
  155. fldl 88(%esp)
  156. fstpl 48(%esp)
  157. fchs
  158. fldl 48(%esp)
  159. fldl 48(%esp)
  160. fmulp %st, %st(1)
  161. fldl 72(%esp)
  162. fadd %st, %st(1)
  163. fxch %st(1)
  164. fstpl 64(%esp)
  165. fxch %st(1)
  166. fstpl 56(%esp)
  167. fldl 56(%esp)
  168. fldl 56(%esp)
  169. fmulp %st, %st(1)
  170. faddp %st, %st(1)
  171. fstpl 40(%esp)
  172. fldl 64(%esp)
  173. fldl 40(%esp)
  174. fsubrp %st, %st(1)
  175. fabs
  176. fldl 40(%esp)
  177. fmull 80(%esp)
  178. fcompp
  179. fnstsw %ax
  180. sahf
  181. jae ..B1.10
  182. jp ..B1.10
  183. ..B1.9:
  184. fstp %st(0)
  185. fldl 64(%esp)
  186. fldl 40(%esp)
  187. fdivrp %st, %st(1)
  188. fstpl (%esp)
  189. call log@PLT
  190. ..B1.76:
  191. fmull .L_2il0floatpacket.9@GOTOFF(%ebx)
  192. fstps 108(%esp)
  193. jmp ..B1.46
  194. ..B1.10:
  195. fldl 72(%esp)
  196. fldl .L_2il0floatpacket.8@GOTOFF(%ebx)
  197. fmuls 100(%esp)
  198. fxch %st(1)
  199. faddl 32(%esp)
  200. fadds 96(%esp)
  201. fstpl 40(%esp)
  202. fstpl 64(%esp)
  203. fldl 64(%esp)
  204. fldl 40(%esp)
  205. fdivrp %st, %st(1)
  206. fstpl (%esp)
  207. fstpl 16(%esp)
  208. call atanh@PLT
  209. ..B1.77:
  210. fldl 16(%esp)
  211. fmulp %st, %st(1)
  212. fstps 108(%esp)
  213. jmp ..B1.46
  214. ..B1.11:
  215. movzwl 14(%ebp), %edx
  216. andl $32640, %edx
  217. shrl $7, %edx
  218. ..B1.12:
  219. cmpl $255, %eax
  220. je ..B1.62
  221. ..B1.13:
  222. cmpl $255, %edx
  223. je ..B1.57
  224. ..B1.14:
  225. cmpl $255, %edx
  226. jge ..B1.39
  227. ..B1.15:
  228. testl %eax, %eax
  229. jle ..B1.56
  230. ..B1.16:
  231. cmpl $127, %eax
  232. jge ..B1.20
  233. ..B1.17:
  234. addl $4, %esp
  235. pushl 8(%ebp)
  236. call atanhf@PLT
  237. ..B1.78:
  238. movzbl 15(%ebp), %eax
  239. testl $128, %eax
  240. fstps 108(%esp)
  241. je ..B1.19
  242. ..B1.18:
  243. movl $-2147483648, 112(%esp)
  244. jmp ..B1.46
  245. ..B1.19:
  246. movl %edi, 112(%esp)
  247. jmp ..B1.46
  248. ..B1.20:
  249. je ..B1.55
  250. ..B1.21:
  251. cmpl $255, %eax
  252. jge ..B1.29
  253. ..B1.22:
  254. flds 8(%ebp)
  255. fld %st(0)
  256. fld %st(1)
  257. fld1
  258. fadd %st, %st(2)
  259. fxch %st(2)
  260. fstpl 48(%esp)
  261. fld %st(2)
  262. fmul %st(3), %st
  263. fxch %st(1)
  264. fsubr %st(2), %st
  265. fchs
  266. flds 12(%ebp)
  267. fmul %st(0), %st
  268. fldl 48(%esp)
  269. fldl 48(%esp)
  270. fmulp %st, %st(1)
  271. fadd %st(1), %st
  272. fstpl 64(%esp)
  273. fxch %st(1)
  274. fstpl 56(%esp)
  275. fldl 56(%esp)
  276. fldl 56(%esp)
  277. fmulp %st, %st(1)
  278. fadd %st(1), %st
  279. fstpl 40(%esp)
  280. fldl 64(%esp)
  281. fldl 40(%esp)
  282. fsubrp %st, %st(1)
  283. fabs
  284. fldl 40(%esp)
  285. fmull .L_2il0floatpacket.6@GOTOFF(%ebx)
  286. fcompp
  287. fnstsw %ax
  288. sahf
  289. jae ..B1.24
  290. jp ..B1.24
  291. ..B1.23:
  292. fstp %st(2)
  293. fstp %st(1)
  294. fstp %st(0)
  295. fstp %st(0)
  296. fldl 64(%esp)
  297. fldl 40(%esp)
  298. fdivrp %st, %st(1)
  299. fstpl (%esp)
  300. call log@PLT
  301. ..B1.79:
  302. fmull .L_2il0floatpacket.9@GOTOFF(%ebx)
  303. fstps 108(%esp)
  304. jmp ..B1.25
  305. ..B1.24:
  306. faddp %st, %st(1)
  307. faddp %st, %st(1)
  308. fstpl 40(%esp)
  309. fldl .L_2il0floatpacket.8@GOTOFF(%ebx)
  310. fmulp %st, %st(1)
  311. fstpl 64(%esp)
  312. fldl 64(%esp)
  313. fldl 40(%esp)
  314. fdivrp %st, %st(1)
  315. fstpl (%esp)
  316. call atanh@PLT
  317. ..B1.80:
  318. fmull .L_2il0floatpacket.7@GOTOFF(%ebx)
  319. fstps 108(%esp)
  320. ..B1.25:
  321. movzbl 15(%ebp), %eax
  322. testl $128, %eax
  323. je ..B1.27
  324. ..B1.26:
  325. flds .L_2il0floatpacket.10@GOTOFF(%ebx)
  326. jmp ..B1.28
  327. ..B1.27:
  328. flds .L_2il0floatpacket.11@GOTOFF(%ebx)
  329. ..B1.28:
  330. flds .L_2il0floatpacket.14@GOTOFF(%ebx)
  331. fxch %st(1)
  332. fsts 112(%esp)
  333. faddp %st, %st(1)
  334. fstps 104(%esp)
  335. jmp ..B1.46
  336. ..B1.29:
  337. testl %edx, %edx
  338. jne ..B1.32
  339. ..B1.30:
  340. testl $8388607, 12(%ebp)
  341. je ..B1.32
  342. ..B1.31:
  343. flds .L_2il0floatpacket.12@GOTOFF(%ebx)
  344. fadds 12(%ebp)
  345. fstps 104(%esp)
  346. ..B1.32:
  347. movzbl 11(%ebp), %eax
  348. testl $128, %eax
  349. je ..B1.34
  350. ..B1.33:
  351. movl $-2147483648, 108(%esp)
  352. jmp ..B1.35
  353. ..B1.34:
  354. movl %edi, 108(%esp)
  355. ..B1.35:
  356. movzbl 15(%ebp), %eax
  357. testl $128, %eax
  358. je ..B1.37
  359. ..B1.36:
  360. flds .L_2il0floatpacket.10@GOTOFF(%ebx)
  361. jmp ..B1.38
  362. ..B1.37:
  363. flds .L_2il0floatpacket.11@GOTOFF(%ebx)
  364. ..B1.38:
  365. flds .L_2il0floatpacket.14@GOTOFF(%ebx)
  366. fxch %st(1)
  367. fsts 112(%esp)
  368. faddp %st, %st(1)
  369. fstps 104(%esp)
  370. jmp ..B1.46
  371. ..B1.39:
  372. testl %eax, %eax
  373. jne ..B1.42
  374. ..B1.40:
  375. testl $8388607, 8(%ebp)
  376. je ..B1.42
  377. ..B1.41:
  378. flds .L_2il0floatpacket.12@GOTOFF(%ebx)
  379. fadds 8(%ebp)
  380. fstps 104(%esp)
  381. ..B1.42:
  382. movzbl 11(%ebp), %eax
  383. testl $128, %eax
  384. je ..B1.44
  385. ..B1.43:
  386. movl $-2147483648, 108(%esp)
  387. jmp ..B1.45
  388. ..B1.44:
  389. movl %edi, 108(%esp)
  390. ..B1.45:
  391. movl 12(%ebp), %eax
  392. movl %eax, (%esp)
  393. call atanf@PLT
  394. ..B1.81:
  395. fstps 112(%esp)
  396. ..B1.46:
  397. movzwl 110(%esp), %eax
  398. testl $32640, %eax
  399. jne ..B1.48
  400. ..B1.47:
  401. testl $8388607, 108(%esp)
  402. jne ..B1.50
  403. ..B1.48:
  404. movzwl 114(%esp), %eax
  405. testl $32640, %eax
  406. jne ..B1.51
  407. ..B1.49:
  408. testl $8388607, 112(%esp)
  409. je ..B1.51
  410. ..B1.50:
  411. flds .L_2il0floatpacket.14@GOTOFF(%ebx)
  412. fmul %st(0), %st
  413. fstps 104(%esp)
  414. ..B1.51:
  415. movl 108(%esp), %eax
  416. movl 112(%esp), %edx
  417. addl $120, %esp
  418. popl %ebx
  419. popl %edi
  420. movl %ebp, %esp
  421. popl %ebp
  422. ret
  423. ..B1.52:
  424. testl $8388607, 12(%ebp)
  425. jne ..B1.5
  426. jmp ..B1.12
  427. ..B1.53:
  428. testl $8388607, 8(%ebp)
  429. jne ..B1.3
  430. jmp ..B1.11
  431. ..B1.55:
  432. testl $8388607, 8(%ebp)
  433. je ..B1.17
  434. jmp ..B1.21
  435. ..B1.56:
  436. testl $8388607, 8(%ebp)
  437. jne ..B1.16
  438. jmp ..B1.39
  439. ..B1.57:
  440. testl $8388607, 12(%ebp)
  441. je ..B1.14
  442. ..B1.58:
  443. cmpl $255, %eax
  444. jge ..B1.14
  445. ..B1.59:
  446. testl %eax, %eax
  447. jle ..B1.61
  448. ..B1.60:
  449. flds 12(%ebp)
  450. fmul %st(0), %st
  451. fsts 108(%esp)
  452. fstps 112(%esp)
  453. jmp ..B1.46
  454. ..B1.61:
  455. testl $8388607, 8(%ebp)
  456. jne ..B1.60
  457. jmp ..B1.14
  458. ..B1.62:
  459. testl $8388607, 8(%ebp)
  460. je ..B1.13
  461. ..B1.63:
  462. flds 8(%ebp)
  463. cmpl $255, %edx
  464. fmul %st(0), %st
  465. jge ..B1.65
  466. ..B1.64:
  467. fsts 8(%ebp)
  468. fmul %st(0), %st
  469. fsts 108(%esp)
  470. fstps 112(%esp)
  471. jmp ..B1.46
  472. ..B1.65:
  473. testl $8388607, 12(%ebp)
  474. jne ..B1.70
  475. ..B1.66:
  476. fmul %st(0), %st
  477. movzbl 15(%ebp), %eax
  478. testl $128, %eax
  479. fstps 8(%ebp)
  480. movl %edi, 108(%esp)
  481. je ..B1.68
  482. ..B1.67:
  483. flds .L_2il0floatpacket.10@GOTOFF(%ebx)
  484. jmp ..B1.69
  485. ..B1.68:
  486. flds .L_2il0floatpacket.11@GOTOFF(%ebx)
  487. ..B1.69:
  488. flds .L_2il0floatpacket.14@GOTOFF(%ebx)
  489. fxch %st(1)
  490. fsts 112(%esp)
  491. faddp %st, %st(1)
  492. fstps 104(%esp)
  493. jmp ..B1.46
  494. ..B1.70:
  495. fsts 8(%ebp)
  496. fmul %st(0), %st
  497. fstps 108(%esp)
  498. flds 12(%ebp)
  499. fmul %st(0), %st
  500. fstps 112(%esp)
  501. jmp ..B1.46
  502. .align 16,0x90
  503. .type catanhf,@function
  504. .size catanhf,.-catanhf
  505. .data
  506. # -- End catanhf
  507. .section .rodata, "a"
  508. .align 8
  509. .align 8
  510. .L_2il0floatpacket.6:
  511. .long 0xe0000000,0x3f9eb851
  512. .type .L_2il0floatpacket.6,@object
  513. .size .L_2il0floatpacket.6,8
  514. .align 8
  515. .L_2il0floatpacket.7:
  516. .long 0x00000000,0x3fe00000
  517. .type .L_2il0floatpacket.7,@object
  518. .size .L_2il0floatpacket.7,8
  519. .align 8
  520. .L_2il0floatpacket.8:
  521. .long 0x00000000,0x40000000
  522. .type .L_2il0floatpacket.8,@object
  523. .size .L_2il0floatpacket.8,8
  524. .align 8
  525. .L_2il0floatpacket.9:
  526. .long 0x00000000,0x3fd00000
  527. .type .L_2il0floatpacket.9,@object
  528. .size .L_2il0floatpacket.9,8
  529. .align 4
  530. .L_2il0floatpacket.10:
  531. .long 0xbfc90fdb
  532. .type .L_2il0floatpacket.10,@object
  533. .size .L_2il0floatpacket.10,4
  534. .align 4
  535. .L_2il0floatpacket.11:
  536. .long 0x3fc90fdb
  537. .type .L_2il0floatpacket.11,@object
  538. .size .L_2il0floatpacket.11,4
  539. .align 4
  540. .L_2il0floatpacket.12:
  541. .long 0x3f000000
  542. .type .L_2il0floatpacket.12,@object
  543. .size .L_2il0floatpacket.12,4
  544. .align 4
  545. .L_2il0floatpacket.13:
  546. .long 0x80000000
  547. .type .L_2il0floatpacket.13,@object
  548. .size .L_2il0floatpacket.13,4
  549. .align 4
  550. .L_2il0floatpacket.14:
  551. .long 0x00800000
  552. .type .L_2il0floatpacket.14,@object
  553. .size .L_2il0floatpacket.14,4
  554. .data
  555. .section .note.GNU-stack, ""
  556. # End