Index: src/mips/assembler-mips.cc |
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc |
index 42d93e1817b21944e7f699af459c0a1daba6d00c..99b1bcd0c5916f77bca8adf32ea92bb8e77973bb 100644 |
--- a/src/mips/assembler-mips.cc |
+++ b/src/mips/assembler-mips.cc |
@@ -1700,7 +1700,7 @@ void Assembler::rotr(Register rd, Register rt, uint16_t sa) { |
void Assembler::rotrv(Register rd, Register rt, Register rs) { |
// Should be called via MacroAssembler::Ror. |
- DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid() ); |
+ DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); |
DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); |
Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) |
| (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; |
@@ -1708,6 +1708,16 @@ 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(IsMipsArchVariant(kMips32r6)); |
+ Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | |
+ (rd.code() << kRdShift) | (sa - 1) << kSaShift | LSA; |
+ emit(instr); |
+} |
+ |
+ |
// ------------Memory-instructions------------- |
// Helper for base-reg + offset, when offset is larger than int16. |