Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Unified Diff: src/wasm/wasm-macro-gen.h

Issue 1775123003: [wasm] Encode immediates to Load and Store as varint. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/wasm/wasm-macro-gen.h
diff --git a/src/wasm/wasm-macro-gen.h b/src/wasm/wasm-macro-gen.h
index beb94316c3297a583a08e257949fcdac9c82307f..4e563e73285c4cebf5933150b07f8686f7b3b44a 100644
--- a/src/wasm/wasm-macro-gen.h
+++ b/src/wasm/wasm-macro-gen.h
@@ -19,6 +19,9 @@
#define FUNC_INDEX(v) U32V_1(v)
#define NAME_OFFSET(v) U32_LE(v)
+#define ZERO_ALIGNMENT 0
+#define ZERO_OFFSET 0
+
#define BR_TARGET(v) U32_LE(v)
#define MASK_7 ((1 << 7) - 1)
@@ -325,21 +328,19 @@ class LocalDeclEncoder {
#define WASM_LOAD_MEM(type, index) \
static_cast<byte>( \
v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, false)), \
- v8::internal::wasm::WasmOpcodes::LoadStoreAccessOf(false), index
+ 0, 0, index
#define WASM_STORE_MEM(type, index, val) \
static_cast<byte>( \
v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, true)), \
- v8::internal::wasm::WasmOpcodes::LoadStoreAccessOf(false), index, val
+ 0, 0, index, val
#define WASM_LOAD_MEM_OFFSET(type, offset, index) \
static_cast<byte>( \
v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, false)), \
- v8::internal::wasm::WasmOpcodes::LoadStoreAccessOf(true), \
- static_cast<byte>(offset), index
+ 0, static_cast<byte>(offset), index
binji 2016/03/09 18:13:28 nit: I've been using U32V_1 for values like this,
titzer 2016/03/09 18:49:15 Done.
#define WASM_STORE_MEM_OFFSET(type, offset, index, val) \
static_cast<byte>( \
v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(type, true)), \
- v8::internal::wasm::WasmOpcodes::LoadStoreAccessOf(true), \
- static_cast<byte>(offset), index, val
+ 0, static_cast<byte>(offset), index, val
#define WASM_CALL_FUNCTION(index, ...) \
kExprCallFunction, static_cast<byte>(index), __VA_ARGS__
#define WASM_CALL_IMPORT(index, ...) \
« no previous file with comments | « src/wasm/encoder.cc ('k') | src/wasm/wasm-opcodes.h » ('j') | test/cctest/wasm/test-run-wasm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698