casinhl.S 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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 "casinhl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin casinhl
  41. .text
  42. .align 16,0x90
  43. .globl casinhl
  44. casinhl:
  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.8@GOTOFF(%ebx)
  63. movl %edx, 272(%esp)
  64. fstpt 8(%esp)
  65. fldt 8(%esp)
  66. fstpt 248(%esp)
  67. fldt 248(%esp)
  68. fstpt 260(%esp)
  69. ..B1.2:
  70. fnstcw 22(%esp)
  71. ..B1.3:
  72. movzwl 22(%esp), %ecx
  73. movl %ecx, %edx
  74. andl $768, %edx
  75. cmpl $768, %edx
  76. je ..B1.62
  77. ..B1.4:
  78. orl $-64768, %ecx
  79. movw %cx, 20(%esp)
  80. ..B1.5:
  81. fldcw 20(%esp)
  82. ..B1.6:
  83. movl $1, %edi
  84. ..B1.7:
  85. movzwl 20(%ebp), %ecx
  86. andl $32767, %ecx
  87. cmpl $32767, %ecx
  88. jge ..B1.16
  89. ..B1.8:
  90. testl %ecx, %ecx
  91. jle ..B1.41
  92. ..B1.9:
  93. movzwl 32(%ebp), %edx
  94. andl $32767, %edx
  95. cmpl $32767, %edx
  96. jge ..B1.16
  97. ..B1.10:
  98. testl %edx, %edx
  99. jle ..B1.39
  100. ..B1.11:
  101. addl $-48, %esp
  102. lea 24(%ebp), %edx
  103. lea 12(%ebp), %ecx
  104. movl %edx, (%esp)
  105. lea 268(%esp), %edx
  106. movl %ecx, 4(%esp)
  107. movl %edx, 8(%esp)
  108. lea 240(%esp), %edx
  109. movl %edx, 12(%esp)
  110. lea 212(%esp), %edx
  111. movl %edx, 16(%esp)
  112. lea 184(%esp), %edx
  113. movl %edx, 20(%esp)
  114. lea 156(%esp), %edx
  115. movl %edx, 24(%esp)
  116. lea 128(%esp), %edx
  117. movl %edx, 28(%esp)
  118. lea 100(%esp), %edx
  119. movl %edx, 32(%esp)
  120. lea 72(%esp), %edx
  121. movl %edx, 36(%esp)
  122. call __libm_carctrigprepare_k80
  123. ..B1.65:
  124. lea 72(%esp), %edx
  125. lea 12(%ebp), %ecx
  126. ..B1.12:
  127. lea 24(%ebp), %eax
  128. movl %eax, (%esp)
  129. lea 268(%esp), %eax
  130. movl %ecx, 4(%esp)
  131. movl %eax, 8(%esp)
  132. lea 240(%esp), %eax
  133. movl %eax, 12(%esp)
  134. lea 212(%esp), %eax
  135. movl %eax, 16(%esp)
  136. lea 184(%esp), %eax
  137. movl %eax, 20(%esp)
  138. lea 156(%esp), %eax
  139. movl %eax, 24(%esp)
  140. lea 128(%esp), %eax
  141. movl %eax, 28(%esp)
  142. lea 100(%esp), %eax
  143. movl %eax, 32(%esp)
  144. movl %edx, 36(%esp)
  145. call __libm_recacoshl_k80
  146. ..B1.66:
  147. lea 72(%esp), %edx
  148. addl $48, %esp
  149. lea 12(%ebp), %ecx
  150. ..B1.13:
  151. movzbl 9(%ecx), %eax
  152. andl $128, %eax
  153. shrl $7, %eax
  154. fldl ones@GOTOFF(%ebx,%eax,8)
  155. lea 24(%ebp), %eax
  156. fmulp %st, %st(1)
  157. fstpt 248(%esp)
  158. addl $-48, %esp
  159. movl %eax, (%esp)
  160. movl %ecx, 4(%esp)
  161. lea 268(%esp), %ecx
  162. movl %ecx, 8(%esp)
  163. lea 240(%esp), %ecx
  164. movl %ecx, 12(%esp)
  165. lea 212(%esp), %ecx
  166. movl %ecx, 16(%esp)
  167. lea 184(%esp), %ecx
  168. movl %ecx, 20(%esp)
  169. lea 156(%esp), %ecx
  170. movl %ecx, 24(%esp)
  171. lea 128(%esp), %ecx
  172. movl %ecx, 28(%esp)
  173. lea 100(%esp), %ecx
  174. movl %ecx, 32(%esp)
  175. movl %edx, 36(%esp)
  176. call __libm_recasinl_k80
  177. ..B1.67:
  178. addl $48, %esp
  179. ..B1.14:
  180. fstpt 260(%esp)
  181. jmp ..B1.35
  182. ..B1.16:
  183. movl 28(%ebp), %edx
  184. ..B1.17:
  185. testl %edx, %edx
  186. jne ..B1.20
  187. ..B1.75:
  188. cmpl $0, 24(%ebp)
  189. ..B1.18:
  190. jne ..B1.20
  191. ..B1.19:
  192. fldt 12(%ebp)
  193. addl $-16, %esp
  194. fstpt (%esp)
  195. call asinhl@PLT
  196. ..B1.68:
  197. fldt 24(%ebp)
  198. addl $16, %esp
  199. fstpt 260(%esp)
  200. fstpt 248(%esp)
  201. jmp ..B1.35
  202. ..B1.20:
  203. movl 16(%ebp), %eax
  204. testl %eax, %eax
  205. movl %eax, (%esp)
  206. jne ..B1.29
  207. ..B1.21:
  208. movzwl 32(%ebp), %eax
  209. andl $32767, %eax
  210. cmpl $0, 12(%ebp)
  211. jne ..B1.30
  212. ..B1.22:
  213. cmpl $32767, %eax
  214. jl ..B1.25
  215. ..B1.23:
  216. cmpl $-2147483648, %edx
  217. jne ..B1.30
  218. ..B1.24:
  219. cmpl $0, 24(%ebp)
  220. jne ..B1.30
  221. ..B1.25:
  222. fldt 24(%ebp)
  223. cmpl $16383, %eax
  224. jl ..B1.27
  225. ..B1.26:
  226. movzbl 33(%ebp), %edx
  227. andl $128, %edx
  228. shrl $7, %edx
  229. fldl ones@GOTOFF(%ebx,%edx,8)
  230. fstl (%esp)
  231. addl $-16, %esp
  232. fmulp %st, %st(1)
  233. fstpt (%esp)
  234. call acoshl@PLT
  235. ..B1.70:
  236. fstpt 24(%esp)
  237. fldl 16(%esp)
  238. fstpt (%esp)
  239. call asinl@PLT
  240. jmp ..B1.71
  241. ..B1.27:
  242. addl $-16, %esp
  243. fstpt (%esp)
  244. call asinl@PLT
  245. ..B1.71:
  246. addl $16, %esp
  247. fstpt 260(%esp)
  248. ..B1.28:
  249. fldt 8(%esp)
  250. movzbl 21(%ebp), %edx
  251. andl $128, %edx
  252. shrl $7, %edx
  253. fmull ones@GOTOFF(%ebx,%edx,8)
  254. fstpt 248(%esp)
  255. jmp ..B1.35
  256. ..B1.29:
  257. movzwl 32(%ebp), %eax
  258. andl $32767, %eax
  259. ..B1.30:
  260. cmpl $32767, %ecx
  261. je ..B1.52
  262. ..B1.31:
  263. cmpl $32767, %eax
  264. je ..B1.48
  265. ..B1.74:
  266. cmpl $32767, %ecx
  267. ..B1.32:
  268. je ..B1.45
  269. ..B1.33:
  270. fldt 24(%ebp)
  271. fld %st(0)
  272. fmul %st(1), %st
  273. fldt 12(%ebp)
  274. fxch %st(2)
  275. ..B1.34:
  276. movzbl 21(%ebp), %edx
  277. andl $128, %edx
  278. shrl $7, %edx
  279. fldl ones@GOTOFF(%ebx,%edx,8)
  280. fmul %st, %st(2)
  281. fxch %st(2)
  282. fstpt 248(%esp)
  283. addl $-32, %esp
  284. fxch %st(2)
  285. fmulp %st, %st(1)
  286. fxch %st(1)
  287. fstpt (%esp)
  288. fstpt 12(%esp)
  289. call atan2l@PLT
  290. ..B1.72:
  291. addl $32, %esp
  292. fstpt 260(%esp)
  293. ..B1.35:
  294. testl %edi, %edi
  295. je ..B1.37
  296. ..B1.36:
  297. fldcw 22(%esp)
  298. ..B1.37:
  299. movl 248(%esp), %edx
  300. movl %edx, (%esi)
  301. movl 260(%esp), %edx
  302. movl %edx, 12(%esi)
  303. movl 264(%esp), %edx
  304. movl %edx, 16(%esi)
  305. movl 252(%esp), %ecx
  306. movl 256(%esp), %edi
  307. movl 268(%esp), %edx
  308. movl %ecx, 4(%esi)
  309. movl %edi, 8(%esi)
  310. movl %edx, 20(%esi)
  311. movl 272(%esp), %edx
  312. xorl %esp, %edx
  313. cmpl %gs:20, %edx
  314. jne ..B1.44
  315. ..B1.38:
  316. movl %esi, %eax
  317. addl $308, %esp
  318. popl %ebx
  319. popl %edi
  320. popl %esi
  321. movl %ebp, %esp
  322. popl %ebp
  323. ret $4
  324. ..B1.39:
  325. movl 28(%ebp), %edx
  326. testl %edx, %edx
  327. jne ..B1.11
  328. ..B1.40:
  329. cmpl $0, 24(%ebp)
  330. jne ..B1.11
  331. jmp ..B1.18
  332. ..B1.41:
  333. cmpl $0, 16(%ebp)
  334. jne ..B1.9
  335. ..B1.42:
  336. cmpl $0, 12(%ebp)
  337. jne ..B1.9
  338. jmp ..B1.16
  339. ..B1.44:
  340. call __stack_chk_fail@PLT
  341. ..B1.45:
  342. cmpl $-2147483648, (%esp)
  343. jne ..B1.33
  344. ..B1.46:
  345. cmpl $0, 12(%ebp)
  346. jne ..B1.33
  347. ..B1.47:
  348. fldt 12(%ebp)
  349. fld %st(0)
  350. fmul %st(1), %st
  351. fldt 24(%ebp)
  352. jmp ..B1.34
  353. ..B1.48:
  354. cmpl $-2147483648, %edx
  355. jne ..B1.50
  356. ..B1.49:
  357. cmpl $0, 24(%ebp)
  358. je ..B1.73
  359. ..B1.50:
  360. cmpl $32767, %ecx
  361. jge ..B1.32
  362. ..B1.51:
  363. fldt 24(%ebp)
  364. fmul %st(0), %st
  365. fstpt 248(%esp)
  366. fldt 248(%esp)
  367. fstpt 260(%esp)
  368. jmp ..B1.35
  369. ..B1.52:
  370. cmpl $-2147483648, (%esp)
  371. jne ..B1.54
  372. ..B1.53:
  373. cmpl $0, 12(%ebp)
  374. je ..B1.56
  375. ..B1.54:
  376. cmpl $32767, %eax
  377. je ..B1.59
  378. ..B1.55:
  379. cmpl $-2147483648, (%esp)
  380. jne ..B1.57
  381. ..B1.76:
  382. cmpl $0, 12(%ebp)
  383. ..B1.56:
  384. je ..B1.31
  385. ..B1.57:
  386. cmpl $32767, %eax
  387. jge ..B1.31
  388. ..B1.58:
  389. fldt 12(%ebp)
  390. fmul %st(0), %st
  391. fstpt 248(%esp)
  392. fldt 248(%esp)
  393. fstpt 260(%esp)
  394. jmp ..B1.35
  395. ..B1.59:
  396. cmpl $-2147483648, %edx
  397. jne ..B1.61
  398. ..B1.60:
  399. cmpl $0, 24(%ebp)
  400. je ..B1.55
  401. ..B1.61:
  402. fldt 12(%ebp)
  403. fmul %st(0), %st
  404. fstpt 248(%esp)
  405. fldt 24(%ebp)
  406. fmul %st(0), %st
  407. fstpt 260(%esp)
  408. jmp ..B1.35
  409. ..B1.62:
  410. xorl %edi, %edi
  411. jmp ..B1.7
  412. ..B1.73:
  413. cmpl $32767, %ecx
  414. je ..B1.45
  415. jmp ..B1.33
  416. .align 16,0x90
  417. .type casinhl,@function
  418. .size casinhl,.-casinhl
  419. .data
  420. # -- End casinhl
  421. .section .rodata, "a"
  422. .align 16
  423. .align 16
  424. .L_2il0floatpacket.8:
  425. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  426. .type .L_2il0floatpacket.8,@object
  427. .size .L_2il0floatpacket.8,12
  428. .space 4, 0x00 # pad
  429. .align 16
  430. ones:
  431. .long 0x00000000,0x3ff00000
  432. .long 0x00000000,0xbff00000
  433. .type ones,@object
  434. .size ones,16
  435. .data
  436. .hidden __libm_recasinl_k80
  437. .hidden __libm_recacoshl_k80
  438. .hidden __libm_carctrigprepare_k80
  439. .section .note.GNU-stack, ""
  440. # End