Index: src/s390/macro-assembler-s390.h |
diff --git a/src/s390/macro-assembler-s390.h b/src/s390/macro-assembler-s390.h |
index 09310c5ea6248c577e776f54fe35d5bf45d78d89..5b38e30a0dfb3a53fa6c8b55cca6e14e89644818 100644 |
--- a/src/s390/macro-assembler-s390.h |
+++ b/src/s390/macro-assembler-s390.h |
@@ -1588,6 +1588,12 @@ class MacroAssembler : public Assembler { |
if (isSmi) { |
SmiToArrayOffset(dst, src, elementSizeLog2); |
} else { |
+#if V8_TARGET_ARCH_S390X |
+ // src (key) is a 32-bit integer. Sign extension ensures |
+ // upper 32-bit does not contain garbage before being used to |
+ // reference memory. |
+ lgfr(src, src); |
+#endif |
ShiftLeftP(dst, src, Operand(elementSizeLog2)); |
} |
} |