Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index e72d40b4aec743f4db9f5a27a81d25c2d5657010..a1d83bd02e961e208627e341eec53d105ced4c2c 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -1114,6 +1114,17 @@ void MacroAssembler::Set(Register dst, int64_t x) { |
} |
} |
+void MacroAssembler::Set(Register dst, int64_t x, RelocInfo::Mode rmode) { |
+ if (x == 0) { |
+ xorl(dst, dst); |
Yang
2016/03/03 06:21:56
so if x == 0, we ignore the relocation mode?
titzer
2016/03/03 18:11:59
I think we shouldn't do any smartness here, since
|
+ } else if (is_uint32(x)) { |
+ movl(dst, Immediate(static_cast<uint32_t>(x), rmode)); |
+ } else if (is_int32(x)) { |
+ movq(dst, Immediate(static_cast<int32_t>(x), rmode)); |
+ } else { |
+ movq(dst, x, rmode); |
+ } |
+} |
void MacroAssembler::Set(const Operand& dst, intptr_t x) { |
if (kPointerSize == kInt64Size) { |