This is the mail archive of the 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]

[PATCH], Fix PR 71869, Correctly implement isgreater, etc. on PowerPC __float128

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?

In addition, since the glibc group needs this functionality to complete the
__float128 library support, I would like to get it into GCC 6.2 if it is still
possible.  I know this is last minute, but this patch is important to the GLIBC
group, and it was only noticed recently.  I will be starting the bootstrap and
regression test on the gcc6 branch shortly.  If the patch works on gcc6, can I
commit it to the gcc6 branch ASAP, or will it have to wait for GCC 6.3?

2016-07-25  Michael Meissner  <>

	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.

2016-07-25  Michael Meissner  <>

	PR target/71869
	* New test to make sure that
	IEEE built-in functions first check to see if the arguments are

Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email:, phone: +1 (978) 899-4797

Attachment: pr71869.patch01b
Description: Text document

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