Date: Sat, 29 Dec 2007 15:01:43 -0800 From: perryh@pluto.rain.com To: ivoras@freebsd.org, imp@bsdimp.com Cc: freebsd-hackers@freebsd.org Subject: Re: Architectures with strict alignment? Message-ID: <4776d1d7.zI7kRv9uFoaBNKnQ%perryh@pluto.rain.com> In-Reply-To: <20071229.122221.-432830441.imp@bsdimp.com> References: <fl4c8o$vpu$1@ger.gmane.org> <20071229.122221.-432830441.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"M. Warner Losh" <bsdimp.com!imp@agora.rdrop.com> wrote: > In message: <fl4c8o$vpu$1@ger.gmane.org> > Ivan Voras <ivoras@freebsd.org> writes: > : Which of the architectures FreeBSD supports (if any) have strict > : memory alignment requirements? (in the sense that accessing a > : 32-bit integer not aligned on a 32-bit address results in a > : hardware trap/exception). > > Sparc64, powerpc, arm, and (thanks to Juniper and others) mips. The degree to which a PowerPC imposes a strict alignment requirement depends on both the particular processor model and the operation being performed. For ordinary integer arithmetic and logical operations, newer PPC processors tend to be more tolerant (although misalignment will typically carry a performance penalty). For the semaphore primitives (lwarx/stwcx.) most PPC will require proper alignment and some will fault if the operand address is cache-inhibited (even though correctly aligned).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4776d1d7.zI7kRv9uFoaBNKnQ%perryh>