mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
target/sh4: Prefer fast cpu_env() over slower CPU QOM cast macro
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240129164514.73104-26-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
f2a4459db9
commit
795bec9652
4 changed files with 14 additions and 30 deletions
|
@ -159,8 +159,7 @@ void sh4_translate_init(void)
|
|||
|
||||
void superh_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||
{
|
||||
SuperHCPU *cpu = SUPERH_CPU(cs);
|
||||
CPUSH4State *env = &cpu->env;
|
||||
CPUSH4State *env = cpu_env(cs);
|
||||
int i;
|
||||
|
||||
qemu_fprintf(f, "pc=0x%08x sr=0x%08x pr=0x%08x fpscr=0x%08x\n",
|
||||
|
@ -2186,7 +2185,6 @@ static void decode_gusa(DisasContext *ctx, CPUSH4State *env)
|
|||
static void sh4_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
|
||||
{
|
||||
DisasContext *ctx = container_of(dcbase, DisasContext, base);
|
||||
CPUSH4State *env = cpu_env(cs);
|
||||
uint32_t tbflags;
|
||||
int bound;
|
||||
|
||||
|
@ -2196,7 +2194,7 @@ static void sh4_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
|
|||
/* We don't know if the delayed pc came from a dynamic or static branch,
|
||||
so assume it is a dynamic branch. */
|
||||
ctx->delayed_pc = -1; /* use delayed pc from env pointer */
|
||||
ctx->features = env->features;
|
||||
ctx->features = cpu_env(cs)->features;
|
||||
ctx->has_movcal = (tbflags & TB_FLAG_PENDING_MOVCA);
|
||||
ctx->gbank = ((tbflags & (1 << SR_MD)) &&
|
||||
(tbflags & (1 << SR_RB))) * 0x10;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue