libm_cosh_k64.S 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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 "libm_cosh_k64.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin __libm_cosh_k64
  41. .text
  42. .align 16,0x90
  43. .globl __libm_cosh_k64
  44. __libm_cosh_k64:
  45. # parameter 1: %xmm0
  46. # parameter 2: %rdi
  47. ..B1.1:
  48. .cfi_startproc
  49. ..___tag_value___libm_cosh_k64.1:
  50. ..L2:
  51. movsd %xmm0, -32(%rsp)
  52. movzwl -26(%rsp), %eax
  53. andl $32752, %eax
  54. cmpl $16720, %eax
  55. jge ..B1.12
  56. ..B1.2:
  57. movl -28(%rsp), %edx
  58. andl $2147483647, %edx
  59. cmpl $1065646817, %edx
  60. jae ..B1.7
  61. ..B1.3:
  62. cmpl $1012924416, %edx
  63. jae ..B1.5
  64. ..B1.4:
  65. movq $0x3ff0000000000000, %rax
  66. movq %rax, (%rdi)
  67. movq $0, 8(%rdi)
  68. jmp ..B1.6
  69. ..B1.5:
  70. movsd -32(%rsp), %xmm0
  71. movq $0x3ff0000000000000, %rax
  72. mulsd %xmm0, %xmm0
  73. movaps %xmm0, %xmm1
  74. mulsd %xmm0, %xmm1
  75. movsd .L_2il0floatpacket.3(%rip), %xmm3
  76. mulsd %xmm1, %xmm3
  77. movsd .L_2il0floatpacket.5(%rip), %xmm2
  78. mulsd %xmm1, %xmm2
  79. addsd .L_2il0floatpacket.4(%rip), %xmm3
  80. mulsd %xmm0, %xmm3
  81. movsd %xmm0, -40(%rsp)
  82. addsd %xmm2, %xmm3
  83. movq %rax, (%rdi)
  84. movsd %xmm3, 8(%rdi)
  85. ..B1.6:
  86. xorl %eax, %eax
  87. ret
  88. ..B1.7:
  89. movsd -32(%rsp), %xmm2
  90. lea _TWO_52(%rip), %rax
  91. andps .L_2il0floatpacket.12(%rip), %xmm2
  92. movsd .L_2il0floatpacket.0(%rip), %xmm4
  93. mulsd %xmm2, %xmm4
  94. movsd (%rax), %xmm0
  95. movsd .L_2il0floatpacket.1(%rip), %xmm1
  96. addsd %xmm0, %xmm4
  97. movsd %xmm4, -40(%rsp)
  98. subsd %xmm0, %xmm4
  99. mulsd %xmm4, %xmm1
  100. movsd %xmm2, -32(%rsp)
  101. subsd %xmm1, %xmm2
  102. movsd .L_2il0floatpacket.2(%rip), %xmm3
  103. movaps %xmm2, %xmm6
  104. mulsd %xmm3, %xmm4
  105. movl -40(%rsp), %eax
  106. movl %eax, %r8d
  107. shll $25, %r8d
  108. subsd %xmm4, %xmm6
  109. sarl $25, %r8d
  110. subsd %xmm6, %xmm2
  111. subl %r8d, %eax
  112. subsd %xmm4, %xmm2
  113. movsd .L_2il0floatpacket.11(%rip), %xmm1
  114. movaps %xmm2, %xmm0
  115. sarl $7, %eax
  116. addsd %xmm6, %xmm0
  117. addsd %xmm6, %xmm1
  118. movzwl 6+.L_2il0floatpacket.11(%rip), %esi
  119. cmpl $1077338037, %edx
  120. jae ..B1.9
  121. ..B1.8:
  122. movaps %xmm0, %xmm7
  123. xorl %edx, %edx
  124. mulsd %xmm0, %xmm7
  125. movaps %xmm6, %xmm9
  126. movsd .L_2il0floatpacket.7(%rip), %xmm8
  127. movl %eax, %ecx
  128. mulsd %xmm7, %xmm8
  129. negl %ecx
  130. movsd .L_2il0floatpacket.11(%rip), %xmm3
  131. addl $1023, %ecx
  132. movsd %xmm1, -32(%rsp)
  133. subl %eax, %ecx
  134. movl %edx, -32(%rsp)
  135. andl $2047, %ecx
  136. movsd -32(%rsp), %xmm10
  137. andl $-32753, %esi
  138. movsd .L_2il0floatpacket.6(%rip), %xmm4
  139. decl %eax
  140. movsd .L_2il0floatpacket.6(%rip), %xmm5
  141. subsd %xmm6, %xmm3
  142. addsd .L_2il0floatpacket.8(%rip), %xmm8
  143. addsd %xmm10, %xmm4
  144. mulsd %xmm7, %xmm8
  145. subsd %xmm4, %xmm9
  146. mulsd %xmm0, %xmm8
  147. addsd %xmm2, %xmm9
  148. movsd .L_2il0floatpacket.9(%rip), %xmm0
  149. addsd %xmm8, %xmm9
  150. mulsd %xmm7, %xmm0
  151. movsd %xmm3, -24(%rsp)
  152. movl %edx, -24(%rsp)
  153. movsd -24(%rsp), %xmm1
  154. movslq %r8d, %r8
  155. addsd .L_2il0floatpacket.10(%rip), %xmm0
  156. addsd %xmm1, %xmm5
  157. mulsd %xmm7, %xmm0
  158. addsd %xmm5, %xmm6
  159. addsd .L_2il0floatpacket.4(%rip), %xmm0
  160. addsd %xmm6, %xmm2
  161. mulsd %xmm7, %xmm0
  162. xorps .L_2il0floatpacket.13(%rip), %xmm2
  163. addsd %xmm0, %xmm9
  164. subsd %xmm8, %xmm2
  165. movaps %xmm9, %xmm15
  166. addsd %xmm10, %xmm9
  167. addsd %xmm0, %xmm2
  168. movsd .L_2il0floatpacket.11(%rip), %xmm6
  169. movaps %xmm2, %xmm12
  170. shll $4, %ecx
  171. addsd %xmm1, %xmm2
  172. shlq $4, %r8
  173. orl %ecx, %esi
  174. movsd %xmm6, -16(%rsp)
  175. movw %si, -10(%rsp)
  176. movq __libm_exp_table_128@GOTPCREL(%rip), %rsi
  177. movsd 1032(%r8,%rsi), %xmm13
  178. mulsd 1024(%r8,%rsi), %xmm9
  179. negq %r8
  180. mulsd %xmm13, %xmm15
  181. mulsd 1024(%rsi,%r8), %xmm2
  182. mulsd %xmm10, %xmm13
  183. addsd %xmm9, %xmm15
  184. movsd 1032(%rsi,%r8), %xmm11
  185. movaps %xmm13, %xmm14
  186. mulsd %xmm11, %xmm12
  187. mulsd %xmm11, %xmm1
  188. addsd %xmm2, %xmm12
  189. movsd -16(%rsp), %xmm2
  190. mulsd %xmm2, %xmm1
  191. mulsd %xmm2, %xmm12
  192. addsd %xmm1, %xmm14
  193. addsd %xmm12, %xmm15
  194. subsd %xmm14, %xmm13
  195. movsd %xmm1, -24(%rsp)
  196. addsd %xmm1, %xmm13
  197. movsd %xmm14, -40(%rsp)
  198. addsd %xmm13, %xmm15
  199. movsd %xmm13, -32(%rsp)
  200. movsd %xmm14, (%rdi)
  201. movsd %xmm15, 8(%rdi)
  202. ret
  203. ..B1.9:
  204. movsd %xmm1, -40(%rsp)
  205. movaps %xmm0, %xmm4
  206. movl $0, -40(%rsp)
  207. decl %eax
  208. movsd -40(%rsp), %xmm7
  209. movsd .L_2il0floatpacket.6(%rip), %xmm1
  210. mulsd %xmm0, %xmm4
  211. addsd %xmm7, %xmm1
  212. movsd .L_2il0floatpacket.9(%rip), %xmm5
  213. subsd %xmm1, %xmm6
  214. mulsd %xmm4, %xmm5
  215. addsd %xmm6, %xmm2
  216. addsd .L_2il0floatpacket.10(%rip), %xmm5
  217. movsd .L_2il0floatpacket.7(%rip), %xmm6
  218. mulsd %xmm4, %xmm6
  219. mulsd %xmm4, %xmm5
  220. addsd .L_2il0floatpacket.8(%rip), %xmm6
  221. mulsd %xmm6, %xmm0
  222. movsd .L_2il0floatpacket.4(%rip), %xmm3
  223. addsd %xmm0, %xmm5
  224. mulsd %xmm4, %xmm5
  225. mulsd %xmm3, %xmm4
  226. movslq %r8d, %r8
  227. addsd %xmm4, %xmm5
  228. shlq $4, %r8
  229. addsd %xmm5, %xmm2
  230. movaps %xmm2, %xmm8
  231. addsd %xmm7, %xmm2
  232. movq __libm_exp_table_128@GOTPCREL(%rip), %rdx
  233. movsd 1032(%r8,%rdx), %xmm0
  234. mulsd 1024(%r8,%rdx), %xmm2
  235. mulsd %xmm0, %xmm8
  236. mulsd %xmm0, %xmm7
  237. addsd %xmm2, %xmm8
  238. movsd %xmm7, -40(%rsp)
  239. movsd %xmm7, (%rdi)
  240. movsd %xmm8, 8(%rdi)
  241. ..B1.10:
  242. ret
  243. ..B1.12:
  244. xorl %eax, %eax
  245. movq %rax, (%rdi)
  246. movq %rax, 8(%rdi)
  247. ..B1.13:
  248. xorl %eax, %eax
  249. ret
  250. .align 16,0x90
  251. .cfi_endproc
  252. .type __libm_cosh_k64,@function
  253. .size __libm_cosh_k64,.-__libm_cosh_k64
  254. .data
  255. # -- End __libm_cosh_k64
  256. .section .rodata, "a"
  257. .align 16
  258. .align 16
  259. .L_2il0floatpacket.12:
  260. .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
  261. .type .L_2il0floatpacket.12,@object
  262. .size .L_2il0floatpacket.12,16
  263. .align 16
  264. .L_2il0floatpacket.13:
  265. .long 0x00000000,0x80000000,0x00000000,0x00000000
  266. .type .L_2il0floatpacket.13,@object
  267. .size .L_2il0floatpacket.13,16
  268. .align 8
  269. .L_2il0floatpacket.0:
  270. .long 0x652b82fe,0x40671547
  271. .type .L_2il0floatpacket.0,@object
  272. .size .L_2il0floatpacket.0,8
  273. .align 8
  274. .L_2il0floatpacket.1:
  275. .long 0x00000000,0x3f762e42
  276. .type .L_2il0floatpacket.1,@object
  277. .size .L_2il0floatpacket.1,8
  278. .align 8
  279. .L_2il0floatpacket.2:
  280. .long 0x3de6af28,0x3e2fdf47
  281. .type .L_2il0floatpacket.2,@object
  282. .size .L_2il0floatpacket.2,8
  283. .align 8
  284. .L_2il0floatpacket.3:
  285. .long 0x6a3d464e,0x3f56c171
  286. .type .L_2il0floatpacket.3,@object
  287. .size .L_2il0floatpacket.3,8
  288. .align 8
  289. .L_2il0floatpacket.4:
  290. .long 0x00000000,0x3fe00000
  291. .type .L_2il0floatpacket.4,@object
  292. .size .L_2il0floatpacket.4,8
  293. .align 8
  294. .L_2il0floatpacket.5:
  295. .long 0x5554a6cf,0x3fa55555
  296. .type .L_2il0floatpacket.5,@object
  297. .size .L_2il0floatpacket.5,8
  298. .align 8
  299. .L_2il0floatpacket.6:
  300. .long 0x00000000,0xbff00000
  301. .type .L_2il0floatpacket.6,@object
  302. .size .L_2il0floatpacket.6,8
  303. .align 8
  304. .L_2il0floatpacket.7:
  305. .long 0x6887cd7c,0x3f811111
  306. .type .L_2il0floatpacket.7,@object
  307. .size .L_2il0floatpacket.7,8
  308. .align 8
  309. .L_2il0floatpacket.8:
  310. .long 0x55555405,0x3fc55555
  311. .type .L_2il0floatpacket.8,@object
  312. .size .L_2il0floatpacket.8,8
  313. .align 8
  314. .L_2il0floatpacket.9:
  315. .long 0x87372663,0x3f56c16c
  316. .type .L_2il0floatpacket.9,@object
  317. .size .L_2il0floatpacket.9,8
  318. .align 8
  319. .L_2il0floatpacket.10:
  320. .long 0x5555541d,0x3fa55555
  321. .type .L_2il0floatpacket.10,@object
  322. .size .L_2il0floatpacket.10,8
  323. .align 8
  324. .L_2il0floatpacket.11:
  325. .long 0x00000000,0x3ff00000
  326. .type .L_2il0floatpacket.11,@object
  327. .size .L_2il0floatpacket.11,8
  328. .align 4
  329. _TWO_52:
  330. .long 0
  331. .long 1127219200
  332. .type _TWO_52,@object
  333. .size _TWO_52,8
  334. .data
  335. .section .note.GNU-stack, ""
  336. // -- Begin DWARF2 SEGMENT .eh_frame
  337. .section .eh_frame,"a",@progbits
  338. .eh_frame_seg:
  339. .align 1
  340. # End