diff mbox series

[07/10] target/ppc: Support Capstone in disas_set_info

Message ID 20170914183516.19537-8-richard.henderson@linaro.org
State New
Headers show
Series Support the Capstone disassembler | expand

Commit Message

Richard Henderson Sept. 14, 2017, 6:35 p.m. UTC
Cc: qemu-ppc@nongnu.org
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/ppc/translate_init.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.13.5
diff mbox series

Patch

diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c
index c7b4a7c02a..b976784d21 100644
--- a/target/ppc/translate_init.c
+++ b/target/ppc/translate_init.c
@@ -35,6 +35,7 @@ 
 #include "mmu-book3s-v3.h"
 #include "sysemu/qtest.h"
 #include "qemu/cutils.h"
+#include "disas/capstone.h"
 
 //#define PPC_DUMP_CPU
 //#define PPC_DEBUG_SPR
@@ -10662,6 +10663,11 @@  static void ppc_disas_set_info(CPUState *cs, disassemble_info *info)
     }
     info->disassembler_options = (char *)"any";
     info->print_insn = print_insn_ppc;
+
+    info->cap_arch = CS_ARCH_PPC;
+#ifdef TARGET_PPC64
+    info->cap_mode = CS_MODE_64;
+#endif
 }
 
 static Property ppc_cpu_properties[] = {