From 48b6cb4ce5c023412c2be1c236e6479354d5272e Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sun, 1 Jun 2014 09:45:19 +0700 Subject: [PATCH] arm: CC_AL is the default code condition for instructions without CC. bug reported by Daniel Colascione --- arch/ARM/ARMInstPrinter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/ARM/ARMInstPrinter.c b/arch/ARM/ARMInstPrinter.c index 2d18c91e..1310e77a 100644 --- a/arch/ARM/ARMInstPrinter.c +++ b/arch/ARM/ARMInstPrinter.c @@ -264,6 +264,12 @@ void ARM_post_printer(csh ud, cs_insn *insn, char *insn_asm, MCInst *mci) } } } + + // instruction should not have invalid CC + if (insn->detail->arm.cc == ARM_CC_INVALID) { + insn->detail->arm.cc = ARM_CC_AL; + } + } void ARM_printInst(MCInst *MI, SStream *O, void *Info)