From: Greg Ungerer <gerg@uclinux.org>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>, qemu-devel@nongnu.org
Cc: Peter Crosthwaite <crosthwaite.peter@gmail.com>,
afaerber@suse.de, Laurent Vivier <laurent@vivier.eu>
Subject: Re: [Qemu-devel] [PATCH 3/8] disas: m68k: QOMify target specific disas setup
Date: Mon, 13 Jul 2015 13:58:46 +1000 [thread overview]
Message-ID: <55A33776.2060000@uclinux.org> (raw)
In-Reply-To: <5acb4fd7a4bc6a2d3f1abe4eb456403af1704765.1436665556.git.crosthwaite.peter@gmail.com>
On 12/07/15 12:00, Peter Crosthwaite wrote:
> From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
>
> Move the target_disas() m68k specifics to the QOM disas_set_info hook
> and delete the #ifdef specific code in disas.c.
>
> Cc: Greg Ungerer <gerg@uclinux.org>
I see no problems.
Reviewed-by: Greg Ungerer <gerg@uclinux.org>
> Cc: Laurent Vivier <laurent@vivier.eu>
> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
> ---
> Testing:
> I cant find binaries for this arch easily, but I got this from executing
> random code:
>
> $ ./m68k-softmmu/qemu-system-m68k -kernel ./random_code -S -nographic -d in_asm 2> err
> QEMU 2.3.90 monitor - type 'help' for more information
> (qemu) xp 0x40000000
> 0000000040000000: 0x7d413a22
> (qemu) xp/i 0x40000000
> 0x40000000: mvsw %d1,%d6
> (qemu) xp/i 0x40000004
> 0x40000004: addqb #2,%a0@(27614)
> (qemu) c
> (qemu) Aborted (core dumped)
>
> $ more err
> qemu: fatal: Illegal instruction: 7d41 @ 40000000
> ---
> disas.c | 4 ----
> target-m68k/cpu.c | 7 +++++++
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/disas.c b/disas.c
> index 6c86129..91cbb1a 100644
> --- a/disas.c
> +++ b/disas.c
> @@ -243,8 +243,6 @@ void target_disas(FILE *out, CPUState *cpu, target_ulong code,
> }
> s.info.disassembler_options = (char *)"any";
> s.info.print_insn = print_insn_ppc;
> -#elif defined(TARGET_M68K)
> - s.info.print_insn = print_insn_m68k;
> #elif defined(TARGET_MIPS)
> #ifdef TARGET_WORDS_BIGENDIAN
> s.info.print_insn = print_insn_big_mips;
> @@ -463,8 +461,6 @@ void monitor_disas(Monitor *mon, CPUState *cpu,
> s.info.endian = BFD_ENDIAN_LITTLE;
> }
> s.info.print_insn = print_insn_ppc;
> -#elif defined(TARGET_M68K)
> - s.info.print_insn = print_insn_m68k;
> #elif defined(TARGET_MIPS)
> #ifdef TARGET_WORDS_BIGENDIAN
> s.info.print_insn = print_insn_big_mips;
> diff --git a/target-m68k/cpu.c b/target-m68k/cpu.c
> index 4f246da..2555755 100644
> --- a/target-m68k/cpu.c
> +++ b/target-m68k/cpu.c
> @@ -61,6 +61,11 @@ static void m68k_cpu_reset(CPUState *s)
> tlb_flush(s, 1);
> }
>
> +static void m68k_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
> +{
> + info->print_insn = print_insn_m68k;
> +}
> +
> /* CPU models */
>
> static ObjectClass *m68k_cpu_class_by_name(const char *cpu_model)
> @@ -212,6 +217,8 @@ static void m68k_cpu_class_init(ObjectClass *c, void *data)
> dc->vmsd = &vmstate_m68k_cpu;
> cc->gdb_num_core_regs = 18;
> cc->gdb_core_xml_file = "cf-core.xml";
> +
> + cc->disas_set_info = m68k_cpu_disas_set_info;
> }
>
> static void register_cpu_type(const M68kCPUInfo *info)
>
next prev parent reply other threads:[~2015-07-13 3:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-12 1:59 [Qemu-devel] [PATCH 0/8] Disas QOMification, round 2 Peter Crosthwaite
2015-07-12 1:59 ` [Qemu-devel] [PATCH 1/8] disas: s390x: QOMify target specific disas setup Peter Crosthwaite
2015-08-16 2:39 ` Peter Crosthwaite
2015-07-12 1:59 ` [Qemu-devel] [PATCH 2/8] disas: moxie: " Peter Crosthwaite
2015-07-12 2:00 ` [Qemu-devel] [PATCH 3/8] disas: m68k: " Peter Crosthwaite
2015-07-12 8:43 ` Laurent Vivier
2015-07-13 3:58 ` Greg Ungerer [this message]
2015-07-12 2:00 ` [Qemu-devel] [PATCH 4/8] disas: sparc: " Peter Crosthwaite
2015-07-12 2:00 ` [Qemu-devel] [PATCH 5/8] disas: lm32: " Peter Crosthwaite
2015-07-12 10:06 ` Michael Walle
2015-07-12 2:00 ` [Qemu-devel] [PATCH 6/8] disas: sh4: " Peter Crosthwaite
2015-07-14 15:47 ` Aurelien Jarno
2015-07-12 2:00 ` [Qemu-devel] [PATCH 7/8] disas: mips: " Peter Crosthwaite
2015-07-13 16:00 ` Leon Alrae
2015-07-12 2:00 ` [Qemu-devel] [PATCH 8/8] disas: alpha: " Peter Crosthwaite
2015-08-16 2:40 ` Peter Crosthwaite
2015-07-12 12:18 ` [Qemu-devel] [PATCH 0/8] Disas QOMification, round 2 Andreas Färber
2015-08-16 2:38 ` Peter Crosthwaite
2015-08-23 19:22 ` Peter Crosthwaite
2015-08-27 22:47 ` Andreas Färber
2015-08-28 4:20 ` Richard Henderson
2015-08-28 15:46 ` Andreas Färber
2015-08-28 16:02 ` Peter Maydell
2015-08-28 16:19 ` Peter Crosthwaite
2015-08-28 16:22 ` Peter Maydell
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=55A33776.2060000@uclinux.org \
--to=gerg@uclinux.org \
--cc=afaerber@suse.de \
--cc=crosthwaite.peter@gmail.com \
--cc=crosthwaitepeter@gmail.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.