[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 26/55] target/sh4: fetch code with translator_ld
From: |
Alex Bennée |
Subject: |
[PATCH v5 26/55] target/sh4: fetch code with translator_ld |
Date: |
Mon, 14 Oct 2019 11:49:19 +0100 |
From: "Emilio G. Cota" <address@hidden>
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 <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Alex Bennée <address@hidden>
---
target/sh4/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index 5a7d8c4535..922785e225 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;
}
--
2.20.1
- Re: [PATCH v5 17/55] plugins: implement helpers for resolving hwaddr, (continued)
- [PATCH v5 32/55] target/sparc: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 18/55] translate-all: notify plugin code of tb_flush, Alex Bennée, 2019/10/14
- [PATCH v5 30/55] target/alpha: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 13/55] tcg: add tcg_gen_st_ptr, Alex Bennée, 2019/10/14
- [PATCH v5 42/55] tests/tcg: move "virtual" tests to EXTRA_TESTS, Alex Bennée, 2019/10/14
- [PATCH v5 45/55] tests/plugin: add a hotblocks plugin, Alex Bennée, 2019/10/14
- [PATCH v5 29/55] target/m68k: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 26/55] target/sh4: fetch code with translator_ld,
Alex Bennée <=
- [PATCH v5 48/55] tests/plugin: add hotpages plugin to breakdown memory access patterns, Alex Bennée, 2019/10/14
- [PATCH v5 16/55] tcg: let plugins instrument virtual memory accesses, Alex Bennée, 2019/10/14
- [PATCH v5 14/55] plugin-gen: add module for TCG-related code, Alex Bennée, 2019/10/14
- [PATCH v5 35/55] translator: inject instrumentation from plugins, Alex Bennée, 2019/10/14
- [PATCH v5 28/55] target/hppa: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 34/55] target/openrisc: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 19/55] *-user: notify plugin of exit, Alex Bennée, 2019/10/14
- [PATCH v5 23/55] translator: add translator_ld{ub,sw,uw,l,q}, Alex Bennée, 2019/10/14