Bugfix : setting all fields to insns cache (#899)

* Bugfix : setting all fields to insns cache

* Bugfix
Fixing root cause, not setting opcode to 0 in default case

* Not resetting opcode to 0 in this case as well

* Finalizing bugfix
This commit is contained in:
Simorfo 2017-04-21 15:20:17 +02:00 committed by Nguyen Anh Quynh
parent 2bf26fe448
commit f88ef5fe37
1 changed files with 6 additions and 2 deletions

View File

@ -230,7 +230,9 @@ static void translateImmediate(MCInst *mcInst, uint64_t immediate,
case X86_CMPSSrr: NewOpc = X86_CMPSSrr_alt; break;
}
// Switch opcode to the one that doesn't get special printing.
MCInst_setOpcode(mcInst, NewOpc);
if (NewOpc != 0) {
MCInst_setOpcode(mcInst, NewOpc);
}
}
#endif
} else if (type == TYPE_IMM5) {
@ -263,7 +265,9 @@ static void translateImmediate(MCInst *mcInst, uint64_t immediate,
case X86_VCMPSSZrr: NewOpc = X86_VCMPSSZrri_alt; break;
}
// Switch opcode to the one that doesn't get special printing.
MCInst_setOpcode(mcInst, NewOpc);
if (NewOpc != 0) {
MCInst_setOpcode(mcInst, NewOpc);
}
}
#endif
}