| 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/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" | 
| 6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" | 
| 7 | 7 | 
| 8 namespace v8 { | 8 namespace v8 { | 
| 9 namespace internal { | 9 namespace internal { | 
| 10 namespace compiler { | 10 namespace compiler { | 
| 11 | 11 | 
| 12 enum ImmediateMode { | 12 enum ImmediateMode { | 
| 13   kArithimeticImm,  // 12 bit unsigned immediate shifted left 0 or 12 bits | 13   kArithimeticImm,  // 12 bit unsigned immediate shifted left 0 or 12 bits | 
| 14   kShift32Imm,      // 0 - 31 | 14   kShift32Imm,      // 0 - 31 | 
| 15   kShift64Imm,      // 0 -63 | 15   kShift64Imm,      // 0 -63 | 
| 16   kLogical32Imm, | 16   kLogical32Imm, | 
| 17   kLogical64Imm, | 17   kLogical64Imm, | 
| 18   kLoadStoreImm,  // unsigned 9 bit or signed 7 bit | 18   kLoadStoreImm,  // unsigned 9 bit or signed 7 bit | 
| 19   kNoImmediate | 19   kNoImmediate | 
| 20 }; | 20 }; | 
| 21 | 21 | 
| 22 | 22 | 
| 23 // Adds Arm64-specific methods for generating operands. | 23 // Adds Arm64-specific methods for generating operands. | 
| 24 class Arm64OperandGenerator V8_FINAL : public OperandGenerator { | 24 class Arm64OperandGenerator FINAL : public OperandGenerator { | 
| 25  public: | 25  public: | 
| 26   explicit Arm64OperandGenerator(InstructionSelector* selector) | 26   explicit Arm64OperandGenerator(InstructionSelector* selector) | 
| 27       : OperandGenerator(selector) {} | 27       : OperandGenerator(selector) {} | 
| 28 | 28 | 
| 29   InstructionOperand* UseOperand(Node* node, ImmediateMode mode) { | 29   InstructionOperand* UseOperand(Node* node, ImmediateMode mode) { | 
| 30     if (CanBeImmediate(node, mode)) { | 30     if (CanBeImmediate(node, mode)) { | 
| 31       return UseImmediate(node); | 31       return UseImmediate(node); | 
| 32     } | 32     } | 
| 33     return UseRegister(node); | 33     return UseRegister(node); | 
| 34   } | 34   } | 
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 666   // Caller clean up of stack for C-style calls. | 666   // Caller clean up of stack for C-style calls. | 
| 667   if (is_c_frame && aligned_push_count > 0) { | 667   if (is_c_frame && aligned_push_count > 0) { | 
| 668     DCHECK(deoptimization == NULL && continuation == NULL); | 668     DCHECK(deoptimization == NULL && continuation == NULL); | 
| 669     Emit(kArchDrop | MiscField::encode(aligned_push_count), NULL); | 669     Emit(kArchDrop | MiscField::encode(aligned_push_count), NULL); | 
| 670   } | 670   } | 
| 671 } | 671 } | 
| 672 | 672 | 
| 673 }  // namespace compiler | 673 }  // namespace compiler | 
| 674 }  // namespace internal | 674 }  // namespace internal | 
| 675 }  // namespace v8 | 675 }  // namespace v8 | 
| OLD | NEW | 
|---|