glibc/soft-fp
Joseph Myers ff12c11f45 soft-fp: Support more precise "invalid" exceptions.
As previously discussed
<https://sourceware.org/ml/libc-alpha/2013-10/msg00345.html>, it would
be desirable to be able to use the same version of the soft-fp code in
the Linux kernel as well as in glibc and libgcc (instead of an old
version in the kernel that's missing ten years of bug fixes,
performance improvements and new features), and to that end it is
useful to add to glibc's copy features in the kernel's copy, even when
they are not directly useful in glibc.

To that end, this patch adds one of those features: support for more
precise "invalid" exceptions describing the particular kind of invalid
operation.  These are relevant for powerpc emulation, and are also as
described in IEEE 754-2008 as sub-exceptions.

The set of sub-exceptions here is the union of those supported on
powerpc and those from IEEE 754-2008 (the former adds a distinction
between 0/0 and Inf/Inf; the latter adds a distinction between Inf*0
from multiplication and the same from fma).  This includes
sub-exceptions for sqrt, conversions to integer and comparisons that
are not supported in the kernel; I see no obvious reason for these
being missing from the kernel support, given that they are supported
on powerpc so accurate powerpc emulation should generate them.

Tested for powerpc-nofpu that the disassembly of installed shared
libraries is unchanged by this patch.

	* soft-fp/soft-fp.h (FP_EX_INVALID_SNAN): New macro.
	(FP_EX_INVALID_IMZ): Likewise.
	(FP_EX_INVALID_IMZ_FMA): Likewise.
	(FP_EX_INVALID_ISI): Likewise.
	(FP_EX_INVALID_ZDZ): Likewise.
	(FP_EX_INVALID_IDI): Likewise.
	(FP_EX_INVALID_SQRT): Likewise.
	(FP_EX_INVALID_CVI): Likewise.
	(FP_EX_INVALID_VC): Likewise.
	* soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Specify more precise
	"invalid" exceptions.
	(_FP_CHECK_SIGNAN_SEMIRAW): Likewise.
	(_FP_ADD_INTERNAL): Likewise.
	(_FP_MUL): Likewise.
	(_FP_FMA): Likewise.
	(_FP_DIV): Likewise.
	(_FP_CMP_CHECK_NAN): Likewise.
	(_FP_SQRT): Likewise.
	(_FP_TO_INT): Likewise.
	(FP_EXTEND): Likewise.
2014-10-09 14:59:23 +00:00
..
adddf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
addsf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
addtf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Banner
divdf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
divsf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
divtf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
double.h soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
eqdf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
eqsf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
eqtf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
extenddftf2.c soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled. 2014-10-09 01:00:41 +00:00
extended.h soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
extendsfdf2.c soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled. 2014-10-09 01:00:41 +00:00
extendsftf2.c soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled. 2014-10-09 01:00:41 +00:00
extendxftf2.c soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled. 2014-10-09 01:00:41 +00:00
fixdfdi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixdfsi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixdfti.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixsfdi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixsfsi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixsfti.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixtfdi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixtfsi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixtfti.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunsdfdi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunsdfsi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunsdfti.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunssfdi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunssfsi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunssfti.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunstfdi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunstfsi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fixunstfti.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatdidf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatdisf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatditf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatsidf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatsisf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatsitf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floattidf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floattisf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floattitf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatundidf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatundisf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatunditf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatunsidf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatunsisf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatunsitf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatuntidf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatuntisf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
floatuntitf.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fmadf4.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fmasf4.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fmatf4.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gedf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
gesf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
getf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
ledf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
lesf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
letf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
Makefile Consistently include Makeconfig after defining subdir. 2014-02-26 23:12:03 +00:00
muldf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mulsf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
multf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
negdf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
negsf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
negtf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
op-1.h soft-fp: Fix comment formatting. 2014-09-17 22:20:45 +00:00
op-2.h soft-fp: Fix comment formatting. 2014-09-17 22:20:45 +00:00
op-4.h soft-fp: Fix comment formatting. 2014-09-17 22:20:45 +00:00
op-8.h soft-fp: Fix comment formatting. 2014-09-17 22:20:45 +00:00
op-common.h soft-fp: Support more precise "invalid" exceptions. 2014-10-09 14:59:23 +00:00
quad.h soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
single.h soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
soft-fp.h soft-fp: Support more precise "invalid" exceptions. 2014-10-09 14:59:23 +00:00
sqrtdf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sqrtsf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sqrttf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
subdf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
subsf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
subtf3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
testit.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
truncdfsf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
trunctfdf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
trunctfsf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
trunctfxf2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
unorddf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
unordsf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00
unordtf2.c soft-fp: Refactor exception handling for comparisons. 2014-10-09 01:03:56 +00:00