In preparation of building misc_helper.c as a common unit, update the cpu_ld/st_be_data_ra() API by cpu_ld/st_mmu() one and replace "accel/tcg/cpu-ldst.h" by "accel/tcg/cpu-ldst-common.h".
For now we are blocked by the CONFIG_DEVICES use so keep the file in s390x_ss[]. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Ilya Leoshkevich <[email protected]> Message-Id: <[email protected]> --- target/s390x/tcg/misc_helper.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index 1fd900fbbf0..3d13c8bd8ea 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -27,7 +27,8 @@ #include "exec/helper-proto.h" #include "qemu/timer.h" #include "exec/cputlb.h" -#include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-ldst-common.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/target_page.h" #include "qapi/error.h" #include "tcg_s390x.h" @@ -710,6 +711,8 @@ void HELPER(stfl)(CPUS390XState *env) uint32_t HELPER(stfle)(CPUS390XState *env, uint64_t addr) { + const int mmu_idx = cpu_mmu_index(env_cpu(env), false); + const MemOpIdx oi = make_memop_idx(MO_8, mmu_idx); const uintptr_t ra = GETPC(); const int count_bytes = ((env->regs[0] & 0xff) + 1) * 8; int max_bytes; @@ -728,7 +731,7 @@ uint32_t HELPER(stfle)(CPUS390XState *env, uint64_t addr) * not store the words, and existing software depend on that. */ for (i = 0; i < MIN(count_bytes, max_bytes); ++i) { - cpu_stb_data_ra(env, addr + i, stfl_bytes[i], ra); + cpu_stb_mmu(env, addr + i, stfl_bytes[i], oi, ra); } env->regs[0] = deposit64(env->regs[0], 0, 8, (max_bytes / 8) - 1); -- 2.53.0
