[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/65] target/hppa: Fix extrw and depw with sar for hppa64
|
From: |
Richard Henderson |
|
Subject: |
[PATCH v2 12/65] target/hppa: Fix extrw and depw with sar for hppa64 |
|
Date: |
Fri, 20 Oct 2023 13:42:38 -0700 |
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 119422870c..f86ea9b9ca 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
- [PATCH v2 03/65] target/hppa: Remove get_temp, (continued)
- [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, 2023/10/20
- [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 <=
- [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
- [PATCH v2 06/65] target/hppa: Fix hppa64 case in machine.c, Richard Henderson, 2023/10/20
- [PATCH v2 05/65] target/hppa: Remove load_const, Richard Henderson, 2023/10/20