Architectures with strict alignment?

Erik Trulsson ertr1013 at student.uu.se
Sat Dec 29 04:41:32 PST 2007


On Sat, Dec 29, 2007 at 06:03:15PM +0800, Erich Dollansky wrote:
> Hi,
> 
> Kip Macy wrote:
>> Isn't it everything except x86?
> 
> not really.
> 
> All RISC based designs need the alignment so that the CPU can fetch a CPU 
> word in one go. CISC based designs do not have this limitiation.
> 
> I also do not know of any other CISC based design which made it to 
> mainstream.


Not quite true.  Take for example the venerable Motorola 68000 CPU (used in
many different computers in the early and mid 80's).
It required all 16-bit (and 32-bit) accesses to be aligned on a 16-bit
boundary.  This was later relaxed in the M68020 and later CPUs.

The M68k series is one of the classic CISC architectures and most certainly
made it to the mainstream.


(Admittedly FreeBSD does not support the M68k series.  NetBSD and (older
releases of) OpenBSD does, but they require at least an 68020 - which does
not have strict alignment requirements.)



> 
> Erich
>> -Kip
>> On Dec 29, 2007 12:11 AM, Erich Dollansky <oceanare at pacific.net.sg> wrote:
>>> Hi,
>>> 
>>> 
>>> Ivan Voras wrote:
>>>> Hi,
>>>> 
>>>> 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).
>>>> 
>>> isn't this the case with SPARC and Itanium?
>>> 
>>> I know, they are 64 bits.
>>> 
>>> Erich
>>> 

-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-hackers mailing list