Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 2065503002: [builtins] Introduce proper Float64Atan and Float64Atan2 operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [WIP] Fix GCC/Win32. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698