This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: EGCS-1.0.2 pre fails on Spec CPU 95


On Mon, Mar 09, 1998 at 11:38:51AM -0800, Bill Broadley wrote:
> Running '146.wave5'
> Error comparing benchmark '146.wave5'

Turns out this is a problem between the spec test and the i386 fpu. 
Having the calculations done at the wrong precision results in 
slightly different end results.

There are two solutions: -ffloat-store, which will completely kill
any sort of performance, or changing the rounding mode in the fpu.

I would go for the later.  On Linux at least, the attached program
may be compiled with

  gcc -O -o libieee-dbl.a libieee-dbl.c

install the result in some convenient directory and add

  146.wave5=default=default:
  EXTRA_LIBS= -lieee-dbl

to your Spec95 config file.  Other Intel operating systems will only
require minor modifications, possibly using inline asm rather than a
library function.


r~
#include <fpu_control.h>

static void
__attribute__((constructor))
init(void)
{
  /* Exceptions masked, round to double.  */
  __setfpucw(0x127f);
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]