sign_extending to values wider than hard registers
d9910490@est.fib.upc.es
d9910490@est.fib.upc.es
Fri May 28 01:16:00 GMT 2004
Hello,
I am quite new in writing .md files and I have got a question about
sign_extending to values wider than hard registers:
Let's imagine I have got a machine where the wider hard registers are HImode.
If I want to use a sign_extend pattern, how would it look like?
I have tried the following one:
(define_insn "extendhisi2"
[(set (subreg:SI (match_operand:HI 0 "register_operand" "=r") 4)
(sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
But it does not work.
Moreover, operands[0] is not the actual register I want to modify, in fact, it
would be the following one (Ex: If operands[0] is R0, I want to modify R1).
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).
Surely I am missing something, but I do not know what :(
Thanks!
Pau Cabre
UPC Barcelona
More information about the Gcc
mailing list