Index: src/mips/assembler-mips.cc |
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc |
index cbbc051a1f6ad64f01a87aae934711f9a7a1afa6..dec4fac235c6efffad932674b4a9b9736681e4b9 100644 |
--- a/src/mips/assembler-mips.cc |
+++ b/src/mips/assembler-mips.cc |
@@ -1653,7 +1653,7 @@ void Assembler::sll(Register rd, |
// nop(int/NopMarkerTypes) or MarkCode(int/NopMarkerTypes) pseudo |
// instructions. |
DCHECK(coming_from_nop || !(rd.is(zero_reg) && rt.is(zero_reg))); |
- GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa, SLL); |
+ GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa & 0x1F, SLL); |
} |
@@ -1663,7 +1663,7 @@ void Assembler::sllv(Register rd, Register rt, Register rs) { |
void Assembler::srl(Register rd, Register rt, uint16_t sa) { |
- GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa, SRL); |
+ GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa & 0x1F, SRL); |
} |
@@ -1673,7 +1673,7 @@ void Assembler::srlv(Register rd, Register rt, Register rs) { |
void Assembler::sra(Register rd, Register rt, uint16_t sa) { |
- GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa, SRA); |
+ GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa & 0x1F, SRA); |
} |