Index: src/ia32/macro-assembler-ia32.h |
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h |
index 6f180c6c2bcd822e2b7751badc6ba5b646463598..12a8923113824a033f9eaabb1347224ee44e4a26 100644 |
--- a/src/ia32/macro-assembler-ia32.h |
+++ b/src/ia32/macro-assembler-ia32.h |
@@ -258,6 +258,17 @@ class MacroAssembler: public Assembler { |
j(not_carry, is_smi); |
} |
+ // Jump the register contains a smi. |
+ inline void JumpIfSmi(Register value, Label* smi_label) { |
+ test(value, Immediate(kSmiTagMask)); |
+ j(zero, smi_label, not_taken); |
+ } |
+ // Jump if register contain a non-smi. |
+ inline void JumpIfNotSmi(Register value, Label* not_smi_label) { |
+ test(value, Immediate(kSmiTagMask)); |
+ j(not_zero, not_smi_label, not_taken); |
+ } |
+ |
// Assumes input is a heap object. |
void JumpIfNotNumber(Register reg, TypeInfo info, Label* on_not_number); |