Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index dab28d6283a0abdd676ee875eed476f85ae5b91b..ab97480918e5d920f8f7297a91bab7fd630ea913 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -1052,6 +1052,19 @@ void MacroAssembler::Pref(int32_t hint, const MemOperand& rs) { |
} |
+void MacroAssembler::Lsa(Register rd, Register rt, Register rs, uint8_t sa, |
+ Register scratch) { |
+ if (IsMipsArchVariant(kMips32r6) && sa <= 4) { |
+ lsa(rd, rt, rs, sa); |
+ } else { |
+ Register tmp = rd.is(rt) ? scratch : rd; |
+ DCHECK(!tmp.is(rt)); |
+ sll(tmp, rs, sa); |
+ Addu(rd, rt, tmp); |
+ } |
+} |
+ |
+ |
// ------------Pseudo-instructions------------- |
void MacroAssembler::Ulw(Register rd, const MemOperand& rs) { |