From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 5 10:16:30 2008 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 E527916A476; Sat, 5 Jan 2008 10:16:30 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.bluestop.org (muon.bluestop.org [IPv6:2001:41c8:1:548a::2]) by mx1.freebsd.org (Postfix) with ESMTP id 99C9C13C447; Sat, 5 Jan 2008 10:16:30 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from tau.draftnet (unknown [IPv6:2a01:348:10f:0:240:f4ff:fe57:9871]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTP id 4E490300EA; Sat, 5 Jan 2008 10:16:28 +0000 (GMT) Message-ID: <477F5901.3000006@cran.org.uk> Date: Sat, 05 Jan 2008 10:16:33 +0000 From: Bruce Cran User-Agent: Thunderbird 2.0.0.9 (X11/20071201) MIME-Version: 1.0 To: Marco van de Voort References: <20080104131529.GA31354@stack.nl> In-Reply-To: <20080104131529.GA31354@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 05 Jan 2008 12:36:14 +0000 Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: 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, 05 Jan 2008 10:16:31 -0000 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