Index: src/mips/assembler-mips.cc |
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc |
index 39448d3812b609ed0cc625d1d250e83a636b4a14..ae760f97112b3eecbd4b4c306dcf6928fd094328 100644 |
--- a/src/mips/assembler-mips.cc |
+++ b/src/mips/assembler-mips.cc |
@@ -1761,10 +1761,10 @@ void Assembler::rotrv(Register rd, Register rt, Register rs) { |
void Assembler::lsa(Register rd, Register rt, Register rs, uint8_t sa) { |
DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); |
- DCHECK(sa < 5 && sa > 0); |
+ DCHECK(sa <= 3); |
DCHECK(IsMipsArchVariant(kMips32r6)); |
- Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | |
- (rd.code() << kRdShift) | (sa - 1) << kSaShift | LSA; |
+ Instr instr = SPECIAL | rs.code() << kRsShift | rt.code() << kRtShift | |
+ rd.code() << kRdShift | sa << kSaShift | LSA; |
emit(instr); |
} |