Set Size appropriately in operand definitions and query it for dumping memory
operand size table getMemOperandSize (follow-up use D126116) and
X86Disassembler::getMemOperandSize.
Excerpt from a produced getMemOperandSize table for X86:
static int getMemOperandSize(int OpType) { switch (OpType) { default: return 0; case OpTypes::i8mem: case OpTypes::i8mem_NOREX: return 8; case OpTypes::f16mem: case OpTypes::i16mem: return 16; case OpTypes::f32mem: case OpTypes::i32mem: return 32; ...
Could you also simply the function getMemOperandSize in X86RecognizableInstr.cpp in this patch? You can return value of Size now.