[PATCH] New style SUBREGs, PLEASE PLEASE testme

Bill Currie bcurrie@tssc.co.nz
Mon Oct 5 15:08:00 GMT 1998


David S. Miller wrote:
> SUBREG_WORD is now SUBREG_BYTE, and you'll see the expected
> differences in the RTL the compiler generates.  For MEM subregs, all
> of the endianness offset computations, both at the word and byte
> level, are done _at_ SUBREG creation time.  When this is changed back
> to a normal MEM reference the SUBREG_BYTE has the offset to use in the
> final address.  No further corrections for big endian are needed.
> 
> In any place where you need the final hard regno a subreg will use,
> use subreg_hard_regno(subreg_rtx) or SUBREG_REGNO (subreg_rtx) to get
> that.  Both give the same answer, but use the former to have many
> assertions on subregs checked.  The idea is that I'll remove or
> simplify the function version once testing proves this new code stable
> on all platforms.
> 
> If you just want the register number offset, use SUBREG_REGNO_OFFSET.
> Both of these must be given a hard register, it will abort if you do
> not.

What does this imply for mixed endian chips such as the i860 in
big-endian mode (ie mem big-endian, regs little-endian)?  Will your
changes make it easier, harder, or indifferent?

Bill
-- 
Leave others their otherness



More information about the Gcc-patches mailing list