From owner-freebsd-sparc64@FreeBSD.ORG Sun Mar 21 13:30:11 2010 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC6E9106566B for ; Sun, 21 Mar 2010 13:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AB6BB8FC17 for ; Sun, 21 Mar 2010 13:30:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o2LDUB9V062585 for ; Sun, 21 Mar 2010 13:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o2LDUBgA062577; Sun, 21 Mar 2010 13:30:11 GMT (envelope-from gnats) Date: Sun, 21 Mar 2010 13:30:11 GMT Message-Id: <201003211330.o2LDUBgA062577@freefall.freebsd.org> To: freebsd-sparc64@FreeBSD.org From: Marius Strobl Cc: Subject: Re: sparc64/144900: [patch] SPARC64 Floating point fixes X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marius Strobl List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2010 13:30:11 -0000 The following reply was made to PR sparc64/144900; it has been noted by GNATS. From: Marius Strobl To: Peter Jeremy Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: sparc64/144900: [patch] SPARC64 Floating point fixes Date: Sun, 21 Mar 2010 14:25:51 +0100 On Sun, Mar 21, 2010 at 11:28:32AM +1100, Peter Jeremy wrote: > On 2010-Mar-20 21:49:41 +0100, Marius Strobl wrote: > >On Sat, Mar 20, 2010 at 08:11:20PM +1100, Peter Jeremy wrote: > >> - Parts of the emulator code must be compiled with no-strict-aliasing > >> specified to function correctly. CFLAGS is updated to include the > >> relevant gcc option. (This will add -fno-strict-aliasing to all of > >> libc - which is excessive but I don't believe it's possible to compile > >> only part of libc that way). > > > >Could you please elaborate on what exactly breaks when compiling > >with strict aliasing rules? I think there actually is a way to > >limit -no-strict-aliasing to the emulator part but I'd like to > >understand what's going on and make sure there's no way it can > >be solved by the code affected before turning it on. > > OK. I spent some time looking at fpu_explode.c and came up with the > attached patch which seems to remove the requirement for > no-strict-aliasing (and I think the code looks cleaner as well). Thanks; I've decided to go that route instead of adding -fno-strict-aliasing as the code seems to be otherwise fine when it comes to strict aliasing rules, i.e. the type-punning used in fpu_qp.c is safe according to the GCC documentation. Marius