Index: src/ia32/macro-assembler-ia32.h |
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h |
index d49113127f7134f854480e874c64ef006a9c7536..a638517dafff3338e4a136f4e8fb1c8e2b969df7 100644 |
--- a/src/ia32/macro-assembler-ia32.h |
+++ b/src/ia32/macro-assembler-ia32.h |
@@ -289,14 +289,25 @@ class MacroAssembler: public Assembler { |
} |
// Jump the register contains a smi. |
- inline void JumpIfSmi(Register value, Label* smi_label) { |
+ inline void JumpIfSmi(Register value, |
+ Label* smi_label, |
+ Label::Distance distance = Label::kFar) { |
test(value, Immediate(kSmiTagMask)); |
- j(zero, smi_label); |
+ j(zero, smi_label, distance); |
+ } |
+ // Jump if the operand is a smi. |
+ inline void JumpIfSmi(Operand value, |
+ Label* smi_label, |
+ Label::Distance distance = Label::kFar) { |
+ test(value, Immediate(kSmiTagMask)); |
+ j(zero, smi_label, distance); |
} |
// Jump if register contain a non-smi. |
- inline void JumpIfNotSmi(Register value, Label* not_smi_label) { |
+ inline void JumpIfNotSmi(Register value, |
+ Label* not_smi_label, |
+ Label::Distance distance = Label::kFar) { |
test(value, Immediate(kSmiTagMask)); |
- j(not_zero, not_smi_label); |
+ j(not_zero, not_smi_label, distance); |
} |
void LoadInstanceDescriptors(Register map, Register descriptors); |