sinhf_gen.S 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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 "sinhf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin sinhf
  41. .text
  42. .align 16,0x90
  43. .globl sinhf
  44. sinhf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_sinhf.1:
  49. ..L2:
  50. movd %xmm0, %edx
  51. movss %xmm0, -8(%rsp)
  52. movl %edx, %eax
  53. andl $2147483647, %eax
  54. cmpl $1107296256, %eax
  55. jae ..B1.14
  56. ..B1.2:
  57. cmpl $1056964608, %eax
  58. jae ..B1.13
  59. ..B1.3:
  60. cmpl $1031798784, %eax
  61. jae ..B1.12
  62. ..B1.4:
  63. cmpl $838860800, %eax
  64. jae ..B1.11
  65. ..B1.5:
  66. shrl $31, %edx
  67. cmpl $8388608, %eax
  68. jb ..B1.7
  69. ..B1.6:
  70. movss .L_2il0floatpacket.16(%rip), %xmm1
  71. addss %xmm0, %xmm1
  72. movss %xmm1, -16(%rsp)
  73. ret
  74. ..B1.7:
  75. testl %eax, %eax
  76. je ..B1.9
  77. ..B1.8:
  78. lea _small_value_32(%rip), %rax
  79. movss (%rax,%rdx,4), %xmm0
  80. mulss .L_2il0floatpacket.15(%rip), %xmm0
  81. movss %xmm0, -16(%rsp)
  82. movss -16(%rsp), %xmm0
  83. addss -8(%rsp), %xmm0
  84. ret
  85. ..B1.9:
  86. movss -8(%rsp), %xmm0
  87. ..B1.10:
  88. ret
  89. ..B1.11:
  90. pxor %xmm1, %xmm1
  91. cvtss2sd -8(%rsp), %xmm1
  92. movaps %xmm1, %xmm0
  93. mulsd %xmm1, %xmm0
  94. movsd .L_2il0floatpacket.13(%rip), %xmm2
  95. mulsd %xmm0, %xmm2
  96. addsd .L_2il0floatpacket.14(%rip), %xmm2
  97. mulsd %xmm0, %xmm2
  98. mulsd %xmm1, %xmm2
  99. addsd %xmm1, %xmm2
  100. cvtsd2ss %xmm2, %xmm2
  101. movaps %xmm2, %xmm0
  102. ret
  103. ..B1.12:
  104. pxor %xmm3, %xmm3
  105. cvtss2sd -8(%rsp), %xmm3
  106. movaps %xmm3, %xmm1
  107. mulsd %xmm3, %xmm1
  108. movaps %xmm1, %xmm0
  109. mulsd %xmm1, %xmm0
  110. movsd .L_2il0floatpacket.8(%rip), %xmm4
  111. movsd .L_2il0floatpacket.10(%rip), %xmm2
  112. mulsd %xmm0, %xmm4
  113. mulsd %xmm0, %xmm2
  114. addsd .L_2il0floatpacket.9(%rip), %xmm4
  115. addsd .L_2il0floatpacket.11(%rip), %xmm2
  116. mulsd %xmm0, %xmm4
  117. mulsd %xmm1, %xmm2
  118. addsd %xmm2, %xmm4
  119. mulsd %xmm3, %xmm4
  120. addsd %xmm3, %xmm4
  121. cvtsd2ss %xmm4, %xmm4
  122. movaps %xmm4, %xmm0
  123. ret
  124. ..B1.13:
  125. pxor %xmm3, %xmm3
  126. andl $-2147483648, %edx
  127. cvtss2sd -8(%rsp), %xmm3
  128. andps .L_2il0floatpacket.17(%rip), %xmm3
  129. pxor %xmm4, %xmm4
  130. movsd .L_2il0floatpacket.0(%rip), %xmm0
  131. pxor %xmm6, %xmm6
  132. mulsd %xmm3, %xmm0
  133. movsd .L_2il0floatpacket.4(%rip), %xmm7
  134. movsd .L_2il0floatpacket.6(%rip), %xmm5
  135. addsd .L_2il0floatpacket.1(%rip), %xmm0
  136. cvtsd2ss %xmm0, %xmm0
  137. movss %xmm0, -16(%rsp)
  138. movss -16(%rsp), %xmm1
  139. movl -16(%rsp), %esi
  140. movl %esi, %eax
  141. shll $26, %eax
  142. subss .L_2il0floatpacket.2(%rip), %xmm1
  143. cvtss2sd %xmm1, %xmm1
  144. mulsd .L_2il0floatpacket.3(%rip), %xmm1
  145. sarl $26, %eax
  146. addsd %xmm1, %xmm3
  147. movaps %xmm3, %xmm2
  148. mulsd %xmm3, %xmm2
  149. mulsd %xmm2, %xmm7
  150. mulsd %xmm2, %xmm5
  151. addsd .L_2il0floatpacket.5(%rip), %xmm7
  152. addsd .L_2il0floatpacket.7(%rip), %xmm5
  153. mulsd %xmm2, %xmm7
  154. mulsd %xmm3, %xmm5
  155. addsd .L_2il0floatpacket.18(%rip), %xmm7
  156. movslq %eax, %rax
  157. movaps %xmm7, %xmm0
  158. subl %eax, %esi
  159. addsd %xmm5, %xmm0
  160. subsd %xmm5, %xmm7
  161. shrl $6, %esi
  162. shll $23, %esi
  163. shlq $3, %rax
  164. lea 1056964608(%rsi), %ecx
  165. negl %esi
  166. addl $1056964608, %esi
  167. orl %edx, %ecx
  168. orl %esi, %edx
  169. movl %edx, -20(%rsp)
  170. movq __libm_expf_table_64@GOTPCREL(%rip), %rdx
  171. movl %ecx, -24(%rsp)
  172. cvtss2sd -24(%rsp), %xmm4
  173. cvtss2sd -20(%rsp), %xmm6
  174. mulsd 256(%rdx,%rax), %xmm0
  175. negq %rax
  176. mulsd %xmm4, %xmm0
  177. mulsd 256(%rdx,%rax), %xmm7
  178. mulsd %xmm6, %xmm7
  179. subsd %xmm7, %xmm0
  180. cvtsd2ss %xmm0, %xmm0
  181. ret
  182. ..B1.14:
  183. cmpl $1119016188, %eax
  184. jbe ..B1.18
  185. ..B1.15:
  186. cmpl $2139095040, %eax
  187. jb ..B1.19
  188. ..B1.16:
  189. movss -8(%rsp), %xmm0
  190. addss %xmm0, %xmm0
  191. ..B1.17:
  192. ret
  193. ..B1.18:
  194. pxor %xmm3, %xmm3
  195. andl $-2147483648, %edx
  196. cvtss2sd -8(%rsp), %xmm3
  197. andps .L_2il0floatpacket.17(%rip), %xmm3
  198. movsd .L_2il0floatpacket.0(%rip), %xmm0
  199. mulsd %xmm3, %xmm0
  200. movsd .L_2il0floatpacket.6(%rip), %xmm4
  201. movl $0, -24(%rsp)
  202. addsd .L_2il0floatpacket.1(%rip), %xmm0
  203. cvtsd2ss %xmm0, %xmm0
  204. movss %xmm0, -16(%rsp)
  205. movss -16(%rsp), %xmm1
  206. movsd .L_2il0floatpacket.4(%rip), %xmm0
  207. movl -16(%rsp), %eax
  208. movl %eax, %ecx
  209. shll $26, %ecx
  210. subss .L_2il0floatpacket.2(%rip), %xmm1
  211. cvtss2sd %xmm1, %xmm1
  212. mulsd .L_2il0floatpacket.3(%rip), %xmm1
  213. sarl $26, %ecx
  214. addsd %xmm1, %xmm3
  215. movaps %xmm3, %xmm2
  216. subl %ecx, %eax
  217. mulsd %xmm3, %xmm2
  218. mulsd %xmm2, %xmm0
  219. mulsd %xmm2, %xmm4
  220. addsd .L_2il0floatpacket.5(%rip), %xmm0
  221. addsd .L_2il0floatpacket.7(%rip), %xmm4
  222. mulsd %xmm2, %xmm0
  223. mulsd %xmm3, %xmm4
  224. shrl $6, %eax
  225. addsd %xmm4, %xmm0
  226. shll $20, %eax
  227. addsd .L_2il0floatpacket.18(%rip), %xmm0
  228. addl $1071644672, %eax
  229. movslq %ecx, %rcx
  230. orl %eax, %edx
  231. movl %edx, -20(%rsp)
  232. movq __libm_expf_table_64@GOTPCREL(%rip), %rdx
  233. mulsd 256(%rdx,%rcx,8), %xmm0
  234. mulsd -24(%rsp), %xmm0
  235. cvtsd2ss %xmm0, %xmm0
  236. ret
  237. ..B1.19:
  238. lea _large_value_32(%rip), %rax
  239. shrl $31, %edx
  240. movss (%rax,%rdx,4), %xmm0
  241. mulss .L_2il0floatpacket.12(%rip), %xmm0
  242. ret
  243. .align 16,0x90
  244. .cfi_endproc
  245. .type sinhf,@function
  246. .size sinhf,.-sinhf
  247. .data
  248. # -- End sinhf
  249. .section .rodata, "a"
  250. .align 16
  251. .align 16
  252. .L_2il0floatpacket.17:
  253. .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
  254. .type .L_2il0floatpacket.17,@object
  255. .size .L_2il0floatpacket.17,16
  256. .align 8
  257. .L_2il0floatpacket.0:
  258. .long 0x652b82fe,0x40571547
  259. .type .L_2il0floatpacket.0,@object
  260. .size .L_2il0floatpacket.0,8
  261. .align 8
  262. .L_2il0floatpacket.1:
  263. .long 0x00000000,0x41680000
  264. .type .L_2il0floatpacket.1,@object
  265. .size .L_2il0floatpacket.1,8
  266. .align 8
  267. .L_2il0floatpacket.3:
  268. .long 0xfefa39ef,0xbf862e42
  269. .type .L_2il0floatpacket.3,@object
  270. .size .L_2il0floatpacket.3,8
  271. .align 8
  272. .L_2il0floatpacket.4:
  273. .long 0xeb78fa85,0x3fa56420
  274. .type .L_2il0floatpacket.4,@object
  275. .size .L_2il0floatpacket.4,8
  276. .align 8
  277. .L_2il0floatpacket.5:
  278. .long 0x008d6118,0x3fe00000
  279. .type .L_2il0floatpacket.5,@object
  280. .size .L_2il0floatpacket.5,8
  281. .align 8
  282. .L_2il0floatpacket.6:
  283. .long 0xda752d4f,0x3fc55550
  284. .type .L_2il0floatpacket.6,@object
  285. .size .L_2il0floatpacket.6,8
  286. .align 8
  287. .L_2il0floatpacket.7:
  288. .long 0xffffe7c6,0x3fefffff
  289. .type .L_2il0floatpacket.7,@object
  290. .size .L_2il0floatpacket.7,8
  291. .align 8
  292. .L_2il0floatpacket.8:
  293. .long 0x4bc96d7d,0x3ec749d8
  294. .type .L_2il0floatpacket.8,@object
  295. .size .L_2il0floatpacket.8,8
  296. .align 8
  297. .L_2il0floatpacket.9:
  298. .long 0x326ed15a,0x3f811111
  299. .type .L_2il0floatpacket.9,@object
  300. .size .L_2il0floatpacket.9,8
  301. .align 8
  302. .L_2il0floatpacket.10:
  303. .long 0xd09557cf,0x3f2a0168
  304. .type .L_2il0floatpacket.10,@object
  305. .size .L_2il0floatpacket.10,8
  306. .align 8
  307. .L_2il0floatpacket.11:
  308. .long 0x552ed1e2,0x3fc55555
  309. .type .L_2il0floatpacket.11,@object
  310. .size .L_2il0floatpacket.11,8
  311. .align 8
  312. .L_2il0floatpacket.13:
  313. .long 0x1fc8e65a,0x3f8111c7
  314. .type .L_2il0floatpacket.13,@object
  315. .size .L_2il0floatpacket.13,8
  316. .align 8
  317. .L_2il0floatpacket.14:
  318. .long 0x4fa4d5d9,0x3fc55555
  319. .type .L_2il0floatpacket.14,@object
  320. .size .L_2il0floatpacket.14,8
  321. .align 8
  322. .L_2il0floatpacket.18:
  323. .long 0x00000000,0x3ff00000
  324. .type .L_2il0floatpacket.18,@object
  325. .size .L_2il0floatpacket.18,8
  326. .align 4
  327. .L_2il0floatpacket.2:
  328. .long 0x4b400000
  329. .type .L_2il0floatpacket.2,@object
  330. .size .L_2il0floatpacket.2,4
  331. .align 4
  332. .L_2il0floatpacket.12:
  333. .long 0x71800000
  334. .type .L_2il0floatpacket.12,@object
  335. .size .L_2il0floatpacket.12,4
  336. .align 4
  337. .L_2il0floatpacket.15:
  338. .long 0x0d800000
  339. .type .L_2il0floatpacket.15,@object
  340. .size .L_2il0floatpacket.15,4
  341. .align 4
  342. .L_2il0floatpacket.16:
  343. .long 0x3f800000
  344. .type .L_2il0floatpacket.16,@object
  345. .size .L_2il0floatpacket.16,4
  346. .align 4
  347. _small_value_32:
  348. .long 226492416
  349. .long 2373976064
  350. .type _small_value_32,@object
  351. .size _small_value_32,8
  352. .align 4
  353. _large_value_32:
  354. .long 1904214016
  355. .long 4051697664
  356. .type _large_value_32,@object
  357. .size _large_value_32,8
  358. .data
  359. .section .note.GNU-stack, ""
  360. // -- Begin DWARF2 SEGMENT .eh_frame
  361. .section .eh_frame,"a",@progbits
  362. .eh_frame_seg:
  363. .align 1
  364. # End