Bug 1270664: Move back the win64 special case to math_sin_uncached; r=arai a=me CLOSED TREE
authorBenjamin Bouvier <benj@benj.me>
Wed, 18 May 2016 12:44:05 +0200
changeset 332901 6d8d672786ef1098c9821400884992785f55beb3
parent 332900 b4e6080db0238862dfb893ea6ab564fcd4375da1
child 332902 c16fd534aba8fe187bd652e222ee66a3ea1bb3fd
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai, me
bugs1270664
milestone48.0a2
Bug 1270664: Move back the win64 special case to math_sin_uncached; r=arai a=me CLOSED TREE
js/src/jsmath.cpp
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -800,28 +800,28 @@ js::math_round(JSContext* cx, unsigned a
     }
 
     return math_round_handle(cx, args[0], args.rval());
 }
 
 double
 js::math_sin_impl(MathCache* cache, double x)
 {
+    return cache->lookup(math_sin_uncached, x, MathCache::Sin);
+}
+
+double
+js::math_sin_uncached(double x)
+{
 #ifdef _WIN64
     // Workaround MSVC bug where sin(-0) is +0 instead of -0 on x64 on
     // CPUs without FMA3 (pre-Haswell). See bug 1076670.
     if (IsNegativeZero(x))
         return -0.0;
 #endif
-    return cache->lookup(math_sin_uncached, x, MathCache::Sin);
-}
-
-double
-js::math_sin_uncached(double x)
-{
     return sin(x);
 }
 
 bool
 js::math_sin_handle(JSContext* cx, HandleValue val, MutableHandleValue res)
 {
     double in;
     if (!ToNumber(cx, val, &in))