[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 36/61] target/hppa: Decode d for cmpb instructions
|
From: |
Richard Henderson |
|
Subject: |
[PATCH 36/61] target/hppa: Decode d for cmpb instructions |
|
Date: |
Wed, 18 Oct 2023 14:51:10 -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 33da82b7c8..681c955125 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -3070,11 +3070,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();
@@ -3092,14 +3091,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 12/61] target/hppa: Introduce TYPE_HPPA64_CPU, (continued)
- [PATCH 12/61] target/hppa: Introduce TYPE_HPPA64_CPU, Richard Henderson, 2023/10/18
- [PATCH 28/61] target/hppa: Drop attempted gdbstub support for hppa64, Richard Henderson, 2023/10/18
- [PATCH 31/61] target/hppa: Decode d for unit instructions, Richard Henderson, 2023/10/18
- [PATCH 11/61] target/hppa: Fix extrw and depw with sar for hppa64, Richard Henderson, 2023/10/18
- [PATCH 14/61] target/hppa: Implement cpu_list, Richard Henderson, 2023/10/18
- [PATCH 17/61] target/hppa: Handle absolute addresses for pa2.0, Richard Henderson, 2023/10/18
- [PATCH 30/61] target/hppa: Decode d for logical instructions, Richard Henderson, 2023/10/18
- [PATCH 27/61] linux-user/hppa: Fixes for TARGET_ABI32, Richard Henderson, 2023/10/18
- [PATCH 36/61] target/hppa: Decode d for cmpb instructions,
Richard Henderson <=
- [PATCH 38/61] target/hppa: Decode ADDB double-word, Richard Henderson, 2023/10/18
- [PATCH 19/61] hw/hppa: Translate phys addresses for the cpu, Richard Henderson, 2023/10/18
- [PATCH 04/61] target/hppa: Remove load_const, Richard Henderson, 2023/10/18
- [PATCH 20/61] target/hppa: Fix hppa64 addressing, Richard Henderson, 2023/10/18
- [PATCH 25/61] target/hppa: Pass d to do_sed_cond, Richard Henderson, 2023/10/18
- [PATCH 29/61] target/hppa: Remove TARGET_HPPA64, Richard Henderson, 2023/10/18
- [PATCH 34/61] target/hppa: Decode d for sub instructions, Richard Henderson, 2023/10/18
- [PATCH 37/61] target/hppa: Decode CMPIB double-word, Richard Henderson, 2023/10/18
- [PATCH 15/61] target/hppa: Implement hppa_cpu_class_by_name, Richard Henderson, 2023/10/18
- [PATCH 16/61] target/hppa: Update cpu_hppa_get/put_psw for hppa64, Richard Henderson, 2023/10/18