[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/70] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS
From: |
Richard Henderson |
Subject: |
[PATCH 12/70] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS |
Date: |
Sun, 26 Feb 2023 19:41:35 -1000 |
The use of separate data/port variables is existing
practice elsewhere, e.g. SBI, CBI.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/avr/translate.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/target/avr/translate.c b/target/avr/translate.c
index b9506a8d86..190d0c3f97 100644
--- a/target/avr/translate.c
+++ b/target/avr/translate.c
@@ -1288,12 +1288,13 @@ static bool trans_SBRS(DisasContext *ctx, arg_SBRS *a)
*/
static bool trans_SBIC(DisasContext *ctx, arg_SBIC *a)
{
- TCGv temp = tcg_const_i32(a->reg);
+ TCGv data = tcg_temp_new_i32();
+ TCGv port = tcg_constant_i32(a->reg);
- gen_helper_inb(temp, cpu_env, temp);
- tcg_gen_andi_tl(temp, temp, 1 << a->bit);
+ gen_helper_inb(data, cpu_env, port);
+ tcg_gen_andi_tl(data, data, 1 << a->bit);
ctx->skip_cond = TCG_COND_EQ;
- ctx->skip_var0 = temp;
+ ctx->skip_var0 = data;
return true;
}
@@ -1305,12 +1306,13 @@ static bool trans_SBIC(DisasContext *ctx, arg_SBIC *a)
*/
static bool trans_SBIS(DisasContext *ctx, arg_SBIS *a)
{
- TCGv temp = tcg_const_i32(a->reg);
+ TCGv data = tcg_temp_new_i32();
+ TCGv port = tcg_constant_i32(a->reg);
- gen_helper_inb(temp, cpu_env, temp);
- tcg_gen_andi_tl(temp, temp, 1 << a->bit);
+ gen_helper_inb(data, cpu_env, port);
+ tcg_gen_andi_tl(data, data, 1 << a->bit);
ctx->skip_cond = TCG_COND_NE;
- ctx->skip_var0 = temp;
+ ctx->skip_var0 = data;
return true;
}
--
2.34.1
- [PATCH 02/70] target/arm: Handle FPROUNDING_ODD in arm_rmode_to_sf, (continued)
- [PATCH 02/70] target/arm: Handle FPROUNDING_ODD in arm_rmode_to_sf, Richard Henderson, 2023/02/27
- [PATCH 03/70] target/arm: Improve arm_rmode_to_sf, Richard Henderson, 2023/02/27
- [PATCH 04/70] target/arm: Consistently use ARMFPRounding during translation, Richard Henderson, 2023/02/27
- [PATCH 05/70] target/arm: Create gen_set_rmode, gen_restore_rmode, Richard Henderson, 2023/02/27
- [PATCH 07/70] target/arm: Avoid tcg_const_ptr in gen_sve_{ldr,str}, Richard Henderson, 2023/02/27
- [PATCH 06/70] target/arm: Improve trans_BFCI, Richard Henderson, 2023/02/27
- [PATCH 08/70] target/arm: Avoid tcg_const_* in translate-mve.c, Richard Henderson, 2023/02/27
- [PATCH 09/70] target/arm: Avoid tcg_const_ptr in disas_simd_zip_trn, Richard Henderson, 2023/02/27
- [PATCH 10/70] target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn, Richard Henderson, 2023/02/27
- [PATCH 11/70] target/arm: Avoid tcg_const_ptr in handle_rev, Richard Henderson, 2023/02/27
- [PATCH 12/70] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS,
Richard Henderson <=
- [PATCH 13/70] target/avr: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/02/27
- [PATCH 14/70] target/cris: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/02/27
- [PATCH 15/70] target/hexagon: Use tcg_constant_* for gen_constant_from_imm, Richard Henderson, 2023/02/27
- [PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG, Richard Henderson, 2023/02/27
- [PATCH 17/70] target/hexagon/idef-parser: Use gen_tmp for gen_pred_assign, Richard Henderson, 2023/02/27
- [PATCH 18/70] target/hexagon/idef-parser: Use gen_tmp for gen_rvalue_pred, Richard Henderson, 2023/02/27