/* If necessary, first collects the instruction up to and including the ModRM byte.  */
void insn_get_sib(struct insn *insn)
/* If necessary, first collects the instruction up to and including the ModRM byte.  */
void insn_get_sib(struct insn *insn)
{
	insn_byte_t modrm;
	if (insn->sib.got)
		return;
	if (!insn->modrm.got)
		insn_get_modrm(insn);
	if (insn->modrm.nbytes) {
		modrm = (insn_byte_t)insn->modrm.value;
		if (insn->addr_bytes != 2 &&
		    X86_MODRM_MOD(modrm) != 3 && X86_MODRM_RM(modrm) == 4) {
			insn->sib.value = get_next(insn_byte_t, insn);
			insn->sib.nbytes = 1;
		}
	}
	insn->sib.got = 1;
}