Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.2 KiB

  1. .file "isnanf.s"
  2. // Copyright (c) 2000, Intel Corporation
  3. // All rights reserved.
  4. //
  5. // Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story,
  6. // and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation.
  7. //
  8. // WARRANTY DISCLAIMER
  9. //
  10. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  11. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  12. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  13. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
  14. // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  15. // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  16. // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  17. // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  18. // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
  19. // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  20. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  21. //
  22. // Intel Corporation is the author of this code, and requests that all
  23. // problem reports or change requests be submitted to it directly at
  24. // http://developer.intel.com/opensource.
  25. //
  26. // History
  27. //==============================================================
  28. // 2/02/00: Initial version
  29. .align 32
  30. .global _isnanf#
  31. .section .text
  32. .proc _isnanf#
  33. .align 32
  34. // API
  35. //==============================================================
  36. // int _isnanf (float x)
  37. // Overview of operation
  38. //==============================================================
  39. // returns 1 if x is a nan; 0 otherwise
  40. // does check for special input; takes no exceptions
  41. // Registers used
  42. //==============================================================
  43. // general registers used: 1
  44. // r8 for return value
  45. // floating-point registers used: 1
  46. // f8
  47. // qnan snan inf norm unorm 0 -+
  48. // 1 1 0 0 0 0 11
  49. _isnanf:
  50. { .mfi
  51. nop.m 999
  52. fclass.m.unc p6,p7 = f8,0xc3
  53. nop.i 999 ;;
  54. }
  55. { .mib
  56. (p6) addl r8 = 0x1,r0
  57. (p7) addl r8 = 0x0,r0
  58. (p0) br.ret.sptk b0 ;;
  59. }
  60. .endp _isnanf