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_MACRO_GEN_H_ | 5 #ifndef V8_WASM_MACRO_GEN_H_ |
6 #define V8_WASM_MACRO_GEN_H_ | 6 #define V8_WASM_MACRO_GEN_H_ |
7 | 7 |
8 #include "src/wasm/wasm-opcodes.h" | 8 #include "src/wasm/wasm-opcodes.h" |
9 | 9 |
10 #include "src/zone-containers.h" | 10 #include "src/zone/zone-containers.h" |
11 | 11 |
12 #define U32_LE(v) \ | 12 #define U32_LE(v) \ |
13 static_cast<byte>(v), static_cast<byte>((v) >> 8), \ | 13 static_cast<byte>(v), static_cast<byte>((v) >> 8), \ |
14 static_cast<byte>((v) >> 16), static_cast<byte>((v) >> 24) | 14 static_cast<byte>((v) >> 16), static_cast<byte>((v) >> 24) |
15 | 15 |
16 #define U16_LE(v) static_cast<byte>(v), static_cast<byte>((v) >> 8) | 16 #define U16_LE(v) static_cast<byte>(v), static_cast<byte>((v) >> 8) |
17 | 17 |
18 #define WASM_MODULE_HEADER U32_LE(kWasmMagic), U32_LE(kWasmVersion) | 18 #define WASM_MODULE_HEADER U32_LE(kWasmMagic), U32_LE(kWasmVersion) |
19 | 19 |
20 #define SIG_INDEX(v) U16_LE(v) | 20 #define SIG_INDEX(v) U16_LE(v) |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 #define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r | 605 #define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r |
606 #define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r | 606 #define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r |
607 #define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r | 607 #define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r |
608 #define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r | 608 #define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r |
609 #define SIZEOF_SIG_ENTRY_x 4 | 609 #define SIZEOF_SIG_ENTRY_x 4 |
610 #define SIZEOF_SIG_ENTRY_x_x 5 | 610 #define SIZEOF_SIG_ENTRY_x_x 5 |
611 #define SIZEOF_SIG_ENTRY_x_xx 6 | 611 #define SIZEOF_SIG_ENTRY_x_xx 6 |
612 #define SIZEOF_SIG_ENTRY_x_xxx 7 | 612 #define SIZEOF_SIG_ENTRY_x_xxx 7 |
613 | 613 |
614 #endif // V8_WASM_MACRO_GEN_H_ | 614 #endif // V8_WASM_MACRO_GEN_H_ |
OLD | NEW |