From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 29 12:41:31 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F035816A41B for ; Sat, 29 Dec 2007 12:41:31 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 8268A13C4DB for ; Sat, 29 Dec 2007 12:41:31 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:57075 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1J8b0K-00020O-4c for freebsd-hackers@freebsd.org; Sat, 29 Dec 2007 13:41:28 +0100 Received: (qmail 4761 invoked from network); 29 Dec 2007 13:41:21 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 29 Dec 2007 13:41:21 +0100 Received: (qmail 23536 invoked by uid 1001); 29 Dec 2007 13:41:21 +0100 Date: Sat, 29 Dec 2007 13:41:21 +0100 From: Erik Trulsson To: Erich Dollansky Message-ID: <20071229124120.GA23415@owl.midgard.homeip.net> Mail-Followup-To: Erich Dollansky , Kip Macy , freebsd-hackers@freebsd.org, Ivan Voras References: <47760132.5040306@pacific.net.sg> <47761B63.4010407@pacific.net.sg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47761B63.4010407@pacific.net.sg> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1J8b0K-00020O-4c. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1J8b0K-00020O-4c c75cf902274f65e1220a35a312a0aea6 Cc: Kip Macy , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: Architectures with strict alignment? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2007 12:41:32 -0000 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 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 >>> -- Erik Trulsson ertr1013@student.uu.se