On Wed, Jul 27, 2011 at 05:45:56PM +0200, Christian Weisgerber wrote: > Can PowerPC do unaligned accesses or not? > > I'm bringing this up *again*, because the fragmentary dialog on ICB > about how powerpc is supposed to behave doesn't agree with observable > reality. > > | <miod> some models can afford unaligned access with a msr setting, > | but we frown upon this and won't enable this anyway > | <miod> so: no. > | <deraadt> we should keep running powerpc strict align. > > The reality is that we *do* support unaligned accesses, at least > on the machines people test on. sthen@ noticed when testing the > proposed port for snappy (Google's fast compression library) that > unaligned accesses work fine and is reluctant to disable them in > the port. > > I just noticed that archivers/xz also uses unaligned accesses on > powerpc and nobody has complained to me that it breaks. > > I don't have a problem with disabling unaligned accesses in ports > on powerpc, but without errors we are unlikely to find all of them > and what's the justification then? > > -- > Christian "naddy" Weisgerber na...@mips.inka.de >
Technically powerpc is a strict alignment machine, however it isn't pedantic about it (in big endian mode, like we use it). If power is configured for little endian, any misalignment is triggers and ALIGN execption, hoever in big endian, generally only floating point operations trigger misalignment exceptions. I know of no integer operations that will trigger an alignment exception in big endian mode. Dale Rahn dr...@dalerahn.com