Little-endian YDL?

Robert Sanders yellowdog-general@lists.terrasoftsolutions.com
Fri Nov 21 07:01:02 2003


>On Nov 20, 2003, at 7:46 PM, Chris Gehlker wrote:
>
>
>Example: on a LE processor, if you store the 32-bit number 
>0x01020304 to address 0, memory looks like this:
>
>mem[0] = 0x04
>mem[1] = 0x03
>mem[2] = 0x02
>mem[3] = 0x01
>
>On a PPC with the LE bit set, you get instead:
>
>mem[0] = (Not changed)
>mem[1] = (Not changed)
>mem[2] = (Not changed)
>mem[3] = (Not changed)
>mem[4] = 0x01
>mem[5] = 0x02
>mem[6] = 0x03
>mem[7] = 0x04
>
>No, I'm not making this up.  Really.  Honest!  Look in the PPC spec 
>for the full details if you don't believe me.  You probably will not 
>believe such a horrible hack ever made it into a CPU architecture 
>definition.  (In fact, you probably won't believe it actually works.)
>


Egads!  I think my 'yeesh' from a previous reply wasn't strong 
enough.  So the PPC in LE mode is going to take
a 32bit number, drop it into the space of a 64 bit (disregarding the 
'high' bits) in BE mode, *access* the bytes
in reverse from the high end of the BE 64 bit space?!