disas: arm: QOMify target specific disas setup
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>
Wed, 24 Jun 2015 03:57:35 +0000 (20:57 -0700)
committerAndreas Färber <afaerber@suse.de>
Thu, 9 Jul 2015 13:20:41 +0000 (15:20 +0200)
commit484406200e51eac023b346fdf987f86af1f6fe75
tree13d4d03ac291067f3e688c9352736f5692f76391
parentfb200d5f003118f63205f34bbe553efcf3a66a81
disas: arm: QOMify target specific disas setup

Move the target_disas() ARM specifics to the QOM disas_set_info hook
and delete the ARM specific code in disas.c.

This has the extra advantage of the more fully featured target_disas()
implementation now applying to monitor_disas().

Currently, target_disas() has multi-endian, thumb and AArch64
support whereas the existing monitor_disas() support only has vanilla
AA32 support.

E.G. Running an AA64 linux kernel the following -d in_asm disas happens
(taget_disas()):

IN:
0x0000000040000000:  580000c0      ldr x0, pc+24 (addr 0x40000018)
0x0000000040000004:  aa1f03e1      mov x1, xzr

However before this patch, disasing the same from the monitor:

(qemu) xp/i 0x40000000
0x0000000040000000:  580000c0      stmdapl  r0, {r6, r7}

After this patch:
(qemu) xp/i 0x40000000
0x0000000040000000:  580000c0      ldr x0, pc+24 (addr 0x40000018)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
disas.c
target-arm/cpu.c