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

Unified Diff: src/assembler.h

Issue 1921203002: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ben's review Created 4 years, 7 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
« no previous file with comments | « src/arm64/assembler-arm64-inl.h ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index 31d87c84f6fb01832dab8cd3b5359f59abe894f7..70ea1755945818d47b6fa3abda5bdef87d15cb3b 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -384,9 +384,10 @@ class RelocInfo {
CODE_TARGET_WITH_ID,
DEBUGGER_STATEMENT, // Code target for the debugger statement.
EMBEDDED_OBJECT,
- CELL,
// To relocate pointers into the wasm memory embedded in wasm code
WASM_MEMORY_REFERENCE,
+ WASM_MEMORY_SIZE_REFERENCE,
+ CELL,
// Everything after runtime_entry (inclusive) is not GC'ed.
RUNTIME_ENTRY,
@@ -430,7 +431,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_REFERENCE,
+ LAST_GCED_ENUM = WASM_MEMORY_SIZE_REFERENCE,
FIRST_SHAREABLE_RELOC_MODE = CELL,
};
@@ -521,6 +522,9 @@ class RelocInfo {
static inline bool IsWasmMemoryReference(Mode mode) {
return mode == WASM_MEMORY_REFERENCE;
}
+ static inline bool IsWasmMemorySizeReference(Mode mode) {
+ return mode == WASM_MEMORY_SIZE_REFERENCE;
+ }
static inline int ModeMask(Mode mode) { return 1 << mode; }
// Accessors
@@ -547,6 +551,12 @@ class RelocInfo {
// constant pool, otherwise the pointer is embedded in the instruction stream.
bool IsInConstantPool();
+ Address wasm_memory_reference();
+ uint32_t wasm_memory_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 = SKIP_ICACHE_FLUSH);
+
// this relocation applies to;
// can only be called if IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
INLINE(Address target_address());
@@ -581,10 +591,6 @@ class RelocInfo {
ICacheFlushMode icache_flush_mode =
FLUSH_ICACHE_IF_NEEDED));
- INLINE(Address wasm_memory_reference());
- INLINE(void update_wasm_memory_reference(
- Address old_base, Address new_base, size_t old_size, size_t new_size,
- ICacheFlushMode icache_flush_mode = SKIP_ICACHE_FLUSH));
// Returns the address of the constant pool entry where the target address
// is held. This should only be called if IsInConstantPool returns true.
INLINE(Address constant_pool_entry_address());
« no previous file with comments | « src/arm64/assembler-arm64-inl.h ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698