Index: src/arm/macro-assembler-arm.h |
diff --git a/src/arm/macro-assembler-arm.h b/src/arm/macro-assembler-arm.h |
index 9a2ee7a17d72133d04c2631bcf82e6f111f925f4..d49891926cada9a66a6661891459b6bbbdcb3591 100644 |
--- a/src/arm/macro-assembler-arm.h |
+++ b/src/arm/macro-assembler-arm.h |
@@ -1355,11 +1355,19 @@ class MacroAssembler: public Assembler { |
void NumberOfOwnDescriptors(Register dst, Register map); |
template<typename Field> |
- void DecodeField(Register reg) { |
+ void DecodeField(Register dst, Register src) { |
static const int shift = Field::kShift; |
static const int mask = Field::kMask >> shift; |
- mov(reg, Operand(reg, LSR, shift)); |
- and_(reg, reg, Operand(mask)); |
+ static const int size = Field::kSize; |
+ mov(dst, Operand(src, LSR, shift)); |
+ if (shift + size != 32) { |
+ and_(dst, dst, Operand(mask)); |
+ } |
+ } |
+ |
+ template<typename Field> |
+ void DecodeField(Register reg) { |
+ DecodeField<Field>(reg, reg); |
} |
// Activation support. |