asinhf_gen.S 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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 "asinhf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin asinhf
  41. .text
  42. .align 16,0x90
  43. .globl asinhf
  44. asinhf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_asinhf.1:
  49. ..L2:
  50. movd %xmm0, %edx
  51. movss %xmm0, -8(%rsp)
  52. movl %edx, %eax
  53. andl $2147483647, %eax
  54. cmpl $2139095040, %eax
  55. jge ..B1.15
  56. ..B1.2:
  57. cmpl $1056964608, %eax
  58. jge ..B1.11
  59. ..B1.3:
  60. cmpl $838860800, %eax
  61. jge ..B1.10
  62. ..B1.4:
  63. shrl $31, %edx
  64. cmpl $8388608, %eax
  65. jl ..B1.6
  66. ..B1.5:
  67. movss .L_2il0floatpacket.8(%rip), %xmm1
  68. lea _MINNORM(%rip), %rax
  69. mulss %xmm1, %xmm0
  70. movl %edx, %edx
  71. subss (%rax,%rdx,4), %xmm0
  72. mulss .L_2il0floatpacket.9(%rip), %xmm0
  73. ret
  74. ..B1.6:
  75. testl %eax, %eax
  76. je ..B1.8
  77. ..B1.7:
  78. lea _small_value_32(%rip), %rax
  79. pxor %xmm2, %xmm2
  80. pxor %xmm1, %xmm1
  81. cvtss2sd -8(%rsp), %xmm2
  82. movss (%rax,%rdx,4), %xmm0
  83. mulss .L_2il0floatpacket.9(%rip), %xmm0
  84. cvtss2sd %xmm0, %xmm0
  85. cvtsd2ss %xmm0, %xmm1
  86. subsd %xmm0, %xmm2
  87. pxor %xmm0, %xmm0
  88. movss %xmm1, -24(%rsp)
  89. cvtsd2ss %xmm2, %xmm0
  90. ret
  91. ..B1.8:
  92. movss -8(%rsp), %xmm0
  93. ..B1.9:
  94. ret
  95. ..B1.10:
  96. pxor %xmm3, %xmm3
  97. cvtss2sd -8(%rsp), %xmm3
  98. movaps %xmm3, %xmm1
  99. mulsd %xmm3, %xmm1
  100. movaps %xmm1, %xmm0
  101. mulsd %xmm1, %xmm0
  102. movsd .L_2il0floatpacket.0(%rip), %xmm4
  103. movsd .L_2il0floatpacket.4(%rip), %xmm2
  104. mulsd %xmm0, %xmm4
  105. mulsd %xmm0, %xmm2
  106. addsd .L_2il0floatpacket.1(%rip), %xmm4
  107. addsd .L_2il0floatpacket.5(%rip), %xmm2
  108. mulsd %xmm0, %xmm4
  109. mulsd %xmm0, %xmm2
  110. addsd .L_2il0floatpacket.2(%rip), %xmm4
  111. addsd .L_2il0floatpacket.6(%rip), %xmm2
  112. mulsd %xmm0, %xmm4
  113. mulsd %xmm0, %xmm2
  114. addsd .L_2il0floatpacket.3(%rip), %xmm4
  115. addsd .L_2il0floatpacket.7(%rip), %xmm2
  116. mulsd %xmm0, %xmm4
  117. mulsd %xmm1, %xmm2
  118. movsd %xmm3, -16(%rsp)
  119. addsd %xmm2, %xmm4
  120. mulsd %xmm3, %xmm4
  121. addsd %xmm3, %xmm4
  122. cvtsd2ss %xmm4, %xmm4
  123. movaps %xmm4, %xmm0
  124. ret
  125. ..B1.11:
  126. pxor %xmm1, %xmm1
  127. cmpl $1199570944, %eax
  128. cvtss2sd -8(%rsp), %xmm1
  129. andps .L_2il0floatpacket.15(%rip), %xmm1
  130. jge ..B1.13
  131. ..B1.12:
  132. movaps %xmm1, %xmm0
  133. movl $-1023, %r8d
  134. mulsd %xmm1, %xmm0
  135. addsd .L_2il0floatpacket.14(%rip), %xmm0
  136. sqrtsd %xmm0, %xmm0
  137. addsd %xmm0, %xmm1
  138. movsd %xmm1, -16(%rsp)
  139. jmp ..B1.14
  140. ..B1.13:
  141. movsd %xmm1, -16(%rsp)
  142. movl $-1022, %r8d
  143. ..B1.14:
  144. movzwl -10(%rsp), %ecx
  145. movl %ecx, %eax
  146. andl $-32753, %ecx
  147. pxor %xmm0, %xmm0
  148. orl $-49168, %ecx
  149. andl $32752, %eax
  150. movw %cx, -10(%rsp)
  151. pxor %xmm1, %xmm1
  152. movq __libm_rcp_table_256@GOTPCREL(%rip), %rdi
  153. movl -12(%rsp), %esi
  154. andl $1048575, %esi
  155. shrl $12, %esi
  156. cvtss2sd (%rdi,%rsi,4), %xmm0
  157. mulsd -16(%rsp), %xmm0
  158. movsd .L_2il0floatpacket.11(%rip), %xmm2
  159. shrl $4, %eax
  160. addsd .L_2il0floatpacket.10(%rip), %xmm0
  161. mulsd %xmm0, %xmm2
  162. addl %eax, %r8d
  163. cvtsi2sd %r8d, %xmm1
  164. addsd .L_2il0floatpacket.12(%rip), %xmm2
  165. mulsd .L_2il0floatpacket.13(%rip), %xmm1
  166. mulsd %xmm0, %xmm2
  167. mulsd %xmm0, %xmm2
  168. testl $-2147483648, %edx
  169. movq __libm_logf_table_256@GOTPCREL(%rip), %r9
  170. addsd %xmm0, %xmm2
  171. addsd (%r9,%rsi,8), %xmm1
  172. addsd %xmm1, %xmm2
  173. movaps %xmm2, %xmm0
  174. xorps .L_2il0floatpacket.16(%rip), %xmm0
  175. jne ..L3
  176. movaps %xmm2, %xmm0
  177. ..L3:
  178. cvtsd2ss %xmm0, %xmm0
  179. ret
  180. ..B1.15:
  181. movss -8(%rsp), %xmm0
  182. ret
  183. .align 16,0x90
  184. .cfi_endproc
  185. .type asinhf,@function
  186. .size asinhf,.-asinhf
  187. .data
  188. # -- End asinhf
  189. .section .rodata, "a"
  190. .align 16
  191. .align 16
  192. .L_2il0floatpacket.15:
  193. .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
  194. .type .L_2il0floatpacket.15,@object
  195. .size .L_2il0floatpacket.15,16
  196. .align 16
  197. .L_2il0floatpacket.16:
  198. .long 0x00000000,0x80000000,0x00000000,0x00000000
  199. .type .L_2il0floatpacket.16,@object
  200. .size .L_2il0floatpacket.16,16
  201. .align 8
  202. .L_2il0floatpacket.0:
  203. .long 0xd28ee596,0x3f73cb17
  204. .type .L_2il0floatpacket.0,@object
  205. .size .L_2il0floatpacket.0,8
  206. .align 8
  207. .L_2il0floatpacket.1:
  208. .long 0x9b9f611c,0x3f91287a
  209. .type .L_2il0floatpacket.1,@object
  210. .size .L_2il0floatpacket.1,8
  211. .align 8
  212. .L_2il0floatpacket.2:
  213. .long 0xac0cf195,0x3f9f1aa4
  214. .type .L_2il0floatpacket.2,@object
  215. .size .L_2il0floatpacket.2,8
  216. .align 8
  217. .L_2il0floatpacket.3:
  218. .long 0x1236cb49,0x3fb33333
  219. .type .L_2il0floatpacket.3,@object
  220. .size .L_2il0floatpacket.3,8
  221. .align 8
  222. .L_2il0floatpacket.4:
  223. .long 0xd27f5e7d,0xbf874400
  224. .type .L_2il0floatpacket.4,@object
  225. .size .L_2il0floatpacket.4,8
  226. .align 8
  227. .L_2il0floatpacket.5:
  228. .long 0x4197b1a0,0xbf96d307
  229. .type .L_2il0floatpacket.5,@object
  230. .size .L_2il0floatpacket.5,8
  231. .align 8
  232. .L_2il0floatpacket.6:
  233. .long 0xdacdeace,0xbfa6db62
  234. .type .L_2il0floatpacket.6,@object
  235. .size .L_2il0floatpacket.6,8
  236. .align 8
  237. .L_2il0floatpacket.7:
  238. .long 0x552ea1bd,0xbfc55555
  239. .type .L_2il0floatpacket.7,@object
  240. .size .L_2il0floatpacket.7,8
  241. .align 8
  242. .L_2il0floatpacket.10:
  243. .long 0x00000000,0xbff00000
  244. .type .L_2il0floatpacket.10,@object
  245. .size .L_2il0floatpacket.10,8
  246. .align 8
  247. .L_2il0floatpacket.11:
  248. .long 0x6890dd10,0x3fd5555a
  249. .type .L_2il0floatpacket.11,@object
  250. .size .L_2il0floatpacket.11,8
  251. .align 8
  252. .L_2il0floatpacket.12:
  253. .long 0xe7362feb,0xbfe00001
  254. .type .L_2il0floatpacket.12,@object
  255. .size .L_2il0floatpacket.12,8
  256. .align 8
  257. .L_2il0floatpacket.13:
  258. .long 0xfefa39ef,0x3fe62e42
  259. .type .L_2il0floatpacket.13,@object
  260. .size .L_2il0floatpacket.13,8
  261. .align 8
  262. .L_2il0floatpacket.14:
  263. .long 0x00000000,0x3ff00000
  264. .type .L_2il0floatpacket.14,@object
  265. .size .L_2il0floatpacket.14,8
  266. .align 4
  267. .L_2il0floatpacket.8:
  268. .long 0x71800000
  269. .type .L_2il0floatpacket.8,@object
  270. .size .L_2il0floatpacket.8,4
  271. .align 4
  272. .L_2il0floatpacket.9:
  273. .long 0x0d800000
  274. .type .L_2il0floatpacket.9,@object
  275. .size .L_2il0floatpacket.9,4
  276. .align 4
  277. _MINNORM:
  278. .long 8388608
  279. .long 2155872256
  280. .type _MINNORM,@object
  281. .size _MINNORM,8
  282. .align 4
  283. _small_value_32:
  284. .long 226492416
  285. .long 2373976064
  286. .type _small_value_32,@object
  287. .size _small_value_32,8
  288. .data
  289. .section .note.GNU-stack, ""
  290. // -- Begin DWARF2 SEGMENT .eh_frame
  291. .section .eh_frame,"a",@progbits
  292. .eh_frame_seg:
  293. .align 1
  294. # End