aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/compiler-unittests/arm/instruction-selector-arm-unittest.cc
blob: b781ac8f9f5c6adf59f4bfc868c248f5f0107972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "test/compiler-unittests/instruction-selector-unittest.h"

namespace v8 {
namespace internal {
namespace compiler {

class InstructionSelectorARMTest : public InstructionSelectorTest {};


TARGET_TEST_F(InstructionSelectorARMTest, Int32AddP) {
  StreamBuilder m(this, kMachineWord32, kMachineWord32, kMachineWord32);
  m.Return(m.Int32Add(m.Parameter(0), m.Parameter(1)));
  Stream s = m.Build();
  ASSERT_EQ(1U, s.size());
  EXPECT_EQ(kArmAdd, s[0]->arch_opcode());
  EXPECT_EQ(kMode_Operand2_R, s[0]->addressing_mode());
  EXPECT_EQ(2U, s[0]->InputCount());
  EXPECT_EQ(1U, s[0]->OutputCount());
}

}  // namespace compiler
}  // namespace internal
}  // namespace v8