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

Unified Diff: src/mips/assembler-mips.cc

Issue 2062003002: [wasm] Relocatable Globals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: {float|double}_t -> {float|double} Created 4 years, 6 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/ia32/assembler-ia32.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/assembler-mips.cc
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc
index f95323b41fa64b5128468aaa6f2d93b38a93520b..0394e4f17e0b19486b1cd4a8f66927060f9ce643 100644
--- a/src/mips/assembler-mips.cc
+++ b/src/mips/assembler-mips.cc
@@ -194,6 +194,11 @@ Address RelocInfo::wasm_memory_reference() {
return Assembler::target_address_at(pc_, host_);
}
+Address RelocInfo::wasm_global_reference() {
+ DCHECK(IsWasmGlobalReference(rmode_));
+ return Assembler::target_address_at(pc_, host_);
+}
+
uint32_t RelocInfo::wasm_memory_size_reference() {
DCHECK(IsWasmMemorySizeReference(rmode_));
return reinterpret_cast<uint32_t>(Assembler::target_address_at(pc_, host_));
@@ -226,6 +231,17 @@ void RelocInfo::update_wasm_memory_reference(
}
}
+void RelocInfo::update_wasm_global_reference(
+ Address old_base, Address new_base, ICacheFlushMode icache_flush_mode) {
+ DCHECK(IsWasmGlobalReference(rmode_));
+ Address updated_global_reference;
+ DCHECK(old_base <= wasm_global_reference());
+ updated_global_reference = new_base + (wasm_global_reference() - old_base);
+ DCHECK(new_base <= updated_global_reference);
+ Assembler::set_target_address_at(isolate_, pc_, host_,
+ updated_global_reference, icache_flush_mode);
+}
+
// -----------------------------------------------------------------------------
// Implementation of Operand and MemOperand.
// See assembler-mips-inl.h for inlined constructors.
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698