acoshf_gen.S 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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 "acoshf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin acoshf
  41. .text
  42. .align 16,0x90
  43. .globl acoshf
  44. acoshf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_acoshf.1:
  49. ..L2:
  50. movd %xmm0, %edx
  51. movss %xmm0, -16(%rsp)
  52. lea -1065353216(%rdx), %eax
  53. cmpl $1073741824, %eax
  54. jae ..B1.11
  55. ..B1.2:
  56. cmpl $4194304, %eax
  57. jae ..B1.6
  58. ..B1.3:
  59. testl %eax, %eax
  60. jne ..B1.5
  61. ..B1.4:
  62. pxor %xmm0, %xmm0
  63. ret
  64. ..B1.5:
  65. pxor %xmm3, %xmm3
  66. cvtss2sd -16(%rsp), %xmm3
  67. movsd .L_2il0floatpacket.0(%rip), %xmm0
  68. movsd %xmm3, -24(%rsp)
  69. addsd %xmm0, %xmm3
  70. movaps %xmm3, %xmm2
  71. mulsd %xmm3, %xmm2
  72. movsd .L_2il0floatpacket.2(%rip), %xmm5
  73. movsd .L_2il0floatpacket.6(%rip), %xmm4
  74. mulsd %xmm2, %xmm5
  75. mulsd %xmm2, %xmm4
  76. addsd .L_2il0floatpacket.3(%rip), %xmm5
  77. addsd .L_2il0floatpacket.7(%rip), %xmm4
  78. mulsd %xmm2, %xmm5
  79. mulsd %xmm2, %xmm4
  80. addsd .L_2il0floatpacket.4(%rip), %xmm5
  81. addsd .L_2il0floatpacket.8(%rip), %xmm4
  82. mulsd %xmm2, %xmm5
  83. mulsd %xmm2, %xmm4
  84. addsd .L_2il0floatpacket.5(%rip), %xmm5
  85. addsd .L_2il0floatpacket.9(%rip), %xmm4
  86. mulsd %xmm2, %xmm5
  87. mulsd %xmm3, %xmm4
  88. movsd .L_2il0floatpacket.1(%rip), %xmm1
  89. addsd %xmm4, %xmm5
  90. mulsd %xmm3, %xmm1
  91. sqrtsd %xmm1, %xmm1
  92. mulsd %xmm1, %xmm5
  93. addsd %xmm1, %xmm5
  94. jmp ..B1.10
  95. ..B1.6:
  96. pxor %xmm1, %xmm1
  97. cmpl $134217728, %eax
  98. cvtss2sd -16(%rsp), %xmm1
  99. jae ..B1.8
  100. ..B1.7:
  101. movaps %xmm1, %xmm0
  102. movl $-1023, %edi
  103. mulsd %xmm1, %xmm0
  104. movsd .L_2il0floatpacket.0(%rip), %xmm2
  105. addsd %xmm2, %xmm0
  106. sqrtsd %xmm0, %xmm0
  107. addsd %xmm0, %xmm1
  108. movsd %xmm1, -24(%rsp)
  109. jmp ..B1.9
  110. ..B1.8:
  111. movsd %xmm1, -24(%rsp)
  112. movl $-1022, %edi
  113. movsd .L_2il0floatpacket.0(%rip), %xmm2
  114. ..B1.9:
  115. movzwl -18(%rsp), %edx
  116. movl %edx, %eax
  117. andl $-32753, %edx
  118. pxor %xmm0, %xmm0
  119. orl $-49168, %edx
  120. andl $32752, %eax
  121. movw %dx, -18(%rsp)
  122. pxor %xmm1, %xmm1
  123. movq __libm_rcp_table_256@GOTPCREL(%rip), %rsi
  124. movl -20(%rsp), %ecx
  125. andl $1048575, %ecx
  126. shrl $12, %ecx
  127. cvtss2sd (%rsi,%rcx,4), %xmm0
  128. mulsd -24(%rsp), %xmm0
  129. movsd .L_2il0floatpacket.11(%rip), %xmm5
  130. addsd %xmm2, %xmm0
  131. mulsd %xmm0, %xmm5
  132. shrl $4, %eax
  133. addsd .L_2il0floatpacket.12(%rip), %xmm5
  134. addl %eax, %edi
  135. cvtsi2sd %edi, %xmm1
  136. mulsd %xmm0, %xmm5
  137. mulsd .L_2il0floatpacket.13(%rip), %xmm1
  138. mulsd %xmm0, %xmm5
  139. movq __libm_logf_table_256@GOTPCREL(%rip), %r8
  140. addsd %xmm0, %xmm5
  141. addsd (%r8,%rcx,8), %xmm1
  142. movsd %xmm0, -24(%rsp)
  143. addsd %xmm1, %xmm5
  144. ..B1.10:
  145. cvtsd2ss %xmm5, %xmm5
  146. movaps %xmm5, %xmm0
  147. ret
  148. ..B1.11:
  149. movl %edx, %eax
  150. andl $2147483647, %eax
  151. cmpl $2139095040, %eax
  152. ja ..B1.14
  153. ..B1.12:
  154. cmpl $2139095040, %edx
  155. je ..B1.14
  156. ..B1.13:
  157. pxor %xmm0, %xmm0
  158. mulss .L_2il0floatpacket.10(%rip), %xmm0
  159. ret
  160. ..B1.14:
  161. movss -16(%rsp), %xmm0
  162. ret
  163. .align 16,0x90
  164. .cfi_endproc
  165. .type acoshf,@function
  166. .size acoshf,.-acoshf
  167. .data
  168. # -- End acoshf
  169. .section .rodata, "a"
  170. .align 8
  171. .align 8
  172. .L_2il0floatpacket.0:
  173. .long 0x00000000,0xbff00000
  174. .type .L_2il0floatpacket.0,@object
  175. .size .L_2il0floatpacket.0,8
  176. .align 8
  177. .L_2il0floatpacket.1:
  178. .long 0x00000000,0x40000000
  179. .type .L_2il0floatpacket.1,@object
  180. .size .L_2il0floatpacket.1,8
  181. .align 8
  182. .L_2il0floatpacket.2:
  183. .long 0xd28ee596,0x3ef3cb17
  184. .type .L_2il0floatpacket.2,@object
  185. .size .L_2il0floatpacket.2,8
  186. .align 8
  187. .L_2il0floatpacket.3:
  188. .long 0x9b9f611c,0x3f31287a
  189. .type .L_2il0floatpacket.3,@object
  190. .size .L_2il0floatpacket.3,8
  191. .align 8
  192. .L_2il0floatpacket.4:
  193. .long 0xac0cf195,0x3f5f1aa4
  194. .type .L_2il0floatpacket.4,@object
  195. .size .L_2il0floatpacket.4,8
  196. .align 8
  197. .L_2il0floatpacket.5:
  198. .long 0x1236cb49,0x3f933333
  199. .type .L_2il0floatpacket.5,@object
  200. .size .L_2il0floatpacket.5,8
  201. .align 8
  202. .L_2il0floatpacket.6:
  203. .long 0xd27f5e7d,0xbf174400
  204. .type .L_2il0floatpacket.6,@object
  205. .size .L_2il0floatpacket.6,8
  206. .align 8
  207. .L_2il0floatpacket.7:
  208. .long 0x4197b1a0,0xbf46d307
  209. .type .L_2il0floatpacket.7,@object
  210. .size .L_2il0floatpacket.7,8
  211. .align 8
  212. .L_2il0floatpacket.8:
  213. .long 0xdacdeace,0xbf76db62
  214. .type .L_2il0floatpacket.8,@object
  215. .size .L_2il0floatpacket.8,8
  216. .align 8
  217. .L_2il0floatpacket.9:
  218. .long 0x552ea1bd,0xbfb55555
  219. .type .L_2il0floatpacket.9,@object
  220. .size .L_2il0floatpacket.9,8
  221. .align 8
  222. .L_2il0floatpacket.11:
  223. .long 0x6890dd10,0x3fd5555a
  224. .type .L_2il0floatpacket.11,@object
  225. .size .L_2il0floatpacket.11,8
  226. .align 8
  227. .L_2il0floatpacket.12:
  228. .long 0xe7362feb,0xbfe00001
  229. .type .L_2il0floatpacket.12,@object
  230. .size .L_2il0floatpacket.12,8
  231. .align 8
  232. .L_2il0floatpacket.13:
  233. .long 0xfefa39ef,0x3fe62e42
  234. .type .L_2il0floatpacket.13,@object
  235. .size .L_2il0floatpacket.13,8
  236. .align 4
  237. .L_2il0floatpacket.10:
  238. .long 0x7f800000
  239. .type .L_2il0floatpacket.10,@object
  240. .size .L_2il0floatpacket.10,4
  241. .data
  242. .section .note.GNU-stack, ""
  243. // -- Begin DWARF2 SEGMENT .eh_frame
  244. .section .eh_frame,"a",@progbits
  245. .eh_frame_seg:
  246. .align 1
  247. # End