aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-02-26 12:58:20 -1000
committerRichard Henderson <richard.henderson@linaro.org>2023-03-05 13:47:01 -0800
commitbc0264752d1ddc4f1a4b034a38883d3bbb03f2af (patch)
treea20e25783c732470b55bc2211a1c60e98d7d229e
parent37d7328e4a159f1c1f3fc16d4a47e0ac22b509b2 (diff)
target/xtensa: Tidy translate_clamps
All writes to arg[0].out; use tcg_constant_i32. Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--target/xtensa/translate.c8
1 files 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[],