This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Subreg-byte patches (was: Branching for GCC 3.0)

On Tue, Jan 09, 2001 at 09:51:34AM -0700, Jeffrey A Law wrote:
>   In message <>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
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 ).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]