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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // The InstructionCode is an opaque, target-specific integer that encodes | 120 // The InstructionCode is an opaque, target-specific integer that encodes |
121 // what code to emit for an instruction in the code generator. It is not | 121 // what code to emit for an instruction in the code generator. It is not |
122 // interesting to the register allocator, as the inputs and flags on the | 122 // interesting to the register allocator, as the inputs and flags on the |
123 // instructions specify everything of interest. | 123 // instructions specify everything of interest. |
124 typedef int32_t InstructionCode; | 124 typedef int32_t InstructionCode; |
125 | 125 |
126 // Helpers for encoding / decoding InstructionCode into the fields needed | 126 // Helpers for encoding / decoding InstructionCode into the fields needed |
127 // for code generation. We encode the instruction, addressing mode, and flags | 127 // for code generation. We encode the instruction, addressing mode, and flags |
128 // continuation into a single InstructionCode which is stored as part of | 128 // continuation into a single InstructionCode which is stored as part of |
129 // the instruction. | 129 // the instruction. |
130 typedef BitField<ArchOpcode, 0, 7> ArchOpcodeField; | 130 typedef BitField<ArchOpcode, 0, 8> ArchOpcodeField; |
131 typedef BitField<AddressingMode, 7, 5> AddressingModeField; | 131 typedef BitField<AddressingMode, 8, 5> AddressingModeField; |
132 typedef BitField<FlagsMode, 12, 2> FlagsModeField; | 132 typedef BitField<FlagsMode, 13, 2> FlagsModeField; |
133 typedef BitField<FlagsCondition, 14, 4> FlagsConditionField; | 133 typedef BitField<FlagsCondition, 15, 4> FlagsConditionField; |
134 typedef BitField<int, 14, 18> MiscField; | 134 typedef BitField<int, 19, 13> MiscField; |
135 | 135 |
136 } // namespace compiler | 136 } // namespace compiler |
137 } // namespace internal | 137 } // namespace internal |
138 } // namespace v8 | 138 } // namespace v8 |
139 | 139 |
140 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ | 140 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ |
OLD | NEW |