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 1f497f1a2430441758a9be0999c5eb8970a52428..62af9b248fba701a2a3e6f97ee74e8a2d650edfb 100644 |
--- a/test/cctest/compiler/test-run-machops.cc |
+++ b/test/cctest/compiler/test-run-machops.cc |
@@ -5517,6 +5517,18 @@ TEST(RunFloat64Atan2) { |
} |
} |
+TEST(RunFloat64Atanh) { |
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
+ m.Return(m.Float64Atanh(m.Parameter(0))); |
+ CHECK(std::isnan(m.Call(std::numeric_limits<double>::quiet_NaN()))); |
+ CHECK(std::isnan(m.Call(std::numeric_limits<double>::signaling_NaN()))); |
+ CHECK_DOUBLE_EQ(std::numeric_limits<double>::infinity(), m.Call(1.0)); |
+ CHECK_DOUBLE_EQ(-std::numeric_limits<double>::infinity(), m.Call(-1.0)); |
+ CHECK_DOUBLE_EQ(-0.0, m.Call(-0.0)); |
+ CHECK_DOUBLE_EQ(0.0, m.Call(0.0)); |
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::atanh(*i), m.Call(*i)); } |
+} |
+ |
TEST(RunFloat64Exp) { |
BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
m.Return(m.Float64Exp(m.Parameter(0))); |
@@ -5530,6 +5542,17 @@ TEST(RunFloat64Exp) { |
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::exp(*i), m.Call(*i)); } |
} |
+TEST(RunFloat64Expm1) { |
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
+ m.Return(m.Float64Expm1(m.Parameter(0))); |
+ CHECK(std::isnan(m.Call(std::numeric_limits<double>::quiet_NaN()))); |
+ CHECK(std::isnan(m.Call(std::numeric_limits<double>::signaling_NaN()))); |
+ CHECK_EQ(-1.0, m.Call(-std::numeric_limits<double>::infinity())); |
+ CHECK_DOUBLE_EQ(std::numeric_limits<double>::infinity(), |
+ m.Call(std::numeric_limits<double>::infinity())); |
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::expm1(*i), m.Call(*i)); } |
+} |
+ |
TEST(RunFloat64Log) { |
BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
m.Return(m.Float64Log(m.Parameter(0))); |
@@ -5588,6 +5611,18 @@ TEST(RunFloat64Log10) { |
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::log10(*i), m.Call(*i)); } |
} |
+TEST(RunFloat64Cbrt) { |
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
+ m.Return(m.Float64Cbrt(m.Parameter(0))); |
+ CHECK(std::isnan(m.Call(std::numeric_limits<double>::quiet_NaN()))); |
+ CHECK(std::isnan(m.Call(std::numeric_limits<double>::signaling_NaN()))); |
+ CHECK_DOUBLE_EQ(std::numeric_limits<double>::infinity(), |
+ m.Call(std::numeric_limits<double>::infinity())); |
+ CHECK_DOUBLE_EQ(-std::numeric_limits<double>::infinity(), |
+ m.Call(-std::numeric_limits<double>::infinity())); |
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::cbrt(*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. |
static double kValues[] = {0.1, |