sign_extending to values wider than hard registers
Jim Wilson
wilson@specifixinc.com
Tue Jun 1 06:59:00 GMT 2004
d9910490@est.fib.upc.es wrote:
> (define_insn "extendhisi2"
> [(set (subreg:SI (match_operand:HI 0 "register_operand" "=r") 4)
> (sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
Don't use subregs like that. Just (match_opreand:SI 0 ...).
> I am worried about that, because when expanding a value placed in R0 (for
> instance), then gcc assumes that R1 has the sign_extension (which is false,
> because nobody has put it there).
It is your responsibility to emit assembler code for the extendhisi2
pattern that puts the sign_extension bits in R1.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list