target/s390x: Replace cpu_stb_data_ra -> cpu_stb_mmu in STFLE opcode
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é <philmd@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20260423135035.50126-10-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Apr 23, 2026 at 12:22 UTC
e7f6130478a38b8b4e3f280b0bfcea1c27d965b5
1 file changed
+5
-2
target/s390x/tcg/misc_helper.c
+5
-2
@@ -27,7 +27,8 @@
27
#include "exec/helper-proto.h"
28
#include "qemu/timer.h"
29
#include "exec/cputlb.h"
30
-#include "accel/tcg/cpu-ldst.h"
30
+#include "accel/tcg/cpu-ldst-common.h"
31
+#include "accel/tcg/cpu-mmu-index.h"
32
#include "exec/target_page.h"
33
#include "qapi/error.h"
34
#include "tcg_s390x.h"
@@ -710,6 +711,8 @@ void HELPER(stfl)(CPUS390XState *env)
711
712
uint32_t HELPER(stfle)(CPUS390XState *env, uint64_t addr)
713
{
714
+ const int mmu_idx = cpu_mmu_index(env_cpu(env), false);
715
+ const MemOpIdx oi = make_memop_idx(MO_8, mmu_idx);
716
const uintptr_t ra = GETPC();
717
const int count_bytes = ((env->regs[0] & 0xff) + 1) * 8;
718
int max_bytes;
@@ -728,7 +731,7 @@ uint32_t HELPER(stfle)(CPUS390XState *env, uint64_t addr)
731
* not store the words, and existing software depend on that.
732
*/
733
for (i = 0; i < MIN(count_bytes, max_bytes); ++i) {
731
- cpu_stb_data_ra(env, addr + i, stfl_bytes[i], ra);
734
+ cpu_stb_mmu(env, addr + i, stfl_bytes[i], oi, ra);
735
}
736
737
env->regs[0] = deposit64(env->regs[0], 0, 8, (max_bytes / 8) - 1);