Leaked source code of windows server 2003
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.

75 lines
2.3 KiB

  1. .file "isnan.s"
  2. // Copyright (c) 2000, 2001, 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 _isnan#
  31. .section .text
  32. .proc _isnan#
  33. .align 32
  34. // API
  35. //==============================================================
  36. // int _isnan (double x)
  37. // Overview of operation
  38. //==============================================================
  39. // returns 1 if x is a nan; 0 otherwise
  40. // takes no exceptions
  41. // Registers used
  42. //==============================================================
  43. // general registers used:
  44. // r8 for return value
  45. // floating-point registers used:
  46. // f8
  47. // predicate registers used
  48. // p6, p7
  49. // qnan snan inf norm unorm 0 -+
  50. // 1 1 0 0 0 0 11
  51. _isnan:
  52. { .mfi
  53. nop.m 999
  54. fclass.m.unc p6,p7 = f8,0xc3
  55. nop.i 999 ;;
  56. }
  57. { .mib
  58. (p6) addl r8 = 0x1,r0
  59. (p7) addl r8 = 0x0,r0
  60. br.ret.sptk b0 ;;
  61. }
  62. .endp _isnan