libm_sinh_k64.S 12 KB

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