Bootstrap FAILURE egcs-980406 on X86 using -march=pentiumpro

grahams@rcp.co.uk grahams@rcp.co.uk
Thu Apr 9 12:35:00 GMT 1998


Hi,

I posted an earlier message regarding problems bootstraping
egcs-980406 using "-O6 -march=pentiumpro -mcpu-pentiumpro"
and have identified a fix.

The problem I experienced was that the file "gcc/include/float.h"
generated by enquire during the bootstrap is WRONG and
is significantly different to the "float.h" generated if bootstraping
with "-O6 -march=pentiumpro -mcpu=pentiumpro". In particular
the value value of FLT_ROUND is -1 (it should be 1) and the
value of LDBL_MANT_DIG is 1 (it should be 64).

In addition compiling the following simple test program
generates incorrect output and a core dump.

#include <stdio.h>

int main()
{
   static long double x = 1.0L;
   static long double y = 10.0L;
   static long double z = 0.0L;

   printf("x = %Lf\n", x);
   printf("y = %Lf\n", y);
   printf("z = %Lf\n", z);

   return 0;
}

The output is

x = 0.0
y = 8.0   !!!!! should be 10.0
dumps core displaying z


Looking at i386.h,i386.c and i386.md the -march=pentiumpro option
only affects the TARGET_CMOVE macro and evaluates to 1
iff -march=pentiumpro option specified. The macro is only used
in eight places (ignoring the four uses which are already disabled).

I modified the above files to allow each of theese uses to be enabled/
disabled seperately and performed eight bootstraps each with only
one use enabled. Each bootstrap built without differences and I
examined the contents of "gcc/include/float.h" and found that enabling
the use of just one of the uses of TARGET_CMOVE results in an
INCORRECT gcc/include/float.h

The problematic use of TARGET_CMOVE was in the definition of
insn_movsicc in i386.md (ie replaced "TARGET_CMOVE" with
"0 && TARGET_CMOVE")).

With ONLY the above change I get a good bootstrap and a
correct gcc/include/float.h

Graham




More information about the Gcc-bugs mailing list