Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Unified Diff: src/mips/lithium-codegen-mips.cc

Issue 219923005: MIPS: Fix PrepareKeyedOperand on MIPS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698