[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 52/70] target/sh4: Avoid tcg_const_i32 for TAS.B
From: |
Richard Henderson |
Subject: |
[PATCH 52/70] target/sh4: Avoid tcg_const_i32 for TAS.B |
Date: |
Sun, 26 Feb 2023 19:42:15 -1000 |
Since we're assigning to cpu_sr_t in the end,
use that as the intermediate temp as well.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sh4/translate.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index ad6de41712..70a45c26e8 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -1610,12 +1610,9 @@ static void _decode_opc(DisasContext * ctx)
tcg_gen_shri_i32(REG(B11_8), REG(B11_8), 16);
return;
case 0x401b: /* tas.b @Rn */
- {
- TCGv val = tcg_const_i32(0x80);
- tcg_gen_atomic_fetch_or_i32(val, REG(B11_8), val,
- ctx->memidx, MO_UB);
- tcg_gen_setcondi_i32(TCG_COND_EQ, cpu_sr_t, val, 0);
- }
+ tcg_gen_atomic_fetch_or_i32(cpu_sr_t, REG(B11_8),
+ tcg_constant_i32(0x80), ctx->memidx,
MO_UB);
+ tcg_gen_setcondi_i32(TCG_COND_EQ, cpu_sr_t, cpu_sr_t, 0);
return;
case 0xf00d: /* fsts FPUL,FRn - FPSCR: Nothing */
CHECK_FPU_ENABLED
--
2.34.1
- Re: [PATCH 45/70] target/riscv: Avoid tcg_const_*, (continued)
- [PATCH 47/70] target/rx: Use cpu_psw_z as temp in flags computation, Richard Henderson, 2023/02/27
- [PATCH 48/70] target/rx: Avoid tcg_const_i32 when new temp needed, Richard Henderson, 2023/02/27
- [PATCH 46/70] target/rx: Use tcg_gen_abs_i32, Richard Henderson, 2023/02/27
- [PATCH 44/70] target/ppc: Avoid tcg_const_* in translate.c, Richard Henderson, 2023/02/27
- [PATCH 51/70] target/s390x: Avoid tcg_const_i64, Richard Henderson, 2023/02/27
- [PATCH 49/70] target/rx: Avoid tcg_const_i32, Richard Henderson, 2023/02/27
- [PATCH 50/70] target/s390x: Split out gen_ri2, Richard Henderson, 2023/02/27
- [PATCH 53/70] target/sh4: Avoid tcg_const_i32, Richard Henderson, 2023/02/27
- [PATCH 52/70] target/sh4: Avoid tcg_const_i32 for TAS.B,
Richard Henderson <=
- [PATCH 54/70] tcg/sparc: Avoid tcg_const_tl in gen_edge, Richard Henderson, 2023/02/27
- [PATCH 55/70] target/sparc: Avoid tcg_const_{tl,i32}, Richard Henderson, 2023/02/27
- [PATCH 58/70] target/tricore: Use min/max for saturate, Richard Henderson, 2023/02/27
- [PATCH 63/70] target/xtensa: Tidy translate_clamps, Richard Henderson, 2023/02/27
- [PATCH 65/70] target/xtensa: Use tcg_gen_subfi_i32 in translate_sll, Richard Henderson, 2023/02/27
- [PATCH 56/70] target/tricore: Split t_n as constant from temp as variable, Richard Henderson, 2023/02/27
- [PATCH 57/70] target/tricore: Rename t_off10 and use tcg_constant_i32, Richard Henderson, 2023/02/27