Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 03419cad03cb38f3a80a8e19e87371528382d911..a5af1b8d65b1450d777d346c702fb44a1f2d5292 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -740,6 +740,28 @@ void MacroAssembler::Mult(Register rs, const Operand& rt) { |
} |
+void MacroAssembler::Mulhu(Register rd, Register rs, const Operand& rt) { |
+ if (rt.is_reg()) { |
+ if (!IsMipsArchVariant(kMips32r6)) { |
+ multu(rs, rt.rm()); |
+ mfhi(rd); |
+ } else { |
+ muhu(rd, rs, rt.rm()); |
+ } |
+ } else { |
+ // li handles the relocation. |
+ DCHECK(!rs.is(at)); |
+ li(at, rt); |
+ if (!IsMipsArchVariant(kMips32r6)) { |
+ multu(rs, at); |
+ mfhi(rd); |
+ } else { |
+ muhu(rd, rs, at); |
+ } |
+ } |
+} |
+ |
+ |
void MacroAssembler::Multu(Register rs, const Operand& rt) { |
if (rt.is_reg()) { |
multu(rs, rt.rm()); |