aboutsummaryrefslogtreecommitdiff
path: root/disas.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2017-09-14 10:38:40 -0700
committerRichard Henderson <richard.henderson@linaro.org>2017-10-25 11:55:21 +0200
commitac226899db15c5751f5b1f4f42ea4b31a3d360e0 (patch)
tree781b174834f0298b7ef4f9d3de26eeaf723afec0 /disas.c
parent110f6c703bb6d99419196c3c5e369880c994d0bd (diff)
ppc: Support Capstone in disas_set_info
Cc: qemu-ppc@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'disas.c')
-rw-r--r--disas.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/disas.c b/disas.c
index 8d9bd4901c..e52e776a60 100644
--- a/disas.c
+++ b/disas.c
@@ -448,6 +448,10 @@ void disas(FILE *out, void *code, unsigned long size)
#elif defined(_ARCH_PPC)
s.info.disassembler_options = (char *)"any";
print_insn = print_insn_ppc;
+ s.info.cap_arch = CS_ARCH_PPC;
+# ifdef _ARCH_PPC64
+ s.info.cap_mode = CS_MODE_64;
+# endif
#elif defined(__aarch64__) && defined(CONFIG_ARM_A64_DIS)
print_insn = print_insn_arm_a64;
s.info.cap_arch = CS_ARCH_ARM64;