aboutsummaryrefslogtreecommitdiff
path: root/target/sh4
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2018-12-07 21:02:38 -0500
committerAlex Bennée <alex.bennee@linaro.org>2019-10-28 15:12:38 +0000
commitda94123fe1803bc9bc0cc38720224efe4b1a9491 (patch)
tree6e103d00054ce24218286964ae9ad27b8950b155 /target/sh4
parent23f42b6053442bf3596ed0f0b4105374d7b4628b (diff)
downloadqemu-da94123fe1803bc9bc0cc38720224efe4b1a9491.zip
qemu-da94123fe1803bc9bc0cc38720224efe4b1a9491.tar.gz
qemu-da94123fe1803bc9bc0cc38720224efe4b1a9491.tar.bz2
target/sh4: fetch code with translator_ld
There is a small wrinkle with the gUSA instruction. The translator effectively treats a (known) gUSA sequence as a single instruction. For the purposes of the plugin we end up with a long multi-instruction qemu_plugin_insn. If the known sequence isn't detected we shall never run this translation anyway. Signed-off-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'target/sh4')
-rw-r--r--target/sh4/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index 5a7d8c4..922785e 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -1917,7 +1917,7 @@ static void decode_gusa(DisasContext *ctx, CPUSH4State *env)
/* Read all of the insns for the region. */
for (i = 0; i < max_insns; ++i) {
- insns[i] = cpu_lduw_code(env, pc + i * 2);
+ insns[i] = translator_lduw(env, pc + i * 2);
}
ld_adr = ld_dst = ld_mop = -1;
@@ -2332,7 +2332,7 @@ static void sh4_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
}
#endif
- ctx->opcode = cpu_lduw_code(env, ctx->base.pc_next);
+ ctx->opcode = translator_lduw(env, ctx->base.pc_next);
decode_opc(ctx);
ctx->base.pc_next += 2;
}