This is the mail archive of the gcc@gcc.gnu.org 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]
Other format: [Raw text]

Re: subreg_regno_offset


   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.


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