[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 46/88] target/hppa: Decode d for cmpb instructions
|
From: |
Richard Henderson |
|
Subject: |
[PATCH v3 46/88] target/hppa: Decode d for cmpb instructions |
|
Date: |
Wed, 1 Nov 2023 18:29:34 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/insns.decode | 9 +++++++--
target/hppa/translate.c | 12 ++++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode
index b185523021..fc327e2bb3 100644
--- a/target/hppa/insns.decode
+++ b/target/hppa/insns.decode
@@ -67,6 +67,7 @@
&rri_cf_d t r i cf d
&rrb_c_f disp n c f r1 r2
+&rrb_c_d_f disp n c d f r1 r2
&rib_c_f disp n c f r i
####
@@ -83,6 +84,8 @@
@rrb_cf ...... r2:5 r1:5 c:3 ........... n:1 . \
&rrb_c_f disp=%assemble_12
+@rrb_cdf ...... r2:5 r1:5 c:3 ........... n:1 . \
+ &rrb_c_d_f disp=%assemble_12
@rib_cf ...... r:5 ..... c:3 ........... n:1 . \
&rib_c_f disp=%assemble_12 i=%im5_16
@@ -296,8 +299,10 @@ 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
-cmpb 100000 ..... ..... ... ........... . . @rrb_cf f=0
-cmpb 100010 ..... ..... ... ........... . . @rrb_cf f=1
+cmpb 100000 ..... ..... ... ........... . . @rrb_cdf d=0 f=0
+cmpb 100010 ..... ..... ... ........... . . @rrb_cdf d=0 f=1
+cmpb 100111 ..... ..... ... ........... . . @rrb_cdf d=1 f=0
+cmpb 101111 ..... ..... ... ........... . . @rrb_cdf d=1 f=1
cmpbi 100001 ..... ..... ... ........... . . @rib_cf f=0
cmpbi 100011 ..... ..... ... ........... . . @rib_cf f=1
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index e326f63866..6cd06fbc0d 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -3091,11 +3091,10 @@ static bool trans_ldo(DisasContext *ctx, arg_ldo *a)
}
static bool do_cmpb(DisasContext *ctx, unsigned r, TCGv_reg in1,
- unsigned c, unsigned f, unsigned n, int disp)
+ unsigned c, unsigned f, bool d, unsigned n, int disp)
{
TCGv_reg dest, in2, sv;
DisasCond cond;
- bool d = false;
in2 = load_gpr(ctx, r);
dest = tcg_temp_new();
@@ -3113,14 +3112,19 @@ static bool do_cmpb(DisasContext *ctx, unsigned r,
TCGv_reg in1,
static bool trans_cmpb(DisasContext *ctx, arg_cmpb *a)
{
+ if (!ctx->is_pa20 && a->d) {
+ return false;
+ }
nullify_over(ctx);
- return do_cmpb(ctx, a->r2, load_gpr(ctx, a->r1), a->c, a->f, a->n,
a->disp);
+ return do_cmpb(ctx, a->r2, load_gpr(ctx, a->r1),
+ a->c, a->f, a->d, a->n, a->disp);
}
static bool trans_cmpbi(DisasContext *ctx, arg_cmpbi *a)
{
nullify_over(ctx);
- return do_cmpb(ctx, a->r, tcg_constant_reg(a->i), a->c, a->f, a->n,
a->disp);
+ return do_cmpb(ctx, a->r, tcg_constant_reg(a->i),
+ a->c, a->f, false, a->n, a->disp);
}
static bool do_addb(DisasContext *ctx, unsigned r, TCGv_reg in1,
--
2.34.1
- [PATCH v3 42/88] target/hppa: Decode d for cmpclr instructions, (continued)
- [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
- [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 <=
- [PATCH v3 50/88] target/hppa: Implement DEPD, DEPDI, Richard Henderson, 2023/11/01
- [PATCH v3 52/88] target/hppa: Implement SHRPD, Richard Henderson, 2023/11/01
- [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