csinh.S 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  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 "csinh.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin csinhf
  41. .text
  42. .align 16,0x90
  43. .globl csinhf
  44. csinhf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_csinhf.1:
  49. ..L2:
  50. subq $24, %rsp
  51. .cfi_def_cfa_offset 32
  52. cvtps2pd %xmm0, %xmm1
  53. movaps %xmm1, %xmm0
  54. unpckhpd %xmm1, %xmm1
  55. ..___tag_value_csinhf.4:
  56. call csinh@PLT
  57. ..___tag_value_csinhf.5:
  58. ..B1.10:
  59. unpcklpd %xmm1, %xmm0
  60. ..B1.2:
  61. cvtpd2ps %xmm0, %xmm0
  62. movsd %xmm0, 4(%rsp)
  63. movzwl 6(%rsp), %eax
  64. testl $32640, %eax
  65. jne ..B1.4
  66. ..B1.3:
  67. testl $8388607, 4(%rsp)
  68. jne ..B1.6
  69. ..B1.4:
  70. movzwl 10(%rsp), %eax
  71. testl $32640, %eax
  72. jne ..B1.7
  73. ..B1.5:
  74. testl $8388607, 8(%rsp)
  75. je ..B1.7
  76. ..B1.6:
  77. movl $8388608, (%rsp)
  78. movss (%rsp), %xmm1
  79. movss (%rsp), %xmm0
  80. mulss %xmm0, %xmm1
  81. movsd 4(%rsp), %xmm0
  82. movss %xmm1, (%rsp)
  83. ..B1.7:
  84. addq $24, %rsp
  85. .cfi_def_cfa_offset 8
  86. ret
  87. .align 16,0x90
  88. .cfi_endproc
  89. .type csinhf,@function
  90. .size csinhf,.-csinhf
  91. .data
  92. # -- End csinhf
  93. .text
  94. # -- Begin csinh
  95. .text
  96. .align 16,0x90
  97. .globl csinh
  98. csinh:
  99. # parameter 1: %xmm0
  100. ..B2.1:
  101. .cfi_startproc
  102. ..___tag_value_csinh.8:
  103. ..L9:
  104. pushq %r13
  105. .cfi_def_cfa_offset 16
  106. .cfi_offset 13, -16
  107. pushq %r14
  108. .cfi_def_cfa_offset 24
  109. .cfi_offset 14, -24
  110. pushq %r15
  111. .cfi_def_cfa_offset 32
  112. .cfi_offset 15, -32
  113. movq %fs:40, %rax
  114. subq $112, %rsp
  115. .cfi_def_cfa_offset 144
  116. movsd %xmm0, 48(%rsp)
  117. xorq %rsp, %rax
  118. movzwl 54(%rsp), %r14d
  119. andl $32752, %r14d
  120. shrl $4, %r14d
  121. movsd %xmm1, 56(%rsp)
  122. cmpl $2047, %r14d
  123. movq %rax, 96(%rsp)
  124. jge ..B2.23
  125. ..B2.2:
  126. testl %r14d, %r14d
  127. jle ..B2.42
  128. ..B2.3:
  129. movzwl 62(%rsp), %r13d
  130. andl $32752, %r13d
  131. shrl $4, %r13d
  132. cmpl $2047, %r13d
  133. jge ..B2.24
  134. ..B2.4:
  135. testl %r13d, %r13d
  136. jle ..B2.40
  137. ..B2.5:
  138. cmpl $1034, %r14d
  139. jl ..B2.11
  140. ..B2.6:
  141. lea _CONSTANTS(%rip), %rax
  142. movsd 48(%rsp), %xmm1
  143. movsd (%rax), %xmm0
  144. mulsd %xmm0, %xmm0
  145. mulsd %xmm0, %xmm1
  146. movsd %xmm0, 32(%rsp)
  147. movsd 56(%rsp), %xmm0
  148. movsd %xmm1, 24(%rsp)
  149. movsd %xmm0, 16(%rsp)
  150. call __libm_sse2_sincos@PLT
  151. ..B2.52:
  152. movaps %xmm0, %xmm2
  153. testl %r13d, %r13d
  154. movsd 24(%rsp), %xmm0
  155. mulsd %xmm1, %xmm0
  156. movsd %xmm0, (%rsp)
  157. jle ..B2.8
  158. ..B2.7:
  159. movsd 32(%rsp), %xmm0
  160. mulsd %xmm2, %xmm0
  161. movsd %xmm0, 32(%rsp)
  162. jmp ..B2.9
  163. ..B2.8:
  164. movsd 32(%rsp), %xmm0
  165. mulsd 16(%rsp), %xmm0
  166. movsd %xmm0, 32(%rsp)
  167. ..B2.9:
  168. movsd %xmm0, 8(%rsp)
  169. movq 96(%rsp), %rax
  170. xorq %rsp, %rax
  171. movsd (%rsp), %xmm0
  172. cmpq %fs:40, %rax
  173. jne ..B2.39
  174. ..B2.10:
  175. movsd 32(%rsp), %xmm1
  176. addq $112, %rsp
  177. .cfi_def_cfa_offset 32
  178. .cfi_restore 15
  179. popq %r15
  180. .cfi_def_cfa_offset 24
  181. .cfi_restore 14
  182. popq %r14
  183. .cfi_def_cfa_offset 16
  184. .cfi_restore 13
  185. popq %r13
  186. .cfi_def_cfa_offset 8
  187. ret
  188. .cfi_def_cfa_offset 144
  189. .cfi_offset 13, -16
  190. .cfi_offset 14, -24
  191. .cfi_offset 15, -32
  192. ..B2.11:
  193. movsd 48(%rsp), %xmm0
  194. lea 64(%rsp), %rdi
  195. ..___tag_value_csinh.28:
  196. call __libm_cosh_k64@PLT
  197. ..___tag_value_csinh.29:
  198. ..B2.53:
  199. movl %eax, %r15d
  200. ..B2.12:
  201. movsd 64(%rsp), %xmm0
  202. movsd 72(%rsp), %xmm4
  203. movaps %xmm0, %xmm5
  204. movsd .L_2il0floatpacket.11(%rip), %xmm3
  205. addsd %xmm4, %xmm5
  206. mulsd %xmm5, %xmm3
  207. movaps %xmm5, %xmm1
  208. subsd %xmm0, %xmm1
  209. movaps %xmm3, %xmm2
  210. subsd %xmm1, %xmm4
  211. subsd %xmm5, %xmm2
  212. movzwl 54(%rsp), %eax
  213. subsd %xmm2, %xmm3
  214. andl $32752, %eax
  215. subsd %xmm3, %xmm5
  216. movsd %xmm3, 64(%rsp)
  217. cmpl $13168, %eax
  218. addsd %xmm4, %xmm5
  219. movsd %xmm5, 72(%rsp)
  220. jge ..B2.14
  221. ..B2.13:
  222. lea 16+_CONSTANTS(%rip), %r14
  223. lea 40(%rsp), %rdx
  224. movsd 8(%rdx), %xmm0
  225. pxor %xmm5, %xmm5
  226. mulsd (%r14), %xmm0
  227. movsd %xmm0, -8(%rdx)
  228. movzwl -2(%rdx), %eax
  229. movl %eax, %r14d
  230. andl $32752, %r14d
  231. andl $-32753, %eax
  232. shrl $4, %r14d
  233. orl $-49168, %eax
  234. movw %ax, -2(%rdx)
  235. addl $-1279, %r14d
  236. jmp ..B2.16
  237. ..B2.14:
  238. movsd 48(%rsp), %xmm0
  239. lea 32(%rsp), %rdi
  240. ..___tag_value_csinh.30:
  241. call __libm_sinh_k64@PLT
  242. ..___tag_value_csinh.31:
  243. ..B2.54:
  244. movl %eax, %r14d
  245. ..B2.15:
  246. lea 40(%rsp), %rdx
  247. movsd (%rdx), %xmm5
  248. ..B2.16:
  249. movsd 32(%rsp), %xmm0
  250. movaps %xmm5, %xmm4
  251. movsd .L_2il0floatpacket.11(%rip), %xmm3
  252. lea 16(%rsp), %rdi
  253. addsd %xmm0, %xmm4
  254. mulsd %xmm4, %xmm3
  255. movaps %xmm4, %xmm1
  256. subsd %xmm0, %xmm1
  257. movaps %xmm3, %xmm2
  258. lea 80(%rsp), %rsi
  259. movsd -24(%rsi), %xmm0
  260. subsd %xmm4, %xmm2
  261. subsd %xmm1, %xmm5
  262. subsd %xmm2, %xmm3
  263. movsd %xmm3, -48(%rsi)
  264. subsd %xmm3, %xmm4
  265. addsd %xmm4, %xmm5
  266. movsd %xmm5, (%rdx)
  267. ..___tag_value_csinh.32:
  268. call __libm_sincos_k64@PLT
  269. ..___tag_value_csinh.33:
  270. ..B2.17:
  271. movsd 80(%rsp), %xmm0
  272. lea 8+_CONSTANTS(%rip), %rax
  273. movsd 88(%rsp), %xmm4
  274. movaps %xmm0, %xmm3
  275. movsd .L_2il0floatpacket.11(%rip), %xmm6
  276. addsd %xmm4, %xmm3
  277. mulsd %xmm3, %xmm6
  278. movaps %xmm3, %xmm1
  279. subsd %xmm0, %xmm1
  280. movaps %xmm6, %xmm2
  281. subsd %xmm1, %xmm4
  282. subsd %xmm3, %xmm2
  283. movsd (%rax), %xmm5
  284. subsd %xmm2, %xmm6
  285. movzwl 62(%rsp), %edx
  286. subsd %xmm6, %xmm3
  287. addsd %xmm5, %xmm6
  288. addsd %xmm3, %xmm4
  289. andl $32752, %edx
  290. movsd %xmm4, 88(%rsp)
  291. cmpl $13168, %edx
  292. movsd %xmm6, 80(%rsp)
  293. jl ..B2.19
  294. ..B2.18:
  295. xorl %r13d, %r13d
  296. lea 24(%rsp), %rdx
  297. movsd (%rdx), %xmm5
  298. jmp ..B2.20
  299. ..B2.19:
  300. lea 16+_CONSTANTS(%rip), %r13
  301. lea 24(%rsp), %rdx
  302. movsd 32(%rdx), %xmm0
  303. pxor %xmm5, %xmm5
  304. mulsd (%r13), %xmm0
  305. movsd %xmm0, -8(%rdx)
  306. movzwl -2(%rdx), %eax
  307. movl %eax, %r13d
  308. andl $32752, %r13d
  309. andl $-32753, %eax
  310. shrl $4, %r13d
  311. orl $-49168, %eax
  312. movw %ax, -2(%rdx)
  313. addl $-1279, %r13d
  314. ..B2.20:
  315. movsd 16(%rsp), %xmm0
  316. movaps %xmm5, %xmm4
  317. movsd .L_2il0floatpacket.11(%rip), %xmm3
  318. lea 32(%rsp), %rsi
  319. movl %r14d, %edi
  320. lea (%rsp), %rcx
  321. addsd %xmm0, %xmm4
  322. mulsd %xmm4, %xmm3
  323. movaps %xmm4, %xmm1
  324. subsd %xmm0, %xmm1
  325. movaps %xmm3, %xmm2
  326. subsd %xmm1, %xmm5
  327. subsd %xmm4, %xmm2
  328. subsd %xmm2, %xmm3
  329. movsd %xmm3, 16(%rcx)
  330. subsd %xmm3, %xmm4
  331. addsd %xmm4, %xmm5
  332. movsd %xmm5, (%rdx)
  333. lea 80(%rsp), %rdx
  334. ..___tag_value_csinh.34:
  335. call __libm_mul_k64@PLT
  336. ..___tag_value_csinh.35:
  337. ..B2.21:
  338. addl %r15d, %r13d
  339. lea 64(%rsp), %rsi
  340. movl %r13d, %edi
  341. lea 16(%rsp), %rdx
  342. lea 8(%rsp), %rcx
  343. ..___tag_value_csinh.36:
  344. call __libm_mul_k64@PLT
  345. ..___tag_value_csinh.37:
  346. ..B2.22:
  347. movsd (%rsp), %xmm0
  348. movhpd 8(%rsp), %xmm0
  349. jmp ..B2.37
  350. ..B2.23:
  351. movzwl 62(%rsp), %r13d
  352. andl $32752, %r13d
  353. shrl $4, %r13d
  354. ..B2.24:
  355. testl %r13d, %r13d
  356. jne ..B2.28
  357. ..B2.25:
  358. testl $1048575, 60(%rsp)
  359. jne ..B2.28
  360. ..B2.26:
  361. cmpl $0, 56(%rsp)
  362. jne ..B2.28
  363. ..B2.27:
  364. movsd 48(%rsp), %xmm0
  365. call sinh@PLT
  366. ..B2.55:
  367. movhpd 56(%rsp), %xmm0
  368. movsd %xmm0, (%rsp)
  369. movhpd %xmm0, 8(%rsp)
  370. jmp ..B2.37
  371. ..B2.28:
  372. cmpl $2047, %r13d
  373. jge ..B2.31
  374. ..B2.29:
  375. movsd 48(%rsp), %xmm0
  376. movsd %xmm0, 32(%rsp)
  377. call sinh@PLT
  378. ..B2.57:
  379. movsd %xmm0, 40(%rsp)
  380. movsd 56(%rsp), %xmm0
  381. movsd %xmm0, 16(%rsp)
  382. call __libm_sse2_sincos@PLT
  383. ..B2.56:
  384. movsd %xmm0, 24(%rsp)
  385. testl %r13d, %r13d
  386. movsd 40(%rsp), %xmm0
  387. mulsd %xmm1, %xmm0
  388. movsd %xmm0, (%rsp)
  389. jle ..B2.45
  390. ..B2.30:
  391. movsd 32(%rsp), %xmm0
  392. call cosh@PLT
  393. ..B2.58:
  394. mulsd 24(%rsp), %xmm0
  395. movsd %xmm0, 8(%rsp)
  396. movsd (%rsp), %xmm0
  397. movhpd 8(%rsp), %xmm0
  398. jmp ..B2.37
  399. ..B2.31:
  400. movsd 56(%rsp), %xmm0
  401. call sin@PLT
  402. ..B2.59:
  403. movsd %xmm0, 8(%rsp)
  404. cmpl $2047, %r14d
  405. je ..B2.35
  406. ..B2.32:
  407. testl %r14d, %r14d
  408. jne ..B2.36
  409. ..B2.33:
  410. testl $1048575, 52(%rsp)
  411. jne ..B2.36
  412. ..B2.34:
  413. cmpl $0, 48(%rsp)
  414. jne ..B2.36
  415. ..B2.35:
  416. movsd 48(%rsp), %xmm0
  417. call sinh@PLT
  418. ..B2.60:
  419. movsd %xmm0, (%rsp)
  420. movhpd 8(%rsp), %xmm0
  421. jmp ..B2.37
  422. ..B2.36:
  423. movsd 48(%rsp), %xmm2
  424. mulsd %xmm0, %xmm2
  425. movaps %xmm2, %xmm0
  426. movhpd 8(%rsp), %xmm0
  427. movsd %xmm2, (%rsp)
  428. ..B2.37:
  429. movq 96(%rsp), %rax
  430. xorq %rsp, %rax
  431. cmpq %fs:40, %rax
  432. jne ..B2.39
  433. ..B2.38:
  434. movaps %xmm0, %xmm1
  435. unpckhpd %xmm0, %xmm1
  436. addq $112, %rsp
  437. .cfi_def_cfa_offset 32
  438. .cfi_restore 15
  439. popq %r15
  440. .cfi_def_cfa_offset 24
  441. .cfi_restore 14
  442. popq %r14
  443. .cfi_def_cfa_offset 16
  444. .cfi_restore 13
  445. popq %r13
  446. .cfi_def_cfa_offset 8
  447. ret
  448. .cfi_def_cfa_offset 144
  449. .cfi_offset 13, -16
  450. .cfi_offset 14, -24
  451. .cfi_offset 15, -32
  452. ..B2.39:
  453. call __stack_chk_fail@PLT
  454. ..B2.40:
  455. testl $1048575, 60(%rsp)
  456. jne ..B2.5
  457. ..B2.41:
  458. cmpl $0, 56(%rsp)
  459. jne ..B2.5
  460. jmp ..B2.24
  461. ..B2.42:
  462. testl $1048575, 52(%rsp)
  463. jne ..B2.3
  464. ..B2.43:
  465. cmpl $0, 48(%rsp)
  466. jne ..B2.3
  467. jmp ..B2.23
  468. ..B2.45:
  469. testl %r14d, %r14d
  470. jne ..B2.48
  471. ..B2.46:
  472. testl $1048575, 52(%rsp)
  473. jne ..B2.48
  474. ..B2.47:
  475. cmpl $0, 48(%rsp)
  476. je ..B2.30
  477. ..B2.48:
  478. movsd 32(%rsp), %xmm0
  479. call cosh@PLT
  480. ..B2.61:
  481. mulsd 16(%rsp), %xmm0
  482. movsd %xmm0, 8(%rsp)
  483. movsd (%rsp), %xmm0
  484. movhpd 8(%rsp), %xmm0
  485. jmp ..B2.37
  486. .align 16,0x90
  487. .cfi_endproc
  488. .type csinh,@function
  489. .size csinh,.-csinh
  490. .data
  491. # -- End csinh
  492. .section .rodata, "a"
  493. .align 8
  494. .align 8
  495. .L_2il0floatpacket.11:
  496. .long 0x02000000,0x41a00000
  497. .type .L_2il0floatpacket.11,@object
  498. .size .L_2il0floatpacket.11,8
  499. .align 4
  500. .L_2il0floatpacket.10:
  501. .long 0x00800000
  502. .type .L_2il0floatpacket.10,@object
  503. .size .L_2il0floatpacket.10,4
  504. .align 4
  505. _CONSTANTS:
  506. .long 0
  507. .long 2145386496
  508. .long 0
  509. .long 1048576
  510. .long 0
  511. .long 1341128704
  512. .type _CONSTANTS,@object
  513. .size _CONSTANTS,24
  514. .data
  515. .section .note.GNU-stack, ""
  516. // -- Begin DWARF2 SEGMENT .eh_frame
  517. .section .eh_frame,"a",@progbits
  518. .eh_frame_seg:
  519. .align 1
  520. # End