asinf_gen.S 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  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 "asinf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin asinf
  41. .text
  42. .align 16,0x90
  43. .globl asinf
  44. asinf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_asinf.1:
  49. ..L2:
  50. movd %xmm0, %edx
  51. movss %xmm0, -16(%rsp)
  52. movl %edx, %eax
  53. andl $2147483647, %eax
  54. cmpl $1065353216, %eax
  55. jae ..B1.14
  56. ..B1.2:
  57. pxor %xmm5, %xmm5
  58. cmpl $1056964608, %eax
  59. cvtss2sd %xmm0, %xmm5
  60. jae ..B1.11
  61. ..B1.3:
  62. cmpl $947912704, %eax
  63. jae ..B1.10
  64. ..B1.4:
  65. shrl $31, %edx
  66. cmpl $8388608, %eax
  67. jb ..B1.6
  68. ..B1.5:
  69. movl %edx, %edx
  70. lea _small_value_32(%rip), %rax
  71. movss (%rax,%rdx,4), %xmm1
  72. mulss .L_2il0floatpacket.26(%rip), %xmm1
  73. addss %xmm1, %xmm0
  74. ret
  75. ..B1.6:
  76. testl %eax, %eax
  77. je ..B1.9
  78. ..B1.7:
  79. lea _small_value_32(%rip), %rax
  80. pxor %xmm2, %xmm2
  81. pxor %xmm1, %xmm1
  82. cvtss2sd -16(%rsp), %xmm2
  83. movss (%rax,%rdx,4), %xmm0
  84. mulss .L_2il0floatpacket.26(%rip), %xmm0
  85. cvtss2sd %xmm0, %xmm0
  86. cvtsd2ss %xmm0, %xmm1
  87. addsd %xmm2, %xmm0
  88. movss %xmm1, -24(%rsp)
  89. cvtsd2ss %xmm0, %xmm0
  90. ..B1.9:
  91. ret
  92. ..B1.10:
  93. movaps %xmm5, %xmm1
  94. mulsd %xmm5, %xmm1
  95. movaps %xmm1, %xmm0
  96. mulsd %xmm1, %xmm0
  97. movsd .L_2il0floatpacket.0(%rip), %xmm3
  98. movsd .L_2il0floatpacket.4(%rip), %xmm2
  99. mulsd %xmm0, %xmm3
  100. mulsd %xmm0, %xmm2
  101. addsd .L_2il0floatpacket.1(%rip), %xmm3
  102. addsd .L_2il0floatpacket.5(%rip), %xmm2
  103. mulsd %xmm0, %xmm3
  104. mulsd %xmm0, %xmm2
  105. addsd .L_2il0floatpacket.2(%rip), %xmm3
  106. addsd .L_2il0floatpacket.6(%rip), %xmm2
  107. mulsd %xmm0, %xmm3
  108. mulsd %xmm0, %xmm2
  109. addsd .L_2il0floatpacket.3(%rip), %xmm3
  110. addsd .L_2il0floatpacket.7(%rip), %xmm2
  111. mulsd %xmm0, %xmm3
  112. mulsd %xmm1, %xmm2
  113. pxor %xmm0, %xmm0
  114. addsd %xmm2, %xmm3
  115. mulsd %xmm5, %xmm3
  116. addsd %xmm3, %xmm5
  117. cvtsd2ss %xmm5, %xmm0
  118. ret
  119. ..B1.11:
  120. cmpl $1061997772, %eax
  121. jb ..B1.13
  122. ..B1.12:
  123. andps .L_2il0floatpacket.28(%rip), %xmm5
  124. pxor %xmm4, %xmm4
  125. movsd .L_2il0floatpacket.27(%rip), %xmm1
  126. testl %edx, %edx
  127. movsd .L_2il0floatpacket.0(%rip), %xmm3
  128. subsd %xmm5, %xmm1
  129. mulsd .L_2il0floatpacket.22(%rip), %xmm1
  130. movaps %xmm1, %xmm0
  131. mulsd %xmm1, %xmm0
  132. sqrtsd %xmm1, %xmm4
  133. mulsd %xmm0, %xmm3
  134. movsd .L_2il0floatpacket.4(%rip), %xmm2
  135. mulsd %xmm0, %xmm2
  136. addsd .L_2il0floatpacket.1(%rip), %xmm3
  137. mulsd %xmm0, %xmm3
  138. addsd .L_2il0floatpacket.5(%rip), %xmm2
  139. mulsd %xmm0, %xmm2
  140. addsd .L_2il0floatpacket.2(%rip), %xmm3
  141. mulsd %xmm0, %xmm3
  142. addsd .L_2il0floatpacket.6(%rip), %xmm2
  143. mulsd %xmm0, %xmm2
  144. addsd .L_2il0floatpacket.3(%rip), %xmm3
  145. mulsd %xmm0, %xmm3
  146. addsd .L_2il0floatpacket.7(%rip), %xmm2
  147. mulsd %xmm1, %xmm2
  148. addsd %xmm2, %xmm3
  149. mulsd %xmm4, %xmm3
  150. addsd %xmm3, %xmm4
  151. mulsd .L_2il0floatpacket.24(%rip), %xmm4
  152. addsd .L_2il0floatpacket.23(%rip), %xmm4
  153. movaps %xmm4, %xmm0
  154. xorps .L_2il0floatpacket.29(%rip), %xmm0
  155. jl ..L3
  156. movaps %xmm4, %xmm0
  157. ..L3:
  158. cvtsd2ss %xmm0, %xmm0
  159. ret
  160. ..B1.13:
  161. movaps %xmm5, %xmm1
  162. mulsd %xmm5, %xmm1
  163. movsd .L_2il0floatpacket.9(%rip), %xmm4
  164. movsd .L_2il0floatpacket.15(%rip), %xmm3
  165. addsd .L_2il0floatpacket.8(%rip), %xmm1
  166. movaps %xmm1, %xmm2
  167. mulsd %xmm1, %xmm2
  168. mulsd %xmm2, %xmm4
  169. mulsd %xmm2, %xmm3
  170. addsd .L_2il0floatpacket.10(%rip), %xmm4
  171. addsd .L_2il0floatpacket.16(%rip), %xmm3
  172. mulsd %xmm2, %xmm4
  173. mulsd %xmm2, %xmm3
  174. addsd .L_2il0floatpacket.11(%rip), %xmm4
  175. addsd .L_2il0floatpacket.17(%rip), %xmm3
  176. mulsd %xmm2, %xmm4
  177. mulsd %xmm2, %xmm3
  178. addsd .L_2il0floatpacket.12(%rip), %xmm4
  179. addsd .L_2il0floatpacket.18(%rip), %xmm3
  180. mulsd %xmm2, %xmm4
  181. mulsd %xmm2, %xmm3
  182. addsd .L_2il0floatpacket.13(%rip), %xmm4
  183. addsd .L_2il0floatpacket.19(%rip), %xmm3
  184. mulsd %xmm2, %xmm4
  185. mulsd %xmm2, %xmm3
  186. addsd .L_2il0floatpacket.14(%rip), %xmm4
  187. addsd .L_2il0floatpacket.20(%rip), %xmm3
  188. mulsd %xmm1, %xmm4
  189. addsd %xmm3, %xmm4
  190. addsd .L_2il0floatpacket.21(%rip), %xmm4
  191. mulsd %xmm5, %xmm4
  192. addsd %xmm4, %xmm5
  193. cvtsd2ss %xmm5, %xmm5
  194. movaps %xmm5, %xmm0
  195. ret
  196. ..B1.14:
  197. cmpl $2139095040, %eax
  198. ja ..B1.18
  199. ..B1.15:
  200. cmpl $1065353216, %eax
  201. jne ..B1.19
  202. ..B1.16:
  203. lea pi_2f(%rip), %rax
  204. lea _small_value_32(%rip), %rcx
  205. shrl $31, %edx
  206. movss (%rax,%rdx,4), %xmm0
  207. subss (%rcx,%rdx,4), %xmm0
  208. ..B1.17:
  209. ret
  210. ..B1.18:
  211. movss -16(%rsp), %xmm0
  212. ret
  213. ..B1.19:
  214. pxor %xmm0, %xmm0
  215. mulss .L_2il0floatpacket.25(%rip), %xmm0
  216. ret
  217. .align 16,0x90
  218. .cfi_endproc
  219. .type asinf,@function
  220. .size asinf,.-asinf
  221. .data
  222. # -- End asinf
  223. .section .rodata, "a"
  224. .align 16
  225. .align 16
  226. .L_2il0floatpacket.28:
  227. .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
  228. .type .L_2il0floatpacket.28,@object
  229. .size .L_2il0floatpacket.28,16
  230. .align 16
  231. .L_2il0floatpacket.29:
  232. .long 0x00000000,0x80000000,0x00000000,0x00000000
  233. .type .L_2il0floatpacket.29,@object
  234. .size .L_2il0floatpacket.29,16
  235. .align 8
  236. .L_2il0floatpacket.0:
  237. .long 0x32950b15,0x3fa10044
  238. .type .L_2il0floatpacket.0,@object
  239. .size .L_2il0floatpacket.0,8
  240. .align 8
  241. .L_2il0floatpacket.1:
  242. .long 0x0f078e5a,0x3f9547bd
  243. .type .L_2il0floatpacket.1,@object
  244. .size .L_2il0floatpacket.1,8
  245. .align 8
  246. .L_2il0floatpacket.2:
  247. .long 0x282596ea,0x3f9f2932
  248. .type .L_2il0floatpacket.2,@object
  249. .size .L_2il0floatpacket.2,8
  250. .align 8
  251. .L_2il0floatpacket.3:
  252. .long 0x3b07aed0,0x3fb33334
  253. .type .L_2il0floatpacket.3,@object
  254. .size .L_2il0floatpacket.3,8
  255. .align 8
  256. .L_2il0floatpacket.4:
  257. .long 0x15b528b3,0x3f5b565b
  258. .type .L_2il0floatpacket.4,@object
  259. .size .L_2il0floatpacket.4,8
  260. .align 8
  261. .L_2il0floatpacket.5:
  262. .long 0x1acf0c57,0x3f965bd0
  263. .type .L_2il0floatpacket.5,@object
  264. .size .L_2il0floatpacket.5,8
  265. .align 8
  266. .L_2il0floatpacket.6:
  267. .long 0x8a6efcbd,0x3fa6db1b
  268. .type .L_2il0floatpacket.6,@object
  269. .size .L_2il0floatpacket.6,8
  270. .align 8
  271. .L_2il0floatpacket.7:
  272. .long 0x541021e2,0x3fc55555
  273. .type .L_2il0floatpacket.7,@object
  274. .size .L_2il0floatpacket.7,8
  275. .align 8
  276. .L_2il0floatpacket.8:
  277. .long 0x00000000,0xbfd00000
  278. .type .L_2il0floatpacket.8,@object
  279. .size .L_2il0floatpacket.8,8
  280. .align 8
  281. .L_2il0floatpacket.9:
  282. .long 0x7c6f097b,0x4014f3d9
  283. .type .L_2il0floatpacket.9,@object
  284. .size .L_2il0floatpacket.9,8
  285. .align 8
  286. .L_2il0floatpacket.10:
  287. .long 0x617c2eba,0x4018ed42
  288. .type .L_2il0floatpacket.10,@object
  289. .size .L_2il0floatpacket.10,8
  290. .align 8
  291. .L_2il0floatpacket.11:
  292. .long 0xb9e8c253,0x3fea66bf
  293. .type .L_2il0floatpacket.11,@object
  294. .size .L_2il0floatpacket.11,8
  295. .align 8
  296. .L_2il0floatpacket.12:
  297. .long 0x7e9f31d2,0x3fb9a89d
  298. .type .L_2il0floatpacket.12,@object
  299. .size .L_2il0floatpacket.12,8
  300. .align 8
  301. .L_2il0floatpacket.13:
  302. .long 0x74fb38bf,0x3fb8e90d
  303. .type .L_2il0floatpacket.13,@object
  304. .size .L_2il0floatpacket.13,8
  305. .align 8
  306. .L_2il0floatpacket.14:
  307. .long 0xe950ab19,0x3fcb8550
  308. .type .L_2il0floatpacket.14,@object
  309. .size .L_2il0floatpacket.14,8
  310. .align 8
  311. .L_2il0floatpacket.15:
  312. .long 0x8c8953a2,0xc0202794
  313. .type .L_2il0floatpacket.15,@object
  314. .size .L_2il0floatpacket.15,8
  315. .align 8
  316. .L_2il0floatpacket.16:
  317. .long 0x94b6927c,0xc0047249
  318. .type .L_2il0floatpacket.16,@object
  319. .size .L_2il0floatpacket.16,8
  320. .align 8
  321. .L_2il0floatpacket.17:
  322. .long 0x3a6dbb00,0xbfa654a1
  323. .type .L_2il0floatpacket.17,@object
  324. .size .L_2il0floatpacket.17,8
  325. .align 8
  326. .L_2il0floatpacket.18:
  327. .long 0x020f8f24,0x3fb60e1d
  328. .type .L_2il0floatpacket.18,@object
  329. .size .L_2il0floatpacket.18,8
  330. .align 8
  331. .L_2il0floatpacket.19:
  332. .long 0x726ca18f,0x3fbff1ac
  333. .type .L_2il0floatpacket.19,@object
  334. .size .L_2il0floatpacket.19,8
  335. .align 8
  336. .L_2il0floatpacket.20:
  337. .long 0xc94e1724,0x3f352382
  338. .type .L_2il0floatpacket.20,@object
  339. .size .L_2il0floatpacket.20,8
  340. .align 8
  341. .L_2il0floatpacket.21:
  342. .long 0x00000000,0x3fa80000
  343. .type .L_2il0floatpacket.21,@object
  344. .size .L_2il0floatpacket.21,8
  345. .align 8
  346. .L_2il0floatpacket.22:
  347. .long 0x00000000,0x3fe00000
  348. .type .L_2il0floatpacket.22,@object
  349. .size .L_2il0floatpacket.22,8
  350. .align 8
  351. .L_2il0floatpacket.23:
  352. .long 0x54442d18,0x3ff921fb
  353. .type .L_2il0floatpacket.23,@object
  354. .size .L_2il0floatpacket.23,8
  355. .align 8
  356. .L_2il0floatpacket.24:
  357. .long 0x00000000,0xc0000000
  358. .type .L_2il0floatpacket.24,@object
  359. .size .L_2il0floatpacket.24,8
  360. .align 8
  361. .L_2il0floatpacket.27:
  362. .long 0x00000000,0x3ff00000
  363. .type .L_2il0floatpacket.27,@object
  364. .size .L_2il0floatpacket.27,8
  365. .align 4
  366. .L_2il0floatpacket.25:
  367. .long 0x7f800000
  368. .type .L_2il0floatpacket.25,@object
  369. .size .L_2il0floatpacket.25,4
  370. .align 4
  371. .L_2il0floatpacket.26:
  372. .long 0x0d800000
  373. .type .L_2il0floatpacket.26,@object
  374. .size .L_2il0floatpacket.26,4
  375. .align 4
  376. _small_value_32:
  377. .long 226492416
  378. .long 2373976064
  379. .type _small_value_32,@object
  380. .size _small_value_32,8
  381. .align 4
  382. pi_2f:
  383. .long 0x3fc90fdb
  384. .long 0xbfc90fdb
  385. .type pi_2f,@object
  386. .size pi_2f,8
  387. .data
  388. .section .note.GNU-stack, ""
  389. // -- Begin DWARF2 SEGMENT .eh_frame
  390. .section .eh_frame,"a",@progbits
  391. .eh_frame_seg:
  392. .align 1
  393. # End