Index: src/x64/macro-assembler-x64.h |
diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h |
index df0ac5d394796da80698a85ba7e1495ce0978c93..1bf50e7c27698d9a591d821aefa25a6c68b23eea 100644 |
--- a/src/x64/macro-assembler-x64.h |
+++ b/src/x64/macro-assembler-x64.h |
@@ -319,7 +319,7 @@ class MacroAssembler: public Assembler { |
void InitializeRootRegister() { |
ExternalReference roots_array_start = |
ExternalReference::roots_array_start(isolate()); |
- movq(kRootRegister, roots_array_start); |
+ Move(kRootRegister, roots_array_start); |
addq(kRootRegister, Immediate(kRootRegisterBias)); |
} |
@@ -829,6 +829,10 @@ class MacroAssembler: public Assembler { |
void Pop(Register dst) { pop(dst); } |
void PushReturnAddressFrom(Register src) { push(src); } |
void PopReturnAddressTo(Register dst) { pop(dst); } |
+ void Move(Register dst, ExternalReference ext) { |
+ movq(dst, reinterpret_cast<Address>(ext.address()), |
+ RelocInfo::EXTERNAL_REFERENCE); |
+ } |
// Control Flow |
void Jump(Address destination, RelocInfo::Mode rmode); |