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

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

Issue 2011303002: [arm] [arm64] Add optional operators Float32Neg and Float64Neg. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 6d681bca85f04272fbd0758ff1d7b9c980fdd8c7..6f8feb75d70c312b5ff953f0eb985d61525e0898 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -3568,6 +3568,12 @@ TEST(RunFloat32Sub) {
}
}
+TEST(RunFloat32Neg) {
+ BufferedRawMachineAssemblerTester<float> m(MachineType::Float32());
+ if (!m.machine()->Float32Neg().IsSupported()) return;
+ m.Return(m.AddNode(m.machine()->Float32Neg().op(), m.Parameter(0)));
+ FOR_FLOAT32_INPUTS(i) { CHECK_FLOAT_EQ(-0.0f - *i, m.Call(*i)); }
+}
TEST(RunFloat32Mul) {
BufferedRawMachineAssemblerTester<float> m(MachineType::Float32(),
@@ -3612,6 +3618,12 @@ TEST(RunFloat64Sub) {
}
}
+TEST(RunFloat64Neg) {
+ BufferedRawMachineAssemblerTester<double> m(MachineType::Float64());
+ if (!m.machine()->Float64Neg().IsSupported()) return;
+ m.Return(m.AddNode(m.machine()->Float64Neg().op(), m.Parameter(0)));
+ FOR_FLOAT64_INPUTS(i) { CHECK_FLOAT_EQ(-0.0 - *i, m.Call(*i)); }
+}
TEST(RunFloat64Mul) {
BufferedRawMachineAssemblerTester<double> m(MachineType::Float64(),
« no previous file with comments | « src/compiler/x87/instruction-selector-x87.cc ('k') | test/unittests/compiler/arm/instruction-selector-arm-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698