Re: How do I expand a move immediate into two RTL expressions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Tabony, Charles" <ctabony@xxxxxxxxxxxx> writes:

>       emit_move_insn(gen_rtx_SUBREG(HImode, operands[0], 2),
>                      GEN_INT((INTVAL(operands[1]) >> 16) & 0xFFFF));
>       emit_move_insn(gen_rtx_SUBREG(HImode, operands[0], 0),
>                      GEN_INT(INTVAL(operands[1]) & 0xFFFF));

Integer constants in sub UNITS_PER_WORD modes should normally be sign
extended.  Use
    trunc_int_for_mode (INTVAL (operands[1]) >> 16, HImode)
and similarly for the other operand.

Incidentally, this kind of question may be better asked on
gcc@xxxxxxxxxxx, although there is nothing wrong with using gcc-help.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux