Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 7087c0397368dbd309a647ee65cc9b1fd81e3b7c..471fa55cb0a02ec189669a845cb96b79de6ab9c2 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -2501,6 +2501,14 @@ void MacroAssembler::Move(Register dst, Register src) { |
} |
} |
+void MacroAssembler::MoveNumber(Register dst, double value) { |
+ int32_t smi; |
+ if (DoubleToSmiInteger(value, &smi)) { |
+ Move(dst, Smi::FromInt(smi)); |
+ } else { |
+ movp_heap_number(dst, value); |
+ } |
+} |
void MacroAssembler::Move(Register dst, Handle<Object> source) { |
AllowDeferredHandleDereference smi_check; |