Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 326e757f6180de273d55b3efd74faec556700cef..3022f43a16916ecab9290895fc1783619da9c7ef 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -1148,8 +1148,9 @@ void MacroAssembler::Pref(int32_t hint, const MemOperand& rs) { |
void MacroAssembler::Lsa(Register rd, Register rt, Register rs, uint8_t sa, |
Register scratch) { |
+ DCHECK(sa >= 1 && sa <= 31); |
if (IsMipsArchVariant(kMips32r6) && sa <= 4) { |
- lsa(rd, rt, rs, sa); |
+ lsa(rd, rt, rs, sa - 1); |
} else { |
Register tmp = rd.is(rt) ? scratch : rd; |
DCHECK(!tmp.is(rt)); |