On Tue, Jul 26, 2016 at 11:23:38AM -0400, Michael Meissner wrote: > When I originally developed the IEEE 128-bit floating point support, the > emulation routines in libgcc did not raise errors on signalling NaNs. In the > course of adding full support for IEEE 128-bit floating point, we now have > added exception signaling support in the library. This means the C99/IEEE > built-in functions isgreater, isgreaterequal, isless, islessequal, and > islessgreater now will raise an error when you compare a signaling NaN. These > functions are mandated not to raise an error. > > These patches add calls to __unordkf3 to validate that both arguments are > ordered before calling the ge/le/eq comparison function. I have done > bootstraps and make check on both little endian Power8 and big endian Power7 > (both 32-bit and 64-bit tests done on the Power7 box) with no regressions. > Are > these patches ok for the trunk?
They are okay for trunk (some testcase stuff below). For the 6 branch, I'd rather see a little bit of testing on trunk first. We still have some time (I hope). > --- gcc/testsuite/gcc.target/powerpc/float128-cmp.c (revision 0) > +++ gcc/testsuite/gcc.target/powerpc/float128-cmp.c (revision 0) > @@ -0,0 +1,17 @@ > +/* { dg-do compile { target { powerpc*-*-linux* } } } */ > +/* { dg-require-effective-target powerpc_float128_sw_ok } */ > +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { > "-mcpu=power7" } } */ > +/* { dg-options "-O2 -mcpu=power7 -mfloat128" } */ > + > +#ifndef __FLOAT128__ > +#error "-mfloat128 is not supported." > +#endif This should never trigger, it is only there for debug, right? > +int > +test_isgreater (__float128 a, __float128 b) > +{ > + return __builtin_isgreater (a, b); > +} > + > +/* { dg-final { scan-assembler "bl __\[gl\]ekf2" } } */ > +/* { dg-final { scan-assembler "bl __unordkf2" } } */ There are some extra spaces in that [gl]ekf2 line. Could you test all five functions please? Use multiple testcases, maybe. Thanks, Segher