[tbb-commits] [tor-browser/esr24] Bug 977538 - Disable PGO for CanonicalizeNaN. r=luke, a=abillings

mikeperry at torproject.org mikeperry at torproject.org
Fri Aug 29 05:26:37 UTC 2014


commit f36c23ba4142e9c6531fdb160c418970ea6ecbf2
Author: Jan de Mooij <jdemooij at mozilla.com>
Date:   Thu Feb 27 20:48:59 2014 +0100

    Bug 977538 - Disable PGO for CanonicalizeNaN. r=luke, a=abillings
---
 js/public/Value.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/js/public/Value.h b/js/public/Value.h
index bf29457..b2bd61f 100644
--- a/js/public/Value.h
+++ b/js/public/Value.h
@@ -819,6 +819,10 @@ GenericNaN()
     return mozilla::SpecificNaN(0, 0x8000000000000ULL);
 }
 
+/* MSVC with PGO miscompiles this function. */
+#if defined(_MSC_VER)
+# pragma optimize("g", off)
+#endif
 static inline double
 CanonicalizeNaN(double d)
 {
@@ -826,6 +830,9 @@ CanonicalizeNaN(double d)
         return GenericNaN();
     return d;
 }
+#if defined(_MSC_VER)
+# pragma optimize("", on)
+#endif
 
 /*
  * JS::Value is the interface for a single JavaScript Engine value.  A few





More information about the tbb-commits mailing list