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 6f8feb75d70c312b5ff953f0eb985d61525e0898..f7502ca668c2b4f3a28960f049f42e19aede8696 100644 |
--- a/test/cctest/compiler/test-run-machops.cc |
+++ b/test/cctest/compiler/test-run-machops.cc |
@@ -5495,6 +5495,20 @@ TEST(RunFloat64Abs) { |
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(std::abs(*i), m.Call(*i)); } |
} |
+TEST(RunFloat64Log) { |
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
+ m.Return(m.Float64Log(m.Parameter(0))); |
+ CHECK(std::isnan(m.Call(std::numeric_limits<double>::quiet_NaN()))); |
ahaas
2016/06/03 09:32:49
Aren't these checks included in the FOR_FLOAT64_IN
Benedikt Meurer
2016/06/03 09:40:28
Yes, but I want to make them explicit. These are t
|
+ CHECK(std::isnan(m.Call(std::numeric_limits<double>::signaling_NaN()))); |
+ CHECK(std::isnan(m.Call(-std::numeric_limits<double>::infinity()))); |
+ CHECK(std::isnan(m.Call(-1.0))); |
+ CHECK_DOUBLE_EQ(-std::numeric_limits<double>::infinity(), m.Call(-0.0)); |
+ CHECK_DOUBLE_EQ(-std::numeric_limits<double>::infinity(), m.Call(0.0)); |
+ CHECK_DOUBLE_EQ(0.0, m.Call(1.0)); |
+ CHECK_DOUBLE_EQ(std::numeric_limits<double>::infinity(), |
+ m.Call(std::numeric_limits<double>::infinity())); |
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(std::log(*i), m.Call(*i)); } |
+} |
static double two_30 = 1 << 30; // 2^30 is a smi boundary. |
static double two_52 = two_30 * (1 << 22); // 2^52 is a precision boundary. |