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 8f3efb5777ed6a6683abd6155a37baf0689692bd..b1b01a48f82e7e0ca7f418fc007e0f0d150662ba 100644 |
--- a/test/cctest/compiler/test-run-machops.cc |
+++ b/test/cctest/compiler/test-run-machops.cc |
@@ -5511,6 +5511,20 @@ TEST(RunFloat64Log) { |
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::log(*i), m.Call(*i)); } |
} |
+TEST(RunFloat64Log1p) { |
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
+ m.Return(m.Float64Log1p(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(std::isnan(m.Call(-std::numeric_limits<double>::infinity()))); |
+ 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)); |
+ CHECK_DOUBLE_EQ(std::numeric_limits<double>::infinity(), |
+ m.Call(std::numeric_limits<double>::infinity())); |
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::log1p(*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, |