diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2025-04-27 15:32:11 -0700 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2025-04-30 12:45:05 -0700 |
| commit | 4759aae43235cd00e1c9b67ff5bd920db89fddc5 (patch) | |
| tree | 1468b766f39480c6b27a10e665545697eb0ca1ff /target/avr/cpu.c | |
| parent | 5b1c93be57ce6364eb7bbaaab6ecbf2b1d5d979e (diff) | |
| download | focaccia-qemu-4759aae43235cd00e1c9b67ff5bd920db89fddc5.tar.gz focaccia-qemu-4759aae43235cd00e1c9b67ff5bd920db89fddc5.zip | |
accel/tcg: Return TCGTBCPUState from cpu_get_tb_cpu_state
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. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/avr/cpu.c')
| -rw-r--r-- | target/avr/cpu.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/target/avr/cpu.c b/target/avr/cpu.c index d9fecb272e..683195b61d 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -54,14 +54,11 @@ static int avr_cpu_mmu_index(CPUState *cs, bool ifetch) return ifetch ? MMU_CODE_IDX : MMU_DATA_IDX; } -void cpu_get_tb_cpu_state(CPUAVRState *env, vaddr *pc, - uint64_t *cs_base, uint32_t *pflags) +TCGTBCPUState cpu_get_tb_cpu_state(CPUState *cs) { + CPUAVRState *env = cpu_env(cs); uint32_t flags = 0; - *pc = env->pc_w * 2; - *cs_base = 0; - if (env->fullacc) { flags |= TB_FLAGS_FULL_ACCESS; } @@ -69,7 +66,7 @@ void cpu_get_tb_cpu_state(CPUAVRState *env, vaddr *pc, flags |= TB_FLAGS_SKIP; } - *pflags = flags; + return (TCGTBCPUState){ .pc = env->pc_w * 2, .flags = flags }; } static void avr_cpu_synchronize_from_tb(CPUState *cs, |