This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: subreg vs register_operand
- From: Pierre Mallard <pierremallard at yahoo dot fr>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 13 Sep 2002 11:43:19 +0200 (CEST)
- Subject: Re: subreg vs register_operand
Thanks for your answer.
This works well for the low_part of the reg but the
high_part seems to be working only when I split a HI
reg into 2 QI reg (wich has the size of
UNIT_PER_WORD).
But when I'm trying to split an SI reg into 2 HI regs,
gen_high_part generate an internal compiler error, due
to the test :
if (GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& GET_MODE_SIZE (mode) != GET_MODE_UNIT_SIZE
(GET_MODE (x)))
abort ();
Is gen_high_part the right expression to generate an
HI register, highpart of an SI register, when the
WORD_SIZE is set on QI?
Pierre
ps : when u have in the assembler mnemonics to
different kind of register size (QI and HI) is it
better to define word as having the size of HI?
--- Richard Henderson <rth@redhat.com> a écrit : > On
Thu, Sep 12, 2002 at 10:09:56AM +0200, Pierre
> Mallard wrote:
> > Unrecognizable insn:
> > (insn 357 190 358 (set (subreg:QI (subreg:HI
> (reg:SI 16 r16) 0) 0)
>
> Nested subregs are illegal.
>
> This happened because you did this:
>
> > [(set (subreg:HI (match_dup 0) 0) ...
>
> You should be using gen_lowpart instead of creating
> subregs by yourself.
>
>
> r~
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com