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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 1759383003: [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips/mips64 compile Created 4 years, 10 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/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 4b1c3aa0ff895e5dae70ffd42c87dd6752d25eaf..26395605865a69a615e45dc1481304453883567b 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2038,13 +2038,15 @@ Node* WasmGraphBuilder::MemBuffer(uint32_t offset) {
DCHECK(module_ && module_->instance);
if (offset == 0) {
if (!mem_buffer_) {
- mem_buffer_ = jsgraph()->IntPtrConstant(
- reinterpret_cast<uintptr_t>(module_->instance->mem_start));
+ mem_buffer_ = jsgraph()->RelocatableIntPtrConstant(
+ reinterpret_cast<uintptr_t>(module_->instance->mem_start),
+ RelocInfo::WASM_MEMORY_REFERENCE);
}
return mem_buffer_;
} else {
- return jsgraph()->IntPtrConstant(
- reinterpret_cast<uintptr_t>(module_->instance->mem_start + offset));
+ return jsgraph()->RelocatableIntPtrConstant(
+ reinterpret_cast<uintptr_t>(module_->instance->mem_start + offset),
+ RelocInfo::WASM_MEMORY_REFERENCE);
}
}

Powered by Google App Engine
This is Rietveld 408576698