On 15/10/25 23:38, Richard Henderson wrote:
From: Philippe Mathieu-Daudé <[email protected]>

See previous commit for rationale.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-ID: <[email protected]>
---
  tcg/mips/tcg-target-reg-bits.h           |  8 ++----
  common-user/host/mips/safe-syscall.inc.S | 35 ------------------------
  tcg/mips/tcg-target.c.inc                | 14 ++--------
  3 files changed, 6 insertions(+), 51 deletions(-)

Maybe squash here (improving comment if necessary):

-- >8 --
diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc
index 43727512d46..fa4e4abcc17 100644
--- a/tcg/mips/tcg-target.c.inc
+++ b/tcg/mips/tcg-target.c.inc
@@ -959,17 +959,10 @@ static void tcg_out_call_int(TCGContext *s, const tcg_insn_unit *arg, bool tail)
      * Note that __mips_abicalls requires the called function's address
      * to be loaded into $25 (t9), even if a direct branch is in range.
      *
-     * For n64, always drop the pointer into the constant pool.
-     * We can re-use helper addresses often and do not want any
-     * of the longer sequences tcg_out_movi may try.
+     * Always drop the pointer into the constant pool.
      */
-    if (sizeof(uintptr_t) == 8) {
-        tcg_out_movi_pool(s, TCG_REG_T9, (uintptr_t)arg, TCG_REG_TB);
-    } else {
-        tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_T9, (uintptr_t)arg);
-    }
+    tcg_out_movi_pool(s, TCG_REG_T9, (uintptr_t)arg, TCG_REG_TB);

- /* But do try a direct branch, allowing the cpu better insn prefetch. */
     if (tail) {
         if (!tcg_out_opc_jmp(s, OPC_J, arg)) {
             tcg_out_opc_reg(s, OPC_JR, 0, TCG_REG_T9, 0);
---

Otherwise I can post as a following up cleanup patch.

Reply via email to