Index: test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc |
diff --git a/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc b/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc |
index 0953de8c40cd8cdad2e23a0dd3b2cce9dfc07d1a..00343d2023448b7f0e199072ca1719f01a0396f5 100644 |
--- a/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc |
+++ b/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc |
@@ -816,6 +816,36 @@ TEST_F(InstructionSelectorTest, Word32Clz) { |
EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); |
} |
+ |
+TEST_F(InstructionSelectorTest, Float32Abs) { |
+ StreamBuilder m(this, kMachFloat32, kMachFloat32); |
+ Node* const p0 = m.Parameter(0); |
+ Node* const n = m.Float32Abs(p0); |
+ m.Return(n); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kMips64AbsS, s[0]->arch_opcode()); |
+ ASSERT_EQ(1U, s[0]->InputCount()); |
+ EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); |
+ ASSERT_EQ(1U, s[0]->OutputCount()); |
+ EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); |
+} |
+ |
+ |
+TEST_F(InstructionSelectorTest, Float64Abs) { |
+ StreamBuilder m(this, kMachFloat64, kMachFloat64); |
+ Node* const p0 = m.Parameter(0); |
+ Node* const n = m.Float64Abs(p0); |
+ m.Return(n); |
+ Stream s = m.Build(); |
+ ASSERT_EQ(1U, s.size()); |
+ EXPECT_EQ(kMips64AbsD, s[0]->arch_opcode()); |
+ ASSERT_EQ(1U, s[0]->InputCount()); |
+ EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); |
+ ASSERT_EQ(1U, s[0]->OutputCount()); |
+ EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); |
+} |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |