This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: subreg_regno_offset
- From: "David S. Miller" <davem at redhat dot com>
- To: joern dot rennecke at superh dot com
- Cc: shebs at apple dot com, dberlin at dberlin dot org, dhazeghi at pacbell dot net, neil at daikokuya dot demon dot co dot uk, ak at suse dot de, gcc at gcc dot gnu dot org
- Date: Tue, 21 May 2002 15:25:19 -0700 (PDT)
- Subject: Re: subreg_regno_offset
- References: <3CEAAC32.A2D69FB0@superh.com>
From: Joern Rennecke <joern.rennecke@superh.com>
Date: Tue, 21 May 2002 21:21:06 +0100
I think it is better to have a simple default definition for
subreg_regno_offset - e.g., just return what is currently calculated
as ymode (of course you can use a run-time generated lookup table to
speed that up). Any target that does not fit into that scheme can
then define its own version.
With the lookup table, the vanilla version can even be made to fit
targets where single precision values are held in double-precision
registers, by looping for each mode through MODE_WIDER_MODE and using
the size of the largest mode that occupies the same number of hard
registers.
I don't know, I'd really like to keep this code generic and just
made the generic code more intelligent and faster.
For example, note that when we are creating SUBREG expressions it
would be easy to compute the register offset and store it in the
SUBREG itself. Then SUBREG_REGNO_OFFSET and SUBREG_REGNO could be
just as cheap as SUBREG_REG.