diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-02-25 12:38:14 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-03-13 06:44:37 -0700 |
commit | 353c18dc02a7470f7edde915cd49a59753066bbe (patch) | |
tree | 33e57e2dd8c78da5217c5ddc9520481242a08bbd /target/avr | |
parent | 00da6b49a227607c7235a1e7db6ebaf1ae44e139 (diff) | |
download | qemu-353c18dc02a7470f7edde915cd49a59753066bbe.zip qemu-353c18dc02a7470f7edde915cd49a59753066bbe.tar.gz qemu-353c18dc02a7470f7edde915cd49a59753066bbe.tar.bz2 |
target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS
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>
Diffstat (limited to 'target/avr')
-rw-r--r-- | target/avr/translate.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/target/avr/translate.c b/target/avr/translate.c index b9506a8..190d0c3 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; } |