Index: src/ia32/assembler-ia32-inl.h |
diff --git a/src/ia32/assembler-ia32-inl.h b/src/ia32/assembler-ia32-inl.h |
index cb6bad8a20f71f28c1c8c70cf8d8afee2a69e46c..4cf94193d341fdcdc5fb7acb05e030ee699c30dc 100644 |
--- a/src/ia32/assembler-ia32-inl.h |
+++ b/src/ia32/assembler-ia32-inl.h |
@@ -81,6 +81,10 @@ Address RelocInfo::target_address() { |
return Assembler::target_address_at(pc_, host_); |
} |
+Address RelocInfo::wasm_memory_reference() { |
+ DCHECK(IsWasmMemoryReference(rmode_)); |
+ return Assembler::target_address_at(pc_, host_); |
+} |
Address RelocInfo::target_address_address() { |
DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) |
@@ -115,6 +119,17 @@ void RelocInfo::set_target_address(Address target, |
} |
} |
+void RelocInfo::update_wasm_memory_reference( |
+ Address old_base, Address new_base, size_t old_size, size_t new_size, |
+ ICacheFlushMode icache_flush_mode) { |
+ DCHECK(IsWasmMemoryReference(rmode_)); |
+ DCHECK(new_size > old_size); |
+ DCHECK(old_base + old_size >= wasm_memory_reference()); |
+ Address updated_reference = wasm_memory_reference() + (new_base - old_base); |
+ DCHECK(new_base + new_size >= updated_reference); |
+ Assembler::set_target_address_at(isolate_, pc_, host_, updated_reference, |
+ icache_flush_mode); |
+} |
Object* RelocInfo::target_object() { |
DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
@@ -321,6 +336,10 @@ Immediate::Immediate(int x) { |
rmode_ = RelocInfo::NONE32; |
} |
+Immediate::Immediate(Address x, RelocInfo::Mode rmode) { |
+ x_ = reinterpret_cast<int32_t>(x); |
+ rmode_ = rmode; |
+} |
Immediate::Immediate(const ExternalReference& ext) { |
x_ = reinterpret_cast<int32_t>(ext.address()); |