This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] New style SUBREGs, PLEASE PLEASE testme
- To: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Subject: Re: [PATCH] New style SUBREGs, PLEASE PLEASE testme
- From: Bill Currie <bcurrie at tssc dot co dot nz>
- Date: Tue, 06 Oct 1998 11:06:58 +1300
- CC: egcs-patches at cygnus dot com
- Organization: NZ Telecommunication Systems Support Centre
- References: <199810040417.VAA21748@dm.cobaltmicro.com>
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