[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 66/70] target/xtensa: Split constant in bit shift
From: |
Richard Henderson |
Subject: |
[PATCH 66/70] target/xtensa: Split constant in bit shift |
Date: |
Sun, 26 Feb 2023 19:42:29 -1000 |
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 2903c73f8e..f906ba7ed5 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -2047,8 +2047,8 @@ static uint32_t test_exceptions_retw(DisasContext *dc,
const OpcodeArg arg[],
static void translate_retw(DisasContext *dc, const OpcodeArg arg[],
const uint32_t par[])
{
- TCGv_i32 tmp = tcg_const_i32(1);
- tcg_gen_shl_i32(tmp, tmp, cpu_SR[WINDOW_BASE]);
+ TCGv_i32 tmp = tcg_temp_new();
+ tcg_gen_shl_i32(tmp, tcg_constant_i32(1), cpu_SR[WINDOW_BASE]);
tcg_gen_andc_i32(cpu_SR[WINDOW_START],
cpu_SR[WINDOW_START], tmp);
tcg_gen_movi_i32(tmp, dc->pc);
@@ -2080,10 +2080,10 @@ static void translate_rfi(DisasContext *dc, const
OpcodeArg arg[],
static void translate_rfw(DisasContext *dc, const OpcodeArg arg[],
const uint32_t par[])
{
- TCGv_i32 tmp = tcg_const_i32(1);
+ TCGv_i32 tmp = tcg_temp_new();
tcg_gen_andi_i32(cpu_SR[PS], cpu_SR[PS], ~PS_EXCM);
- tcg_gen_shl_i32(tmp, tmp, cpu_SR[WINDOW_BASE]);
+ tcg_gen_shl_i32(tmp, tcg_constant_i32(1), cpu_SR[WINDOW_BASE]);
if (par[0]) {
tcg_gen_andc_i32(cpu_SR[WINDOW_START],
--
2.34.1
- Re: [PATCH 63/70] target/xtensa: Tidy translate_clamps, (continued)
- [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
- [PATCH 59/70] target/tricore: Use setcondi instead of explicit allocation, Richard Henderson, 2023/02/27
- [PATCH 61/70] target/tricore: Avoid tcg_const_i32, Richard Henderson, 2023/02/27
- [PATCH 60/70] target/tricore: Drop some temp initialization, Richard Henderson, 2023/02/27
- [PATCH 64/70] target/xtensa: Avoid tcg_const_i32 in translate_l32r, Richard Henderson, 2023/02/27
- [PATCH 66/70] target/xtensa: Split constant in bit shift,
Richard Henderson <=
- [PATCH 62/70] target/xtensa: Tidy translate_bb, Richard Henderson, 2023/02/27
- [PATCH 67/70] target/xtensa: Avoid tcg_const_i32, Richard Henderson, 2023/02/27
- [PATCH 68/70] tcg: Replace tcg_const_i64 in tcg-op.c, Richard Henderson, 2023/02/27
- [PATCH 69/70] tcg: Drop tcg_const_*_vec, Richard Henderson, 2023/02/27
- [PATCH 70/70] tcg: Drop tcg_const_*, Richard Henderson, 2023/02/27