Index: src/arm64/assembler-arm64.cc |
diff --git a/src/arm64/assembler-arm64.cc b/src/arm64/assembler-arm64.cc |
index 6fddd6f29396841540e4cc17f909ae058d02671c..89219ec274b746d4774edb2285648e0a8be21556 100644 |
--- a/src/arm64/assembler-arm64.cc |
+++ b/src/arm64/assembler-arm64.cc |
@@ -189,6 +189,11 @@ uint32_t RelocInfo::wasm_memory_size_reference() { |
return Memory::uint32_at(Assembler::target_pointer_address_at(pc_)); |
} |
+Address RelocInfo::wasm_global_reference() { |
+ DCHECK(IsWasmGlobalReference(rmode_)); |
+ return Memory::Address_at(Assembler::target_pointer_address_at(pc_)); |
+} |
+ |
void RelocInfo::update_wasm_memory_reference( |
Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, |
ICacheFlushMode icache_flush_mode) { |
@@ -215,6 +220,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_reference; |
+ DCHECK(old_base <= wasm_global_reference()); |
+ updated_reference = new_base + (wasm_global_reference() - old_base); |
+ DCHECK(new_base <= updated_reference); |
+ Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference, |
+ icache_flush_mode); |
+} |
+ |
Register GetAllocatableRegisterThatIsNotOneOf(Register reg1, Register reg2, |
Register reg3, Register reg4) { |
CPURegList regs(reg1, reg2, reg3, reg4); |