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

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

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/mips64/assembler-mips64-inl.h ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/assembler-x64.h
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h
index 06f1601537e02412fd29209a2bba0a72f13cec8d..2b8a1f870a96c02167446be0a840a489e8d3f98e 100644
--- a/src/x64/assembler-x64.h
+++ b/src/x64/assembler-x64.h
@@ -334,6 +334,8 @@ enum RoundingMode {
class Immediate BASE_EMBEDDED {
public:
explicit Immediate(int32_t value) : value_(value) {}
+ explicit Immediate(int32_t value, RelocInfo::Mode rmode)
+ : value_(value), rmode_(rmode) {}
explicit Immediate(Smi* value) {
DCHECK(SmiValuesAre31Bits()); // Only available for 31-bit SMI.
value_ = static_cast<int32_t>(reinterpret_cast<intptr_t>(value));
@@ -341,6 +343,7 @@ class Immediate BASE_EMBEDDED {
private:
int32_t value_;
+ RelocInfo::Mode rmode_ = RelocInfo::NONE32;
friend class Assembler;
};
@@ -1758,7 +1761,12 @@ class Assembler : public AssemblerBase {
RelocInfo::Mode rmode,
TypeFeedbackId ast_id = TypeFeedbackId::None());
inline void emit_runtime_entry(Address entry, RelocInfo::Mode rmode);
- void emit(Immediate x) { emitl(x.value_); }
+ void emit(Immediate x) {
+ if (!RelocInfo::IsNone(x.rmode_)) {
+ RecordRelocInfo(x.rmode_);
+ }
+ emitl(x.value_);
+ }
// Emits a REX prefix that encodes a 64-bit operand size and
// the top bit of both register codes.
« no previous file with comments | « src/mips64/assembler-mips64-inl.h ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698