Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index a92196d74cd34457e4fab08f15d22a677ebd6469..d5b4514f2116d5decca6e137d7de2f14c4b6be59 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -1465,26 +1465,24 @@ void Assembler::movq(Register dst, void* value, RelocInfo::Mode rmode) { |
void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) { |
// Non-relocatable values might not need a 64-bit representation. |
- if (RelocInfo::IsNone(rmode)) { |
- if (is_uint32(value)) { |
- movl(dst, Immediate(static_cast<int32_t>(value))); |
- return; |
- } else if (is_int32(value)) { |
- movq(dst, Immediate(static_cast<int32_t>(value))); |
- return; |
- } |
+ ASSERT(RelocInfo::IsNone(rmode)); |
haitao.feng
2013/10/17 06:11:48
I will submit a CL to move the movq(Register dst,
danno
2013/10/23 13:16:09
Done.
|
+ if (is_uint32(value)) { |
+ movl(dst, Immediate(static_cast<int32_t>(value))); |
+ } else if (is_int32(value)) { |
+ movq(dst, Immediate(static_cast<int32_t>(value))); |
+ } else { |
// Value cannot be represented by 32 bits, so do a full 64 bit immediate |
// value. |
+ EnsureSpace ensure_space(this); |
+ emit_rex_64(dst); |
+ emit(0xB8 | dst.low_bits()); |
+ emitq(value); |
} |
- EnsureSpace ensure_space(this); |
- emit_rex_64(dst); |
- emit(0xB8 | dst.low_bits()); |
- emitq(value, rmode); |
} |
void Assembler::movq(Register dst, ExternalReference ref) { |
- int64_t value = reinterpret_cast<int64_t>(ref.address()); |
+ Address value = reinterpret_cast<Address>(ref.address()); |
movq(dst, value, RelocInfo::EXTERNAL_REFERENCE); |
} |