Index: src/wasm/wasm-macro-gen.h |
diff --git a/src/wasm/wasm-macro-gen.h b/src/wasm/wasm-macro-gen.h |
index 85787d9f991ff204bf175a9aa4936e85102f5b4e..beb94316c3297a583a08e257949fcdac9c82307f 100644 |
--- a/src/wasm/wasm-macro-gen.h |
+++ b/src/wasm/wasm-macro-gen.h |
@@ -16,9 +16,10 @@ |
#define WASM_MODULE_HEADER U32_LE(kWasmMagic), U32_LE(kWasmVersion) |
#define SIG_INDEX(v) U16_LE(v) |
-#define FUNC_INDEX(v) U16_LE(v) |
+#define FUNC_INDEX(v) U32V_1(v) |
#define NAME_OFFSET(v) U32_LE(v) |
-#define BR_TARGET(v) U16_LE(v) |
+ |
+#define BR_TARGET(v) U32_LE(v) |
#define MASK_7 ((1 << 7) - 1) |
#define MASK_14 ((1 << 14) - 1) |
@@ -71,7 +72,7 @@ |
#define WASM_UNREACHABLE kExprUnreachable |
#define WASM_BR_TABLE(key, count, ...) \ |
- kExprBrTable, U16_LE(count), __VA_ARGS__, key |
+ kExprBrTable, U32V_1(count), __VA_ARGS__, key |
#define WASM_CASE(x) static_cast<byte>(x), static_cast<byte>(x >> 8) |
#define WASM_CASE_BR(x) static_cast<byte>(x), static_cast<byte>(0x80 | (x) >> 8) |