sparc64/144900: [patch] SPARC64 Floating point fixes
marius at alchemy.franken.de
Sun Mar 21 13:30:11 UTC 2010
The following reply was made to PR sparc64/144900; it has been noted by GNATS.
From: Marius Strobl <marius at alchemy.franken.de>
To: Peter Jeremy <peterjeremy at acm.org>
Cc: FreeBSD-gnats-submit at 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 <marius at alchemy.franken.de> 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.
More information about the freebsd-sparc64