Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Jan 2008 10:16:33 +0000
From:      Bruce Cran <bruce@cran.org.uk>
To:        Marco van de Voort <marcov@stack.nl>
Cc:        freebsd-hackers@freebsd.org, Ivan Voras <ivoras@freebsd.org>
Subject:   Re: Re: Architectures with strict alignment?
Message-ID:  <477F5901.3000006@cran.org.uk>
In-Reply-To: <20080104131529.GA31354@stack.nl>
References:  <fl4c8o$vpu$1@ger.gmane.org> <20080104131529.GA31354@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Marco van de Voort wrote:
> On Sat, Dec 08, 2007 at 03:43:30AM +0100, Ivan Voras wrote:
>
>   
>> 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).
>>     
>
> I do know that older PPCs (PowerPC603) have a requirement on aligning of
> floats.
>
> IIRC the e.g. Linux the kernel hooks an exception handler that makes it
> transparent for apps (at the cost of some performance), and NetBSD does not
> I never ran FreeBSD on PPC, so I wouldn't know that one.
>   

The newer 32-bit PPCs (G4 / PPC7447A) can't handle unaligned 64-bit 
accesses
either - they generate a trap which gets handled by fix_unaligned in 
/sys/powerpc/powerpc/trap.c on FreeBSD.

--
Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?477F5901.3000006>