x86: improve EIZ check

This commit is contained in:
Nguyen Anh Quynh 2019-04-16 23:55:18 +08:00
parent f9da22b59e
commit cb8e1d14b0
2 changed files with 2 additions and 2 deletions

View File

@ -766,7 +766,7 @@ static void printMemReference(MCInst *MI, unsigned Op, SStream *O)
if (MCOperand_getReg(BaseReg))
_printOperand(MI, Op + X86_AddrBaseReg, O);
if (MCOperand_getReg(IndexReg) != X86_EIZ) {
if (MCOperand_getReg(IndexReg) && MCOperand_getReg(IndexReg) != X86_EIZ) {
SStream_concat0(O, ", ");
_printOperand(MI, Op + X86_AddrIndexReg, O);
ScaleVal = MCOperand_getImm(MCInst_getOperand(MI, Op + X86_AddrScaleAmt));

View File

@ -976,7 +976,7 @@ static void printMemReference(MCInst *MI, unsigned Op, SStream *O)
NeedPlus = true;
}
if (MCOperand_getReg(IndexReg) != X86_EIZ) {
if (MCOperand_getReg(IndexReg) && MCOperand_getReg(IndexReg) != X86_EIZ) {
if (NeedPlus) SStream_concat0(O, " + ");
_printOperand(MI, Op + X86_AddrIndexReg, O);
if (ScaleVal != 1)