mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
bulk: Call in place single use cpu_env()
Avoid CPUArchState local variable when cpu_env() is used once. Mechanical patch using the following Coccinelle spatch script: @@ type CPUArchState; identifier env; expression cs; @@ { - CPUArchState *env = cpu_env(cs); ... when != env - env + cpu_env(cs) ... when != env } Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240129164514.73104-5-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
97e0310601
commit
94956d7b51
9 changed files with 16 additions and 31 deletions
|
@ -3811,8 +3811,7 @@ static bool trans_b_gate(DisasContext *ctx, arg_b_gate *a)
|
|||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
if (ctx->tb_flags & PSW_C) {
|
||||
CPUHPPAState *env = cpu_env(ctx->cs);
|
||||
int type = hppa_artype_for_page(env, ctx->base.pc_next);
|
||||
int type = hppa_artype_for_page(cpu_env(ctx->cs), ctx->base.pc_next);
|
||||
/* If we could not find a TLB entry, then we need to generate an
|
||||
ITLB miss exception so the kernel will provide it.
|
||||
The resulting TLB fill operation will invalidate this TB and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue