core/x86/instr.c
/* shrinks all 32-bit registers in opnd to 16 bits.  also shrinks the size of
 * immed ints and mem refs from OPSZ_4 to OPSZ_2.
 */
shrinks all 32-bit registers in opnd to 16 bits.  also shrinks the size of
immed ints and mem refs from OPSZ_4 to OPSZ_2.
shrinks all 32 - bit registers in opnd to 16 bits . also shrinks the size of immed ints and mem refs from OPSZ_4 to OPSZ_2 .
opnd_t
opnd_shrink_to_16_bits(opnd_t opnd)
{
    int i;
    for (i=0; i<opnd_num_regs_used(opnd); i++) {
        reg_id_t reg = opnd_get_reg_used(opnd, i);
        if (reg >= REG_START_32 && reg <= REG_STOP_32) {
            opnd_replace_reg(&opnd, reg, reg_32_to_16(reg));
        }
    }
    if ((opnd_is_immed_int(opnd) || opnd_is_memory_reference(opnd)) &&
        opnd_get_size(opnd) == OPSZ_4)
        opnd_set_size(&opnd, OPSZ_2);
    return opnd;
}
opnd_t opnd_shrink_to_16_bits ( opnd_t opnd ) { int i ; for ( i = 0 ; i < opnd_num_regs_used ( opnd ) ; i ++ ) { reg_id_t reg = opnd_get_reg_used ( opnd , i ) ; if ( reg >= REG_START_32 && reg <= REG_STOP_32 ) { opnd_replace_reg ( & opnd , reg , reg_32_to_16 ( reg ) ) ; } } if ( ( opnd_is_immed_int ( opnd ) || opnd_is_memory_reference ( opnd ) ) && opnd_get_size ( opnd ) == OPSZ_4 ) opnd_set_size ( & opnd , OPSZ_2 ) ; return opnd ; }
shrinks all 32-bit registers in opnd to 16 bits.
shrinks all 32 - bit registers in opnd to 16 bits .