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 b1b01a48f82e7e0ca7f418fc007e0f0d150662ba..70e57cbd6814c1414609d08255d14cb29803dc94 100644 |
--- a/test/cctest/compiler/test-run-machops.cc |
+++ b/test/cctest/compiler/test-run-machops.cc |
@@ -5496,6 +5496,27 @@ TEST(RunFloat64Abs) { |
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(std::abs(*i), m.Call(*i)); } |
} |
+TEST(RunFloat64Atan) { |
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
+ m.Return(m.Float64Atan(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(-0.0, m.Call(-0.0)); |
+ CHECK_DOUBLE_EQ(0.0, m.Call(0.0)); |
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::atan(*i), m.Call(*i)); } |
+} |
+ |
+TEST(RunFloat64Atan2) { |
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64(), |
+ MachineType::Float64()); |
+ m.Return(m.Float64Atan2(m.Parameter(0), m.Parameter(1))); |
+ FOR_FLOAT64_INPUTS(i) { |
+ FOR_FLOAT64_INPUTS(j) { |
+ CHECK_DOUBLE_EQ(ieee754::atan2(*i, *j), m.Call(*i, *j)); |
+ } |
+ } |
+} |
+ |
TEST(RunFloat64Log) { |
BufferedRawMachineAssemblerTester<double> m(MachineType::Float64()); |
m.Return(m.Float64Log(m.Parameter(0))); |