diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2025-03-21 18:19:28 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-04-22 14:07:12 -0700 |
commit | c0f830cb6a756add847f9cd9d62d50397a1284c1 (patch) | |
tree | 2e1269f0cdba9fb37577e171762a16da4404e262 | |
parent | ba675861ea6f1f8b3eeee4a2d64b47204b883ab1 (diff) | |
download | qemu-c0f830cb6a756add847f9cd9d62d50397a1284c1.zip qemu-c0f830cb6a756add847f9cd9d62d50397a1284c1.tar.gz qemu-c0f830cb6a756add847f9cd9d62d50397a1284c1.tar.bz2 |
target/avr: Use cpu_stb_mmuidx_ra in helper_fullwr
Avoid direct use of address_space_memory.
Make use of the softmmu cache of the i/o page.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | target/avr/helper.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/target/avr/helper.c b/target/avr/helper.c index d0e86f5..7d6954e 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -23,10 +23,10 @@ #include "qemu/error-report.h" #include "cpu.h" #include "accel/tcg/cpu-ops.h" +#include "accel/tcg/getpc.h" #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/cpu_ldst.h" -#include "exec/address-spaces.h" #include "exec/helper-proto.h" bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) @@ -67,6 +67,11 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) return false; } +static void do_stb(CPUAVRState *env, uint32_t addr, uint8_t data, uintptr_t ra) +{ + cpu_stb_mmuidx_ra(env, addr, data, MMU_DATA_IDX, ra); +} + void avr_cpu_do_interrupt(CPUState *cs) { CPUAVRState *env = cpu_env(cs); @@ -311,8 +316,7 @@ void helper_fullwr(CPUAVRState *env, uint32_t data, uint32_t addr) break; default: - address_space_stb(&address_space_memory, OFFSET_DATA + addr, data, - MEMTXATTRS_UNSPECIFIED, NULL); + do_stb(env, addr, data, GETPC()); break; } } |