Index: src/mips64/assembler-mips64.cc |
diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc |
index fa62932e82d24bf28f4fe6be2c3cddaf485c8c07..0fe096691f03831358999f4733d6cbd971ef650a 100644 |
--- a/src/mips64/assembler-mips64.cc |
+++ b/src/mips64/assembler-mips64.cc |
@@ -1757,7 +1757,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(kArchVariant == kMips64r2 || kArchVariant == kMips64r6); |
Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) |
| (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; |
@@ -1826,6 +1826,26 @@ 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(kArchVariant == kMips64r6); |
+ Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | |
+ (rd.code() << kRdShift) | (sa - 1) << 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(kArchVariant == kMips64r6); |
+ Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | |
+ (rd.code() << kRdShift) | (sa - 1) << kSaShift | DLSA; |
+ emit(instr); |
+} |
+ |
+ |
// ------------Memory-instructions------------- |
// Helper for base-reg + offset, when offset is larger than int16. |