mips: update doing_mem status, regardless of detail option, since that is also used to avoid printing zero offset in mem reference

This commit is contained in:
Nguyen Anh Quynh 2013-12-15 22:05:01 +08:00
parent 3d5930f39e
commit 4626224a33
1 changed files with 2 additions and 1 deletions

View File

@ -86,10 +86,11 @@ static void printInstruction(MCInst *MI, SStream *O);
static bool doing_mem = false;
static void set_mem_access(MCInst *MI, bool status)
{
doing_mem = status;
if (MI->detail != CS_OPT_ON)
return;
doing_mem = status;
if (doing_mem) {
MI->pub_insn.mips.operands[MI->pub_insn.mips.op_count].type = MIPS_OP_MEM;
MI->pub_insn.mips.operands[MI->pub_insn.mips.op_count].mem.base = MIPS_REG_INVALID;