[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 42/88] target/hppa: Decode d for cmpclr instructions
|
From: |
Richard Henderson |
|
Subject: |
[PATCH v3 42/88] target/hppa: Decode d for cmpclr instructions |
|
Date: |
Wed, 1 Nov 2023 18:29:30 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/insns.decode | 6 ++++--
target/hppa/translate.c | 11 +++++------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode
index 03b1a11cac..d4a03b0299 100644
--- a/target/hppa/insns.decode
+++ b/target/hppa/insns.decode
@@ -64,6 +64,7 @@
&rrr_cf_d t r1 r2 cf d
&rrr_cf_sh t r1 r2 cf sh
&rri_cf t r i cf
+&rri_cf_d t r i cf d
&rrb_c_f disp n c f r1 r2
&rib_c_f disp n c f r i
@@ -78,6 +79,7 @@
@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
+@rri_cf_d ...... r:5 t:5 cf:4 d:1 ........... &rri_cf_d i=%lowsign_11
@rrb_cf ...... r2:5 r1:5 c:3 ........... n:1 . \
&rrb_c_f disp=%assemble_12
@@ -158,7 +160,7 @@ or 000010 ..... ..... .... 001001 . .....
@rrr_cf_d
xor 000010 ..... ..... .... 001010 . ..... @rrr_cf_d
uxor 000010 ..... ..... .... 001110 . ..... @rrr_cf_d
ds 000010 ..... ..... .... 010001 0 ..... @rrr_cf
-cmpclr 000010 ..... ..... .... 100010 0 ..... @rrr_cf
+cmpclr 000010 ..... ..... .... 100010 . ..... @rrr_cf_d
uaddcm 000010 ..... ..... .... 100110 . ..... @rrr_cf_d
uaddcm_tc 000010 ..... ..... .... 100111 . ..... @rrr_cf_d
dcor 000010 ..... 00000 .... 101110 . ..... @rr_cf_d
@@ -189,7 +191,7 @@ addi_tc_tsv 101100 ..... ..... .... 1 ...........
@rri_cf
subi 100101 ..... ..... .... 0 ........... @rri_cf
subi_tsv 100101 ..... ..... .... 1 ........... @rri_cf
-cmpiclr 100100 ..... ..... .... 0 ........... @rri_cf
+cmpiclr 100100 ..... ..... .... . ........... @rri_cf_d
####
# Index Mem
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index a0785bb32c..8301d007ff 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -1377,11 +1377,10 @@ static bool do_sub_imm(DisasContext *ctx, arg_rri_cf
*a, bool is_tsv)
}
static void do_cmpclr(DisasContext *ctx, unsigned rt, TCGv_reg in1,
- TCGv_reg in2, unsigned cf)
+ TCGv_reg in2, unsigned cf, bool d)
{
TCGv_reg dest, sv;
DisasCond cond;
- bool d = false;
dest = tcg_temp_new();
tcg_gen_sub_reg(dest, in1, in2);
@@ -2758,7 +2757,7 @@ static bool trans_xor(DisasContext *ctx, arg_rrr_cf_d *a)
return do_log_reg(ctx, a, tcg_gen_xor_reg);
}
-static bool trans_cmpclr(DisasContext *ctx, arg_rrr_cf *a)
+static bool trans_cmpclr(DisasContext *ctx, arg_rrr_cf_d *a)
{
TCGv_reg tcg_r1, tcg_r2;
@@ -2767,7 +2766,7 @@ static bool trans_cmpclr(DisasContext *ctx, arg_rrr_cf *a)
}
tcg_r1 = load_gpr(ctx, a->r1);
tcg_r2 = load_gpr(ctx, a->r2);
- do_cmpclr(ctx, a->t, tcg_r1, tcg_r2, a->cf);
+ do_cmpclr(ctx, a->t, tcg_r1, tcg_r2, a->cf, a->d);
return nullify_end(ctx);
}
@@ -2925,7 +2924,7 @@ static bool trans_subi_tsv(DisasContext *ctx, arg_rri_cf
*a)
return do_sub_imm(ctx, a, true);
}
-static bool trans_cmpiclr(DisasContext *ctx, arg_rri_cf *a)
+static bool trans_cmpiclr(DisasContext *ctx, arg_rri_cf_d *a)
{
TCGv_reg tcg_im, tcg_r2;
@@ -2935,7 +2934,7 @@ static bool trans_cmpiclr(DisasContext *ctx, arg_rri_cf
*a)
tcg_im = tcg_constant_reg(a->i);
tcg_r2 = load_gpr(ctx, a->r);
- do_cmpclr(ctx, a->t, tcg_im, tcg_r2, a->cf);
+ do_cmpclr(ctx, a->t, tcg_im, tcg_r2, a->cf, a->d);
return nullify_end(ctx);
}
--
2.34.1
- [PATCH v3 28/88] target/hppa: Always use copy_iaoq_entry to set cpu_iaoq_[fb], (continued)
- [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, 2023/11/01
- [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 <=
- [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
- [PATCH v3 59/88] target/hppa: Remove remaining TARGET_REGISTER_BITS redirections, Richard Henderson, 2023/11/01
- [PATCH v3 64/88] target/hppa: Implement HSUB, Richard Henderson, 2023/11/01
- [PATCH v3 46/88] target/hppa: Decode d for cmpb instructions, Richard Henderson, 2023/11/01