This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
test case for 'i386 floating point conditional move patch'
- To: egcs-patches at cygnus dot com
- Subject: test case for 'i386 floating point conditional move patch'
- From: Robert Lipe <robertl at dgii dot com>
- Date: Thu, 4 Jun 1998 17:01:34 -0500
John Wehle and I were having a discussion.
> There were two decisions that were yours. You just made the second.
> The remaining one is to decide if you want it in the suite or not.
> This probably pivots on whether you think this is a problem likely
> to ever be seen again or if you think this is just noise in you
> reenabling the cmov stuff.
I think it was always broken and I wouldn't be suprised if it gets
broken again considering the number of problems that there have been
with the conditional move patterns on the i386. Thus:
1) Yes, please add it to the test suite.
2) Place it in gcc.dg.
>> it will only run on a Pentium Pro or better when compiled in this fashion).
>
> Will only fail or will only run? If you run the test on, say, a 486 but
> specify "-march-pentiumpro", would you expect the binary to fail in the
> predictable way, or are there other Pro-specific things that will send a
> Pre-P6 core down in flames?
The conditional move instructions which are used when compiled with -O
-march=pentiumpro are not implemented on earlier processors and will
probably cause the illegal instruction handler to be invoked. Ideally
this should result in a SIGILL signal on a well behaved system.
=-=-=-=-=-=-
In light of this, I've made the test run only when configured for a 686.
I've tested that it correctly won't try to execute on a "mere" P5 core.
I've also tested that it fails to fail if you run the wrong runtest, but
that's a different story. :-)
Please consider the following test case addition.
$ cat 980604-1.c
/* { dg-do run { target i686-*-* } } */
/* { dg-options "-O -march=pentiumpro" } */
int a = 1;
int b = -1;
int c = 1;
int d = 0;
int main ()
{
double e;
double f;
double g;
f = c;
g = d;
e = (a < b) ? f : g;
if ( e == 1.0)
abort();
exit(0);
}