From owner-freebsd-ppc@FreeBSD.ORG Thu Aug 3 18:52:06 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7970A16A4DF; Thu, 3 Aug 2006 18:52:06 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDA1243D68; Thu, 3 Aug 2006 18:52:03 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id BZY50951 (AUTH peterg@ptree32.com.au); Fri, 4 Aug 2006 04:51:41 +1000 (EST) Message-ID: <44D245E5.4070102@freebsd.org> Date: Thu, 03 Aug 2006 11:52:21 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Maxim Sobolev References: <44D23F02.9020709@FreeBSD.org> <200608031826.k73IQX835138@makai.watson.ibm.com> <44D2419F.1050100@FreeBSD.org> In-Reply-To: <44D2419F.1050100@FreeBSD.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: Unaligned 64-bits access on FreeBSD/powerpc X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 18:52:06 -0000 > Well, actually *nix has a long history of just killing the program with > SIGBUS in such case. > > I am just wondering if it's really expected behavior on FreeBSD/powerpc > or not. No :( What system are you running on ? I was pretty sure that G3/G4 CPUs allowed unaligned accesses unless you explicitly disabled it (except for cases such as vector ops). A 64 bit op on these CPUs should decompose into separate 32-bit accesses ala i386 so the same case should occurr for unaligned 32-bit ops. In any event, the default should be that unaligned accesses are handled, and then have switches to optionally uprintf the address, or SIGBUS. later, Peter.