Subject: Re: gcc math problems on NetBSD and OpenBSD
From: Ignatios Souvatzis <firstname.lastname@example.org>
Date: 12/29/2005 21:14:31
On Thu, Dec 29, 2005 at 07:12:40PM +0100, Lars Bausch wrote:
> Hello !
> Valeriy E. Ushakov wrote:
> >On Thu, Dec 29, 2005 at 15:37:09 +0100, Lars Bausch wrote:
> >>But with these CFLAGS I have no success on SPARC. On NetBSD the
> >>results are some hundret times higher as in the reference, on
> >>OpenBSD sometimes double so high.
> >As Krister has pointed out, NetBSD gcc defaults to generating code
> >that runs on all machines. Try compiling sparc binaries with -mcpu=v8
> I have still tried to compile it as a sparc v8, but the computed results
> are also totaly wrong computed.
> My primary major problem is that the math get wrong computed on sparc,
> and totaly out of ranges. The less performance on i386 is only minor.
To thest the FPU routines/compiler: from pkgsrc, try the
package benchmarks/paranoia .
Note that it sometimes reports _excess_ precision - e.g., if the compiler
leaves intermediate results in registers that are wider than the target
type. Your -ffloat-store results probably indicate that this is the case,
without that switch, on i386.