Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 7152ba21cc2af690406d1d209eba6087c6f53dce..875f4a651d0a97b72eedbb30daf42dc7915a7368 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -3309,7 +3309,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key, |
__ add(scratch0(), scratch0(), Operand(key, LSL, shift_size)); |
} else { |
ASSERT_EQ(-1, shift_size); |
- __ add(scratch0(), scratch0(), Operand(key, LSR, 1)); |
+ // key can be negative, so using ASR here. |
+ __ add(scratch0(), scratch0(), Operand(key, ASR, 1)); |
} |
return MemOperand(base, scratch0()); |
} |