From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, qemu-s390x <qemu-s390x@nongnu.org>,
Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH 2/3] capstone: Enable disassembly for s390x
Date: Sat, 4 Jan 2020 12:26:49 +0100 [thread overview]
Message-ID: <ef288915-88cf-c498-3dc8-6c26d5817567@redhat.com> (raw)
In-Reply-To: <20200103212500.14384-3-richard.henderson@linaro.org>
On 1/3/20 10:24 PM, Richard Henderson wrote:
> Enable s390x, aka SYSZ, in the git submodule build.
> Set the capstone parameters for both s390x host and guest.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
I'm fine with this patch because I don't use the s390 disas often.
For the S390 experts, my previous analysis is here:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg667954.html
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> Makefile | 1 +
> disas.c | 3 +++
> target/s390x/cpu.c | 4 ++++
> 3 files changed, 8 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 12e129ac9d..df1c692ccd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -504,6 +504,7 @@ CAP_CFLAGS += -DCAPSTONE_USE_SYS_DYN_MEM
> CAP_CFLAGS += -DCAPSTONE_HAS_ARM
> CAP_CFLAGS += -DCAPSTONE_HAS_ARM64
> CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC
> +CAP_CFLAGS += -DCAPSTONE_HAS_SYSZ
> CAP_CFLAGS += -DCAPSTONE_HAS_X86
>
> .PHONY: capstone/all
> diff --git a/disas.c b/disas.c
> index 3937da6157..845c40fca8 100644
> --- a/disas.c
> +++ b/disas.c
> @@ -660,6 +660,9 @@ void disas(FILE *out, void *code, unsigned long size)
> print_insn = print_insn_m68k;
> #elif defined(__s390__)
> print_insn = print_insn_s390;
> + s.info.cap_arch = CS_ARCH_SYSZ;
> + s.info.cap_insn_unit = 2;
> + s.info.cap_insn_split = 6;
> #elif defined(__hppa__)
> print_insn = print_insn_hppa;
> #endif
> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
> index 625daeedd1..1734ad9c3a 100644
> --- a/target/s390x/cpu.c
> +++ b/target/s390x/cpu.c
> @@ -43,6 +43,7 @@
> #include "sysemu/tcg.h"
> #endif
> #include "fpu/softfloat-helpers.h"
> +#include "disas/capstone.h"
>
> #define CR0_RESET 0xE0UL
> #define CR14_RESET 0xC2000000UL;
> @@ -162,6 +163,9 @@ static void s390_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
> {
> info->mach = bfd_mach_s390_64;
> info->print_insn = print_insn_s390;
> + info->cap_arch = CS_ARCH_SYSZ;
> + info->cap_insn_unit = 2;
> + info->cap_insn_split = 6;
> }
>
> static void s390_cpu_realizefn(DeviceState *dev, Error **errp)
>
next prev parent reply other threads:[~2020-01-04 11:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 21:24 [PATCH 0/3] capstone: update to next Richard Henderson
2020-01-03 21:24 ` [PATCH 1/3] capstone: Update " Richard Henderson
2020-01-04 11:23 ` Philippe Mathieu-Daudé
2020-01-03 21:24 ` [PATCH 2/3] capstone: Enable disassembly for s390x Richard Henderson
2020-01-04 11:26 ` Philippe Mathieu-Daudé [this message]
2020-01-03 21:25 ` [PATCH 3/3] capstone: Add skipdata hook " Richard Henderson
2020-01-04 11:27 ` Philippe Mathieu-Daudé
2020-01-03 21:34 ` [PATCH 0/3] capstone: update to next no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef288915-88cf-c498-3dc8-6c26d5817567@redhat.com \
--to=philmd@redhat.com \
--cc=david@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).