fabs1.js 764 B

1234567891011121314151617
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. /*
  6. fabs from ucrtbase.dll doesn't restore the FPU Control word correctly when passed a NaN.
  7. This is exposed if we WScript.LoadScriptFile() code with Math.Abs(NaN) in it.
  8. Causing an assertion failure in SmartFPUControl. The change special-handles NaN without calling fabs
  9. */
  10. WScript.LoadScriptFile("fabs2.js");
  11. WScript.LoadScriptFile("fabs2asmjs.js");
  12. WScript.Echo('PASS');