[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 16/60] target/arm: Simplify aa32 DISAS_WFI
From: |
Richard Henderson |
Subject: |
[PATCH v3 16/60] target/arm: Simplify aa32 DISAS_WFI |
Date: |
Sun, 17 Apr 2022 10:43:42 -0700 |
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>
---
target/arm/translate.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 8d6534f9a5..e1c1dbc563 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -9870,18 +9870,14 @@ static void arm_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cpu)
/* nothing more to generate */
break;
case DISAS_WFI:
- {
- TCGv_i32 tmp = tcg_const_i32((dc->thumb &&
- !(dc->insn & (1U << 31))) ? 2 : 4);
-
- gen_helper_wfi(cpu_env, tmp);
- tcg_temp_free_i32(tmp);
- /* The helper doesn't necessarily throw an exception, but we
+ gen_helper_wfi(cpu_env,
+ tcg_constant_i32(dc->base.pc_next - dc->pc_curr));
+ /*
+ * The helper doesn't necessarily throw an exception, but we
* must go back to the main loop to check for interrupts anyway.
*/
tcg_gen_exit_tb(NULL, 0);
break;
- }
case DISAS_WFE:
gen_helper_wfe(cpu_env);
break;
--
2.25.1
- Re: [PATCH v3 18/60] target/arm: Use tcg_constant in translate-m-nocp.c, (continued)
- [PATCH v3 09/60] target/arm: Change CPUArchState.thumb to bool, Richard Henderson, 2022/04/17
- [PATCH v3 19/60] target/arm: Use tcg_constant in translate-neon.c, Richard Henderson, 2022/04/17
- [PATCH v3 16/60] target/arm: Simplify aa32 DISAS_WFI,
Richard Henderson <=
- [PATCH v3 15/60] target/arm: Simplify gen_sar, Richard Henderson, 2022/04/17
- [PATCH v3 07/60] target/arm: Extend store_cpu_offset to take field size, Richard Henderson, 2022/04/17
- [PATCH v3 11/60] target/arm: Split out set_btype_raw, Richard Henderson, 2022/04/17
- [PATCH v3 14/60] target/arm: Simplify GEN_SHIFT in translate.c, Richard Henderson, 2022/04/17