Words endian is different in registers than in memory
Andrew Haley
aph@redhat.com
Wed Feb 26 17:06:00 GMT 2003
=?ISO-8859-1?Q?Anders=5F=C5dland?= writes:
> Hi
>
> I am porting GCC to a new architecture and have one problem when defining
> WORDS_BIG_ENDIAN because "GCC fundamentally assumes that the order of
> words in memory is the same as the order in registers." In my case it
> should be defined as 0 when working with memory and 1 when working with
> registers.
I think you're saying that Register 0 is the high word of R0:R1, but
memory has little endian words, with the low word first, so you want
to store R0 in a higher address than R1. Could you swap the register
names so that gcc's internal register zero maps on to real hardware
register 1, and vice versa? You'd have something like REG:SI 0 r1 and
REG:SI 1 r0.
Andrew.
More information about the Gcc
mailing list