Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 0c7c2203f0708d13a2938f9363454da54e9ce4a2..084901783e2ddba1c002483ac23115445bc62a0d 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -2564,11 +2564,13 @@ void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register object1, |
const int kFlatOneByteStringTag = |
kStringTag | kOneByteStringTag | kSeqStringTag; |
// Interleave bits from both instance types and compare them in one check. |
- DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << 3)); |
+ const int kShift = 8; |
+ DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << kShift)); |
and_(scratch1, kFlatOneByteStringMask); |
and_(scratch2, kFlatOneByteStringMask); |
- lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); |
- cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << 3)); |
+ shl(scratch2, kShift); |
+ or_(scratch1, scratch2); |
+ cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << kShift)); |
j(not_equal, failure); |
} |