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

Unified Diff: src/assembler.cc

Issue 2627543003: [wasm] Prerequisites for WebAssembly Table.Grow (Closed)
Patch Set: Rename update function Created 3 years, 11 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/assembler.h ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 6503041b9215e4d70a04d87059c0da92eaba2d07..f390b7443b303df5e343d3d03bc5fce801d6d237 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -334,8 +334,7 @@ void RelocInfo::update_wasm_memory_reference(
uint32_t current_size_reference = wasm_memory_size_reference();
uint32_t updated_size_reference =
new_size + (current_size_reference - old_size);
- unchecked_update_wasm_memory_size(updated_size_reference,
- icache_flush_mode);
+ unchecked_update_wasm_size(updated_size_reference, icache_flush_mode);
} else {
UNREACHABLE();
}
@@ -359,6 +358,18 @@ void RelocInfo::update_wasm_global_reference(
}
}
+void RelocInfo::update_wasm_function_table_size_reference(
+ uint32_t old_size, uint32_t new_size, ICacheFlushMode icache_flush_mode) {
+ DCHECK(IsWasmFunctionTableSizeReference(rmode_));
+ uint32_t current_size_reference = wasm_function_table_size_reference();
+ uint32_t updated_size_reference =
+ new_size + (current_size_reference - old_size);
+ unchecked_update_wasm_size(updated_size_reference, icache_flush_mode);
+ if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
+ Assembler::FlushICache(isolate_, pc_, sizeof(int64_t));
+ }
+}
+
void RelocInfo::set_target_address(Address target,
WriteBarrierMode write_barrier_mode,
ICacheFlushMode icache_flush_mode) {
@@ -769,6 +780,8 @@ const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) {
return "wasm memory size reference";
case WASM_GLOBAL_REFERENCE:
return "wasm global value reference";
+ case WASM_FUNCTION_TABLE_SIZE_REFERENCE:
+ return "wasm function table size reference";
case NUMBER_OF_MODES:
case PC_JUMP:
UNREACHABLE();
@@ -866,6 +879,7 @@ void RelocInfo::Verify(Isolate* isolate) {
case WASM_MEMORY_REFERENCE:
case WASM_MEMORY_SIZE_REFERENCE:
case WASM_GLOBAL_REFERENCE:
+ case WASM_FUNCTION_TABLE_SIZE_REFERENCE:
case NONE32:
case NONE64:
break;
« no previous file with comments | « src/assembler.h ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698