target/arm: Simplify aa32 DISAS_WFI
The length of the previous insn may be computed from the difference of start and end addresses. Use tcg_constant_i32 while we're at it. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
099d1c2088
commit
c89a9d139b
@ -9870,18 +9870,14 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
|||||||
/* nothing more to generate */
|
/* nothing more to generate */
|
||||||
break;
|
break;
|
||||||
case DISAS_WFI:
|
case DISAS_WFI:
|
||||||
{
|
gen_helper_wfi(cpu_env,
|
||||||
TCGv_i32 tmp = tcg_const_i32((dc->thumb &&
|
tcg_constant_i32(dc->base.pc_next - dc->pc_curr));
|
||||||
!(dc->insn & (1U << 31))) ? 2 : 4);
|
/*
|
||||||
|
* The helper doesn't necessarily throw an exception, but we
|
||||||
gen_helper_wfi(cpu_env, tmp);
|
|
||||||
tcg_temp_free_i32(tmp);
|
|
||||||
/* The helper doesn't necessarily throw an exception, but we
|
|
||||||
* must go back to the main loop to check for interrupts anyway.
|
* must go back to the main loop to check for interrupts anyway.
|
||||||
*/
|
*/
|
||||||
tcg_gen_exit_tb(NULL, 0);
|
tcg_gen_exit_tb(NULL, 0);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case DISAS_WFE:
|
case DISAS_WFE:
|
||||||
gen_helper_wfe(cpu_env);
|
gen_helper_wfe(cpu_env);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user