acosf_gen.S 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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 "acosf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin acosf
  41. .text
  42. .align 16,0x90
  43. .globl acosf
  44. acosf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_acosf.1:
  49. ..L2:
  50. movd %xmm0, %edx
  51. movss %xmm0, -8(%rsp)
  52. movl %edx, %eax
  53. andl $2147483647, %eax
  54. cmpl $1065353216, %eax
  55. jae ..B1.10
  56. ..B1.2:
  57. cmpl $1056964608, %eax
  58. jae ..B1.6
  59. ..B1.3:
  60. cmpl $838860800, %eax
  61. jae ..B1.5
  62. ..B1.4:
  63. cvtss2sd %xmm0, %xmm0
  64. movsd .L_2il0floatpacket.8(%rip), %xmm1
  65. subsd %xmm0, %xmm1
  66. cvtsd2ss %xmm1, %xmm1
  67. movaps %xmm1, %xmm0
  68. ret
  69. ..B1.5:
  70. pxor %xmm5, %xmm5
  71. cvtss2sd -8(%rsp), %xmm5
  72. movaps %xmm5, %xmm1
  73. mulsd %xmm5, %xmm1
  74. movaps %xmm1, %xmm0
  75. mulsd %xmm1, %xmm0
  76. movsd .L_2il0floatpacket.0(%rip), %xmm4
  77. movsd .L_2il0floatpacket.4(%rip), %xmm2
  78. mulsd %xmm0, %xmm4
  79. mulsd %xmm0, %xmm2
  80. addsd .L_2il0floatpacket.1(%rip), %xmm4
  81. addsd .L_2il0floatpacket.5(%rip), %xmm2
  82. mulsd %xmm0, %xmm4
  83. mulsd %xmm0, %xmm2
  84. addsd .L_2il0floatpacket.2(%rip), %xmm4
  85. addsd .L_2il0floatpacket.6(%rip), %xmm2
  86. mulsd %xmm0, %xmm4
  87. mulsd %xmm0, %xmm2
  88. addsd .L_2il0floatpacket.3(%rip), %xmm4
  89. addsd .L_2il0floatpacket.7(%rip), %xmm2
  90. mulsd %xmm0, %xmm4
  91. mulsd %xmm1, %xmm2
  92. movsd .L_2il0floatpacket.8(%rip), %xmm3
  93. addsd %xmm2, %xmm4
  94. subsd %xmm5, %xmm3
  95. mulsd %xmm4, %xmm5
  96. subsd %xmm5, %xmm3
  97. jmp ..B1.9
  98. ..B1.6:
  99. pxor %xmm3, %xmm3
  100. testl $-2147483648, %edx
  101. cvtss2sd -8(%rsp), %xmm3
  102. movsd .L_2il0floatpacket.1(%rip), %xmm6
  103. movsd .L_2il0floatpacket.2(%rip), %xmm9
  104. movsd .L_2il0floatpacket.3(%rip), %xmm10
  105. movsd .L_2il0floatpacket.5(%rip), %xmm0
  106. movsd .L_2il0floatpacket.6(%rip), %xmm1
  107. movsd .L_2il0floatpacket.7(%rip), %xmm2
  108. je ..B1.8
  109. ..B1.7:
  110. movsd .L_2il0floatpacket.13(%rip), %xmm5
  111. pxor %xmm8, %xmm8
  112. movsd .L_2il0floatpacket.0(%rip), %xmm7
  113. addsd %xmm3, %xmm5
  114. mulsd .L_2il0floatpacket.9(%rip), %xmm5
  115. movaps %xmm5, %xmm4
  116. mulsd %xmm5, %xmm4
  117. sqrtsd %xmm5, %xmm8
  118. mulsd %xmm4, %xmm7
  119. mulsd .L_2il0floatpacket.10(%rip), %xmm8
  120. addsd %xmm6, %xmm7
  121. movsd .L_2il0floatpacket.4(%rip), %xmm6
  122. mulsd %xmm4, %xmm6
  123. mulsd %xmm4, %xmm7
  124. addsd %xmm0, %xmm6
  125. addsd %xmm9, %xmm7
  126. mulsd %xmm4, %xmm6
  127. mulsd %xmm4, %xmm7
  128. addsd %xmm1, %xmm6
  129. addsd %xmm10, %xmm7
  130. mulsd %xmm4, %xmm6
  131. mulsd %xmm4, %xmm7
  132. addsd %xmm2, %xmm6
  133. mulsd %xmm5, %xmm6
  134. movsd .L_2il0floatpacket.11(%rip), %xmm3
  135. addsd %xmm6, %xmm7
  136. subsd %xmm8, %xmm3
  137. mulsd %xmm7, %xmm8
  138. subsd %xmm8, %xmm3
  139. jmp ..B1.9
  140. ..B1.8:
  141. movsd .L_2il0floatpacket.13(%rip), %xmm5
  142. movsd .L_2il0floatpacket.0(%rip), %xmm7
  143. subsd %xmm3, %xmm5
  144. mulsd .L_2il0floatpacket.9(%rip), %xmm5
  145. pxor %xmm3, %xmm3
  146. movaps %xmm5, %xmm4
  147. mulsd %xmm5, %xmm4
  148. sqrtsd %xmm5, %xmm3
  149. mulsd %xmm4, %xmm7
  150. mulsd .L_2il0floatpacket.10(%rip), %xmm3
  151. addsd %xmm6, %xmm7
  152. movsd .L_2il0floatpacket.4(%rip), %xmm6
  153. mulsd %xmm4, %xmm6
  154. mulsd %xmm4, %xmm7
  155. addsd %xmm0, %xmm6
  156. addsd %xmm9, %xmm7
  157. mulsd %xmm4, %xmm6
  158. mulsd %xmm4, %xmm7
  159. addsd %xmm1, %xmm6
  160. addsd %xmm10, %xmm7
  161. mulsd %xmm4, %xmm6
  162. mulsd %xmm4, %xmm7
  163. addsd %xmm2, %xmm6
  164. mulsd %xmm5, %xmm6
  165. addsd %xmm6, %xmm7
  166. mulsd %xmm3, %xmm7
  167. addsd %xmm7, %xmm3
  168. ..B1.9:
  169. cvtsd2ss %xmm3, %xmm3
  170. movaps %xmm3, %xmm0
  171. ret
  172. ..B1.10:
  173. cmpl $2139095040, %eax
  174. ja ..B1.16
  175. ..B1.11:
  176. cmpl $1065353216, %eax
  177. jne ..B1.17
  178. ..B1.12:
  179. testl $-2147483648, %edx
  180. je ..B1.14
  181. ..B1.13:
  182. lea _small_value_64(%rip), %rax
  183. movsd .L_2il0floatpacket.11(%rip), %xmm0
  184. addsd (%rax), %xmm0
  185. cvtsd2ss %xmm0, %xmm0
  186. ret
  187. ..B1.14:
  188. pxor %xmm0, %xmm0
  189. ..B1.15:
  190. ret
  191. ..B1.16:
  192. movss -8(%rsp), %xmm0
  193. ret
  194. ..B1.17:
  195. pxor %xmm0, %xmm0
  196. mulss .L_2il0floatpacket.12(%rip), %xmm0
  197. ret
  198. .align 16,0x90
  199. .cfi_endproc
  200. .type acosf,@function
  201. .size acosf,.-acosf
  202. .data
  203. # -- End acosf
  204. .section .rodata, "a"
  205. .align 8
  206. .align 8
  207. .L_2il0floatpacket.0:
  208. .long 0xa6220783,0x3f9e3be5
  209. .type .L_2il0floatpacket.0,@object
  210. .size .L_2il0floatpacket.0,8
  211. .align 8
  212. .L_2il0floatpacket.1:
  213. .long 0xb5dc5888,0x3f93d64d
  214. .type .L_2il0floatpacket.1,@object
  215. .size .L_2il0floatpacket.1,8
  216. .align 8
  217. .L_2il0floatpacket.2:
  218. .long 0x5290ac8c,0x3f9f20d0
  219. .type .L_2il0floatpacket.2,@object
  220. .size .L_2il0floatpacket.2,8
  221. .align 8
  222. .L_2il0floatpacket.3:
  223. .long 0x4fa3bc7b,0x3fb33333
  224. .type .L_2il0floatpacket.3,@object
  225. .size .L_2il0floatpacket.3,8
  226. .align 8
  227. .L_2il0floatpacket.4:
  228. .long 0xa9336e0b,0x3f758206
  229. .type .L_2il0floatpacket.4,@object
  230. .size .L_2il0floatpacket.4,8
  231. .align 8
  232. .L_2il0floatpacket.5:
  233. .long 0xecc3fecb,0x3f96a6f2
  234. .type .L_2il0floatpacket.5,@object
  235. .size .L_2il0floatpacket.5,8
  236. .align 8
  237. .L_2il0floatpacket.6:
  238. .long 0x9e7be0cc,0x3fa6db5b
  239. .type .L_2il0floatpacket.6,@object
  240. .size .L_2il0floatpacket.6,8
  241. .align 8
  242. .L_2il0floatpacket.7:
  243. .long 0x554dfea4,0x3fc55555
  244. .type .L_2il0floatpacket.7,@object
  245. .size .L_2il0floatpacket.7,8
  246. .align 8
  247. .L_2il0floatpacket.8:
  248. .long 0x54442d18,0x3ff921fb
  249. .type .L_2il0floatpacket.8,@object
  250. .size .L_2il0floatpacket.8,8
  251. .align 8
  252. .L_2il0floatpacket.9:
  253. .long 0x00000000,0x3fe00000
  254. .type .L_2il0floatpacket.9,@object
  255. .size .L_2il0floatpacket.9,8
  256. .align 8
  257. .L_2il0floatpacket.10:
  258. .long 0x00000000,0x40000000
  259. .type .L_2il0floatpacket.10,@object
  260. .size .L_2il0floatpacket.10,8
  261. .align 8
  262. .L_2il0floatpacket.11:
  263. .long 0x54442d18,0x400921fb
  264. .type .L_2il0floatpacket.11,@object
  265. .size .L_2il0floatpacket.11,8
  266. .align 8
  267. .L_2il0floatpacket.13:
  268. .long 0x00000000,0x3ff00000
  269. .type .L_2il0floatpacket.13,@object
  270. .size .L_2il0floatpacket.13,8
  271. .align 4
  272. .L_2il0floatpacket.12:
  273. .long 0x7f800000
  274. .type .L_2il0floatpacket.12,@object
  275. .size .L_2il0floatpacket.12,4
  276. .align 4
  277. _small_value_64:
  278. .long 0
  279. .long 24117248
  280. .long 0
  281. .long 2171600896
  282. .type _small_value_64,@object
  283. .size _small_value_64,16
  284. .data
  285. .section .note.GNU-stack, ""
  286. // -- Begin DWARF2 SEGMENT .eh_frame
  287. .section .eh_frame,"a",@progbits
  288. .eh_frame_seg:
  289. .align 1
  290. # End