OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_WASM_OPCODES_H_ | 5 #ifndef V8_WASM_OPCODES_H_ |
6 #define V8_WASM_OPCODES_H_ | 6 #define V8_WASM_OPCODES_H_ |
7 | 7 |
8 #include "src/machine-type.h" | 8 #include "src/machine-type.h" |
9 #include "src/signature.h" | 9 #include "src/signature.h" |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 V(I32StoreMem8, 0x2e, i_ii) \ | 109 V(I32StoreMem8, 0x2e, i_ii) \ |
110 V(I32StoreMem16, 0x2f, i_ii) \ | 110 V(I32StoreMem16, 0x2f, i_ii) \ |
111 V(I64StoreMem8, 0x30, l_il) \ | 111 V(I64StoreMem8, 0x30, l_il) \ |
112 V(I64StoreMem16, 0x31, l_il) \ | 112 V(I64StoreMem16, 0x31, l_il) \ |
113 V(I64StoreMem32, 0x32, l_il) \ | 113 V(I64StoreMem32, 0x32, l_il) \ |
114 V(I32StoreMem, 0x33, i_ii) \ | 114 V(I32StoreMem, 0x33, i_ii) \ |
115 V(I64StoreMem, 0x34, l_il) \ | 115 V(I64StoreMem, 0x34, l_il) \ |
116 V(F32StoreMem, 0x35, f_if) \ | 116 V(F32StoreMem, 0x35, f_if) \ |
117 V(F64StoreMem, 0x36, d_id) | 117 V(F64StoreMem, 0x36, d_id) |
118 | 118 |
| 119 #define FOREACH_SIMPLE_MEM_OPCODE(V) V(GrowMemory, 0x39, i_i) |
| 120 |
119 // Load memory expressions. | 121 // Load memory expressions. |
120 #define FOREACH_MISC_MEM_OPCODE(V) \ | 122 #define FOREACH_MISC_MEM_OPCODE(V) \ |
121 V(GrowMemory, 0x39, i_i) \ | |
122 V(MemorySize, 0x3b, i_v) | 123 V(MemorySize, 0x3b, i_v) |
123 | 124 |
124 // Expressions with signatures. | 125 // Expressions with signatures. |
125 #define FOREACH_SIMPLE_OPCODE(V) \ | 126 #define FOREACH_SIMPLE_OPCODE(V) \ |
126 V(I32Add, 0x40, i_ii) \ | 127 V(I32Add, 0x40, i_ii) \ |
127 V(I32Sub, 0x41, i_ii) \ | 128 V(I32Sub, 0x41, i_ii) \ |
128 V(I32Mul, 0x42, i_ii) \ | 129 V(I32Mul, 0x42, i_ii) \ |
129 V(I32DivS, 0x43, i_ii) \ | 130 V(I32DivS, 0x43, i_ii) \ |
130 V(I32DivU, 0x44, i_ii) \ | 131 V(I32DivU, 0x44, i_ii) \ |
131 V(I32RemS, 0x45, i_ii) \ | 132 V(I32RemS, 0x45, i_ii) \ |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 V(S128And, 0xe576, s_ss) \ | 404 V(S128And, 0xe576, s_ss) \ |
404 V(S128Ior, 0xe577, s_ss) \ | 405 V(S128Ior, 0xe577, s_ss) \ |
405 V(S128Xor, 0xe578, s_ss) \ | 406 V(S128Xor, 0xe578, s_ss) \ |
406 V(S128Not, 0xe579, s_s) | 407 V(S128Not, 0xe579, s_s) |
407 | 408 |
408 // All opcodes. | 409 // All opcodes. |
409 #define FOREACH_OPCODE(V) \ | 410 #define FOREACH_OPCODE(V) \ |
410 FOREACH_CONTROL_OPCODE(V) \ | 411 FOREACH_CONTROL_OPCODE(V) \ |
411 FOREACH_MISC_OPCODE(V) \ | 412 FOREACH_MISC_OPCODE(V) \ |
412 FOREACH_SIMPLE_OPCODE(V) \ | 413 FOREACH_SIMPLE_OPCODE(V) \ |
| 414 FOREACH_SIMPLE_MEM_OPCODE(V) \ |
413 FOREACH_STORE_MEM_OPCODE(V) \ | 415 FOREACH_STORE_MEM_OPCODE(V) \ |
414 FOREACH_LOAD_MEM_OPCODE(V) \ | 416 FOREACH_LOAD_MEM_OPCODE(V) \ |
415 FOREACH_MISC_MEM_OPCODE(V) \ | 417 FOREACH_MISC_MEM_OPCODE(V) \ |
416 FOREACH_ASMJS_COMPAT_OPCODE(V) \ | 418 FOREACH_ASMJS_COMPAT_OPCODE(V) \ |
417 FOREACH_SIMD_OPCODE(V) | 419 FOREACH_SIMD_OPCODE(V) |
418 | 420 |
419 // All signatures. | 421 // All signatures. |
420 #define FOREACH_SIGNATURE(V) \ | 422 #define FOREACH_SIGNATURE(V) \ |
421 FOREACH_SIMD_SIGNATURE(V) \ | 423 FOREACH_SIMD_SIGNATURE(V) \ |
422 V(i_ii, kAstI32, kAstI32, kAstI32) \ | 424 V(i_ii, kAstI32, kAstI32, kAstI32) \ |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 default: | 666 default: |
665 return "<unknown>"; | 667 return "<unknown>"; |
666 } | 668 } |
667 } | 669 } |
668 }; | 670 }; |
669 } // namespace wasm | 671 } // namespace wasm |
670 } // namespace internal | 672 } // namespace internal |
671 } // namespace v8 | 673 } // namespace v8 |
672 | 674 |
673 #endif // V8_WASM_OPCODES_H_ | 675 #endif // V8_WASM_OPCODES_H_ |
OLD | NEW |