Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index e6f52d84b707ef82d3385eddea892525039b744d..57d13fb0e8e55ced2047e0003a1d2889c35d6cf4 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -3259,7 +3259,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key, |
__ Addu(scratch0(), scratch0(), Operand(base_offset)); |
} else { |
ASSERT_EQ(-1, shift_size); |
- __ srl(scratch0(), key, 1); |
+ // Key can be negative, so using sra here. |
+ __ sra(scratch0(), key, 1); |
__ Addu(scratch0(), scratch0(), Operand(base_offset)); |
} |
__ Addu(scratch0(), base, scratch0()); |