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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // The InstructionCode is an opaque, target-specific integer that encodes | 199 // The InstructionCode is an opaque, target-specific integer that encodes |
200 // what code to emit for an instruction in the code generator. It is not | 200 // what code to emit for an instruction in the code generator. It is not |
201 // interesting to the register allocator, as the inputs and flags on the | 201 // interesting to the register allocator, as the inputs and flags on the |
202 // instructions specify everything of interest. | 202 // instructions specify everything of interest. |
203 typedef int32_t InstructionCode; | 203 typedef int32_t InstructionCode; |
204 | 204 |
205 // Helpers for encoding / decoding InstructionCode into the fields needed | 205 // Helpers for encoding / decoding InstructionCode into the fields needed |
206 // for code generation. We encode the instruction, addressing mode, and flags | 206 // for code generation. We encode the instruction, addressing mode, and flags |
207 // continuation into a single InstructionCode which is stored as part of | 207 // continuation into a single InstructionCode which is stored as part of |
208 // the instruction. | 208 // the instruction. |
209 typedef BitField<ArchOpcode, 0, 8> ArchOpcodeField; | 209 typedef BitField<ArchOpcode, 0, 9> ArchOpcodeField; |
210 typedef BitField<AddressingMode, 8, 5> AddressingModeField; | 210 typedef BitField<AddressingMode, 9, 5> AddressingModeField; |
211 typedef BitField<FlagsMode, 13, 3> FlagsModeField; | 211 typedef BitField<FlagsMode, 14, 3> FlagsModeField; |
212 typedef BitField<FlagsCondition, 16, 5> FlagsConditionField; | 212 typedef BitField<FlagsCondition, 17, 5> FlagsConditionField; |
213 typedef BitField<int, 21, 11> MiscField; | 213 typedef BitField<int, 22, 10> MiscField; |
214 | 214 |
215 } // namespace compiler | 215 } // namespace compiler |
216 } // namespace internal | 216 } // namespace internal |
217 } // namespace v8 | 217 } // namespace v8 |
218 | 218 |
219 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ | 219 #endif // V8_COMPILER_INSTRUCTION_CODES_H_ |
OLD | NEW |