[Scummvm-devel] Wii & Gamecube (resp. PowerPC) vs. unaligned memory access
Max Horn
max at quendi.de
Thu May 5 21:12:47 CEST 2011
Am 05.05.2011 um 19:04 schrieb Andre Heider:
[...]
>
> Hi,
>
> ugh, it's been a while, but as far as I remember not every powerpc is
> capable of that.
I think every one that was ever built into a Mac certainly was, but of course there are many more, and esp. more "embedded" versions, so ... :)
> Accessing unaligned addresses on a 750CL using >8bit
> instructions that cross a 64bit boundary shouldn't work. Maybe with a
> fault handler that acts on alignment exceptions and splits the access.
> Anyway, the broadway on the Wii requires alignment on certain
> instructions, and I think I added need_memalign because I ran into the
> issue. Maybe just with -fstrict-aliasing (which is implied by >= -O2),
> but I really can't remember. Also, we run on bare metal there and the
> hardware exception handler of the homebrew libs halts in the case of
> an alignment exceptions.
Well, we wouldn't want to use unaligned access if that relies on an exception handler anyway -- much too slow. It's just that on many PowerPC's, it is apparently not necessary to use an exception handler. But if the Broadway (and Gecko) does not support this, oh well... so be it.
>
> And, coming from an apple user, hearing about a powerpc being crippled
> compared to x86 is new. Others would choose the words "less insane" :)
I didn't say it is crippled compared to x86, but rather compared to other members of the PowerPC family :).
Cheers,
MAx
More information about the Scummvm-devel
mailing list