Re: ppc LE questions (seeking help hand info pointers)
From: Albert D. Cahalan <hidden>
Date: 2001-09-22 20:06:42
Holger Bettag writes:
"Albert D. Cahalan" [off-list ref] writes:
quoted
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.
Yes. Motorola noticed this problem, and added a built-in swap to fix the problem. See page 3-6, section 3.1.4, figure 3-5 in ALTIVECPEM.pdf, the "AltiVec Technology Programming Environments Manual". Unaligned vectors don't work in big-endian or little-endian mode, and the code needed to load them is equally long. ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/