core/x86/instr.c
/* Use basereg==REG_NULL to get default (xdi, or xsi for upcontext) 
 * Auto-magically picks the mem opnd size to match reg if it's a GPR.
 */
Use basereg==REG_NULL to get default (xdi, or xsi for upcontext)
Auto-magically picks the mem opnd size to match reg if it's a GPR.
Use basereg == REG_NULL to get default ( xdi or xsi for upcontext ) Auto - magically picks the mem opnd size to match reg if it ' s a GPR .
instr_t *
instr_create_save_to_dc_via_reg(dcontext_t *dcontext, reg_id_t basereg,
                                reg_id_t reg, int offs)
{
    if (reg_is_xmm(reg) || reg_is_mmx(reg)) {
        opnd_t memopnd = opnd_create_dcontext_field_via_reg(dcontext, basereg, offs);
        return INSTR_CREATE_movd(dcontext, memopnd, opnd_create_reg(reg));
    } else {
        opnd_t memopnd = opnd_create_dcontext_field_via_reg_sz
            (dcontext, basereg, offs, reg_get_size(reg));
        return INSTR_CREATE_mov_st(dcontext, memopnd, opnd_create_reg(reg));
    }
}
instr_t * instr_create_save_to_dc_via_reg ( dcontext_t * dcontext , reg_id_t basereg , reg_id_t reg , int offs ) { if ( reg_is_xmm ( reg ) || reg_is_mmx ( reg ) ) { opnd_t memopnd = opnd_create_dcontext_field_via_reg ( dcontext , basereg , offs ) ; return INSTR_CREATE_movd ( dcontext , memopnd , opnd_create_reg ( reg ) ) ; } else { opnd_t memopnd = opnd_create_dcontext_field_via_reg_sz ( dcontext , basereg , offs , reg_get_size ( reg ) ) ; return INSTR_CREATE_mov_st ( dcontext , memopnd , opnd_create_reg ( reg ) ) ; } }
Use basereg==REG_NULL to get default (xdi, or xsi for upcontext)
 Auto-magically picks the mem opnd size to match reg if it's a GPR.
Use basereg == REG_NULL to get default ( xdi or xsi for upcontext ) Auto - magically picks the mem opnd size to match reg if it ' s a GPR .
/* use movd for xmm/mmx, and OPSZ_PTR */