Chromium Code Reviews| Index: src/x64/assembler-x64.cc |
| diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
| index 9fe7b8392e7a3a55b188b8d2769ae3363b6172de..b297b5c88322dd5a488ee21671fc2eda15bdbb7f 100644 |
| --- a/src/x64/assembler-x64.cc |
| +++ b/src/x64/assembler-x64.cc |
| @@ -1456,16 +1456,19 @@ void Assembler::movq(Register dst, void* value, RelocInfo::Mode rmode) { |
| // This method must not be used with heap object references. The stored |
| // address is not GC safe. Use the handle version instead. |
| ASSERT(rmode > RelocInfo::LAST_GCED_ENUM); |
| - EnsureSpace ensure_space(this); |
| - emit_rex_64(dst); |
| - emit(0xB8 | dst.low_bits()); |
| - emitp(value, rmode); |
| + if (RelocInfo::IsNone(rmode)) { |
| + movq(dst, reinterpret_cast<int64_t>(value)); |
| + } else { |
| + EnsureSpace ensure_space(this); |
| + emit_rex_64(dst); |
| + emit(0xB8 | dst.low_bits()); |
| + emitp(value, rmode); |
| + } |
| } |
| -void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) { |
| +void Assembler::movq(Register dst, int64_t value) { |
| // Non-relocatable values might not need a 64-bit representation. |
| - ASSERT(RelocInfo::IsNone(rmode)); |
| if (is_uint32(value)) { |
| movl(dst, Immediate(static_cast<int32_t>(value))); |
| } else if (is_int32(value)) { |
| @@ -1527,7 +1530,7 @@ void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) { |
| // There is no possible reason to store a heap pointer without relocation |
| // info, so it must be a smi. |
| ASSERT(value->IsSmi()); |
| - movq(dst, reinterpret_cast<int64_t>(*value), RelocInfo::NONE64); |
| + movq(dst, Smi::cast(*value), RelocInfo::NONE64); |
|
haitao.feng
2013/10/24 07:32:48
In the macro assembler, we have Move(Register, Smi
|
| } else { |
| EnsureSpace ensure_space(this); |
| ASSERT(value->IsHeapObject()); |