| Index: test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc
|
| diff --git a/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc b/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc
|
| index e892ad3735957905b893c26e6c0f0dcd3959337d..2ce7bca708d56dc8ec4539d1c2e9d953b4efdacc 100644
|
| --- a/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc
|
| +++ b/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc
|
| @@ -103,6 +103,7 @@ TEST_F(InstructionSelectorTest, TruncateFloat64ToFloat32WithParameter) {
|
| // -----------------------------------------------------------------------------
|
| // Better left operand for commutative binops
|
|
|
| +
|
| TEST_F(InstructionSelectorTest, BetterLeftOperandTestAddBinop) {
|
| StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
|
| Node* param1 = m.Parameter(0);
|
| @@ -136,6 +137,7 @@ TEST_F(InstructionSelectorTest, BetterLeftOperandTestMulBinop) {
|
| // -----------------------------------------------------------------------------
|
| // Conversions.
|
|
|
| +
|
| TEST_F(InstructionSelectorTest, ChangeUint32ToFloat64WithParameter) {
|
| StreamBuilder m(this, kMachFloat64, kMachUint32);
|
| m.Return(m.ChangeUint32ToFloat64(m.Parameter(0)));
|
| @@ -148,6 +150,7 @@ TEST_F(InstructionSelectorTest, ChangeUint32ToFloat64WithParameter) {
|
| // -----------------------------------------------------------------------------
|
| // Loads and stores
|
|
|
| +
|
| namespace {
|
|
|
| struct MemoryAccess {
|
| @@ -295,6 +298,7 @@ INSTANTIATE_TEST_CASE_P(InstructionSelectorTest,
|
| // -----------------------------------------------------------------------------
|
| // AddressingMode for loads and stores.
|
|
|
| +
|
| class AddressingModeUnitTest : public InstructionSelectorTest {
|
| public:
|
| AddressingModeUnitTest() : m(NULL) { Reset(); }
|
| @@ -438,6 +442,7 @@ TEST_F(AddressingModeUnitTest, AddressingMode_MI) {
|
| // -----------------------------------------------------------------------------
|
| // Multiplication.
|
|
|
| +
|
| namespace {
|
|
|
| struct MultParam {
|
| @@ -576,6 +581,23 @@ TEST_P(InstructionSelectorMultTest, MultAdd32) {
|
| INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorMultTest,
|
| ::testing::ValuesIn(kMultParams));
|
|
|
| +
|
| +TEST_F(InstructionSelectorTest, Int32MulHigh) {
|
| + StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
|
| + Node* const p0 = m.Parameter(0);
|
| + Node* const p1 = m.Parameter(1);
|
| + Node* const n = m.Int32MulHigh(p0, p1);
|
| + m.Return(n);
|
| + Stream s = m.Build();
|
| + ASSERT_EQ(1U, s.size());
|
| + EXPECT_EQ(kIA32ImulHigh, s[0]->arch_opcode());
|
| + ASSERT_EQ(2U, s[0]->InputCount());
|
| + EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
|
| + EXPECT_EQ(s.ToVreg(p1), s.ToVreg(s[0]->InputAt(1)));
|
| + ASSERT_EQ(1U, s[0]->OutputCount());
|
| + EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
|
| +}
|
| +
|
| } // namespace compiler
|
| } // namespace internal
|
| } // namespace v8
|
|
|