Index: src/mips64/assembler-mips64.cc |
diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc |
index 2b8bc72c6c4e57f92ffd4b79a1d2208c90fd00c9..747b7e27f132bf7d934e1c94b163589f76b3bb0b 100644 |
--- a/src/mips64/assembler-mips64.cc |
+++ b/src/mips64/assembler-mips64.cc |
@@ -172,6 +172,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 static_cast<uint32_t>( |
@@ -205,6 +210,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. |