Index: base/numerics/safe_numerics_unittest.cc |
diff --git a/base/numerics/safe_numerics_unittest.cc b/base/numerics/safe_numerics_unittest.cc |
index 0402cef200ac368bb425852c2d0a4311e410ced6..bdececb19364c75b2eb9813ec4c6467f529f34d9 100644 |
--- a/base/numerics/safe_numerics_unittest.cc |
+++ b/base/numerics/safe_numerics_unittest.cc |
@@ -26,14 +26,6 @@ using base::internal::RANGE_OVERFLOW; |
using base::internal::RANGE_UNDERFLOW; |
using base::enable_if; |
-// MSVS 2013 ia32 may not reset the FPU between calculations, and the test |
-// framework masks the exceptions. So we just force a manual reset after NaN. |
-inline void ResetFloatingPointUnit() { |
-#if defined(COMPILER_MSVC) && defined(ARCH_CPU_32_BITS) |
- _mm_empty(); |
-#endif |
-} |
- |
// These tests deliberately cause arithmetic overflows. If the compiler is |
// aggressive enough, it can const fold these overflows. Disable warnings about |
// overflows for const expressions. |
@@ -341,7 +333,6 @@ struct TestNumericConversion<Dst, Src, SIGN_PRESERVING_VALUE_PRESERVING> { |
TEST_EXPECTED_RANGE(RANGE_OVERFLOW, SrcLimits::infinity()); |
TEST_EXPECTED_RANGE(RANGE_UNDERFLOW, SrcLimits::infinity() * -1); |
TEST_EXPECTED_RANGE(RANGE_INVALID, SrcLimits::quiet_NaN()); |
- ResetFloatingPointUnit(); |
} else if (numeric_limits<Src>::is_signed) { |
TEST_EXPECTED_RANGE(RANGE_VALID, static_cast<Src>(-1)); |
TEST_EXPECTED_RANGE(RANGE_VALID, SrcLimits::min()); |
@@ -373,7 +364,6 @@ struct TestNumericConversion<Dst, Src, SIGN_PRESERVING_NARROW> { |
TEST_EXPECTED_RANGE(RANGE_OVERFLOW, SrcLimits::infinity()); |
TEST_EXPECTED_RANGE(RANGE_UNDERFLOW, SrcLimits::infinity() * -1); |
TEST_EXPECTED_RANGE(RANGE_INVALID, SrcLimits::quiet_NaN()); |
- ResetFloatingPointUnit(); |
} else if (SrcLimits::is_signed) { |
TEST_EXPECTED_VALUE(-1, checked_dst - static_cast<Src>(1)); |
TEST_EXPECTED_RANGE(RANGE_UNDERFLOW, SrcLimits::min()); |
@@ -432,7 +422,6 @@ struct TestNumericConversion<Dst, Src, SIGN_TO_UNSIGN_NARROW> { |
TEST_EXPECTED_RANGE(RANGE_OVERFLOW, SrcLimits::infinity()); |
TEST_EXPECTED_RANGE(RANGE_UNDERFLOW, SrcLimits::infinity() * -1); |
TEST_EXPECTED_RANGE(RANGE_INVALID, SrcLimits::quiet_NaN()); |
- ResetFloatingPointUnit(); |
} else { |
TEST_EXPECTED_RANGE(RANGE_UNDERFLOW, SrcLimits::min()); |
} |