diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc index 53dde152d5720e..5f7544c0510e1d 100644 --- a/cc/base/math_util.cc +++ b/cc/base/math_util.cc @@ -7,7 +7,7 @@ #include #include #include -#ifdef __SSE__ +#if defined(ARCH_CPU_X86_FAMILY) #include #endif @@ -810,7 +810,7 @@ gfx::Vector3dF MathUtil::GetYAxis(const gfx::Transform& transform) { } ScopedSubnormalFloatDisabler::ScopedSubnormalFloatDisabler() { -#ifdef __SSE__ +#if defined(ARCH_CPU_X86_FAMILY) // Turn on "subnormals are zero" and "flush to zero" CSR flags. orig_state_ = _mm_getcsr(); _mm_setcsr(orig_state_ | 0x8040); @@ -818,7 +818,7 @@ ScopedSubnormalFloatDisabler::ScopedSubnormalFloatDisabler() { } ScopedSubnormalFloatDisabler::~ScopedSubnormalFloatDisabler() { -#ifdef __SSE__ +#if defined(ARCH_CPU_X86_FAMILY) _mm_setcsr(orig_state_); #endif } diff --git a/cc/base/math_util.h b/cc/base/math_util.h index 8052b07c8d371e..dd3dd89b1c0131 100644 --- a/cc/base/math_util.h +++ b/cc/base/math_util.h @@ -11,6 +11,7 @@ #include #include "base/logging.h" +#include "build/build_config.h" #include "cc/base/base_export.h" #include "ui/gfx/geometry/box_f.h" #include "ui/gfx/geometry/point3_f.h" @@ -330,7 +331,7 @@ class CC_BASE_EXPORT ScopedSubnormalFloatDisabler { ~ScopedSubnormalFloatDisabler(); private: -#ifdef __SSE__ +#if defined(ARCH_CPU_X86_FAMILY) unsigned int orig_state_; #endif DISALLOW_COPY_AND_ASSIGN(ScopedSubnormalFloatDisabler);