Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 1832db411a656f92aecfd53d4b7047dd90765e59..ab7643cce9b08cd575b8ab396963daebd9f6472f 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -2965,6 +2965,22 @@ void MacroAssembler::JumpIfNotBothSmi(Register reg1, |
} |
+void MacroAssembler::UntagAndJumpIfSmi( |
+ Register dst, Register src, Label* smi_case) { |
+ STATIC_ASSERT(kSmiTag == 0); |
+ mov(dst, Operand(src, ASR, kSmiTagSize), SetCC); |
+ b(cc, smi_case); // Shifter carry is not set for a smi. |
+} |
+ |
+ |
+void MacroAssembler::UntagAndJumpIfNotSmi( |
+ Register dst, Register src, Label* smi_case) { |
ulan
2012/01/27 15:24:35
smi_case should be non_smi_case
|
+ STATIC_ASSERT(kSmiTag == 0); |
+ mov(dst, Operand(src, ASR, kSmiTagSize), SetCC); |
+ b(cs, smi_case); // Shifter carry is set for a non-smi. |
+} |
+ |
+ |
void MacroAssembler::JumpIfEitherSmi(Register reg1, |
Register reg2, |
Label* on_either_smi) { |