On 4/30/25 9:48 AM, Richard Henderson wrote:
Combine 3 different pointer returns into one structure return.
Include a cflags field in TCGTBCPUState, not filled in by
cpu_get_tb_cpu_state, but used by all callers. This fills
a hole in the structure and is useful in some subroutines.
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
include/accel/tcg/cpu-ops.h | 4 +--
include/accel/tcg/tb-cpu-state.h | 18 ++++++++++
accel/tcg/cpu-exec.c | 56 +++++++++++++-------------------
accel/tcg/translate-all.c | 8 ++---
target/alpha/cpu.c | 13 ++++----
target/arm/tcg/hflags.c | 17 ++++++----
target/avr/cpu.c | 9 ++---
target/hexagon/cpu.c | 15 +++++----
target/hppa/cpu.c | 10 +++---
target/i386/tcg/tcg-cpu.c | 19 +++++++----
target/loongarch/cpu.c | 20 +++++++-----
target/m68k/cpu.c | 21 +++++++-----
target/microblaze/cpu.c | 13 +++++---
target/mips/cpu.c | 14 ++++----
target/openrisc/cpu.c | 16 +++++----
target/ppc/helper_regs.c | 8 ++---
target/riscv/tcg/tcg-cpu.c | 12 +++----
target/rx/cpu.c | 14 ++++----
target/s390x/cpu.c | 14 ++++----
target/sh4/cpu.c | 22 +++++++++----
target/sparc/cpu.c | 17 ++++++----
target/tricore/cpu.c | 14 ++++----
target/xtensa/cpu.c | 40 +++++++++++++----------
23 files changed, 218 insertions(+), 176 deletions(-)
create mode 100644 include/accel/tcg/tb-cpu-state.h
[...]
+ return (TCGTBCPUState){
+ .pc = env->pc,
+ .flags = flags,
+ .cs_base = cs_base,
+ };
This is a quite neat way to write it.
}
Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>