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

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

Issue 1759873002: Assembler changes for enabling GrowHeap in Wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix update method for ia32/x64 Created 4 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
Index: src/x64/assembler-x64.h
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h
index 0ce714db0915fa077e943853ede217ce6c69babc..1a183c06cf37ed9876b98714dc7f33c042daf74e 100644
--- a/src/x64/assembler-x64.h
+++ b/src/x64/assembler-x64.h
@@ -334,13 +334,18 @@ enum RoundingMode {
class Immediate BASE_EMBEDDED {
public:
explicit Immediate(int32_t value) : value_(value) {}
+ explicit Immediate(int32_t value, RelocInfo::Mode rmode)
titzer 2016/03/14 15:23:38 AFAICT we don't need this until we have updateable
gdeepti1 2016/03/14 20:08:14 Sounds good, removed from this CL.
+ : 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));
}
+ RelocInfo::Mode rmode() { return rmode_; }
+
private:
int32_t value_;
+ RelocInfo::Mode rmode_ = RelocInfo::NONE32;
friend class Assembler;
};
@@ -699,8 +704,10 @@ class Assembler : public AssemblerBase {
void movp(Register dst, void* ptr, RelocInfo::Mode rmode);
// Loads a 64-bit immediate into a register.
- void movq(Register dst, int64_t value);
- void movq(Register dst, uint64_t value);
+ void movq(Register dst, int64_t value,
+ RelocInfo::Mode rmode = RelocInfo::NONE64);
+ void movq(Register dst, uint64_t value,
+ RelocInfo::Mode rmode = RelocInfo::NONE64);
void movsxbl(Register dst, Register src);
void movsxbl(Register dst, const Operand& src);
@@ -1744,7 +1751,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.

Powered by Google App Engine
This is Rietveld 408576698