atanf_gen.S 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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 "atanf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin atanf
  41. .text
  42. .align 16,0x90
  43. .globl atanf
  44. atanf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_atanf.1:
  49. ..L2:
  50. pxor %xmm5, %xmm5
  51. movd %xmm0, %edx
  52. cvtss2sd %xmm0, %xmm5
  53. movl %edx, %eax
  54. andl $2147483647, %eax
  55. cmpl $1300234240, %eax
  56. jae ..B1.14
  57. ..B1.2:
  58. cmpl $1073741824, %eax
  59. jae ..B1.13
  60. ..B1.3:
  61. cmpl $1056964608, %eax
  62. jae ..B1.12
  63. ..B1.4:
  64. cmpl $964689920, %eax
  65. jae ..B1.11
  66. ..B1.5:
  67. shrl $31, %edx
  68. cmpl $8388608, %eax
  69. jb ..B1.7
  70. ..B1.6:
  71. movl %edx, %edx
  72. lea _small_value_32(%rip), %rax
  73. movss (%rax,%rdx,4), %xmm1
  74. mulss .L_2il0floatpacket.17(%rip), %xmm1
  75. subss %xmm1, %xmm0
  76. ret
  77. ..B1.7:
  78. testl %eax, %eax
  79. je ..B1.10
  80. ..B1.8:
  81. lea _small_value_32(%rip), %rax
  82. pxor %xmm1, %xmm1
  83. movss (%rax,%rdx,4), %xmm0
  84. mulss .L_2il0floatpacket.17(%rip), %xmm0
  85. cvtss2sd %xmm0, %xmm0
  86. cvtsd2ss %xmm0, %xmm1
  87. subsd %xmm0, %xmm5
  88. pxor %xmm0, %xmm0
  89. movss %xmm1, -8(%rsp)
  90. cvtsd2ss %xmm5, %xmm0
  91. ..B1.10:
  92. ret
  93. ..B1.11:
  94. movaps %xmm5, %xmm1
  95. mulsd %xmm5, %xmm1
  96. movaps %xmm1, %xmm0
  97. mulsd %xmm1, %xmm0
  98. movsd .L_2il0floatpacket.4(%rip), %xmm2
  99. mulsd %xmm0, %xmm2
  100. movsd .L_2il0floatpacket.0(%rip), %xmm3
  101. mulsd %xmm0, %xmm3
  102. addsd .L_2il0floatpacket.5(%rip), %xmm2
  103. mulsd %xmm0, %xmm2
  104. addsd .L_2il0floatpacket.1(%rip), %xmm3
  105. mulsd %xmm0, %xmm3
  106. addsd .L_2il0floatpacket.6(%rip), %xmm2
  107. mulsd %xmm0, %xmm2
  108. addsd .L_2il0floatpacket.2(%rip), %xmm3
  109. mulsd %xmm0, %xmm3
  110. addsd .L_2il0floatpacket.7(%rip), %xmm2
  111. mulsd %xmm0, %xmm2
  112. addsd .L_2il0floatpacket.3(%rip), %xmm3
  113. mulsd %xmm0, %xmm3
  114. addsd .L_2il0floatpacket.8(%rip), %xmm2
  115. mulsd %xmm1, %xmm2
  116. pxor %xmm0, %xmm0
  117. addsd %xmm2, %xmm3
  118. mulsd %xmm5, %xmm3
  119. subsd %xmm3, %xmm5
  120. cvtsd2ss %xmm5, %xmm0
  121. ret
  122. ..B1.12:
  123. andps .L_2il0floatpacket.19(%rip), %xmm5
  124. testl $-2147483648, %edx
  125. movsd .L_2il0floatpacket.9(%rip), %xmm4
  126. movsd .L_2il0floatpacket.18(%rip), %xmm1
  127. addsd %xmm5, %xmm4
  128. addsd %xmm1, %xmm5
  129. divsd %xmm5, %xmm4
  130. movaps %xmm4, %xmm0
  131. mulsd %xmm4, %xmm0
  132. movaps %xmm0, %xmm2
  133. mulsd %xmm0, %xmm2
  134. movsd .L_2il0floatpacket.10(%rip), %xmm5
  135. mulsd %xmm2, %xmm5
  136. movsd .L_2il0floatpacket.13(%rip), %xmm3
  137. mulsd %xmm2, %xmm3
  138. addsd .L_2il0floatpacket.11(%rip), %xmm5
  139. mulsd %xmm2, %xmm5
  140. addsd .L_2il0floatpacket.14(%rip), %xmm3
  141. mulsd %xmm2, %xmm3
  142. addsd .L_2il0floatpacket.12(%rip), %xmm5
  143. mulsd %xmm0, %xmm5
  144. addsd .L_2il0floatpacket.15(%rip), %xmm3
  145. addsd %xmm3, %xmm5
  146. mulsd %xmm4, %xmm5
  147. addsd .L_2il0floatpacket.16(%rip), %xmm5
  148. movaps %xmm5, %xmm0
  149. xorps .L_2il0floatpacket.20(%rip), %xmm0
  150. jne ..L3
  151. movaps %xmm5, %xmm0
  152. ..L3:
  153. cvtsd2ss %xmm0, %xmm0
  154. ret
  155. ..B1.13:
  156. movsd .L_2il0floatpacket.18(%rip), %xmm2
  157. lea pi_2d(%rip), %rax
  158. divsd %xmm5, %xmm2
  159. movaps %xmm2, %xmm0
  160. mulsd %xmm2, %xmm0
  161. movaps %xmm0, %xmm5
  162. mulsd %xmm0, %xmm5
  163. movsd .L_2il0floatpacket.4(%rip), %xmm1
  164. mulsd %xmm5, %xmm1
  165. movsd .L_2il0floatpacket.0(%rip), %xmm3
  166. mulsd %xmm5, %xmm3
  167. addsd .L_2il0floatpacket.5(%rip), %xmm1
  168. mulsd %xmm5, %xmm1
  169. addsd .L_2il0floatpacket.1(%rip), %xmm3
  170. mulsd %xmm5, %xmm3
  171. addsd .L_2il0floatpacket.6(%rip), %xmm1
  172. mulsd %xmm5, %xmm1
  173. addsd .L_2il0floatpacket.2(%rip), %xmm3
  174. mulsd %xmm5, %xmm3
  175. addsd .L_2il0floatpacket.7(%rip), %xmm1
  176. mulsd %xmm5, %xmm1
  177. addsd .L_2il0floatpacket.3(%rip), %xmm3
  178. mulsd %xmm5, %xmm3
  179. addsd .L_2il0floatpacket.8(%rip), %xmm1
  180. mulsd %xmm0, %xmm1
  181. shrl $31, %edx
  182. addsd %xmm1, %xmm3
  183. movsd (%rax,%rdx,8), %xmm0
  184. mulsd %xmm2, %xmm3
  185. subsd %xmm2, %xmm0
  186. addsd %xmm3, %xmm0
  187. cvtsd2ss %xmm0, %xmm0
  188. ret
  189. ..B1.14:
  190. cmpl $2139095040, %eax
  191. ja ..B1.17
  192. ..B1.15:
  193. lea pi_2f(%rip), %rax
  194. lea _small_value_32(%rip), %rcx
  195. shrl $31, %edx
  196. movss (%rax,%rdx,4), %xmm0
  197. subss (%rcx,%rdx,4), %xmm0
  198. ..B1.17:
  199. ret
  200. .align 16,0x90
  201. .cfi_endproc
  202. .type atanf,@function
  203. .size atanf,.-atanf
  204. .data
  205. # -- End atanf
  206. .section .rodata, "a"
  207. .align 16
  208. .align 16
  209. .L_2il0floatpacket.19:
  210. .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
  211. .type .L_2il0floatpacket.19,@object
  212. .size .L_2il0floatpacket.19,16
  213. .align 16
  214. .L_2il0floatpacket.20:
  215. .long 0x00000000,0x80000000,0x00000000,0x00000000
  216. .type .L_2il0floatpacket.20,@object
  217. .size .L_2il0floatpacket.20,16
  218. .align 8
  219. .L_2il0floatpacket.0:
  220. .long 0xd091d944,0xbf9ca14d
  221. .type .L_2il0floatpacket.0,@object
  222. .size .L_2il0floatpacket.0,8
  223. .align 8
  224. .L_2il0floatpacket.1:
  225. .long 0x12effb80,0xbfb28de9
  226. .type .L_2il0floatpacket.1,@object
  227. .size .L_2il0floatpacket.1,8
  228. .align 8
  229. .L_2il0floatpacket.2:
  230. .long 0xcda40e6e,0xbfbc6a7e
  231. .type .L_2il0floatpacket.2,@object
  232. .size .L_2il0floatpacket.2,8
  233. .align 8
  234. .L_2il0floatpacket.3:
  235. .long 0x1185f36d,0xbfc99997
  236. .type .L_2il0floatpacket.3,@object
  237. .size .L_2il0floatpacket.3,8
  238. .align 8
  239. .L_2il0floatpacket.4:
  240. .long 0x3cb73089,0x3f7fa335
  241. .type .L_2il0floatpacket.4,@object
  242. .size .L_2il0floatpacket.4,8
  243. .align 8
  244. .L_2il0floatpacket.5:
  245. .long 0x44053df6,0x3faac31f
  246. .type .L_2il0floatpacket.5,@object
  247. .size .L_2il0floatpacket.5,8
  248. .align 8
  249. .L_2il0floatpacket.6:
  250. .long 0x1cf194fa,0x3fb70b87
  251. .type .L_2il0floatpacket.6,@object
  252. .size .L_2il0floatpacket.6,8
  253. .align 8
  254. .L_2il0floatpacket.7:
  255. .long 0xb177868e,0x3fc248e0
  256. .type .L_2il0floatpacket.7,@object
  257. .size .L_2il0floatpacket.7,8
  258. .align 8
  259. .L_2il0floatpacket.8:
  260. .long 0x509fdfb1,0x3fd55555
  261. .type .L_2il0floatpacket.8,@object
  262. .size .L_2il0floatpacket.8,8
  263. .align 8
  264. .L_2il0floatpacket.9:
  265. .long 0x00000000,0xbff00000
  266. .type .L_2il0floatpacket.9,@object
  267. .size .L_2il0floatpacket.9,8
  268. .align 8
  269. .L_2il0floatpacket.10:
  270. .long 0xd9d9aa33,0xbfb1c1c0
  271. .type .L_2il0floatpacket.10,@object
  272. .size .L_2il0floatpacket.10,8
  273. .align 8
  274. .L_2il0floatpacket.11:
  275. .long 0x04ba093e,0xbfc24485
  276. .type .L_2il0floatpacket.11,@object
  277. .size .L_2il0floatpacket.11,8
  278. .align 8
  279. .L_2il0floatpacket.12:
  280. .long 0x312dd43c,0xbfd55555
  281. .type .L_2il0floatpacket.12,@object
  282. .size .L_2il0floatpacket.12,8
  283. .align 8
  284. .L_2il0floatpacket.13:
  285. .long 0x947e6edc,0x3fbbcbeb
  286. .type .L_2il0floatpacket.13,@object
  287. .size .L_2il0floatpacket.13,8
  288. .align 8
  289. .L_2il0floatpacket.14:
  290. .long 0x700fa0b3,0x3fc9997b
  291. .type .L_2il0floatpacket.14,@object
  292. .size .L_2il0floatpacket.14,8
  293. .align 8
  294. .L_2il0floatpacket.15:
  295. .long 0xfff8f7db,0x3fefffff
  296. .type .L_2il0floatpacket.15,@object
  297. .size .L_2il0floatpacket.15,8
  298. .align 8
  299. .L_2il0floatpacket.16:
  300. .long 0x54442d18,0x3fe921fb
  301. .type .L_2il0floatpacket.16,@object
  302. .size .L_2il0floatpacket.16,8
  303. .align 8
  304. .L_2il0floatpacket.18:
  305. .long 0x00000000,0x3ff00000
  306. .type .L_2il0floatpacket.18,@object
  307. .size .L_2il0floatpacket.18,8
  308. .align 8
  309. pi_2d:
  310. .long 0x54442d18,0x3ff921fb
  311. .long 0x54442d18,0xbff921fb
  312. .type pi_2d,@object
  313. .size pi_2d,16
  314. .align 4
  315. .L_2il0floatpacket.17:
  316. .long 0x0d800000
  317. .type .L_2il0floatpacket.17,@object
  318. .size .L_2il0floatpacket.17,4
  319. .align 4
  320. _small_value_32:
  321. .long 226492416
  322. .long 2373976064
  323. .type _small_value_32,@object
  324. .size _small_value_32,8
  325. .align 4
  326. pi_2f:
  327. .long 0x3fc90fdb
  328. .long 0xbfc90fdb
  329. .type pi_2f,@object
  330. .size pi_2f,8
  331. .data
  332. .section .note.GNU-stack, ""
  333. // -- Begin DWARF2 SEGMENT .eh_frame
  334. .section .eh_frame,"a",@progbits
  335. .eh_frame_seg:
  336. .align 1
  337. # End