[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 45/88] target/hppa: Decode d for bb instructions
From: |
Richard Henderson |
Subject: |
[PATCH v3 45/88] target/hppa: Decode d for bb instructions |
Date: |
Wed, 1 Nov 2023 18:29:33 -0700 |
Manipulate the shift count so that the bit to be tested
is always placed at the MSB.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/insns.decode | 4 ++--
target/hppa/translate.c | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode
index ad454adcbb..b185523021 100644
--- a/target/hppa/insns.decode
+++ b/target/hppa/insns.decode
@@ -290,8 +290,8 @@ fmpysub_d 100110 ..... ..... ..... ..... 1 .....
@mpyadd
# Conditional Branches
####
-bb_sar 110000 00000 r:5 c:1 10 ........... n:1 . disp=%assemble_12
-bb_imm 110001 p:5 r:5 c:1 10 ........... n:1 . disp=%assemble_12
+bb_sar 110000 00000 r:5 c:1 1 d:1 ........... n:1 . disp=%assemble_12
+bb_imm 110001 p:5 r:5 c:1 1 d:1 ........... n:1 . disp=%assemble_12
movb 110010 ..... ..... ... ........... . . @rrb_cf f=0
movbi 110011 ..... ..... ... ........... . . @rib_cf f=0
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index f2b2933c88..e326f63866 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -3172,13 +3172,12 @@ static bool trans_bb_sar(DisasContext *ctx, arg_bb_sar
*a)
{
TCGv_reg tmp, tcg_r;
DisasCond cond;
- bool d = false;
nullify_over(ctx);
tmp = tcg_temp_new();
tcg_r = load_gpr(ctx, a->r);
- if (cond_need_ext(ctx, d)) {
+ if (cond_need_ext(ctx, a->d)) {
/* Force shift into [32,63] */
tcg_gen_ori_reg(tmp, cpu_sar, 32);
tcg_gen_shl_reg(tmp, tcg_r, tmp);
@@ -3194,14 +3193,13 @@ static bool trans_bb_imm(DisasContext *ctx, arg_bb_imm
*a)
{
TCGv_reg tmp, tcg_r;
DisasCond cond;
- bool d = false;
int p;
nullify_over(ctx);
tmp = tcg_temp_new();
tcg_r = load_gpr(ctx, a->r);
- p = a->p | (cond_need_ext(ctx, d) ? 32 : 0);
+ p = a->p | (cond_need_ext(ctx, a->d) ? 32 : 0);
tcg_gen_shli_reg(tmp, tcg_r, p);
cond = cond_make_0(a->c ? TCG_COND_GE : TCG_COND_LT, tmp);
--
2.34.1
- [PATCH v3 53/88] target/hppa: Implement CLRBTS, POPBTS, PUSHBTS, PUSHNOM, (continued)
- [PATCH v3 53/88] target/hppa: Implement CLRBTS, POPBTS, PUSHBTS, PUSHNOM, Richard Henderson, 2023/11/01
- [PATCH v3 54/88] target/hppa: Implement STDBY, Richard Henderson, 2023/11/01
- [PATCH v3 60/88] target/hppa: Adjust vmstate_env for pa2.0 tlb, Richard Henderson, 2023/11/01
- [PATCH v3 73/88] include/hw/elf: Remove truncating signed casts, Richard Henderson, 2023/11/01
- [PATCH v3 61/88] target/hppa: Use tcg_temp_new_i64 not tcg_temp_new, Richard Henderson, 2023/11/01
- [PATCH v3 77/88] target/hppa: Add pa2.0 cpu local tlb flushes, Richard Henderson, 2023/11/01
- [PATCH v3 65/88] target/hppa: Implement HAVG, Richard Henderson, 2023/11/01
- [PATCH v3 62/88] target/hppa: Replace tcg_gen_*_tl with tcg_gen_*_i64, Richard Henderson, 2023/11/01
- [PATCH v3 67/88] target/hppa: Implement HSHLADD, HSHRADD, Richard Henderson, 2023/11/01
- [PATCH v3 75/88] linux-user/hppa: Drop EXCP_DUMP from handled exceptions, Richard Henderson, 2023/11/01
- [PATCH v3 45/88] target/hppa: Decode d for bb instructions,
Richard Henderson <=
- [PATCH v3 78/88] target/hppa: Avoid async_safe_run_on_cpu on uniprocessor system, Richard Henderson, 2023/11/01
- [PATCH v3 74/88] hw/hppa: Translate phys addresses for the cpu, Richard Henderson, 2023/11/01
- [PATCH v3 70/88] target/hppa: Fix interruption based on default PSW, Richard Henderson, 2023/11/01
- [PATCH v3 56/88] hw/hppa: Use uint32_t instead of target_ureg, Richard Henderson, 2023/11/01
- [PATCH v3 58/88] target/hppa: Remove most of the TARGET_REGISTER_BITS redirections, Richard Henderson, 2023/11/01
- [PATCH v3 72/88] target/hppa: Return zero for r0 from load_gpr, Richard Henderson, 2023/11/01
- [PATCH v3 79/88] target/hppa: Clear upper bits in mtctl for pa1.x, Richard Henderson, 2023/11/01
- [PATCH v3 66/88] target/hppa: Implement HSHL, HSHR, Richard Henderson, 2023/11/01
- [PATCH v3 76/88] target/hppa: Implement pa2.0 data prefetch instructions, Richard Henderson, 2023/11/01
- [PATCH v3 63/88] target/hppa: Implement HADD, Richard Henderson, 2023/11/01