Arch Specific Notes -- PPC

The Gentoo PowerPC port uses the ppc keyword and maintains compatibility with
all 32 bit PowerPC processors. It is also used for 32 bit userland installs
on 64 bit PowerPC systems.

Common issues

Although PowerPC processors can be run in little endian mode, the Linux kernel
runs on PowerPC processors in big endian mode. Due to this fact, a common
PowerPC issue is dealing with code that is written with only little endian
processors in mind (x86/amd64). These bugs can be difficult to find, but are
usually found when loading data from disk (such as a structure written directly
to disk) or during bit operations.

The PowerPC port of gcc uses unsigned characters by default, which is
different than on x86. If the code you are working with assumes that the char
type is signed, you can pass -fsigned-char to GCC to work around the issue.

Altivec

Altivec (Apple's name for VMX SIMD instructions) is supported on the G4 and G5
processors. You can enable support for the instruction set by passing
-mabi=altivec -maltivec to GCC. Note that passing -mcpu= options may enable
altivec without passing the flags above.

Occasionally, an altivec issue that crops up is that Apple uses a different
notation for indicating vectors, (x) instead of {x}. Using something like the
code below to define vectors is the preferred way of fixing this: