| 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 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| 11 namespace compiler { | 11 namespace compiler { |
| 12 | 12 |
| 13 enum ImmediateMode { | 13 enum ImmediateMode { |
| 14 kInt16Imm, | 14 kInt16Imm, |
| 15 kInt16Imm_Unsigned, | 15 kInt16Imm_Unsigned, |
| 16 kInt16Imm_Negate, | 16 kInt16Imm_Negate, |
| 17 kInt16Imm_4ByteAligned, | 17 kInt16Imm_4ByteAligned, |
| 18 kShift32Imm, | 18 kShift32Imm, |
| 19 kShift64Imm, | 19 kShift64Imm, |
| 20 kNoImmediate | 20 kNoImmediate |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 | 23 |
| 24 // Adds PPC-specific methods for generating operands. | 24 // Adds PPC-specific methods for generating operands. |
| 25 class PPCOperandGenerator FINAL : public OperandGenerator { | 25 class PPCOperandGenerator final : public OperandGenerator { |
| 26 public: | 26 public: |
| 27 explicit PPCOperandGenerator(InstructionSelector* selector) | 27 explicit PPCOperandGenerator(InstructionSelector* selector) |
| 28 : OperandGenerator(selector) {} | 28 : OperandGenerator(selector) {} |
| 29 | 29 |
| 30 InstructionOperand UseOperand(Node* node, ImmediateMode mode) { | 30 InstructionOperand UseOperand(Node* node, ImmediateMode mode) { |
| 31 if (CanBeImmediate(node, mode)) { | 31 if (CanBeImmediate(node, mode)) { |
| 32 return UseImmediate(node); | 32 return UseImmediate(node); |
| 33 } | 33 } |
| 34 return UseRegister(node); | 34 return UseRegister(node); |
| 35 } | 35 } |
| (...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 MachineOperatorBuilder::kFloat64Min | | 1548 MachineOperatorBuilder::kFloat64Min | |
| 1549 MachineOperatorBuilder::kFloat64RoundDown | | 1549 MachineOperatorBuilder::kFloat64RoundDown | |
| 1550 MachineOperatorBuilder::kFloat64RoundTruncate | | 1550 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1551 MachineOperatorBuilder::kFloat64RoundTiesAway; | 1551 MachineOperatorBuilder::kFloat64RoundTiesAway; |
| 1552 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1552 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
| 1553 } | 1553 } |
| 1554 | 1554 |
| 1555 } // namespace compiler | 1555 } // namespace compiler |
| 1556 } // namespace internal | 1556 } // namespace internal |
| 1557 } // namespace v8 | 1557 } // namespace v8 |
| OLD | NEW |