Index: test/cctest/compiler/test-run-machops.cc |
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc |
index 872c0d8b7bf547352face30ba1d419b8ebae98fc..56f1c4f6fe038eeea5dd4fb7c2c529fa422c595d 100644 |
--- a/test/cctest/compiler/test-run-machops.cc |
+++ b/test/cctest/compiler/test-run-machops.cc |
@@ -5160,7 +5160,7 @@ TEST(RunFloat64RoundDown1) { |
m.Return(m.Float64RoundDown(m.Parameter(0))); |
- FOR_FLOAT64_INPUTS(i) { CheckDoubleEq(std::floor(*i), m.Call(*i)); } |
+ FOR_FLOAT64_INPUTS(i) { CheckDoubleEq(floor(*i), m.Call(*i)); } |
} |
@@ -5172,7 +5172,7 @@ TEST(RunFloat64RoundDown2) { |
m.Parameter(0))))); |
for (size_t i = 0; i < arraysize(kValues); ++i) { |
- CHECK_EQ(std::ceil(kValues[i]), m.Call(kValues[i])); |
+ CHECK_EQ(ceil(kValues[i]), m.Call(kValues[i])); |
} |
} |
@@ -5182,7 +5182,7 @@ TEST(RunFloat32RoundUp) { |
if (!m.machine()->Float32RoundUp().IsSupported()) return; |
m.Return(m.Float32RoundUp(m.Parameter(0))); |
- FOR_FLOAT32_INPUTS(i) { CheckFloatEq(std::ceil(*i), m.Call(*i)); } |
+ FOR_FLOAT32_INPUTS(i) { CheckFloatEq(ceilf(*i), m.Call(*i)); } |
} |
@@ -5191,7 +5191,7 @@ TEST(RunFloat64RoundUp) { |
if (!m.machine()->Float64RoundUp().IsSupported()) return; |
m.Return(m.Float64RoundUp(m.Parameter(0))); |
- FOR_FLOAT64_INPUTS(i) { CheckDoubleEq(std::ceil(*i), m.Call(*i)); } |
+ FOR_FLOAT64_INPUTS(i) { CheckDoubleEq(ceil(*i), m.Call(*i)); } |
} |
@@ -5204,6 +5204,16 @@ TEST(RunFloat64RoundTiesEven) { |
} |
+TEST(RunFloat32RoundTruncate) { |
+ BufferedRawMachineAssemblerTester<float> m(kMachFloat32); |
+ if (!m.machine()->Float32RoundTruncate().IsSupported()) return; |
+ |
+ m.Return(m.Float32RoundTruncate(m.Parameter(0))); |
+ |
+ FOR_FLOAT32_INPUTS(i) { CheckFloatEq(truncf(*i), m.Call(*i)); } |
+} |
+ |
+ |
TEST(RunFloat64RoundTruncate) { |
BufferedRawMachineAssemblerTester<double> m(kMachFloat64); |
if (!m.machine()->Float64RoundTruncate().IsSupported()) return; |