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

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

Issue 2056633002: [wasm] Separate compilation from instantiation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: feedback 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/wasm/wasm-module.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/assembler-x64.cc
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc
index d7e458972f309b6256a6bf253b148e0c49543976..233470c77a705c204dcbfbe3b83021eff2bf1276 100644
--- a/src/x64/assembler-x64.cc
+++ b/src/x64/assembler-x64.cc
@@ -132,44 +132,14 @@ uint32_t RelocInfo::wasm_memory_size_reference() {
return Memory::uint32_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) {
- DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_));
- if (IsWasmMemoryReference(rmode_)) {
- Address updated_reference;
- DCHECK(old_base <= wasm_memory_reference() &&
- wasm_memory_reference() < old_base + old_size);
- updated_reference = new_base + (wasm_memory_reference() - old_base);
- DCHECK(new_base <= updated_reference &&
- updated_reference < new_base + new_size);
- Memory::Address_at(pc_) = updated_reference;
- } else if (IsWasmMemorySizeReference(rmode_)) {
- uint32_t updated_size_reference;
- DCHECK(wasm_memory_size_reference() <= old_size);
- updated_size_reference =
- new_size + (wasm_memory_size_reference() - old_size);
- DCHECK(updated_size_reference <= new_size);
- Memory::uint32_at(pc_) = updated_size_reference;
- } else {
- UNREACHABLE();
- }
- if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
- Assembler::FlushICache(isolate_, pc_, sizeof(int64_t));
- }
+void RelocInfo::unchecked_update_wasm_memory_reference(
+ Address address, ICacheFlushMode flush_mode) {
+ Memory::Address_at(pc_) = address;
}
-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);
- Memory::Address_at(pc_) = updated_reference;
- if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
- Assembler::FlushICache(isolate_, pc_, sizeof(int64_t));
- }
+void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size,
+ ICacheFlushMode flush_mode) {
+ Memory::uint32_at(pc_) = size;
}
// -----------------------------------------------------------------------------
@@ -617,12 +587,9 @@ void Assembler::immediate_arithmetic_op(byte subcode,
int size) {
EnsureSpace ensure_space(this);
emit_rex(dst, size);
- if (is_int8(src.value_)) {
+ if (is_int8(src.value_) && RelocInfo::IsNone(src.rmode_)) {
emit(0x83);
emit_modrm(subcode, dst);
- if (!RelocInfo::IsNone(src.rmode_)) {
- RecordRelocInfo(src.rmode_);
- }
emit(src.value_);
} else if (dst.is(rax)) {
emit(0x05 | (subcode << 3));
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698