OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_INTERPRETER_BYTECODE_OPERANDS_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_OPERANDS_H_ |
6 #define V8_INTERPRETER_BYTECODE_OPERANDS_H_ | 6 #define V8_INTERPRETER_BYTECODE_OPERANDS_H_ |
7 | 7 |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 namespace interpreter { | 12 namespace interpreter { |
13 | 13 |
14 #define INVALID_OPERAND_TYPE_LIST(V) V(None, OperandTypeInfo::kNone) | 14 #define INVALID_OPERAND_TYPE_LIST(V) V(None, OperandTypeInfo::kNone) |
15 | 15 |
16 #define REGISTER_INPUT_OPERAND_TYPE_LIST(V) \ | 16 #define REGISTER_INPUT_OPERAND_TYPE_LIST(V) \ |
| 17 V(Reg, OperandTypeInfo::kScalableSignedByte) \ |
17 V(RegList, OperandTypeInfo::kScalableSignedByte) \ | 18 V(RegList, OperandTypeInfo::kScalableSignedByte) \ |
18 V(Reg, OperandTypeInfo::kScalableSignedByte) \ | |
19 V(RegPair, OperandTypeInfo::kScalableSignedByte) | 19 V(RegPair, OperandTypeInfo::kScalableSignedByte) |
20 | 20 |
21 #define REGISTER_OUTPUT_OPERAND_TYPE_LIST(V) \ | 21 #define REGISTER_OUTPUT_OPERAND_TYPE_LIST(V) \ |
22 V(RegOut, OperandTypeInfo::kScalableSignedByte) \ | 22 V(RegOut, OperandTypeInfo::kScalableSignedByte) \ |
23 V(RegOutPair, OperandTypeInfo::kScalableSignedByte) \ | 23 V(RegOutPair, OperandTypeInfo::kScalableSignedByte) \ |
24 V(RegOutTriple, OperandTypeInfo::kScalableSignedByte) | 24 V(RegOutTriple, OperandTypeInfo::kScalableSignedByte) |
25 | 25 |
26 #define SCALAR_OPERAND_TYPE_LIST(V) \ | 26 #define UNSIGNED_SCALAR_OPERAND_TYPE_LIST(V) \ |
27 V(Flag8, OperandTypeInfo::kFixedUnsignedByte) \ | 27 V(Flag8, OperandTypeInfo::kFixedUnsignedByte) \ |
28 V(IntrinsicId, OperandTypeInfo::kFixedUnsignedByte) \ | 28 V(IntrinsicId, OperandTypeInfo::kFixedUnsignedByte) \ |
29 V(Idx, OperandTypeInfo::kScalableUnsignedByte) \ | 29 V(Idx, OperandTypeInfo::kScalableUnsignedByte) \ |
30 V(UImm, OperandTypeInfo::kScalableUnsignedByte) \ | 30 V(UImm, OperandTypeInfo::kScalableUnsignedByte) \ |
31 V(Imm, OperandTypeInfo::kScalableSignedByte) \ | |
32 V(RegCount, OperandTypeInfo::kScalableUnsignedByte) \ | 31 V(RegCount, OperandTypeInfo::kScalableUnsignedByte) \ |
33 V(RuntimeId, OperandTypeInfo::kFixedUnsignedShort) | 32 V(RuntimeId, OperandTypeInfo::kFixedUnsignedShort) |
34 | 33 |
| 34 #define SIGNED_SCALAR_OPERAND_TYPE_LIST(V) \ |
| 35 V(Imm, OperandTypeInfo::kScalableSignedByte) |
| 36 |
35 #define REGISTER_OPERAND_TYPE_LIST(V) \ | 37 #define REGISTER_OPERAND_TYPE_LIST(V) \ |
36 REGISTER_INPUT_OPERAND_TYPE_LIST(V) \ | 38 REGISTER_INPUT_OPERAND_TYPE_LIST(V) \ |
37 REGISTER_OUTPUT_OPERAND_TYPE_LIST(V) | 39 REGISTER_OUTPUT_OPERAND_TYPE_LIST(V) |
38 | 40 |
39 #define NON_REGISTER_OPERAND_TYPE_LIST(V) \ | 41 #define NON_REGISTER_OPERAND_TYPE_LIST(V) \ |
40 INVALID_OPERAND_TYPE_LIST(V) \ | 42 INVALID_OPERAND_TYPE_LIST(V) \ |
41 SCALAR_OPERAND_TYPE_LIST(V) | 43 UNSIGNED_SCALAR_OPERAND_TYPE_LIST(V) \ |
| 44 SIGNED_SCALAR_OPERAND_TYPE_LIST(V) |
42 | 45 |
43 // The list of operand types used by bytecodes. | 46 // The list of operand types used by bytecodes. |
44 #define OPERAND_TYPE_LIST(V) \ | 47 #define OPERAND_TYPE_LIST(V) \ |
45 NON_REGISTER_OPERAND_TYPE_LIST(V) \ | 48 NON_REGISTER_OPERAND_TYPE_LIST(V) \ |
46 REGISTER_OPERAND_TYPE_LIST(V) | 49 REGISTER_OPERAND_TYPE_LIST(V) |
47 | 50 |
48 // Enumeration of scaling factors applicable to scalable operands. Code | 51 // Enumeration of scaling factors applicable to scalable operands. Code |
49 // relies on being able to cast values to integer scaling values. | 52 // relies on being able to cast values to integer scaling values. |
50 #define OPERAND_SCALE_LIST(V) \ | 53 #define OPERAND_SCALE_LIST(V) \ |
51 V(Single, 1) \ | 54 V(Single, 1) \ |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 const OperandScale& operand_scale); | 123 const OperandScale& operand_scale); |
121 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, | 124 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, |
122 const OperandSize& operand_size); | 125 const OperandSize& operand_size); |
123 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 126 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
124 | 127 |
125 } // namespace interpreter | 128 } // namespace interpreter |
126 } // namespace internal | 129 } // namespace internal |
127 } // namespace v8 | 130 } // namespace v8 |
128 | 131 |
129 #endif // V8_INTERPRETER_BYTECODE_OPERANDS_H_ | 132 #endif // V8_INTERPRETER_BYTECODE_OPERANDS_H_ |
OLD | NEW |