[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/85] target/hppa: Fix extrw and depw with sar for hppa64
|
From: |
Richard Henderson |
|
Subject: |
[PULL 16/85] target/hppa: Fix extrw and depw with sar for hppa64 |
|
Date: |
Mon, 6 Nov 2023 19:02:58 -0800 |
These are 32-bit operations regardless of processor.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/translate.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index ffa367b91f..ed88f724ce 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -3230,7 +3230,9 @@ static bool trans_extrw_sar(DisasContext *ctx,
arg_extrw_sar *a)
tmp = tcg_temp_new();
/* Recall that SAR is using big-endian bit numbering. */
- tcg_gen_xori_reg(tmp, cpu_sar, TARGET_REGISTER_BITS - 1);
+ tcg_gen_andi_reg(tmp, cpu_sar, 31);
+ tcg_gen_xori_reg(tmp, tmp, 31);
+
if (a->se) {
tcg_gen_sar_reg(dest, src, tmp);
tcg_gen_sextract_reg(dest, dest, 0, len);
@@ -3355,7 +3357,8 @@ static bool do_depw_sar(DisasContext *ctx, unsigned rt,
unsigned c,
tmp = tcg_temp_new();
/* Convert big-endian bit numbering in SAR to left-shift. */
- tcg_gen_xori_reg(shift, cpu_sar, TARGET_REGISTER_BITS - 1);
+ tcg_gen_andi_reg(shift, cpu_sar, 31);
+ tcg_gen_xori_reg(shift, shift, 31);
mask = tcg_temp_new();
tcg_gen_movi_reg(mask, msb + (msb - 1));
--
2.34.1
- [PULL 08/85] target/hppa: Remove get_temp_tl, (continued)
- [PULL 08/85] target/hppa: Remove get_temp_tl, Richard Henderson, 2023/11/06
- [PULL 13/85] target/hppa: Fix trans_ds for hppa64, Richard Henderson, 2023/11/06
- [PULL 10/85] target/hppa: Fix hppa64 case in machine.c, Richard Henderson, 2023/11/06
- [PULL 15/85] target/hppa: Fix bb_sar for hppa64, Richard Henderson, 2023/11/06
- [PULL 18/85] target/hppa: Make HPPA_BTLB_ENTRIES variable, Richard Henderson, 2023/11/06
- [PULL 11/85] target/hppa: Fix load in do_load_32, Richard Henderson, 2023/11/06
- [PULL 30/85] target/hppa: Pass d to do_cond, Richard Henderson, 2023/11/06
- [PULL 22/85] target/hppa: Handle absolute addresses for pa2.0, Richard Henderson, 2023/11/06
- [PULL 37/85] target/hppa: Remove TARGET_HPPA64, Richard Henderson, 2023/11/06
- [PULL 38/85] target/hppa: Decode d for logical instructions, Richard Henderson, 2023/11/06
- [PULL 16/85] target/hppa: Fix extrw and depw with sar for hppa64,
Richard Henderson <=
- [PULL 17/85] target/hppa: Introduce TYPE_HPPA64_CPU, Richard Henderson, 2023/11/06
- [PULL 06/85] target/hppa: Populate an interval tree with valid tlb entries, Richard Henderson, 2023/11/06
- [PULL 26/85] target/hppa: Always use copy_iaoq_entry to set cpu_iaoq_[fb], Richard Henderson, 2023/11/06
- [PULL 07/85] target/hppa: Remove get_temp, Richard Henderson, 2023/11/06
- [PULL 09/85] target/hppa: Remove load_const, Richard Henderson, 2023/11/06
- [PULL 25/85] target/hppa: Pass DisasContext to copy_iaoq_entry, Richard Henderson, 2023/11/06
- [PULL 19/85] target/hppa: Implement cpu_list, Richard Henderson, 2023/11/06
- [PULL 27/85] target/hppa: Use copy_iaoq_entry for link in do_ibranch, Richard Henderson, 2023/11/06
- [PULL 28/85] target/hppa: Mask inputs in copy_iaoq_entry, Richard Henderson, 2023/11/06
- [PULL 29/85] target/hppa: sar register allows only 5 bits on 32-bit CPU, Richard Henderson, 2023/11/06