Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 7570c85bf68ba68f03115f7e3573c610bcb87acf..02703bf82dad6349dde9ce4f8e38c06a29f9616d 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -4170,7 +4170,7 @@ void MacroAssembler::EnsureNotWhite( |
addq(length, Immediate(0x04)); |
// Value now either 4 (if ASCII) or 8 (if UC16), i.e. char-size shifted by 2. |
imul(length, FieldOperand(value, String::kLengthOffset)); |
- shr(length, Immediate(2 + kSmiTagSize)); |
+ shr(length, Immediate(2 + kSmiTagSize + kSmiShiftSize)); |
addq(length, Immediate(SeqString::kHeaderSize + kObjectAlignmentMask)); |
and_(length, Immediate(~kObjectAlignmentMask)); |