Bug 1157635 - Remove linux32 support for flushing denormals from DenormalDisabler.h; r?karlt draft
authorDan Minor <dminor@mozilla.com>
Fri, 05 Aug 2016 15:58:43 -0400
changeset 397809 50dbb59ddbe7d1d1326cef56de91899321d5a03c
parent 397808 f2b18156f6b287412b4b80f5e72d81b0a30bf6b0
child 397810 d4fe431dfa507180c9429a628e7e2ef2ed9f30dc
push id25409
push userdminor@mozilla.com
push dateMon, 08 Aug 2016 12:09:42 +0000
reviewerskarlt
bugs1157635
milestone51.0a1
Bug 1157635 - Remove linux32 support for flushing denormals from DenormalDisabler.h; r?karlt We don't support automatic flushing of denormals on 32 bit linux so we need to remove it from the defines in DenormalDisabler.h. MozReview-Commit-ID: FdMMMsZfcJW
dom/media/webaudio/blink/DenormalDisabler.h
--- a/dom/media/webaudio/blink/DenormalDisabler.h
+++ b/dom/media/webaudio/blink/DenormalDisabler.h
@@ -21,28 +21,29 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifndef DenormalDisabler_h
 #define DenormalDisabler_h
 
 #include <float.h>
+#include <math.h>
 
 namespace WebCore {
 
 // Deal with denormals. They can very seriously impact performance on x86.
 
 // Define HAVE_DENORMAL if we support flushing denormals to zero.
 
 #if defined (XP_WIN) && defined(_MSC_VER)
 #define HAVE_DENORMAL
 #endif
 
-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+#if defined(__GNUC__) && defined(__x86_64__)
 #define HAVE_DENORMAL
 #endif
 
 #if defined(__arm__) || defined(__aarch64__)
 #define HAVE_DENORMAL
 #endif
 
 #ifdef HAVE_DENORMAL
@@ -62,17 +63,17 @@ public:
     // This is a nop if we can flush denormals to zero in hardware.
     static inline float flushDenormalFloatToZero(float f)
     {
         return f;
     }
 private:
     unsigned m_savedCSR;
 
-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+#if defined(__GNUC__) && defined(__x86_64__)
     inline void disableDenormals()
     {
         m_savedCSR = getCSR();
         setCSR(m_savedCSR | 0x8040);
     }
 
     inline void restoreState()
     {