On 10/2/26 21:15, Pierrick Bouvier wrote:
This commit removes TARGET_INSN_START_EXTRA_WORDS and force all arch to
call the same version of tcg_gen_insn_start, with additional 0 arguments
if needed. Since all arch have a single call site (in translate.c), this
is as good documentation as having a single define.
The notable exception is target/arm, which has two different translate
files for 32/64 bits. Since it's the only one, we accept to have two
call sites for this.
As well, we update parameter type to use uint64_t instead of
target_ulong, so it can be called from common code.
Signed-off-by: Pierrick Bouvier <[email protected]>
---
include/tcg/tcg-op-common.h | 8 ++++++++
include/tcg/tcg-op.h | 29 -----------------------------
target/alpha/cpu-param.h | 2 --
target/arm/cpu-param.h | 7 -------
target/avr/cpu-param.h | 2 --
target/hexagon/cpu-param.h | 2 --
target/hppa/cpu-param.h | 2 --
target/i386/cpu-param.h | 2 --
target/loongarch/cpu-param.h | 2 --
target/m68k/cpu-param.h | 2 --
target/microblaze/cpu-param.h | 2 --
target/mips/cpu-param.h | 2 --
target/or1k/cpu-param.h | 2 --
target/ppc/cpu-param.h | 2 --
target/riscv/cpu-param.h | 7 -------
target/rx/cpu-param.h | 2 --
target/s390x/cpu-param.h | 2 --
target/sh4/cpu-param.h | 2 --
target/sparc/cpu-param.h | 2 --
target/tricore/cpu-param.h | 2 --
target/xtensa/cpu-param.h | 2 --
target/alpha/translate.c | 4 ++--
target/avr/translate.c | 2 +-
target/hexagon/translate.c | 2 +-
target/i386/tcg/translate.c | 2 +-
target/loongarch/tcg/translate.c | 2 +-
target/m68k/translate.c | 2 +-
target/microblaze/translate.c | 2 +-
target/or1k/translate.c | 2 +-
target/ppc/translate.c | 2 +-
target/rx/translate.c | 2 +-
target/sh4/translate.c | 4 ++--
target/sparc/translate.c | 2 +-
target/tricore/translate.c | 2 +-
target/xtensa/translate.c | 2 +-
35 files changed, 24 insertions(+), 93 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index bb8d2ed86cf..5e3707d3fdf 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -1159,7 +1159,7 @@ static void xtensa_tr_tb_start(DisasContextBase *dcbase,
CPUState *cpu)
static void xtensa_tr_insn_start(DisasContextBase *dcbase, CPUState *cpu)
{
- tcg_gen_insn_start(dcbase->pc_next);
+ tcg_gen_insn_start(dcbase->pc_next, 0, 0);
If documentation is a concern, we could define INSN_START_DUMMY = 0 and
use it here.
}
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>