dpml_ux_log.S 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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 "dpml_ux_log.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin __dpml_ux_log_poly__
  41. .text
  42. .align 16,0x90
  43. .hidden __dpml_ux_log_poly__
  44. .globl __dpml_ux_log_poly__
  45. __dpml_ux_log_poly__:
  46. # parameter 1: 48 + %esp
  47. # parameter 2: 52 + %esp
  48. ..B1.1:
  49. ..L1:
  50. pushl %edi
  51. pushl %ebx
  52. subl $36, %esp
  53. xorl %eax, %eax
  54. movl 52(%esp), %edi
  55. addl $28, %esp
  56. pushl %edi
  57. call ..L2
  58. ..L2:
  59. popl %ebx
  60. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  61. pushl %eax
  62. pushl $6
  63. pushl %eax
  64. pushl $17
  65. lea 128+__log_x_table@GOTOFF(%ebx), %edx
  66. pushl %edx
  67. pushl 44(%esp)
  68. call __dpml_evaluate_rational__
  69. ..B1.2:
  70. addl $12, %esp
  71. lea 472+__log_x_table@GOTOFF(%ebx), %eax
  72. pushl %edi
  73. pushl %eax
  74. pushl %edi
  75. call __dpml_multiply__
  76. ..B1.3:
  77. addl $36, %esp
  78. popl %ebx
  79. popl %edi
  80. ret
  81. .align 16,0x90
  82. .type __dpml_ux_log_poly__,@function
  83. .size __dpml_ux_log_poly__,.-__dpml_ux_log_poly__
  84. .data
  85. # -- End __dpml_ux_log_poly__
  86. .text
  87. # -- Begin __dpml_ux_log__
  88. .text
  89. .align 16,0x90
  90. .hidden __dpml_ux_log__
  91. .globl __dpml_ux_log__
  92. __dpml_ux_log__:
  93. # parameter 1: 112 + %esp
  94. # parameter 2: 116 + %esp
  95. # parameter 3: 120 + %esp
  96. ..B2.1:
  97. ..L3:
  98. pushl %esi
  99. pushl %edi
  100. pushl %ebx
  101. pushl %ebp
  102. subl $92, %esp
  103. movl 112(%esp), %ecx
  104. call ..L4
  105. ..L4:
  106. popl %ebx
  107. lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx
  108. movl 8(%ecx), %esi
  109. movl %gs:20, %eax
  110. xorl %esp, %eax
  111. subl 112+__log_x_table@GOTOFF(%ebx), %esi
  112. movl 12(%ecx), %ebp
  113. movl 4(%ecx), %edx
  114. movl %edx, %edi
  115. movl %eax, 80(%esp)
  116. sbbl 116+__log_x_table@GOTOFF(%ebx), %ebp
  117. jb ..B2.2
  118. ..B2.19:
  119. orl %ebp, %esi
  120. jne ..B2.3
  121. ..B2.2:
  122. lea -1(%edx), %edi
  123. ..B2.3:
  124. addl $20, %esp
  125. lea 424+__log_x_table@GOTOFF(%ebx), %ebp
  126. subl %edi, %edx
  127. lea 12(%esp), %esi
  128. pushl %esi
  129. pushl $0
  130. pushl $6
  131. pushl %ebp
  132. pushl %ecx
  133. movl %edx, 4(%ecx)
  134. call __dpml_addsub__
  135. ..B2.4:
  136. movl 112(%esp), %ecx
  137. movl 120(%esp), %ebp
  138. addl $20, %esp
  139. addl %edi, 4(%ecx)
  140. lea 36(%esp), %edx
  141. pushl %ebp
  142. pushl $0
  143. pushl $2
  144. pushl %esi
  145. pushl %edx
  146. call __dpml_divide__
  147. ..B2.5:
  148. addl $28, %esp
  149. xorl %edx, %edx
  150. pushl %esi
  151. pushl %edx
  152. pushl $6
  153. pushl %edx
  154. pushl $17
  155. lea 128+__log_x_table@GOTOFF(%ebx), %ecx
  156. pushl %ecx
  157. pushl %ebp
  158. call __dpml_evaluate_rational__
  159. ..B2.6:
  160. addl $12, %esp
  161. movl %edi, %eax
  162. pushl $0
  163. pushl $1
  164. cltd
  165. pushl %ebp
  166. movl %edi, 8(%ebp)
  167. movl %edx, 12(%ebp)
  168. call __dpml_ffs_and_shift__
  169. ..B2.7:
  170. addl $20, %esp
  171. pushl %ebp
  172. pushl $0
  173. pushl $8
  174. pushl %esi
  175. pushl %ebp
  176. call __dpml_addsub__
  177. ..B2.8:
  178. movl 116(%esp), %esi
  179. testl %esi, %esi
  180. je ..B2.10
  181. ..B2.9:
  182. addl $12, %esp
  183. pushl %ebp
  184. pushl %esi
  185. pushl %ebp
  186. call __dpml_multiply__
  187. ..B2.10:
  188. cmpl $-262144, 60(%esp)
  189. je ..B2.15
  190. ..B2.11:
  191. movl $1, %eax
  192. ..B2.12:
  193. movl 80(%esp), %edx
  194. xorl %esp, %edx
  195. cmpl %gs:20, %edx
  196. jne ..B2.14
  197. ..B2.13:
  198. xorl %edx, %edx
  199. addl $92, %esp
  200. popl %ebp
  201. popl %ebx
  202. popl %edi
  203. popl %esi
  204. ret
  205. ..B2.14:
  206. call __stack_chk_fail@PLT
  207. ..B2.15:
  208. testl %esi, %esi
  209. jne ..B2.11
  210. ..B2.16:
  211. xorl %eax, %eax
  212. jmp ..B2.12
  213. .align 16,0x90
  214. .type __dpml_ux_log__,@function
  215. .size __dpml_ux_log__,.-__dpml_ux_log__
  216. .data
  217. # -- End __dpml_ux_log__
  218. .section .rodata, "a"
  219. .align 4
  220. .align 4
  221. __log_x_table:
  222. .long 1088750600
  223. .long 519758862
  224. .long 58
  225. .long 0
  226. .long 59
  227. .long 0
  228. .long 60
  229. .long 0
  230. .long 1088750600
  231. .long 519758862
  232. .long 61
  233. .long 0
  234. .long 62
  235. .long 0
  236. .long 63
  237. .long 0
  238. .long 1088750600
  239. .long 519758862
  240. .long 64
  241. .long 0
  242. .long 65
  243. .long 0
  244. .long 66
  245. .long 0
  246. .long 15008776
  247. .long 336609536
  248. .long 58
  249. .long 0
  250. .long 4192101508
  251. .long 3037000499
  252. .long 4243534402
  253. .long 1518500249
  254. .long 1261892956
  255. .long 1305769775
  256. .long 706307789
  257. .long 114052365
  258. .long 2125978754
  259. .long 1401519948
  260. .long 2628436525
  261. .long 90640697
  262. .long 1075745124
  263. .long 4046945230
  264. .long 850547722
  265. .long 100185346
  266. .long 3858047057
  267. .long 2069326047
  268. .long 3415016796
  269. .long 106820841
  270. .long 196219186
  271. .long 3461778520
  272. .long 1283971156
  273. .long 114747264
  274. .long 133398994
  275. .long 3894487089
  276. .long 1548005786
  277. .long 123926548
  278. .long 4002430868
  279. .long 3905024888
  280. .long 1104860464
  281. .long 134702783
  282. .long 1396868873
  283. .long 2152947579
  284. .long 2102985887
  285. .long 147531619
  286. .long 361329122
  287. .long 2531697111
  288. .long 2794113080
  289. .long 163061263
  290. .long 2117398987
  291. .long 2352680084
  292. .long 3122626672
  293. .long 182244941
  294. .long 299366278
  295. .long 2801833386
  296. .long 1248329477
  297. .long 206544267
  298. .long 99864504
  299. .long 1693623838
  300. .long 1770762254
  301. .long 238320308
  302. .long 959885721
  303. .long 1462617677
  304. .long 2483170600
  305. .long 281651273
  306. .long 2353710846
  307. .long 1786830293
  308. .long 2080549112
  309. .long 344240445
  310. .long 2781107612
  311. .long 1683788319
  312. .long 2061424959
  313. .long 442594858
  314. .long 2924123738
  315. .long 1498310185
  316. .long 3744988402
  317. .long 619632801
  318. .long 2019498699
  319. .long 1065527877
  320. .long 1946680041
  321. .long 1032721336
  322. .long 1763524233
  323. .long 3196583632
  324. .long 1545072827
  325. .long 3098164009
  326. .long 2
  327. .long 0
  328. .long 0
  329. .long 1
  330. .long 0
  331. .long 2147483648
  332. .long 0
  333. .long 0
  334. .long 0
  335. .long 2
  336. .long 0
  337. .long 2147483648
  338. .long 0
  339. .long 0
  340. .long 0
  341. .long 0
  342. .long 3520035243
  343. .long 2977044471
  344. .long 66254511
  345. .long 3387143064
  346. .long 0
  347. .long 4294967295
  348. .long 4224710552
  349. .long 2585827972
  350. .long 192713080
  351. .long 2408143276
  352. .long 0
  353. .long 0
  354. .type __log_x_table,@object
  355. .size __log_x_table,528
  356. .data
  357. .hidden __dpml_multiply__
  358. .hidden __dpml_divide__
  359. .hidden __dpml_ffs_and_shift__
  360. .hidden __dpml_addsub__
  361. .hidden __dpml_evaluate_rational__
  362. .section .note.GNU-stack, ""
  363. # End