isnan.S 6.0 KB

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