isnan.S 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value___isnand.1:
  49. ..L2:
  50. movq $0x7ff0000000000000, %rdx
  51. movd %xmm0, %rcx
  52. xorl %eax, %eax
  53. btrq $63, %rcx
  54. cmpq %rcx, %rdx
  55. setb %al
  56. ret
  57. .align 16,0x90
  58. .cfi_endproc
  59. .type __isnand,@function
  60. .size __isnand,.-__isnand
  61. .data
  62. # -- End __isnand
  63. .text
  64. # -- Begin isnand
  65. .text
  66. .align 16,0x90
  67. .globl isnand
  68. isnand:
  69. # parameter 1: %xmm0
  70. ..B2.1:
  71. .cfi_startproc
  72. ..___tag_value_isnand.4:
  73. ..L5:
  74. movq $0x7ff0000000000000, %rdx
  75. movd %xmm0, %rcx
  76. xorl %eax, %eax
  77. btrq $63, %rcx
  78. cmpq %rcx, %rdx
  79. setb %al
  80. ret
  81. .align 16,0x90
  82. .cfi_endproc
  83. .type isnand,@function
  84. .size isnand,.-isnand
  85. .data
  86. # -- End isnand
  87. .text
  88. # -- Begin __isnan
  89. .text
  90. .align 16,0x90
  91. .globl __isnan
  92. __isnan:
  93. # parameter 1: %xmm0
  94. ..B3.1:
  95. .cfi_startproc
  96. ..___tag_value___isnan.7:
  97. ..L8:
  98. movq $0x7ff0000000000000, %rdx
  99. movd %xmm0, %rcx
  100. xorl %eax, %eax
  101. btrq $63, %rcx
  102. cmpq %rcx, %rdx
  103. setb %al
  104. ret
  105. .align 16,0x90
  106. .cfi_endproc
  107. .type __isnan,@function
  108. .size __isnan,.-__isnan
  109. .data
  110. # -- End __isnan
  111. .text
  112. # -- Begin isnan
  113. .text
  114. .align 16,0x90
  115. .globl isnan
  116. isnan:
  117. # parameter 1: %xmm0
  118. ..B4.1:
  119. .cfi_startproc
  120. ..___tag_value_isnan.10:
  121. ..L11:
  122. movq $0x7ff0000000000000, %rdx
  123. movd %xmm0, %rcx
  124. xorl %eax, %eax
  125. btrq $63, %rcx
  126. cmpq %rcx, %rdx
  127. setb %al
  128. ret
  129. .align 16,0x90
  130. .cfi_endproc
  131. .type isnan,@function
  132. .size isnan,.-isnan
  133. .data
  134. # -- End isnan
  135. .text
  136. # -- Begin __isnanf
  137. .text
  138. .align 16,0x90
  139. .globl __isnanf
  140. __isnanf:
  141. # parameter 1: %xmm0
  142. ..B5.1:
  143. .cfi_startproc
  144. ..___tag_value___isnanf.13:
  145. ..L14:
  146. xorl %eax, %eax
  147. movd %xmm0, %edx
  148. andl $2147483647, %edx
  149. cmpl $2139095040, %edx
  150. seta %al
  151. ret
  152. .align 16,0x90
  153. .cfi_endproc
  154. .type __isnanf,@function
  155. .size __isnanf,.-__isnanf
  156. .data
  157. # -- End __isnanf
  158. .text
  159. # -- Begin isnanf
  160. .text
  161. .align 16,0x90
  162. .globl isnanf
  163. isnanf:
  164. # parameter 1: %xmm0
  165. ..B6.1:
  166. .cfi_startproc
  167. ..___tag_value_isnanf.16:
  168. ..L17:
  169. xorl %eax, %eax
  170. movd %xmm0, %edx
  171. andl $2147483647, %edx
  172. cmpl $2139095040, %edx
  173. seta %al
  174. ret
  175. .align 16,0x90
  176. .cfi_endproc
  177. .type isnanf,@function
  178. .size isnanf,.-isnanf
  179. .data
  180. # -- End isnanf
  181. .text
  182. # -- Begin __isnanl
  183. .text
  184. .align 16,0x90
  185. .globl __isnanl
  186. __isnanl:
  187. # parameter 1: 8 + %rsp
  188. ..B7.1:
  189. .cfi_startproc
  190. ..___tag_value___isnanl.19:
  191. ..L20:
  192. movzwl 16(%rsp), %eax
  193. andl $32767, %eax
  194. cmpl $32767, %eax
  195. je ..B7.4
  196. ..B7.2:
  197. xorl %eax, %eax
  198. ..B7.3:
  199. ret
  200. ..B7.4:
  201. movq $0x8000000000000000, %rdx
  202. movl $1, %ecx
  203. xorl %eax, %eax
  204. cmpq 8(%rsp), %rdx
  205. cmovne %ecx, %eax
  206. ret
  207. .align 16,0x90
  208. .cfi_endproc
  209. .type __isnanl,@function
  210. .size __isnanl,.-__isnanl
  211. .data
  212. # -- End __isnanl
  213. .text
  214. # -- Begin isnanl
  215. .text
  216. .align 16,0x90
  217. .globl isnanl
  218. isnanl:
  219. # parameter 1: 8 + %rsp
  220. ..B8.1:
  221. .cfi_startproc
  222. ..___tag_value_isnanl.22:
  223. ..L23:
  224. movzwl 16(%rsp), %eax
  225. andl $32767, %eax
  226. cmpl $32767, %eax
  227. je ..B8.4
  228. ..B8.2:
  229. xorl %eax, %eax
  230. ..B8.3:
  231. ret
  232. ..B8.4:
  233. movq $0x8000000000000000, %rdx
  234. movl $1, %ecx
  235. xorl %eax, %eax
  236. cmpq 8(%rsp), %rdx
  237. cmovne %ecx, %eax
  238. ret
  239. .align 16,0x90
  240. .cfi_endproc
  241. .type isnanl,@function
  242. .size isnanl,.-isnanl
  243. .data
  244. # -- End isnanl
  245. .data
  246. .section .note.GNU-stack, ""
  247. // -- Begin DWARF2 SEGMENT .eh_frame
  248. .section .eh_frame,"a",@progbits
  249. .eh_frame_seg:
  250. .align 1
  251. # End