GNIDA.mediana.get_mod_type_sib C# (CSharp) Method

get_mod_type_sib() static private method

static private get_mod_type_sib ( INSTRUCTION &instr, int op_index ) : void
instr INSTRUCTION
op_index int
return void
        static void get_mod_type_sib(ref INSTRUCTION instr, int op_index)
        {
            if (instr.ops[op_index].value.addr.index == REG_CODE_SP)
            {
            get_mod_type_modrm(ref instr, op_index);
            }
            else
            {
            if (instr.ops[op_index].value.addr.mod == 0)
            {
            if ((instr.ops[op_index].value.addr.bas == REG_CODE_BP) || (instr.ops[op_index].value.addr.bas == REG_CODE_R13))
            {
                instr.ops[op_index].value.addr.mod = (byte)(ADDR_MOD_IDX | ADDR_MOD_DISP);
            }
            else
            {
                instr.ops[op_index].value.addr.mod = (byte)(ADDR_MOD_BASE | ADDR_MOD_IDX);
            }
            }
            else
            {
            instr.ops[op_index].value.addr.mod = (byte)(ADDR_MOD_BASE | ADDR_MOD_IDX | ADDR_MOD_DISP);
            }
            }
        }