ccosh.S 12 KB

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