Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index 9307b87b4bd756e12bedfac35bf5bd65d85acdb2..e45e66d40069f63bf06c1ee365b9f3bc47253de5 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -1565,13 +1565,16 @@ compiler::Node* CodeStubAssembler::ElementOffsetFromIndex(Node* index_node, |
if (constant_index) { |
return IntPtrConstant(base_size + element_size * index); |
} |
+ if (Is64() && mode == INTEGER_PARAMETERS) { |
+ index_node = ChangeInt32ToInt64(index_node); |
+ } |
if (base_size == 0) { |
return (element_size_shift >= 0) |
? WordShl(index_node, IntPtrConstant(element_size_shift)) |
: WordShr(index_node, IntPtrConstant(-element_size_shift)); |
} |
return IntPtrAdd( |
- Int32Constant(base_size), |
+ IntPtrConstant(base_size), |
(element_size_shift >= 0) |
? WordShl(index_node, IntPtrConstant(element_size_shift)) |
: WordShr(index_node, IntPtrConstant(-element_size_shift))); |