mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-27 15:30:33 +00:00
x86: improve EIZ check
This commit is contained in:
parent
f9da22b59e
commit
cb8e1d14b0
@ -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));
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user