[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 54/70] tcg/sparc: Avoid tcg_const_tl in gen_edge
From: |
Richard Henderson |
Subject: |
[PATCH 54/70] tcg/sparc: Avoid tcg_const_tl in gen_edge |
Date: |
Sun, 26 Feb 2023 19:42:17 -1000 |
Push tcg_constant_tl into the shift argument directly.
Since t1 no longer exists as a temp, replace with lo1,
whose last use was just above.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/translate.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 814f3f8b1e..925023adef 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -2842,7 +2842,7 @@ static inline void gen_load_trap_state_at_tl(TCGv_ptr
r_tsptr, TCGv_env cpu_env)
static void gen_edge(DisasContext *dc, TCGv dst, TCGv s1, TCGv s2,
int width, bool cc, bool left)
{
- TCGv lo1, lo2, t1, t2;
+ TCGv lo1, lo2;
uint64_t amask, tabl, tabr;
int shift, imask, omask;
@@ -2909,10 +2909,8 @@ static void gen_edge(DisasContext *dc, TCGv dst, TCGv
s1, TCGv s2,
tcg_gen_shli_tl(lo1, lo1, shift);
tcg_gen_shli_tl(lo2, lo2, shift);
- t1 = tcg_const_tl(tabl);
- t2 = tcg_const_tl(tabr);
- tcg_gen_shr_tl(lo1, t1, lo1);
- tcg_gen_shr_tl(lo2, t2, lo2);
+ tcg_gen_shr_tl(lo1, tcg_constant_tl(tabl), lo1);
+ tcg_gen_shr_tl(lo2, tcg_constant_tl(tabr), lo2);
tcg_gen_andi_tl(dst, lo1, omask);
tcg_gen_andi_tl(lo2, lo2, omask);
@@ -2931,9 +2929,9 @@ static void gen_edge(DisasContext *dc, TCGv dst, TCGv s1,
TCGv s2,
lo2 |= -(s1 == s2)
dst &= lo2
*/
- tcg_gen_setcond_tl(TCG_COND_EQ, t1, s1, s2);
- tcg_gen_neg_tl(t1, t1);
- tcg_gen_or_tl(lo2, lo2, t1);
+ tcg_gen_setcond_tl(TCG_COND_EQ, lo1, s1, s2);
+ tcg_gen_neg_tl(lo1, lo1);
+ tcg_gen_or_tl(lo2, lo2, lo1);
tcg_gen_and_tl(dst, dst, lo2);
}
--
2.34.1
- [PATCH 45/70] target/riscv: Avoid tcg_const_*, (continued)
- [PATCH 45/70] target/riscv: Avoid tcg_const_*, Richard Henderson, 2023/02/27
- [PATCH 51/70] target/s390x: Avoid tcg_const_i64, Richard Henderson, 2023/02/27
- [PATCH 46/70] target/rx: Use tcg_gen_abs_i32, Richard Henderson, 2023/02/27
- [PATCH 47/70] target/rx: Use cpu_psw_z as temp in flags computation, Richard Henderson, 2023/02/27
- [PATCH 52/70] target/sh4: Avoid tcg_const_i32 for TAS.B, Richard Henderson, 2023/02/27
- [PATCH 48/70] target/rx: Avoid tcg_const_i32 when new temp needed, 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 54/70] tcg/sparc: Avoid tcg_const_tl in gen_edge,
Richard Henderson <=
- [PATCH 56/70] target/tricore: Split t_n as constant from temp as variable, Richard Henderson, 2023/02/27
- [PATCH 53/70] target/sh4: Avoid tcg_const_i32, Richard Henderson, 2023/02/27
- [PATCH 57/70] target/tricore: Rename t_off10 and use tcg_constant_i32, Richard Henderson, 2023/02/27
- [PATCH 58/70] target/tricore: Use min/max for saturate, Richard Henderson, 2023/02/27
- [PATCH 55/70] target/sparc: Avoid tcg_const_{tl,i32}, Richard Henderson, 2023/02/27
- [PATCH 64/70] target/xtensa: Avoid tcg_const_i32 in translate_l32r, Richard Henderson, 2023/02/27
- [PATCH 60/70] target/tricore: Drop some temp initialization, Richard Henderson, 2023/02/27
- [PATCH 59/70] target/tricore: Use setcondi instead of explicit allocation, Richard Henderson, 2023/02/27