[Scummvm-devel] Wii & Gamecube (resp. PowerPC) vs. unaligned memory access

Andre Heider a.heider at gmail.com
Fri May 6 14:37:52 CEST 2011


On Fri, May 6, 2011 at 1:27 PM, Max Horn <max at quendi.de> wrote:
> Anyway, I would appreciate some input on the whole "unaligned access" business. Should we even bother running a test for it, and instead just assume "unaligned access is OK" on x86, but nowhere else?

I think the alignment test is not reliable. A CPU align exception may
not be mapped to what the OS exposes via signal(). The test is only
telling us if it doesn't crash, nothing more. Which is probably not
the result we're looking for.
And, like you already mentioned, unaligned access has different
constraints, like address boundaries. Which makes the test even less
reliable.
Last but not least, it can't be tested when cross compiling. So IMHO
1) makes the most sense.

Regards,
Andre

PS:
Digging for more 750CL infos yields
https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/D6A29FC425331F7F8725724400599B3F
See ยง2.2.2
While that doesn't talk about endianess, I read it as BE (who wants to
run powerpc in the wrong endian mode anyway?)
That matches with your findings, and confirms that my memory doesn't
always fail on me :)




More information about the Scummvm-devel mailing list