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

Unified Diff: src/compiler/x64/code-generator-x64.cc

Issue 1921203002: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ben's review Created 4 years, 7 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/compiler/instruction.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
index b4ec99b7cdb4c6a6d52470cf5bb1fd5d94bc070a..59c58fd55869cc4bc5b4ce8187c5be0a7cc286d0 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -44,6 +44,10 @@ class X64OperandConverter : public InstructionOperandConverter {
DCHECK_EQ(0, bit_cast<int64_t>(constant.ToFloat64()));
return Immediate(0);
}
+ if (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
+ constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) {
+ return Immediate(constant.ToInt32(), constant.rmode());
+ }
return Immediate(constant.ToInt32());
}
@@ -2150,6 +2154,7 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
__ movq(dst, src.ToInt64(), src.rmode());
} else {
+ DCHECK(src.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
__ Set(dst, src.ToInt64());
}
break;
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698