blob: 462abf1d65e5eb90951fa5e8a6e2076b7729f72a [file] [log] [blame]
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
/*
fabs from ucrtbase.dll doesn't restore the FPU Control word correctly when passed a NaN.
This is exposed if we WScript.LoadScriptFile() code with Math.Abs(NaN) in it.
Causing an assertion failure in SmartFPUControl. The change special-handles NaN without calling fabs
*/
WScript.LoadScriptFile("fabs2.js");
WScript.LoadScriptFile("fabs2asmjs.js");
WScript.Echo('PASS');