ppc LE questions (seeking help hand info pointers)

Timothy A. Seufert tas at mindspring.com
Sun Sep 23 06:26:58 EST 2001


At 4:23 PM +0200 9/22/01, Holger Bettag wrote:
>"Albert D. Cahalan" <acahalan at cs.uml.edu> writes:
>
>[...]
>>  Now do an unconditional 64-bit byte swap on the motherboard.
>>  Consider an array of four __u16 values affected by this.
>>  They get converted from big-endian to little-endian, and they
>>  get moved to different addresses. Excellent! All the weirdness
>>  just cancels out, giving perfect little-endian. This works for
>>  8-bit, 16-bit, 32-bit, and 64-bit data. Life is good.
>>
>Does it work for 128 bit data? The 74x0's most promiment feature,
>AltiVec, would expose a strange mixed endianness to programmers
>otherwise.

For compatability's sake, when AltiVec quad word loads/stores are
performed in LE mode, you get a double munge (one munge for each of
the two doublewords in the quadword) and a swap of the two munged
doublewords.  Details are in the AltiVec PEM.  So AltiVec has true LE
ordering of doublewords and munged up contents inside doublewords,
and an unconditional 64-bit swap on the motherboard will fix the
munging inside each doubleword.
--
Tim Seufert

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list