Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index 970a1bfc25c197ad78e95442408aa05a59cebd15..f62c7bb76db3599393feabd0e87ec2c4c6f94856 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()); |