Index: src/x64/macro-assembler-x64.h |
diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h |
index 695e243c18d2c90ddf0c67f5086b07d907b94e1d..85b795e9ff627e662572435b7a6cbb92eef25d10 100644 |
--- a/src/x64/macro-assembler-x64.h |
+++ b/src/x64/macro-assembler-x64.h |
@@ -427,6 +427,12 @@ class MacroAssembler: public Assembler { |
void SmiToInteger64(Register dst, Register src); |
void SmiToInteger64(Register dst, const Operand& src); |
+ // Convert smi to double. |
+ void SmiToDouble(XMMRegister dst, Register src) { |
+ SmiToInteger32(kScratchRegister, src); |
+ Cvtlsi2sd(dst, kScratchRegister); |
+ } |
+ |
// Multiply a positive smi's integer value by a power of two. |
// Provides result as 64-bit integer value. |
void PositiveSmiTimesPowerOfTwoToInteger64(Register dst, |