static byte parse_modrm_sib(long offset, ref INSTRUCTION instr, OPCODE_DESCRIPTOR opcode)
{
byte len = 0;
if ((opcode.props & PROP_MODRM)!=0)
{
len++;
instr.flags |= INSTR_FLAG_MODRM;
//instr.modrm = *offset;
instr.modrm = assembly.Image.ReadBytes(offset, 1)[0];
if (instr.addrsize != ADDR_SIZE_16)
{
if ((instr.modrm & 0x7) == 0x4 && (instr.modrm & 0xC0) != 0xC0)
{
len++;
instr.flags |= INSTR_FLAG_SIB;
//instr.sib = offset[1];
instr.sib = instr.modrm = assembly.Image.ReadBytes(offset, 2)[1];
}
}
}
return len;
}