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

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

Issue 2116753002: [builtins] Unify most of the remaining Math builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2102223005
Patch Set: 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
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 3cb208d01448c1c49420c463acc2610a86dde0b5..48a8f7adef55e7fd26975633add7a18b60371523 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -5499,6 +5499,30 @@ TEST(RunFloat64Abs) {
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(std::abs(*i), m.Call(*i)); }
}
+TEST(RunFloat64Acos) {
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64());
+ m.Return(m.Float64Acos(m.Parameter(0)));
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::acos(*i), m.Call(*i)); }
+}
+
+TEST(RunFloat64Acosh) {
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64());
+ m.Return(m.Float64Acosh(m.Parameter(0)));
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::acosh(*i), m.Call(*i)); }
+}
+
+TEST(RunFloat64Asin) {
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64());
+ m.Return(m.Float64Asin(m.Parameter(0)));
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::asin(*i), m.Call(*i)); }
+}
+
+TEST(RunFloat64Asinh) {
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64());
+ m.Return(m.Float64Asinh(m.Parameter(0)));
+ FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::asinh(*i), m.Call(*i)); }
+}
+
TEST(RunFloat64Atan) {
BufferedRawMachineAssemblerTester<double> m(MachineType::Float64());
m.Return(m.Float64Atan(m.Parameter(0)));
@@ -5509,17 +5533,6 @@ TEST(RunFloat64Atan) {
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(RunFloat64Atanh) {
BufferedRawMachineAssemblerTester<double> m(MachineType::Float64());
m.Return(m.Float64Atanh(m.Parameter(0)));
@@ -5532,6 +5545,17 @@ TEST(RunFloat64Atanh) {
FOR_FLOAT64_INPUTS(i) { CHECK_DOUBLE_EQ(ieee754::atanh(*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(RunFloat64Cos) {
BufferedRawMachineAssemblerTester<double> m(MachineType::Float64());
m.Return(m.Float64Cos(m.Parameter(0)));

Powered by Google App Engine
This is Rietveld 408576698