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(), |