On 17/2/25 00:08, Richard Henderson wrote:
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  tcg/aarch64/tcg-target-has.h     |  2 --
  tcg/arm/tcg-target-has.h         |  1 -
  tcg/i386/tcg-target-has.h        |  2 --
  tcg/loongarch64/tcg-target-has.h |  2 --
  tcg/mips/tcg-target-has.h        |  2 --
  tcg/ppc/tcg-target-has.h         |  2 --
  tcg/riscv/tcg-target-has.h       |  2 --
  tcg/s390x/tcg-target-has.h       |  2 --
  tcg/sparc64/tcg-target-has.h     |  2 --
  tcg/tcg-has.h                    |  1 -
  tcg/tci/tcg-target-has.h         |  2 --
  tcg/tcg-op.c                     |  4 ++--
  tcg/tcg.c                        |  8 +++----
  tcg/aarch64/tcg-target.c.inc     | 17 ++++++++++-----
  tcg/arm/tcg-target.c.inc         |  4 ++++
  tcg/i386/tcg-target.c.inc        |  4 ++++
  tcg/loongarch64/tcg-target.c.inc | 24 +++++++++++++--------
  tcg/mips/tcg-target.c.inc        | 37 ++++++++++++++++++--------------
  tcg/ppc/tcg-target.c.inc         | 21 ++++++++++--------
  tcg/riscv/tcg-target.c.inc       | 19 ++++++++++------
  tcg/s390x/tcg-target.c.inc       |  4 ++++
  tcg/sparc64/tcg-target.c.inc     |  4 ++++
  tcg/tci/tcg-target.c.inc         |  4 ++++
  23 files changed, 98 insertions(+), 72 deletions(-)


diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc
index ad62d877c7..08d98f49f7 100644
--- a/tcg/mips/tcg-target.c.inc
+++ b/tcg/mips/tcg-target.c.inc
@@ -1743,6 +1743,27 @@ static const TCGOutOpBinary outop_mul = {
      .out_rrr = tgen_mul,
  };
+static void tgen_mulsh(TCGContext *s, TCGType type,
+                       TCGReg a0, TCGReg a1, TCGReg a2)
+{

Maybe for style consistency:

       MIPSInsn insn;

+    if (use_mips32r6_instructions) {

           insn = type == TCG_TYPE_I32 ? OPC_MUH : OPC_DMUH;

+        if (type == TCG_TYPE_I32) {
+            tcg_out_opc_reg(s, OPC_MUH, a0, a1, a2);
+        } else {
+            tcg_out_opc_reg(s, OPC_DMUH, a0, a1, a2);
+        }
+    } else {
+        MIPSInsn insn = type == TCG_TYPE_I32 ? OPC_MULT : OPC_DMULT;
+        tcg_out_opc_reg(s, insn, 0, a1, a2);
+        tcg_out_opc_reg(s, OPC_MFHI, a0, 0, 0);
+    }
+}

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to