[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 08/65] target/hppa: Truncate rotate count in trans_shrpw_sar
From: |
Richard Henderson |
Subject: |
[PATCH v2 08/65] target/hppa: Truncate rotate count in trans_shrpw_sar |
Date: |
Fri, 20 Oct 2023 13:42:34 -0700 |
When forcing rotate by i32, the shift count must be as well.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/translate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index ff559ed21d..e6ab113a1c 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -3105,8 +3105,11 @@ static bool trans_shrpw_sar(DisasContext *ctx,
arg_shrpw_sar *a)
tcg_gen_shr_reg(dest, dest, cpu_sar);
} else if (a->r1 == a->r2) {
TCGv_i32 t32 = tcg_temp_new_i32();
+ TCGv_i32 s32 = tcg_temp_new_i32();
+
tcg_gen_trunc_reg_i32(t32, load_gpr(ctx, a->r2));
- tcg_gen_rotr_i32(t32, t32, cpu_sar);
+ tcg_gen_trunc_reg_i32(s32, cpu_sar);
+ tcg_gen_rotr_i32(t32, t32, s32);
tcg_gen_extu_i32_reg(dest, t32);
} else {
TCGv_i64 t = tcg_temp_new_i64();
--
2.34.1
- [PATCH v2 00/65] target/hppa: Implement hppa64-cpu, Richard Henderson, 2023/10/20
- [PATCH v2 01/65] tcg: Improve expansion of deposit of constant, Richard Henderson, 2023/10/20
- [PATCH v2 03/65] target/hppa: Remove get_temp, Richard Henderson, 2023/10/20
- [PATCH v2 02/65] tcg: Improve expansion of deposit into a constant, Richard Henderson, 2023/10/20
- [PATCH v2 04/65] target/hppa: Remove get_temp_tl, Richard Henderson, 2023/10/20
- [PATCH v2 10/65] target/hppa: Fix do_add, do_sub for hppa64, Richard Henderson, 2023/10/20
- [PATCH v2 17/65] target/hppa: Update cpu_hppa_get/put_psw for hppa64, Richard Henderson, 2023/10/20
- [PATCH v2 15/65] target/hppa: Implement cpu_list, Richard Henderson, 2023/10/20
- [PATCH v2 18/65] target/hppa: Handle absolute addresses for pa2.0, Richard Henderson, 2023/10/20
- [PATCH v2 07/65] target/hppa: Fix load in do_load_32, Richard Henderson, 2023/10/20
- [PATCH v2 08/65] target/hppa: Truncate rotate count in trans_shrpw_sar,
Richard Henderson <=
- [PATCH v2 09/65] target/hppa: Fix trans_ds for hppa64, Richard Henderson, 2023/10/20
- [PATCH v2 12/65] target/hppa: Fix extrw and depw with sar for hppa64, Richard Henderson, 2023/10/20
- [PATCH v2 19/65] target/hppa: Adjust hppa_cpu_dump_state for hppa64, Richard Henderson, 2023/10/20
- [PATCH v2 25/65] target/hppa: Pass d to do_sed_cond, Richard Henderson, 2023/10/20
- [PATCH v2 27/65] linux-user/hppa: Fixes for TARGET_ABI32, Richard Henderson, 2023/10/20
- [PATCH v2 30/65] target/hppa: Decode d for logical instructions, Richard Henderson, 2023/10/20
- [PATCH v2 28/65] target/hppa: Drop attempted gdbstub support for hppa64, Richard Henderson, 2023/10/20
- [PATCH v2 33/65] target/hppa: Decode d for add instructions, Richard Henderson, 2023/10/20
- [PATCH v2 29/65] target/hppa: Remove TARGET_HPPA64, Richard Henderson, 2023/10/20