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

Unified Diff: src/assembler.h

Issue 2416543002: [wasm] Fix bounds check for zero initial memory. (Closed)
Patch Set: Add aTODO Created 4 years, 2 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/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index a925032e2d72bb86995ea1d798f687c403f50019..b8bb02357154e9e4e2c341041d0076dcf8bcebbc 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -393,6 +393,7 @@ class RelocInfo {
WASM_MEMORY_REFERENCE,
WASM_GLOBAL_REFERENCE,
WASM_MEMORY_SIZE_REFERENCE,
+ WASM_MEMTYPE_SIZE_REFERENCE,
CELL,
// Everything after runtime_entry (inclusive) is not GC'ed.
@@ -437,7 +438,7 @@ class RelocInfo {
FIRST_REAL_RELOC_MODE = CODE_TARGET,
LAST_REAL_RELOC_MODE = VENEER_POOL,
LAST_CODE_ENUM = DEBUGGER_STATEMENT,
- LAST_GCED_ENUM = WASM_MEMORY_SIZE_REFERENCE,
+ LAST_GCED_ENUM = WASM_MEMTYPE_SIZE_REFERENCE,
FIRST_SHAREABLE_RELOC_MODE = CELL,
};
@@ -530,9 +531,21 @@ class RelocInfo {
static inline bool IsWasmMemorySizeReference(Mode mode) {
return mode == WASM_MEMORY_SIZE_REFERENCE;
}
+ static inline bool IsWasmMemtypeSizeReference(Mode mode) {
+ return mode == WASM_MEMTYPE_SIZE_REFERENCE;
+ }
static inline bool IsWasmGlobalReference(Mode mode) {
return mode == WASM_GLOBAL_REFERENCE;
}
+ static inline bool IsWasmReference(Mode mode) {
+ return mode == WASM_MEMORY_REFERENCE ||
+ mode == WASM_MEMORY_SIZE_REFERENCE ||
+ mode == WASM_MEMTYPE_SIZE_REFERENCE || mode == WASM_GLOBAL_REFERENCE;
+ }
+ static inline bool IsWasmSizeReference(Mode mode) {
+ return mode == WASM_MEMORY_SIZE_REFERENCE ||
+ mode == WASM_MEMTYPE_SIZE_REFERENCE;
+ }
static inline int ModeMask(Mode mode) { return 1 << mode; }
// Accessors
@@ -562,6 +575,7 @@ class RelocInfo {
Address wasm_memory_reference();
Address wasm_global_reference();
uint32_t wasm_memory_size_reference();
+ uint8_t wasm_memtype_size_reference();
void update_wasm_memory_reference(
Address old_base, Address new_base, uint32_t old_size, uint32_t new_size,
ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED);
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/assembler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698