[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 40/88] target/hppa: Decode d for logical instructions
From: |
Richard Henderson |
Subject: |
[PATCH v3 40/88] target/hppa: Decode d for logical instructions |
Date: |
Wed, 1 Nov 2023 18:29:28 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/insns.decode | 10 ++++++----
target/hppa/translate.c | 15 +++++++--------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode
index aebe03ccfd..26ca9f1063 100644
--- a/target/hppa/insns.decode
+++ b/target/hppa/insns.decode
@@ -61,6 +61,7 @@
&rr_cf t r cf
&rrr_cf t r1 r2 cf
+&rrr_cf_d t r1 r2 cf d
&rrr_cf_sh t r1 r2 cf sh
&rri_cf t r i cf
@@ -73,6 +74,7 @@
@rr_cf ...... r:5 ..... cf:4 ....... t:5 &rr_cf
@rrr_cf ...... r2:5 r1:5 cf:4 ....... t:5 &rrr_cf
+@rrr_cf_d ...... r2:5 r1:5 cf:4 ...... d:1 t:5 &rrr_cf_d
@rrr_cf_sh ...... r2:5 r1:5 cf:4 .... sh:2 . t:5 &rrr_cf_sh
@rrr_cf_sh0 ...... r2:5 r1:5 cf:4 ....... t:5 &rrr_cf_sh sh=0
@rri_cf ...... r:5 t:5 cf:4 . ........... &rri_cf i=%lowsign_11
@@ -150,10 +152,10 @@ lci 000001 ----- ----- -- 01001100 0 t:5
# Arith/Log
####
-andcm 000010 ..... ..... .... 000000 - ..... @rrr_cf
-and 000010 ..... ..... .... 001000 - ..... @rrr_cf
-or 000010 ..... ..... .... 001001 - ..... @rrr_cf
-xor 000010 ..... ..... .... 001010 0 ..... @rrr_cf
+andcm 000010 ..... ..... .... 000000 . ..... @rrr_cf_d
+and 000010 ..... ..... .... 001000 . ..... @rrr_cf_d
+or 000010 ..... ..... .... 001001 . ..... @rrr_cf_d
+xor 000010 ..... ..... .... 001010 . ..... @rrr_cf_d
uxor 000010 ..... ..... .... 001110 0 ..... @rrr_cf
ds 000010 ..... ..... .... 010001 0 ..... @rrr_cf
cmpclr 000010 ..... ..... .... 100010 0 ..... @rrr_cf
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 187d47f4c3..227d59b263 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -1405,11 +1405,10 @@ static void do_cmpclr(DisasContext *ctx, unsigned rt,
TCGv_reg in1,
}
static void do_log(DisasContext *ctx, unsigned rt, TCGv_reg in1,
- TCGv_reg in2, unsigned cf,
+ TCGv_reg in2, unsigned cf, bool d,
void (*fn)(TCGv_reg, TCGv_reg, TCGv_reg))
{
TCGv_reg dest = dest_gpr(ctx, rt);
- bool d = false;
/* Perform the operation, and writeback. */
fn(dest, in1, in2);
@@ -1422,7 +1421,7 @@ static void do_log(DisasContext *ctx, unsigned rt,
TCGv_reg in1,
}
}
-static bool do_log_reg(DisasContext *ctx, arg_rrr_cf *a,
+static bool do_log_reg(DisasContext *ctx, arg_rrr_cf_d *a,
void (*fn)(TCGv_reg, TCGv_reg, TCGv_reg))
{
TCGv_reg tcg_r1, tcg_r2;
@@ -1432,7 +1431,7 @@ static bool do_log_reg(DisasContext *ctx, arg_rrr_cf *a,
}
tcg_r1 = load_gpr(ctx, a->r1);
tcg_r2 = load_gpr(ctx, a->r2);
- do_log(ctx, a->t, tcg_r1, tcg_r2, a->cf, fn);
+ do_log(ctx, a->t, tcg_r1, tcg_r2, a->cf, a->d, fn);
return nullify_end(ctx);
}
@@ -2693,17 +2692,17 @@ static bool trans_sub_b_tsv(DisasContext *ctx,
arg_rrr_cf *a)
return do_sub_reg(ctx, a, true, true, false);
}
-static bool trans_andcm(DisasContext *ctx, arg_rrr_cf *a)
+static bool trans_andcm(DisasContext *ctx, arg_rrr_cf_d *a)
{
return do_log_reg(ctx, a, tcg_gen_andc_reg);
}
-static bool trans_and(DisasContext *ctx, arg_rrr_cf *a)
+static bool trans_and(DisasContext *ctx, arg_rrr_cf_d *a)
{
return do_log_reg(ctx, a, tcg_gen_and_reg);
}
-static bool trans_or(DisasContext *ctx, arg_rrr_cf *a)
+static bool trans_or(DisasContext *ctx, arg_rrr_cf_d *a)
{
if (a->cf == 0) {
unsigned r2 = a->r2;
@@ -2755,7 +2754,7 @@ static bool trans_or(DisasContext *ctx, arg_rrr_cf *a)
return do_log_reg(ctx, a, tcg_gen_or_reg);
}
-static bool trans_xor(DisasContext *ctx, arg_rrr_cf *a)
+static bool trans_xor(DisasContext *ctx, arg_rrr_cf_d *a)
{
return do_log_reg(ctx, a, tcg_gen_xor_reg);
}
--
2.34.1
- [PATCH v3 08/88] tcg: Improve expansion of deposit into a constant, (continued)
- [PATCH v3 08/88] tcg: Improve expansion of deposit into a constant, Richard Henderson, 2023/11/01
- [PATCH v3 20/88] target/hppa: Make HPPA_BTLB_ENTRIES variable, Richard Henderson, 2023/11/01
- [PATCH v3 27/88] target/hppa: Pass DisasContext to copy_iaoq_entry, Richard Henderson, 2023/11/01
- [PATCH v3 28/88] target/hppa: Always use copy_iaoq_entry to set cpu_iaoq_[fb], Richard Henderson, 2023/11/01
- [PATCH v3 32/88] target/hppa: Pass d to do_cond, Richard Henderson, 2023/11/01
- [PATCH v3 37/88] linux-user/hppa: Fixes for TARGET_ABI32, Richard Henderson, 2023/11/01
- [PATCH v3 35/88] target/hppa: Pass d to do_sed_cond, Richard Henderson, 2023/11/01
- [PATCH v3 36/88] target/hppa: Pass d to do_unit_cond, Richard Henderson, 2023/11/01
- [PATCH v3 38/88] target/hppa: Drop attempted gdbstub support for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 39/88] target/hppa: Remove TARGET_HPPA64, Richard Henderson, 2023/11/01
- [PATCH v3 40/88] target/hppa: Decode d for logical instructions,
Richard Henderson <=
- [PATCH v3 41/88] target/hppa: Decode d for unit instructions, Richard Henderson, 2023/11/01
- [PATCH v3 43/88] target/hppa: Decode d for add instructions, Richard Henderson, 2023/11/01
- [PATCH v3 42/88] target/hppa: Decode d for cmpclr instructions, Richard Henderson, 2023/11/01
- [PATCH v3 44/88] target/hppa: Decode d for sub instructions, Richard Henderson, 2023/11/01
- [PATCH v3 49/88] target/hppa: Implement LDD, LDCD, LDDA, STD, STDA, Richard Henderson, 2023/11/01
- [PATCH v3 51/88] target/hppa: Implement EXTRD, Richard Henderson, 2023/11/01
- [PATCH v3 57/88] target/hppa: Remove TARGET_REGISTER_BITS, Richard Henderson, 2023/11/01
- [PATCH v3 55/88] target/hppa: Implement IDTLBT, IITLBT, Richard Henderson, 2023/11/01
- [PATCH v3 69/88] target/hppa: Implement PERMH, Richard Henderson, 2023/11/01
- [PATCH v3 71/88] target/hppa: Precompute zero into DisasContext, Richard Henderson, 2023/11/01