Commit 85949ac2 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Shift additional_index by element_shift_size, not shift_size.

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14629021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a15305c3
...@@ -3325,7 +3325,8 @@ Operand LCodeGen::BuildFastArrayOperand( ...@@ -3325,7 +3325,8 @@ Operand LCodeGen::BuildFastArrayOperand(
uint32_t offset, uint32_t offset,
uint32_t additional_index) { uint32_t additional_index) {
Register elements_pointer_reg = ToRegister(elements_pointer); Register elements_pointer_reg = ToRegister(elements_pointer);
int shift_size = ElementsKindToShiftSize(elements_kind); int element_shift_size = ElementsKindToShiftSize(elements_kind);
int shift_size = element_shift_size;
if (key->IsConstantOperand()) { if (key->IsConstantOperand()) {
int constant_value = ToInteger32(LConstantOperand::cast(key)); int constant_value = ToInteger32(LConstantOperand::cast(key));
if (constant_value & 0xF0000000) { if (constant_value & 0xF0000000) {
...@@ -3343,7 +3344,7 @@ Operand LCodeGen::BuildFastArrayOperand( ...@@ -3343,7 +3344,7 @@ Operand LCodeGen::BuildFastArrayOperand(
return Operand(elements_pointer_reg, return Operand(elements_pointer_reg,
ToRegister(key), ToRegister(key),
scale_factor, scale_factor,
offset + (additional_index << shift_size)); offset + (additional_index << element_shift_size));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment