[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 14/88] target/hppa: Truncate rotate count in trans_shrpw_sar
|
From: |
Richard Henderson |
|
Subject: |
[PATCH v3 14/88] target/hppa: Truncate rotate count in trans_shrpw_sar |
|
Date: |
Wed, 1 Nov 2023 18:29:02 -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 20e44ed528..d6ccce020a 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 v3 00/88] target/hppa: Implement hppa64 cpu, Richard Henderson, 2023/11/01
- [PATCH v3 03/88] target/hppa: Use IntervalTreeNode in HPPATLBEntry, Richard Henderson, 2023/11/01
- [PATCH v3 07/88] tcg: Improve expansion of deposit of constant, Richard Henderson, 2023/11/01
- [PATCH v3 10/88] target/hppa: Remove get_temp_tl, Richard Henderson, 2023/11/01
- [PATCH v3 05/88] target/hppa: Split out hppa_flush_tlb_range, Richard Henderson, 2023/11/01
- [PATCH v3 01/88] target/hppa: Include PSW_P in tb flags and mmu index, Richard Henderson, 2023/11/01
- [PATCH v3 02/88] target/hppa: Rename hppa_tlb_entry to HPPATLBEntry, Richard Henderson, 2023/11/01
- [PATCH v3 14/88] target/hppa: Truncate rotate count in trans_shrpw_sar,
Richard Henderson <=
- [PATCH v3 09/88] target/hppa: Remove get_temp, Richard Henderson, 2023/11/01
- [PATCH v3 04/88] target/hppa: Always report one page to tlb_set_page, Richard Henderson, 2023/11/01
- [PATCH v3 18/88] target/hppa: Fix extrw and depw with sar for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 15/88] target/hppa: Fix trans_ds for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 17/88] target/hppa: Fix bb_sar for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 06/88] target/hppa: Populate an interval tree with valid tlb entries, Richard Henderson, 2023/11/01
- [PATCH v3 12/88] target/hppa: Fix hppa64 case in machine.c, Richard Henderson, 2023/11/01
- [PATCH v3 19/88] target/hppa: Introduce TYPE_HPPA64_CPU, Richard Henderson, 2023/11/01
- [PATCH v3 16/88] target/hppa: Fix do_add, do_sub for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 23/88] target/hppa: Update cpu_hppa_get/put_psw for hppa64, Richard Henderson, 2023/11/01