Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 4c19fced69dd5b9fa7a20eb4ce28a27db78ddaf4..1d7f541d5877f8c87f90671e69fa632fad0981b6 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -984,12 +984,17 @@ void MacroAssembler::Set(Register dst, int64_t x) { |
} |
-void MacroAssembler::Set(const Operand& dst, int64_t x) { |
- if (is_int32(x)) { |
- movq(dst, Immediate(static_cast<int32_t>(x))); |
+void MacroAssembler::Set(const Operand& dst, intptr_t x) { |
+ if (kPointerSize == kInt64Size) { |
+ if (is_int32(x)) { |
+ movp(dst, Immediate(static_cast<int32_t>(x))); |
+ } else { |
+ Set(kScratchRegister, x); |
+ movp(dst, kScratchRegister); |
+ } |
} else { |
- Set(kScratchRegister, x); |
- movq(dst, kScratchRegister); |
+ ASSERT(kPointerSize == kInt32Size); |
+ movp(dst, Immediate(static_cast<int32_t>(x))); |
} |
} |
@@ -2592,6 +2597,17 @@ void MacroAssembler::Jump(ExternalReference ext) { |
} |
+void MacroAssembler::Jump(const Operand& op) { |
+ if (kPointerSize == kInt64Size) { |
+ jmp(op); |
+ } else { |
+ ASSERT(kPointerSize == kInt32Size); |
+ movp(kScratchRegister, op); |
+ jmp(kScratchRegister); |
+ } |
+} |
+ |
+ |
void MacroAssembler::Jump(Address destination, RelocInfo::Mode rmode) { |
Move(kScratchRegister, destination, rmode); |
jmp(kScratchRegister); |
@@ -2623,6 +2639,17 @@ void MacroAssembler::Call(ExternalReference ext) { |
} |
+void MacroAssembler::Call(const Operand& op) { |
+ if (kPointerSize == kInt64Size) { |
+ call(op); |
+ } else { |
+ ASSERT(kPointerSize == kInt32Size); |
+ movp(kScratchRegister, op); |
+ call(kScratchRegister); |
+ } |
+} |
+ |
+ |
void MacroAssembler::Call(Address destination, RelocInfo::Mode rmode) { |
#ifdef DEBUG |
int end_position = pc_offset() + CallSize(destination); |