Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index e744d53f2ddda747f728e44d99305c22943d7138..0e15a947adf97bd3d58ca09404767d046b5b8e62 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -782,8 +782,8 @@ void MacroAssembler::SmiCompare(Register dst, Smi* src) { |
if (src->value() == 0) { |
testq(dst, dst); |
} else { |
- Move(kScratchRegister, src); |
- cmpq(dst, kScratchRegister); |
+ Register constant_reg = GetSmiConstant(src); |
+ cmpq(dst, constant_reg); |
} |
} |