Index: src/mips64/assembler-mips64.cc |
diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc |
index c1ffa6c39b5a7b346b0e0cf028d1846e069e2017..fbb0a612fc10956fa93f02451f384274a2d31fd1 100644 |
--- a/src/mips64/assembler-mips64.cc |
+++ b/src/mips64/assembler-mips64.cc |
@@ -1905,20 +1905,20 @@ void Assembler::dsra32(Register rd, Register rt, uint16_t sa) { |
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(kArchVariant == kMips64r6); |
- 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); |
} |
void Assembler::dlsa(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(kArchVariant == kMips64r6); |
- Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | |
- (rd.code() << kRdShift) | (sa - 1) << kSaShift | DLSA; |
+ Instr instr = SPECIAL | rs.code() << kRsShift | rt.code() << kRtShift | |
+ rd.code() << kRdShift | sa << kSaShift | DLSA; |
emit(instr); |
} |