All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] disas: Unify target_disas and monitor_disas
@ 2015-05-05  4:44 Peter Crosthwaite
  2015-05-05  4:44 ` [Qemu-devel] [PATCH 1/7] disas: Create factored out fn for monitor and target disas Peter Crosthwaite
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Peter Crosthwaite @ 2015-05-05  4:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, claudio.fontana, Peter Crosthwaite, agraf, edgari,
	edgar.iglesias, rth

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2015-05-06 18:39 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05  4:44 [Qemu-devel] [PATCH 0/7] disas: Unify target_disas and monitor_disas Peter Crosthwaite
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

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.