Index: src/wasm/wasm-macro-gen.h |
diff --git a/src/wasm/wasm-macro-gen.h b/src/wasm/wasm-macro-gen.h |
index dd653c174016c9d7c2346b2abba1db8209856a82..7e50d03fd6335563b9a2de5cabf5b5e3bd1a59a8 100644 |
--- a/src/wasm/wasm-macro-gen.h |
+++ b/src/wasm/wasm-macro-gen.h |
@@ -265,4 +265,16 @@ |
#define WASM_I32_REINTERPRET_F32(x) kExprI32ReinterpretF32, x |
#define WASM_I64_REINTERPRET_F64(x) kExprI64ReinterpretF64, x |
+#define U32_LE(v) \ |
+ static_cast<byte>(v), static_cast<byte>((v) >> 8), \ |
+ static_cast<byte>((v) >> 16), static_cast<byte>((v) >> 24) |
+ |
+#define U16_LE(v) static_cast<byte>(v), static_cast<byte>((v) >> 8) |
+ |
+#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 NAME_OFFSET(v) U32_LE(v) |
+ |
#endif // V8_WASM_MACRO_GEN_H_ |