fix setting writeback for post index memory accesses

This commit is contained in:
David Callahan 2015-05-10 16:39:15 -07:00
parent c42effd51c
commit 63547c70d4

View File

@ -1379,8 +1379,15 @@ void AArch64_post_printer(csh handle, cs_insn *flat_insn, char *insn_asm, MCInst
return;
// check if this insn requests write-back
if (strrchr(insn_asm, '!') != NULL)
if (strrchr(insn_asm, '!') != NULL) {
flat_insn->detail->arm64.writeback = true;
} else {
// check for post-index ... [reg], #offset
const char * lb = strrchr(insn_asm, ']');
if (lb != NULL && lb[1] == ',') {
flat_insn->detail->arm64.writeback = true;
}
}
}
#endif