erff.S 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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 "erff.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin erff
  41. .text
  42. .align 16,0x90
  43. .globl erff
  44. erff:
  45. # parameter 1: 16 + %esp
  46. ..B1.1:
  47. ..L1:
  48. subl $12, %esp
  49. movl 16(%esp), %edx
  50. movl %edx, %eax
  51. andl $-2147483648, %eax
  52. andl $2147483647, %edx
  53. orl $1065353216, %eax
  54. movl %eax, (%esp)
  55. cmpl $2139095040, %edx
  56. flds (%esp)
  57. jge ..B1.8
  58. ..B1.2:
  59. call ..L2
  60. ..L2:
  61. popl %eax
  62. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
  63. cmpl $1081791744, %edx
  64. jge ..B1.7
  65. ..B1.3:
  66. cmpl $1065353216, %edx
  67. jl ..B1.5
  68. ..B1.4:
  69. movl %edx, %ecx
  70. andl $8388607, %edx
  71. shrl $23, %ecx
  72. orl $1065353216, %edx
  73. movl %edx, (%esp)
  74. flds (%esp)
  75. fsubl .L_2il0floatpacket.0@GOTOFF(%eax)
  76. fld %st(0)
  77. lea (%ecx,%ecx,2), %ecx
  78. shll $5, %ecx
  79. fmul %st(1), %st
  80. fld %st(0)
  81. fmul %st(1), %st
  82. fldl -12104+_dbA@GOTOFF(%eax,%ecx)
  83. fmul %st(3), %st
  84. fldl -12120+_dbA@GOTOFF(%eax,%ecx)
  85. fmul %st(4), %st
  86. fxch %st(1)
  87. faddl -12112+_dbA@GOTOFF(%eax,%ecx)
  88. fmul %st(3), %st
  89. faddp %st, %st(1)
  90. fldl -12072+_dbA@GOTOFF(%eax,%ecx)
  91. fmul %st(4), %st
  92. fxch %st(1)
  93. faddl -12128+_dbA@GOTOFF(%eax,%ecx)
  94. fxch %st(1)
  95. faddl -12080+_dbA@GOTOFF(%eax,%ecx)
  96. fmul %st(3), %st
  97. fldl -12088+_dbA@GOTOFF(%eax,%ecx)
  98. fmul %st(5), %st
  99. faddp %st, %st(1)
  100. fldl -12040+_dbA@GOTOFF(%eax,%ecx)
  101. fmul %st(5), %st
  102. fxch %st(1)
  103. faddl -12096+_dbA@GOTOFF(%eax,%ecx)
  104. fxch %st(1)
  105. faddl -12048+_dbA@GOTOFF(%eax,%ecx)
  106. fmulp %st, %st(4)
  107. fldl -12056+_dbA@GOTOFF(%eax,%ecx)
  108. fmulp %st, %st(5)
  109. fxch %st(4)
  110. faddp %st, %st(3)
  111. fxch %st(2)
  112. faddl -12064+_dbA@GOTOFF(%eax,%ecx)
  113. fmul %st(1), %st
  114. faddp %st, %st(3)
  115. fmulp %st, %st(2)
  116. faddp %st, %st(1)
  117. fmulp %st, %st(1)
  118. addl $12, %esp
  119. ret
  120. ..B1.5:
  121. fstp %st(0)
  122. flds 16(%esp)
  123. fld %st(0)
  124. fmul %st(1), %st
  125. fld %st(0)
  126. fmul %st(1), %st
  127. fldl 48+_dbA@GOTOFF(%eax)
  128. fmul %st(1), %st
  129. fldl 56+_dbA@GOTOFF(%eax)
  130. fmul %st(2), %st
  131. fxch %st(1)
  132. faddl 32+_dbA@GOTOFF(%eax)
  133. fmul %st(2), %st
  134. fxch %st(1)
  135. faddl 40+_dbA@GOTOFF(%eax)
  136. fmul %st(2), %st
  137. fxch %st(1)
  138. faddl 16+_dbA@GOTOFF(%eax)
  139. fmul %st(2), %st
  140. fxch %st(1)
  141. faddl 24+_dbA@GOTOFF(%eax)
  142. fmulp %st, %st(2)
  143. faddl _dbA@GOTOFF(%eax)
  144. fxch %st(1)
  145. faddl 8+_dbA@GOTOFF(%eax)
  146. fmulp %st, %st(2)
  147. faddp %st, %st(1)
  148. fmulp %st, %st(1)
  149. ..B1.6:
  150. addl $12, %esp
  151. ret
  152. ..B1.7:
  153. fldl 256+_dbA@GOTOFF(%eax)
  154. fmulp %st, %st(1)
  155. addl $12, %esp
  156. ret
  157. ..B1.8:
  158. je ..B1.11
  159. ..B1.9:
  160. fstp %st(0)
  161. flds 16(%esp)
  162. fadd %st(0), %st
  163. ..B1.11:
  164. addl $12, %esp
  165. ret
  166. .align 16,0x90
  167. .type erff,@function
  168. .size erff,.-erff
  169. .data
  170. # -- End erff
  171. .section .rodata, "a"
  172. .align 16
  173. .align 16
  174. _dbA:
  175. .long 1346373606
  176. .long 1072827863
  177. .long 1710987328
  178. .long 3218608756
  179. .long 2039146822
  180. .long 1069343472
  181. .long 2052989911
  182. .long 3214639770
  183. .long 3741021613
  184. .long 1064657550
  185. .long 2828932584
  186. .long 3209415657
  187. .long 556515485
  188. .long 1058898537
  189. .long 1493771156
  190. .long 3202627648
  191. .long 1460823802
  192. .long 1072622165
  193. .long 647757120
  194. .long 1069445687
  195. .long 1478820123
  196. .long 3217479081
  197. .long 827266439
  198. .long 1069662880
  199. .long 4153551678
  200. .long 3215381932
  201. .long 3249389370
  202. .long 3213783616
  203. .long 3875823656
  204. .long 1066650297
  205. .long 2479749796
  206. .long 3212012677
  207. .long 4079794357
  208. .long 3210967401
  209. .long 3292960271
  210. .long 1062989018
  211. .long 1338933997
  212. .long 3204757561
  213. .long 4209598023
  214. .long 3207545998
  215. .long 2886434981
  216. .long 1072693201
  217. .long 1721637260
  218. .long 1060257935
  219. .long 960688093
  220. .long 3210436681
  221. .long 1128797080
  222. .long 1064950642
  223. .long 798939459
  224. .long 3213958757
  225. .long 937205111
  226. .long 1067493282
  227. .long 3504975339
  228. .long 3215465534
  229. .long 3388113641
  230. .long 1068080152
  231. .long 9542307
  232. .long 3215088353
  233. .long 1310184383
  234. .long 1065080747
  235. .long 3264801679
  236. .long 1066837484
  237. .long 3394984936
  238. .long 3214223095
  239. .long 4294967295
  240. .long 1072693247
  241. .type _dbA,@object
  242. .size _dbA,264
  243. .align 8
  244. .L_2il0floatpacket.0:
  245. .long 0x00000000,0x3ff80000
  246. .type .L_2il0floatpacket.0,@object
  247. .size .L_2il0floatpacket.0,8
  248. .data
  249. .section .note.GNU-stack, ""
  250. # End