Index: src/a64/ic-a64.cc |
diff --git a/src/a64/ic-a64.cc b/src/a64/ic-a64.cc |
index 18677f79d7ff42f0a5dc883065519099a01383be..71d4c66fe54de2b22ab839709a157a8cb06247ca 100644 |
--- a/src/a64/ic-a64.cc |
+++ b/src/a64/ic-a64.cc |
@@ -392,8 +392,11 @@ static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm, |
// Load value from context and return it. |
__ Ldr(scratch2, FieldMemOperand(map, FixedArray::kHeaderSize)); |
__ SmiUntag(scratch1); |
- __ Add(scratch2, scratch2, Context::kHeaderSize - kHeapObjectTag); |
- return MemOperand(scratch2, scratch1, LSL, kPointerSizeLog2); |
+ __ Lsl(scratch1, scratch1, kPointerSizeLog2); |
+ __ Add(scratch1, scratch1, Context::kHeaderSize - kHeapObjectTag); |
+ // The base of the result (scratch2) is passed to RecordWrite in |
+ // KeyedStoreIC::GenerateSloppyArguments and it must be a HeapObject. |
+ return MemOperand(scratch2, scratch1); |
} |