This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: (subreg:SF (reg:SC)) question - 20020227-1.c failure
- From: Michael Matz <matz at suse dot de>
- To: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 3 May 2003 22:29:34 +0200 (CEST)
- Subject: Re: (subreg:SF (reg:SC)) question - 20020227-1.c failure
Hi,
On Sat, 3 May 2003, Ulrich Weigand wrote:
> Michael Matz wrote:
>
> > So, is it possible for s390x to store a complete SCmode value into _one_
> > register (also into float regs)?
>
> We can store a SCmode value either in one general register, or else
> in two floating point registers (that would be preferred).
See why I dislike the use of word_size to differentiate between the two
cases for writes to subregs? The real destinction is based on which
registers are needed to implement subregs, and if the "next" subreg is
placed into a different register. Of course you can't know, as long as
pseudos are involved, that's why we have this definition based on
word_size, which creates more than one problem on 64 bit machines.
> I guess we could enforce the use of two general registers as well
> (even though not strictly necessary), if that helps things. But
> that wouldn't change the flow.c test either.
No. The test in flow would need to use the number of registers, instead
of using wordsize. But that would be an involved change I think (and
contrary to what currently would be documented).
> If we do indeed need to use strict_low_part, it would appear the
> whole handling of complex values needs to be reworked ...
I don't doubt that.
> > If OTOH you need two registers for SCmode, the code was correct (and the
> > subreg would be limited to one of the two regs). In that case the
> > condition in flow.c would be wrong.
>
> That would contradict the documentation Geoff has pointed out.
Yes, sort of. It would contradict the docu, but not the _intent_ why we
made writes to subregs clobber parts outside the subreg. I have no good
small solution, except using strict_low_part. A quick look in expr.c
makes me believe that wrapping the (few) uses of gen_{real,imag}part with
gen_rtx_STRICT_LOW_PART if needed should not be too difficult.
Ciao,
Michael.