Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 5cf09f2675476b437753518cfd0c6c99735cef11..2121679ebb48ff1dedc13456e858f1ca67f51789 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -581,6 +581,17 @@ Condition MacroAssembler::CheckBothSmi(Register first, Register second) { |
} |
+Condition MacroAssembler::CheckEitherSmi(Register first, Register second) { |
+ if (first.is(second)) { |
+ return CheckSmi(first); |
+ } |
+ movl(kScratchRegister, first); |
+ andl(kScratchRegister, second); |
+ testb(kScratchRegister, Immediate(kSmiTagMask)); |
+ return zero; |
+} |
+ |
+ |
Condition MacroAssembler::CheckIsMinSmi(Register src) { |
ASSERT(kSmiTag == 0 && kSmiTagSize == 1); |
movq(kScratchRegister, src); |