isinf.S 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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 "isinf.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin __isinfd
  41. .text
  42. .align 16,0x90
  43. .globl __isinfd
  44. __isinfd:
  45. # parameter 1: 4 + %esp
  46. ..B1.1:
  47. ..L1:
  48. movl $2146435072, %ecx
  49. negl %ecx
  50. movl 8(%esp), %eax
  51. addl %eax, %ecx
  52. movl 4(%esp), %edx
  53. orl %edx, %ecx
  54. jne ..B1.3
  55. ..B1.2:
  56. movl $1, %eax
  57. ret
  58. ..B1.3:
  59. movl $-1048576, %ecx
  60. subl %ecx, %eax
  61. orl %eax, %edx
  62. jne ..B1.5
  63. ..B1.4:
  64. movl $-1, %eax
  65. ret
  66. ..B1.5:
  67. xorl %eax, %eax
  68. ..B1.6:
  69. ret
  70. .align 16,0x90
  71. .type __isinfd,@function
  72. .size __isinfd,.-__isinfd
  73. .data
  74. # -- End __isinfd
  75. .text
  76. # -- Begin isinfd
  77. .text
  78. .align 16,0x90
  79. .globl isinfd
  80. isinfd:
  81. # parameter 1: 4 + %esp
  82. ..B2.1:
  83. ..L2:
  84. movl $2146435072, %ecx
  85. negl %ecx
  86. movl 8(%esp), %eax
  87. addl %eax, %ecx
  88. movl 4(%esp), %edx
  89. orl %edx, %ecx
  90. jne ..B2.3
  91. ..B2.2:
  92. movl $1, %eax
  93. ret
  94. ..B2.3:
  95. movl $-1048576, %ecx
  96. subl %ecx, %eax
  97. orl %eax, %edx
  98. jne ..B2.5
  99. ..B2.4:
  100. movl $-1, %eax
  101. ret
  102. ..B2.5:
  103. xorl %eax, %eax
  104. ..B2.6:
  105. ret
  106. .align 16,0x90
  107. .type isinfd,@function
  108. .size isinfd,.-isinfd
  109. .data
  110. # -- End isinfd
  111. .text
  112. # -- Begin __isinf
  113. .text
  114. .align 16,0x90
  115. .globl __isinf
  116. __isinf:
  117. # parameter 1: 4 + %esp
  118. ..B3.1:
  119. ..L3:
  120. movl $2146435072, %ecx
  121. negl %ecx
  122. movl 8(%esp), %eax
  123. addl %eax, %ecx
  124. movl 4(%esp), %edx
  125. orl %edx, %ecx
  126. jne ..B3.3
  127. ..B3.2:
  128. movl $1, %eax
  129. ret
  130. ..B3.3:
  131. movl $-1048576, %ecx
  132. subl %ecx, %eax
  133. orl %eax, %edx
  134. jne ..B3.5
  135. ..B3.4:
  136. movl $-1, %eax
  137. ret
  138. ..B3.5:
  139. xorl %eax, %eax
  140. ..B3.6:
  141. ret
  142. .align 16,0x90
  143. .type __isinf,@function
  144. .size __isinf,.-__isinf
  145. .data
  146. # -- End __isinf
  147. .text
  148. # -- Begin isinf
  149. .text
  150. .align 16,0x90
  151. .globl isinf
  152. isinf:
  153. # parameter 1: 4 + %esp
  154. ..B4.1:
  155. ..L4:
  156. movl $2146435072, %ecx
  157. negl %ecx
  158. movl 8(%esp), %eax
  159. addl %eax, %ecx
  160. movl 4(%esp), %edx
  161. orl %edx, %ecx
  162. jne ..B4.3
  163. ..B4.2:
  164. movl $1, %eax
  165. ret
  166. ..B4.3:
  167. movl $-1048576, %ecx
  168. subl %ecx, %eax
  169. orl %eax, %edx
  170. jne ..B4.5
  171. ..B4.4:
  172. movl $-1, %eax
  173. ret
  174. ..B4.5:
  175. xorl %eax, %eax
  176. ..B4.6:
  177. ret
  178. .align 16,0x90
  179. .type isinf,@function
  180. .size isinf,.-isinf
  181. .data
  182. # -- End isinf
  183. .text
  184. # -- Begin __isinff
  185. .text
  186. .align 16,0x90
  187. .globl __isinff
  188. __isinff:
  189. # parameter 1: 4 + %esp
  190. ..B5.1:
  191. ..L5:
  192. movl 4(%esp), %edx
  193. cmpl $2139095040, %edx
  194. jne ..B5.3
  195. ..B5.2:
  196. movl $1, %eax
  197. ret
  198. ..B5.3:
  199. cmpl $-8388608, %edx
  200. movl $0, %eax
  201. setne %al
  202. decl %eax
  203. ret
  204. .align 16,0x90
  205. .type __isinff,@function
  206. .size __isinff,.-__isinff
  207. .data
  208. # -- End __isinff
  209. .text
  210. # -- Begin isinff
  211. .text
  212. .align 16,0x90
  213. .globl isinff
  214. isinff:
  215. # parameter 1: 4 + %esp
  216. ..B6.1:
  217. ..L6:
  218. movl 4(%esp), %edx
  219. cmpl $2139095040, %edx
  220. jne ..B6.3
  221. ..B6.2:
  222. movl $1, %eax
  223. ret
  224. ..B6.3:
  225. cmpl $-8388608, %edx
  226. movl $0, %eax
  227. setne %al
  228. decl %eax
  229. ret
  230. .align 16,0x90
  231. .type isinff,@function
  232. .size isinff,.-isinff
  233. .data
  234. # -- End isinff
  235. .text
  236. # -- Begin __isinfl
  237. .text
  238. .align 16,0x90
  239. .globl __isinfl
  240. __isinfl:
  241. # parameter 1: 4 + %esp
  242. ..B7.1:
  243. ..L7:
  244. movzwl 12(%esp), %eax
  245. andl $32767, %eax
  246. cmpl $32767, %eax
  247. je ..B7.3
  248. ..B7.2:
  249. xorl %eax, %eax
  250. ret
  251. ..B7.3:
  252. cmpl $-2147483648, 8(%esp)
  253. jne ..B7.2
  254. ..B7.4:
  255. cmpl $0, 4(%esp)
  256. jne ..B7.2
  257. ..B7.5:
  258. movzbl 13(%esp), %eax
  259. notl %eax
  260. andl $128, %eax
  261. shrl $6, %eax
  262. decl %eax
  263. ret
  264. .align 16,0x90
  265. .type __isinfl,@function
  266. .size __isinfl,.-__isinfl
  267. .data
  268. # -- End __isinfl
  269. .text
  270. # -- Begin isinfl
  271. .text
  272. .align 16,0x90
  273. .globl isinfl
  274. isinfl:
  275. # parameter 1: 4 + %esp
  276. ..B8.1:
  277. ..L8:
  278. movzwl 12(%esp), %eax
  279. andl $32767, %eax
  280. cmpl $32767, %eax
  281. je ..B8.3
  282. ..B8.2:
  283. xorl %eax, %eax
  284. ret
  285. ..B8.3:
  286. cmpl $-2147483648, 8(%esp)
  287. jne ..B8.2
  288. ..B8.4:
  289. cmpl $0, 4(%esp)
  290. jne ..B8.2
  291. ..B8.5:
  292. movzbl 13(%esp), %eax
  293. notl %eax
  294. andl $128, %eax
  295. shrl $6, %eax
  296. decl %eax
  297. ret
  298. .align 16,0x90
  299. .type isinfl,@function
  300. .size isinfl,.-isinfl
  301. .data
  302. # -- End isinfl
  303. .data
  304. .section .note.GNU-stack, ""
  305. # End