| 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_CODES_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_CODES_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_CODES_H_ | 6 #define V8_COMPILER_INSTRUCTION_CODES_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #if V8_TARGET_ARCH_ARM | 10 #if V8_TARGET_ARCH_ARM |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 kSignedLessThan, | 95 kSignedLessThan, |
| 96 kSignedGreaterThanOrEqual, | 96 kSignedGreaterThanOrEqual, |
| 97 kSignedLessThanOrEqual, | 97 kSignedLessThanOrEqual, |
| 98 kSignedGreaterThan, | 98 kSignedGreaterThan, |
| 99 kUnsignedLessThan, | 99 kUnsignedLessThan, |
| 100 kUnsignedGreaterThanOrEqual, | 100 kUnsignedGreaterThanOrEqual, |
| 101 kUnsignedLessThanOrEqual, | 101 kUnsignedLessThanOrEqual, |
| 102 kUnsignedGreaterThan, | 102 kUnsignedGreaterThan, |
| 103 kUnorderedEqual, | 103 kUnorderedEqual, |
| 104 kUnorderedNotEqual, | 104 kUnorderedNotEqual, |
| 105 kUnorderedLessThan, | |
| 106 kUnorderedGreaterThanOrEqual, | |
| 107 kUnorderedLessThanOrEqual, | |
| 108 kUnorderedGreaterThan, | |
| 109 kOverflow, | 105 kOverflow, |
| 110 kNotOverflow | 106 kNotOverflow |
| 111 }; | 107 }; |
| 112 | 108 |
| 113 inline FlagsCondition NegateFlagsCondition(FlagsCondition condition) { | 109 inline FlagsCondition NegateFlagsCondition(FlagsCondition condition) { |
| 114 return static_cast<FlagsCondition>(condition ^ 1); | 110 return static_cast<FlagsCondition>(condition ^ 1); |
| 115 } | 111 } |
| 116 | 112 |
| 117 std::ostream& operator<<(std::ostream& os, const FlagsCondition& fc); | 113 std::ostream& operator<<(std::ostream& os, const FlagsCondition& fc); |
| 118 | 114 |
| 119 // The InstructionCode is an opaque, target-specific integer that encodes | 115 // The InstructionCode is an opaque, target-specific integer that encodes |
| 120 // what code to emit for an instruction in the code generator. It is not | 116 // what code to emit for an instruction in the code generator. It is not |
| 121 // interesting to the register allocator, as the inputs and flags on the | 117 // interesting to the register allocator, as the inputs and flags on the |
| 122 // instructions specify everything of interest. | 118 // instructions specify everything of interest. |
| 123 typedef int32_t InstructionCode; | 119 typedef int32_t InstructionCode; |
| 124 | 120 |
| 125 // Helpers for encoding / decoding InstructionCode into the fields needed | 121 // Helpers for encoding / decoding InstructionCode into the fields needed |
| 126 // for code generation. We encode the instruction, addressing mode, and flags | 122 // for code generation. We encode the instruction, addressing mode, and flags |
| 127 // continuation into a single InstructionCode which is stored as part of | 123 // continuation into a single InstructionCode which is stored as part of |
| 128 // the instruction. | 124 // the instruction. |
| 129 typedef BitField<ArchOpcode, 0, 7> ArchOpcodeField; | 125 typedef BitField<ArchOpcode, 0, 7> ArchOpcodeField; |
| 130 typedef BitField<AddressingMode, 7, 5> AddressingModeField; | 126 typedef BitField<AddressingMode, 7, 5> AddressingModeField; |
| 131 typedef BitField<FlagsMode, 12, 2> FlagsModeField; | 127 typedef BitField<FlagsMode, 12, 2> FlagsModeField; |
| 132 typedef BitField<FlagsCondition, 14, 5> FlagsConditionField; | 128 typedef BitField<FlagsCondition, 14, 4> FlagsConditionField; |
| 133 typedef BitField<int, 14, 18> MiscField; | 129 typedef BitField<int, 14, 18> MiscField; |
| 134 | 130 |
| 135 } // namespace compiler | 131 } // namespace compiler |
| 136 } // namespace internal | 132 } // namespace internal |
| 137 } // namespace v8 | 133 } // namespace v8 |
| 138 | 134 |
| 139 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ | 135 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ |
| OLD | NEW |