x86: fix movw instruction in #789

This commit is contained in:
Nguyen Anh Quynh 2016-11-08 10:56:18 +08:00
parent bda181a6b5
commit 10bafd3bab
3 changed files with 9 additions and 6 deletions

View File

@ -803,7 +803,7 @@ static void printMemReference(MCInst *MI, unsigned Op, SStream *O)
}
}
} else {
SStream_concat0(O, "0");
//SStream_concat0(O, "0");
}
}

View File

@ -19239,12 +19239,15 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
uint64_t Bits = (Bits2 << 32) | Bits1;
// printf("Opcode ID = %u\n", opcode);
// assert(Bits != 0 && "Cannot print this instruction.");
if (!X86_lockrep(MI, O))
if (!X86_lockrep(MI, O)) {
#ifndef CAPSTONE_DIET
SStream_concat0(O, AsmStrs+(Bits & 16383)-1);
#else
;
// HACK TODO
if (opcode == X86_MOV32sm) {
SStream_concat0(O, "movw\t");
} else
SStream_concat0(O, AsmStrs+(Bits & 16383)-1);
#endif
}
// Fragment 0 encoded into 7 bits for 102 unique commands.

View File

@ -24,7 +24,7 @@ else
endif
clean:
${RM} -rf *.o cstool
${RM} -rf *.o $(TARGET)
%.o: %.c
ifeq ($(V),0)