x86: MOV32ms should reference word rather than dword. bug reported by Gabriel Quadros

This commit is contained in:
Nguyen Anh Quynh 2014-12-04 23:12:38 +07:00
parent 8ab01369d7
commit ba31f26d5d

View File

@ -82,13 +82,21 @@ static void printi16mem(MCInst *MI, unsigned OpNo, SStream *O)
static void printi32mem(MCInst *MI, unsigned OpNo, SStream *O)
{
if (MI->Opcode == X86_BOUNDS32rm) {
SStream_concat0(O, "qword ptr ");
MI->x86opsize = 8;
} else {
SStream_concat0(O, "dword ptr ");
MI->x86opsize = 4;
switch(MI->Opcode) {
default:
SStream_concat0(O, "dword ptr ");
MI->x86opsize = 4;
break;
case X86_BOUNDS32rm:
SStream_concat0(O, "qword ptr ");
MI->x86opsize = 8;
break;
case X86_MOV32ms:
SStream_concat0(O, "word ptr ");
MI->x86opsize = 2;
break;
}
printMemReference(MI, OpNo, O);
}