Bug 1076670 part 2 - Use VS2013 Win64 sin(-0) workaround for Odin code too. r=luke
authorJan de Mooij <jdemooij@mozilla.com>
Tue, 14 Oct 2014 11:09:17 +0200
changeset 210336 518aafb5a98ac4c74e287f8578744a5683e1cfe1
parent 210335 beae97bde5ca8c007697f0d5d06642f6e9165d99
child 210337 47ac4791adf36c55df747f27b5ef60ccc1bb91fb
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersluke
bugs1076670
milestone36.0a1
Bug 1076670 part 2 - Use VS2013 Win64 sin(-0) workaround for Odin code too. r=luke
js/src/asmjs/AsmJSModule.cpp
--- a/js/src/asmjs/AsmJSModule.cpp
+++ b/js/src/asmjs/AsmJSModule.cpp
@@ -647,17 +647,22 @@ AddressOf(AsmJSImmKind kind, ExclusiveCo
       case AsmJSImm_aeabi_idivmod:
         return RedirectCall(FuncCast(__aeabi_idivmod), Args_General2);
       case AsmJSImm_aeabi_uidivmod:
         return RedirectCall(FuncCast(__aeabi_uidivmod), Args_General2);
 #endif
       case AsmJSImm_ModD:
         return RedirectCall(FuncCast(NumberMod), Args_Double_DoubleDouble);
       case AsmJSImm_SinD:
+#ifdef _WIN64
+        // Workaround a VS 2013 sin issue, see math_sin_uncached.
+        return RedirectCall(FuncCast<double (double)>(js::math_sin_uncached), Args_Double_Double);
+#else
         return RedirectCall(FuncCast<double (double)>(sin), Args_Double_Double);
+#endif
       case AsmJSImm_CosD:
         return RedirectCall(FuncCast<double (double)>(cos), Args_Double_Double);
       case AsmJSImm_TanD:
         return RedirectCall(FuncCast<double (double)>(tan), Args_Double_Double);
       case AsmJSImm_ASinD:
         return RedirectCall(FuncCast<double (double)>(asin), Args_Double_Double);
       case AsmJSImm_ACosD:
         return RedirectCall(FuncCast<double (double)>(acos), Args_Double_Double);