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 #ifndef V8_COMPILER_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 InstructionCode opcode() const { return opcode_; } | 731 InstructionCode opcode() const { return opcode_; } |
732 ArchOpcode arch_opcode() const { return ArchOpcodeField::decode(opcode()); } | 732 ArchOpcode arch_opcode() const { return ArchOpcodeField::decode(opcode()); } |
733 AddressingMode addressing_mode() const { | 733 AddressingMode addressing_mode() const { |
734 return AddressingModeField::decode(opcode()); | 734 return AddressingModeField::decode(opcode()); |
735 } | 735 } |
736 FlagsMode flags_mode() const { return FlagsModeField::decode(opcode()); } | 736 FlagsMode flags_mode() const { return FlagsModeField::decode(opcode()); } |
737 FlagsCondition flags_condition() const { | 737 FlagsCondition flags_condition() const { |
738 return FlagsConditionField::decode(opcode()); | 738 return FlagsConditionField::decode(opcode()); |
739 } | 739 } |
740 | 740 |
741 // TODO(titzer): make call into a flags. | |
742 static Instruction* New(Zone* zone, InstructionCode opcode) { | 741 static Instruction* New(Zone* zone, InstructionCode opcode) { |
743 return New(zone, opcode, 0, nullptr, 0, nullptr, 0, nullptr); | 742 return New(zone, opcode, 0, nullptr, 0, nullptr, 0, nullptr); |
744 } | 743 } |
745 | 744 |
746 static Instruction* New(Zone* zone, InstructionCode opcode, | 745 static Instruction* New(Zone* zone, InstructionCode opcode, |
747 size_t output_count, InstructionOperand* outputs, | 746 size_t output_count, InstructionOperand* outputs, |
748 size_t input_count, InstructionOperand* inputs, | 747 size_t input_count, InstructionOperand* inputs, |
749 size_t temp_count, InstructionOperand* temps) { | 748 size_t temp_count, InstructionOperand* temps) { |
750 DCHECK(opcode >= 0); | 749 DCHECK(opcode >= 0); |
751 DCHECK(output_count == 0 || outputs != nullptr); | 750 DCHECK(output_count == 0 || outputs != nullptr); |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 | 1363 |
1365 | 1364 |
1366 std::ostream& operator<<(std::ostream& os, | 1365 std::ostream& operator<<(std::ostream& os, |
1367 const PrintableInstructionSequence& code); | 1366 const PrintableInstructionSequence& code); |
1368 | 1367 |
1369 } // namespace compiler | 1368 } // namespace compiler |
1370 } // namespace internal | 1369 } // namespace internal |
1371 } // namespace v8 | 1370 } // namespace v8 |
1372 | 1371 |
1373 #endif // V8_COMPILER_INSTRUCTION_H_ | 1372 #endif // V8_COMPILER_INSTRUCTION_H_ |
OLD | NEW |