| 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 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 namespace compiler { | 12 namespace compiler { |
| 13 | 13 |
| 14 #define TRACE_UNIMPL() \ | 14 #define TRACE_UNIMPL() \ |
| 15 PrintF("UNIMPLEMENTED instr_sel: %s at line %d\n", __FUNCTION__, __LINE__) | 15 PrintF("UNIMPLEMENTED instr_sel: %s at line %d\n", __FUNCTION__, __LINE__) |
| 16 | 16 |
| 17 #define TRACE() PrintF("instr_sel: %s at line %d\n", __FUNCTION__, __LINE__) | 17 #define TRACE() PrintF("instr_sel: %s at line %d\n", __FUNCTION__, __LINE__) |
| 18 | 18 |
| 19 | 19 |
| 20 // Adds Mips-specific methods for generating InstructionOperands. | 20 // Adds Mips-specific methods for generating InstructionOperands. |
| 21 class MipsOperandGenerator FINAL : public OperandGenerator { | 21 class MipsOperandGenerator final : public OperandGenerator { |
| 22 public: | 22 public: |
| 23 explicit MipsOperandGenerator(InstructionSelector* selector) | 23 explicit MipsOperandGenerator(InstructionSelector* selector) |
| 24 : OperandGenerator(selector) {} | 24 : OperandGenerator(selector) {} |
| 25 | 25 |
| 26 InstructionOperand UseOperand(Node* node, InstructionCode opcode) { | 26 InstructionOperand UseOperand(Node* node, InstructionCode opcode) { |
| 27 if (CanBeImmediate(node, opcode)) { | 27 if (CanBeImmediate(node, opcode)) { |
| 28 return UseImmediate(node); | 28 return UseImmediate(node); |
| 29 } | 29 } |
| 30 return UseRegister(node); | 30 return UseRegister(node); |
| 31 } | 31 } |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 980 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { |
| 981 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 981 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 982 MachineOperatorBuilder::kFloat64RoundTruncate; | 982 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 983 } | 983 } |
| 984 return flags; | 984 return flags; |
| 985 } | 985 } |
| 986 | 986 |
| 987 } // namespace compiler | 987 } // namespace compiler |
| 988 } // namespace internal | 988 } // namespace internal |
| 989 } // namespace v8 | 989 } // namespace v8 |
| OLD | NEW |