From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, claudio.fontana@gmail.com,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
agraf@suse.de, edgari@xilinx.com, edgar.iglesias@gmail.com,
rth@twiddle.net
Subject: [Qemu-devel] [PATCH 0/7] disas: Unify target_disas and monitor_disas
Date: Mon, 4 May 2015 21:44:57 -0700 [thread overview]
Message-ID: <cover.1430798763.git.crosthwaite.peter@gmail.com> (raw)
There two functions are mostly trying to do the same thing, which is
disassemble a target instruction (sequence) for printfing. The
architecture specific setup is largely duped between the two functions.
Most architectures are carbon copy and can be factored out without
issue (P1). Three architectures (microblaze, cris and ARM) are patched
to make the monitor_disas consistent with target_disas.
Microblaze is trivial, the target_disas setup is directly applicable
to monitor_disas to bring in microblaze monitor disas support (P2).
Cris had a small hiccup, a patch is needed to handle monitor_disas's
0 buffer length (P3). Then cris is patched to enable monitor disas
in same way as microblaze (P4).
ARM is the harder. The vixl A64 disas was hardcoded to fprintf with
a statically inited output stream (matching target_disas). The vixl
printfery is patched to be runtime variable (P5). ARM is also missing
setting of the disas flags from monitor.c. Fixed in (P6). P7 bring
ARM monitor disassembly online (via unification as target_disas
implementation).
Two architectures remain unresolved. PPC has some diffs
between target_disas and monitor_disas. Alpha looks easier, but I have
no test case (can anyone link me a random elf or kernel? Doesn't need
to do anything meaningful other than enter execution of instructions).
Alpha sets the BFD for target_disas but not monitor_disas? Should it
just always set the BFD? That is this:
s.info.mach = bfd_mach_alpha_ev6;
PPC sets the disassembler_options to "any" but only for target_disas.
s.info.disassembler_options = (char *)"any";
Can/should this be applied to monitor disas to remove the diff?
Regards,
Peter
Peter Crosthwaite (7):
disas: Create factored out fn for monitor and target disas
disas: microblaze: Migrate setup to common code
disas: cris: Fix 0 buffer length case
disas: cris: Migrate setup to common code
disas: arm-a64: Make printfer and stream variable
monitor: "i": Add ARM specifics
disas: arm: Use target_disas impl for monitor
disas.c | 202 ++++++++++++++++++++++++-------------------------------
disas/arm-a64.cc | 22 ++++--
disas/cris.c | 6 +-
monitor.c | 11 +++
4 files changed, 118 insertions(+), 123 deletions(-)
--
1.9.1
next reply other threads:[~2015-05-05 4:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 4:44 Peter Crosthwaite [this message]
2015-05-05 4:44 ` [Qemu-devel] [PATCH 1/7] disas: Create factored out fn for monitor and target disas Peter Crosthwaite
2015-05-05 14:45 ` Claudio Fontana
2015-05-05 4:44 ` [Qemu-devel] [PATCH 2/7] disas: microblaze: Migrate setup to common code Peter Crosthwaite
2015-05-05 4:45 ` [Qemu-devel] [PATCH 3/7] disas: cris: Fix 0 buffer length case Peter Crosthwaite
2015-05-05 4:45 ` [Qemu-devel] [PATCH 4/7] disas: cris: Migrate setup to common code Peter Crosthwaite
2015-05-05 4:45 ` [Qemu-devel] [PATCH 5/7] disas: arm-a64: Make printfer and stream variable Peter Crosthwaite
2015-05-05 14:41 ` Claudio Fontana
2015-05-05 17:22 ` Richard Henderson
2015-05-05 4:45 ` [Qemu-devel] [PATCH 6/7] monitor: "i": Add ARM specifics Peter Crosthwaite
2015-05-05 14:40 ` Claudio Fontana
2015-05-05 17:19 ` Peter Maydell
2015-05-05 17:43 ` Richard Henderson
2015-05-06 6:57 ` Peter Crosthwaite
2015-05-06 13:57 ` Richard Henderson
2015-05-06 7:06 ` Peter Crosthwaite
2015-05-06 14:12 ` Richard Henderson
2015-05-06 14:17 ` Paolo Bonzini
2015-05-06 14:32 ` Stefano Stabellini
2015-05-06 15:44 ` Peter Maydell
2015-05-06 18:24 ` Richard Henderson
2015-05-06 18:39 ` Peter Maydell
2015-05-05 4:45 ` [Qemu-devel] [PATCH 7/7] disas: arm: Use target_disas impl for monitor Peter Crosthwaite
2015-05-05 14:38 ` Claudio Fontana
2015-05-05 16:48 ` Peter Crosthwaite
2015-05-05 17:18 ` [Qemu-devel] [PATCH 0/7] disas: Unify target_disas and monitor_disas Richard Henderson
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=cover.1430798763.git.crosthwaite.peter@gmail.com \
--to=crosthwaitepeter@gmail.com \
--cc=agraf@suse.de \
--cc=claudio.fontana@gmail.com \
--cc=crosthwaite.peter@gmail.com \
--cc=edgar.iglesias@gmail.com \
--cc=edgari@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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.