cacoshl.S 12 KB

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