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

Unified Diff: test/cctest/test-run-wasm-relocation-ia32.cc

Issue 2735103003: Merged: [wasm] Fix code specialization for empty memory buffer (Closed)
Patch Set: Created 3 years, 9 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 | « test/cctest/test-run-wasm-relocation-arm64.cc ('k') | test/cctest/test-run-wasm-relocation-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-run-wasm-relocation-ia32.cc
diff --git a/test/cctest/test-run-wasm-relocation-ia32.cc b/test/cctest/test-run-wasm-relocation-ia32.cc
index f2241d5f9263ddad332f3db1b1ec8135e1743cc0..0b3f06156839f8e3e3f4a3e1221dbe9acf60520b 100644
--- a/test/cctest/test-run-wasm-relocation-ia32.cc
+++ b/test/cctest/test-run-wasm-relocation-ia32.cc
@@ -61,15 +61,10 @@ TEST(WasmRelocationIa32MemoryReference) {
// Relocating references by offset
int mode_mask = (1 << RelocInfo::WASM_MEMORY_REFERENCE);
for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
- RelocInfo::Mode mode = it.rinfo()->rmode();
- if (RelocInfo::IsWasmMemoryReference(mode)) {
- // Dummy values of size used here as the objective of the test is to
- // verify that the immediate is patched correctly
- it.rinfo()->update_wasm_memory_reference(
- it.rinfo()->wasm_memory_reference(),
- it.rinfo()->wasm_memory_reference() + offset, 1, 2,
- SKIP_ICACHE_FLUSH);
- }
+ DCHECK(RelocInfo::IsWasmMemoryReference(it.rinfo()->rmode()));
+ it.rinfo()->update_wasm_memory_reference(
+ it.rinfo()->wasm_memory_reference(),
+ it.rinfo()->wasm_memory_reference() + offset, SKIP_ICACHE_FLUSH);
}
// Check if immediate is updated correctly
@@ -128,13 +123,10 @@ TEST(WasmRelocationIa32MemorySizeReference) {
int mode_mask = (1 << RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
- RelocInfo::Mode mode = it.rinfo()->rmode();
- if (RelocInfo::IsWasmMemorySizeReference(mode)) {
- it.rinfo()->update_wasm_memory_reference(
- reinterpret_cast<Address>(1234), reinterpret_cast<Address>(1234),
- it.rinfo()->wasm_memory_size_reference(),
- it.rinfo()->wasm_memory_size_reference() + offset, SKIP_ICACHE_FLUSH);
- }
+ DCHECK(RelocInfo::IsWasmMemorySizeReference(it.rinfo()->rmode()));
+ it.rinfo()->update_wasm_memory_size(
+ it.rinfo()->wasm_memory_size_reference(),
+ it.rinfo()->wasm_memory_size_reference() + offset, SKIP_ICACHE_FLUSH);
}
ret_value = runnable.Call();
« no previous file with comments | « test/cctest/test-run-wasm-relocation-arm64.cc ('k') | test/cctest/test-run-wasm-relocation-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698