Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index bc875d67e83c9336cefaa84019b2ff6909080b43..910d7600a9dead487f140bff03c143cec033dc7b 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -110,7 +110,7 @@ void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { |
#endif |
// Patch the code. |
- patcher.masm()->movq(kScratchRegister, target, RelocInfo::NONE64); |
+ patcher.masm()->movp(kScratchRegister, target, RelocInfo::NONE64); |
patcher.masm()->call(kScratchRegister); |
// Check that the size of the code generated is as expected. |
@@ -1448,18 +1448,11 @@ void Assembler::emit_mov(const Operand& dst, Immediate value, int size) { |
} |
-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); |
- 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::movp(Register dst, void* value, RelocInfo::Mode rmode) { |
+ EnsureSpace ensure_space(this); |
+ emit_rex(dst, kPointerSize); |
+ emit(0xB8 | dst.low_bits()); |
+ emitp(value, rmode); |
} |
@@ -1499,18 +1492,6 @@ void Assembler::movl(const Operand& dst, Label* src) { |
} |
-void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) { |
- AllowDeferredHandleDereference using_raw_address; |
- ASSERT(!RelocInfo::IsNone(mode)); |
- EnsureSpace ensure_space(this); |
- ASSERT(value->IsHeapObject()); |
- ASSERT(!isolate()->heap()->InNewSpace(*value)); |
- emit_rex_64(dst); |
- emit(0xB8 | dst.low_bits()); |
- emitp(value.location(), mode); |
-} |
- |
- |
void Assembler::movsxbq(Register dst, const Operand& src) { |
EnsureSpace ensure_space(this); |
emit_rex_64(dst, src); |