cacosl.S 12 KB

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