This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
sign_extending to values wider than hard registers
- From: d9910490 at est dot fib dot upc dot es
- To: gcc at gcc dot gnu dot org
- Date: Fri, 28 May 2004 03:16:25 +0200
- Subject: sign_extending to values wider than hard registers
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