[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 39/67] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS
From: |
Richard Henderson |
Subject: |
[PULL 39/67] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS |
Date: |
Tue, 7 Mar 2023 09:58:20 -0800 |
The use of separate data/port variables is existing
practice elsewhere, e.g. SBI, CBI.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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
- [PULL 19/67] target/avr: Remove `NB_MMU_MODES` define, (continued)
- [PULL 19/67] target/avr: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 26/67] target/microblaze: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 29/67] target/openrisc: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 34/67] target/sh4: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 37/67] target/xtensa: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 35/67] target/sparc: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 33/67] target/s390x: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 38/67] include/exec: Remove guards around `NB_MMU_MODES`, Richard Henderson, 2023/03/07
- [PULL 32/67] target/rx: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 36/67] target/tricore: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 39/67] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS,
Richard Henderson <=
- [PULL 31/67] target/riscv: Remove `NB_MMU_MODES` define, Richard Henderson, 2023/03/07
- [PULL 40/67] target/avr: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/03/07
- [PULL 41/67] target/cris: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/03/07
- [PULL 43/67] target/hppa: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/03/07
- [PULL 42/67] target/hppa: Avoid tcg_const_i64 in trans_fid_f, Richard Henderson, 2023/03/07
- [PULL 45/67] target/m68k: Avoid tcg_const_i32 when modified, Richard Henderson, 2023/03/07
- [PULL 44/67] target/i386: Avoid use of tcg_const_* throughout, Richard Henderson, 2023/03/07
- [PULL 46/67] target/m68k: Avoid tcg_const_i32 in bfop_reg, Richard Henderson, 2023/03/07
- [PULL 48/67] target/mips: Split out gen_lxl, Richard Henderson, 2023/03/07
- [PULL 49/67] target/mips: Split out gen_lxr, Richard Henderson, 2023/03/07