Index: src/x64/assembler-x64.h |
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h |
index 0ce714db0915fa077e943853ede217ce6c69babc..f1351e72e40bbab7aa28f94efb4add80a6c84cac 100644 |
--- a/src/x64/assembler-x64.h |
+++ b/src/x64/assembler-x64.h |
@@ -339,8 +339,11 @@ class Immediate BASE_EMBEDDED { |
value_ = static_cast<int32_t>(reinterpret_cast<intptr_t>(value)); |
} |
+ RelocInfo::Mode rmode() { return rmode_; } |
Yang
2016/03/15 07:44:18
This cannot be anything other than NONE32. Why do
gdeepti1
2016/03/16 06:05:26
Left over from Immediate constructor, removed now.
|
+ |
private: |
int32_t value_; |
+ RelocInfo::Mode rmode_ = RelocInfo::NONE32; |
friend class Assembler; |
}; |
@@ -699,8 +702,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 +1749,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_)) { |
Yang
2016/03/15 07:44:18
This seems like dead code.
gdeepti1
2016/03/16 06:05:26
Done.
|
+ 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. |