diff mbox series

[09/10] target/sparc: Support Capstone in disas_set_info

Message ID 20170914183516.19537-10-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: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/sparc/cpu.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.13.5
diff mbox series

Patch

diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index 0806d699e6..7eabf410de 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -24,6 +24,7 @@ 
 #include "exec/exec-all.h"
 #include "hw/qdev-properties.h"
 #include "qapi/visitor.h"
+#include "disas/capstone.h"
 
 //#define DEBUG_FEATURES
 
@@ -99,8 +100,10 @@  static bool sparc_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
 static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info)
 {
     info->print_insn = print_insn_sparc;
+    info->cap_arch = CS_ARCH_SPARC;
 #ifdef TARGET_SPARC64
     info->mach = bfd_mach_sparc_v9b;
+    info->cap_mode = CS_MODE_V9;
 #endif
 }