aboutsummaryrefslogtreecommitdiff
path: root/target/sparc
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-05-02 16:14:19 +0100
committerRichard Henderson <richard.henderson@linaro.org>2023-05-05 17:09:47 +0100
commit60abd45224d0cb855bf32789b7b7b78061f1fbd6 (patch)
tree60874f1d75b0dc77cebed2185857ea6230ea7595 /target/sparc
parent316b6783f1a67aa6b124d864f06b75d43b710675 (diff)
downloadqemu-60abd45224d0cb855bf32789b7b7b78061f1fbd6.zip
qemu-60abd45224d0cb855bf32789b7b7b78061f1fbd6.tar.gz
qemu-60abd45224d0cb855bf32789b7b7b78061f1fbd6.tar.bz2
target/sparc: Use cpu_ld*_code_mmu
This passes on the memop as given as argument to helper_ld_asi to the ultimate load primitive. Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/sparc')
-rw-r--r--target/sparc/ldst_helper.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c
index a53580d..7972d56 100644
--- a/target/sparc/ldst_helper.c
+++ b/target/sparc/ldst_helper.c
@@ -593,6 +593,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr,
#if defined(DEBUG_MXCC) || defined(DEBUG_ASI)
uint32_t last_addr = addr;
#endif
+ MemOpIdx oi;
do_check_align(env, addr, size - 1, GETPC());
switch (asi) {
@@ -692,19 +693,20 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr,
case ASI_M_IODIAG: /* Turbosparc IOTLB Diagnostic */
break;
case ASI_KERNELTXT: /* Supervisor code access */
+ oi = make_memop_idx(memop, cpu_mmu_index(env, true));
switch (size) {
case 1:
- ret = cpu_ldub_code(env, addr);
+ ret = cpu_ldb_code_mmu(env, addr, oi, GETPC());
break;
case 2:
- ret = cpu_lduw_code(env, addr);
+ ret = cpu_ldw_code_mmu(env, addr, oi, GETPC());
break;
default:
case 4:
- ret = cpu_ldl_code(env, addr);
+ ret = cpu_ldl_code_mmu(env, addr, oi, GETPC());
break;
case 8:
- ret = cpu_ldq_code(env, addr);
+ ret = cpu_ldq_code_mmu(env, addr, oi, GETPC());
break;
}
break;