Workaround capstone bug for mips64 disassembly (#7632)

* Add asm.cpu=64v2 to support modern mips64
* Enforce 64 bits for 64v2 cpu
This commit is contained in:
Francesco Tamagni 2017-05-30 13:33:40 +02:00 committed by radare
parent 4dd740ebf2
commit edb46a8495

View File

@ -25,9 +25,11 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
mode |= CS_MODE_MIPS3;
// } else if (!strcmp (a->cpu, "gp64")) {
// a->bits = 64;
} else if (!strcmp (a->cpu, "64v2")) {
mode |= CS_MODE_MIPS32 | CS_MODE_MIPS64;
}
}
mode |= (a->bits == 64)? CS_MODE_64: CS_MODE_32;
mode |= (a->bits == 64)? CS_MODE_MIPS64 : CS_MODE_MIPS32;
memset (op, 0, sizeof (RAsmOp));
op->size = 4;
if (cd != 0) {