This is the mail archive of the gcc-patches@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] |
Other format: | [Raw text] |
On Tue, Jul 26, 2016 at 11:05:32AM -0500, Segher Boessenkool wrote: > > --- 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. I decided to write an executable test rather than do more assembly tests. The patch to rs6000.c is unchanged, and the test now tests all of the comparison operators and functions with various values including quiet NaNs and signalling NaNs. It passes on power7 big endian 64-bit, power7 big endian 32-bit, power8 little endian 64-bit, and I ran it on the power9 simulator with hardware float128 support. [gcc] 2016-07-26 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/71869 * config/rs6000/rs6000.c (rs6000_generate_compare): Rework __float128 support when we don't have hardware support, so that the IEEE built-in functions like isgreater, first call __unordkf3 to make sure neither operand is a NaN, and if both operands are ordered, do the normal comparison. [gcc/testsuite] 2016-07-26 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/71869 * gcc.target/powerpc/float128-cmp.c: New test to make sure that IEEE built-in functions handle quiet and signalling NaNs correctly. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797
Attachment:
pr71869.patch02b
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |