summaryrefslogtreecommitdiffstats
path: root/target-moxie
diff options
context:
space:
mode:
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>2015-07-11 18:59:59 -0700
committerAndreas Färber <afaerber@suse.de>2015-10-22 15:49:40 +0200
commit9f87a4cacd397e82e80c9512627ce5e190dfa971 (patch)
treead14475fbd7f199e62a0b86a6f76c2e44d6719ea /target-moxie
parentdbad6b74b3de6ce839bd870657b6bcc192e3b74a (diff)
downloadhqemu-9f87a4cacd397e82e80c9512627ce5e190dfa971.zip
hqemu-9f87a4cacd397e82e80c9512627ce5e190dfa971.tar.gz
disas: QOMify moxie specific disas setup
Move the target_disas() moxie specifics to the CPUClass::disas_set_info() hook and delete the #ifdef specific code in disas.c. Cc: Anthony Green <green@moxielogic.com> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-moxie')
-rw-r--r--target-moxie/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/target-moxie/cpu.c b/target-moxie/cpu.c
index 3af3779..0c60c65 100644
--- a/target-moxie/cpu.c
+++ b/target-moxie/cpu.c
@@ -48,6 +48,12 @@ static void moxie_cpu_reset(CPUState *s)
tlb_flush(s, 1);
}
+static void moxie_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
+{
+ info->mach = bfd_arch_moxie;
+ info->print_insn = print_insn_moxie;
+}
+
static void moxie_cpu_realizefn(DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
@@ -114,6 +120,7 @@ static void moxie_cpu_class_init(ObjectClass *oc, void *data)
cc->get_phys_page_debug = moxie_cpu_get_phys_page_debug;
cc->vmsd = &vmstate_moxie_cpu;
#endif
+ cc->disas_set_info = moxie_cpu_disas_set_info;
/*
* Reason: moxie_cpu_initfn() calls cpu_exec_init(), which saves
OpenPOWER on IntegriCloud