Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 962c2e8b45e0067e6b81c9601ca2d64b5c1fa5a8..3fea033fe0c128d2e291e286a001893299998125 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -2201,16 +2201,19 @@ void MacroAssembler::JumpIfNotBothSequentialAsciiStrings( |
// Check that both are flat ASCII strings. |
ASSERT(kNotStringTag != 0); |
const int kFlatAsciiStringMask = |
- kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; |
+ kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask | |
+ kStringRepresentationMask; |
const int kFlatAsciiStringTag = ASCII_STRING_TYPE; |
andl(scratch1, Immediate(kFlatAsciiStringMask)); |
andl(scratch2, Immediate(kFlatAsciiStringMask)); |
// Interleave the bits to check both scratch1 and scratch2 in one test. |
- ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3)); |
- lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); |
+ ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 8)); |
+ ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask); |
+ shl(scratch1, Immediate(8)); |
+ orl(scratch1, scratch2); |
cmpl(scratch1, |
- Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); |
+ Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 8))); |
j(not_equal, on_fail, near_jump); |
} |
@@ -2246,17 +2249,19 @@ void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( |
// Check that both are flat ASCII strings. |
ASSERT(kNotStringTag != 0); |
- const int kFlatAsciiStringMask = |
- kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; |
+ const int kFlatAsciiStringMask = kIsNotStringMask | kStringRepresentationMask |
+ | kStringEncodingMask | kAsciiDataHintTag; |
const int kFlatAsciiStringTag = ASCII_STRING_TYPE; |
andl(scratch1, Immediate(kFlatAsciiStringMask)); |
andl(scratch2, Immediate(kFlatAsciiStringMask)); |
// Interleave the bits to check both scratch1 and scratch2 in one test. |
- ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3)); |
- lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); |
+ ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 8)); |
+ ASSERT_EQ(ASCII_STRING_TYPE, ASCII_STRING_TYPE & kFlatAsciiStringMask); |
+ shl(scratch1, Immediate(8)); |
+ orl(scratch1, scratch2); |
cmpl(scratch1, |
- Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); |
+ Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 8))); |
j(not_equal, on_fail, near_jump); |
} |