This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Subreg-byte patches (was: Branching for GCC 3.0)
- To: Jeffrey A Law <law at redhat dot com>
- Subject: Re: Subreg-byte patches (was: Branching for GCC 3.0)
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 9 Jan 2001 12:08:58 -0500
- Cc: Andreas Jaeger <aj at suse dot de>, gcc at gcc dot gnu dot org
- References: <20010109051946.N1120@devserv.devel.redhat.com> <9841.979059094@upchuck>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 09, 2001 at 09:51:34AM -0700, Jeffrey A Law wrote:
>
> In message <20010109051946.N1120@devserv.devel.redhat.com>you write:
> > The major problem SPARC v9 has (there are other architectures with similar
> > problems) with this is that it is a 64bit architecture, thus WORD size is
> > 64bits, but there are still 32bit registers (float SFmode registers), so
> > there were problems in expressing e.g. store of high 32bits of 64bit %f8
> > register) etc. I believe this was the main reason why David Miller and
> > Richard Henderson (somebody else as well?) decided in 1998 that this needs
> > to change.
> But this can also be solved by other means.
I think Richard and DaveM should comment here.
>
> 1. You claim all registers are 64bits wide, including the FP registers.
>
> 2. Obviously you cut the number of FP regs in half
>
>
> The PA has 28 FP registers (%fr4 - %fr31). They are 64bits wide. However,
> we can access either half of the 64bit quantity for storing and operating
> on single precision FP values. For the PA32 port we expose the fact that
> we can address the upper and lower halves of the FP registers.
>
> Not surprisingly we ran into the same problem on the PA64 port as you've
> run into on the sparc64 port. However, we solved it in a completely
> different (and IMHO) much simpler, cleaner way.
SPARC v9 is similar here (well, things are little bit more complicated
because first 16 DFmode registers (%f0 - %f30) can be accessed as 32bit
SFmode halves and the remaining 16 DFmode registers (%f32 - %f62) can be
accessed as DFmode only (plus the architecture allows accessing pairs of
DFmode as TFmode but the instructions working on TFmode are software
emulated).
But this would not work for SPARC v9 ABI, because some values are
specifically passed in even and some values in odd SFmode registers (e.g.
float arguments are passed in %f1, %f3, ... while if passing small structure
containing some floats, they should be passed in the corresponding %fX
register, say struct { float f; int i; int j; float h; }; will be passed
as argument in f = %f0, i = %o0, j = upper 32 bits of %o1, h = %f3 ).
Jakub