OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/base/bits.h" | 5 #include "src/base/bits.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
11 namespace compiler { | 11 namespace compiler { |
12 | 12 |
13 // Adds Arm-specific methods for generating InstructionOperands. | 13 // Adds Arm-specific methods for generating InstructionOperands. |
14 class ArmOperandGenerator V8_FINAL : public OperandGenerator { | 14 class ArmOperandGenerator FINAL : public OperandGenerator { |
15 public: | 15 public: |
16 explicit ArmOperandGenerator(InstructionSelector* selector) | 16 explicit ArmOperandGenerator(InstructionSelector* selector) |
17 : OperandGenerator(selector) {} | 17 : OperandGenerator(selector) {} |
18 | 18 |
19 InstructionOperand* UseOperand(Node* node, InstructionCode opcode) { | 19 InstructionOperand* UseOperand(Node* node, InstructionCode opcode) { |
20 if (CanBeImmediate(node, opcode)) { | 20 if (CanBeImmediate(node, opcode)) { |
21 return UseImmediate(node); | 21 return UseImmediate(node); |
22 } | 22 } |
23 return UseRegister(node); | 23 return UseRegister(node); |
24 } | 24 } |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 } else { | 952 } else { |
953 DCHECK(cont->IsSet()); | 953 DCHECK(cont->IsSet()); |
954 Emit(cont->Encode(kArmVcmpF64), g.DefineAsRegister(cont->result()), | 954 Emit(cont->Encode(kArmVcmpF64), g.DefineAsRegister(cont->result()), |
955 g.UseRegister(m.left().node()), g.UseRegister(m.right().node())); | 955 g.UseRegister(m.left().node()), g.UseRegister(m.right().node())); |
956 } | 956 } |
957 } | 957 } |
958 | 958 |
959 } // namespace compiler | 959 } // namespace compiler |
960 } // namespace internal | 960 } // namespace internal |
961 } // namespace v8 | 961 } // namespace v8 |
OLD | NEW |