Index: src/ia32/macro-assembler-ia32.h |
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h |
index 8ec3652deb3f4a27530ed2ae19dcfd5eadaae664..7d475e7d7edf0b0462c72a8b45f9ddbe41409b17 100644 |
--- a/src/ia32/macro-assembler-ia32.h |
+++ b/src/ia32/macro-assembler-ia32.h |
@@ -492,7 +492,15 @@ class MacroAssembler: public Assembler { |
} |
void LoadInstanceDescriptors(Register map, Register descriptors); |
- |
+ void EnumLength(Register dst, Register map); |
+ |
+ template<typename Field> |
+ void DecodeField(Register reg) { |
+ static const int full_shift = Field::kShift + kSmiTagSize; |
+ static const int low_mask = Field::kMask >> Field::kShift; |
+ sar(reg, full_shift); |
+ and_(reg, Immediate(low_mask)); |
+ } |
void LoadPowerOf2(XMMRegister dst, Register scratch, int power); |
// Abort execution if argument is not a number. Used in debug code. |