[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 63/70] target/xtensa: Tidy translate_clamps
From: |
Richard Henderson |
Subject: |
[PATCH 63/70] target/xtensa: Tidy translate_clamps |
Date: |
Sun, 26 Feb 2023 19:42:26 -1000 |
All writes to arg[0].out; use tcg_constant_i32.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/xtensa/translate.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index e3fcd50691..d727f9ffd8 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -1514,11 +1514,11 @@ static void translate_callxw(DisasContext *dc, const
OpcodeArg arg[],
static void translate_clamps(DisasContext *dc, const OpcodeArg arg[],
const uint32_t par[])
{
- TCGv_i32 tmp1 = tcg_const_i32(-1u << arg[2].imm);
- TCGv_i32 tmp2 = tcg_const_i32((1 << arg[2].imm) - 1);
+ TCGv_i32 tmp1 = tcg_constant_i32(-1u << arg[2].imm);
+ TCGv_i32 tmp2 = tcg_constant_i32((1 << arg[2].imm) - 1);
- tcg_gen_smax_i32(tmp1, tmp1, arg[1].in);
- tcg_gen_smin_i32(arg[0].out, tmp1, tmp2);
+ tcg_gen_smax_i32(arg[0].out, tmp1, arg[1].in);
+ tcg_gen_smin_i32(arg[0].out, arg[0].out, tmp2);
}
static void translate_clrb_expstate(DisasContext *dc, const OpcodeArg arg[],
--
2.34.1
- [PATCH 52/70] target/sh4: Avoid tcg_const_i32 for TAS.B, (continued)
- [PATCH 52/70] target/sh4: Avoid tcg_const_i32 for TAS.B, Richard Henderson, 2023/02/27
- [PATCH 55/70] target/sparc: Avoid tcg_const_{tl,i32}, 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 58/70] target/tricore: Use min/max for saturate, Richard Henderson, 2023/02/27
- [PATCH 59/70] target/tricore: Use setcondi instead of explicit allocation, Richard Henderson, 2023/02/27
- [PATCH 60/70] target/tricore: Drop some temp initialization, Richard Henderson, 2023/02/27
- [PATCH 57/70] target/tricore: Rename t_off10 and use tcg_constant_i32, Richard Henderson, 2023/02/27
- [PATCH 62/70] target/xtensa: Tidy translate_bb, Richard Henderson, 2023/02/27
- [PATCH 63/70] target/xtensa: Tidy translate_clamps,
Richard Henderson <=
- [PATCH 64/70] target/xtensa: Avoid tcg_const_i32 in translate_l32r, Richard Henderson, 2023/02/27
- [PATCH 65/70] target/xtensa: Use tcg_gen_subfi_i32 in translate_sll, Richard Henderson, 2023/02/27
- [PATCH 61/70] target/tricore: Avoid tcg_const_i32, Richard Henderson, 2023/02/27
- [PATCH 70/70] tcg: Drop tcg_const_*, Richard Henderson, 2023/02/27
- [PATCH 66/70] target/xtensa: Split constant in bit shift, Richard Henderson, 2023/02/27
- [PATCH 68/70] tcg: Replace tcg_const_i64 in tcg-op.c, Richard Henderson, 2023/02/27