glibc/soft-fp
Joseph Myers 7d67a196b6 soft-fp: Define and use _FP_STATIC_ASSERT.
This patch makes soft-fp use static assertions in place of conditional
calls to abort, in places where there are checks for conditions (on
the types for which a macro is used) that the code is not prepared to
handle.  The fallback definition of _FP_STATIC_ASSERT (for kernel use
only, as only relevant to compilers not supported for building glibc)
is as in misc/sys/cdefs.h.

This means that soft-fp only ever calls abort for _FP_UNREACHABLE
calls in builds with GCC versions before 4.5.  Thus, there is no need
for an abort declaration or <stdlib.h> include, since the kernel code
handles defining abort as a macro itself - and so this avoids any need
for an __KERNEL__ condition on the abort declaration to avoid it
breaking with the kernel's macro definition.  That is, this patch is
intended to make glibc's soft-fp code suitable for kernel use with no
kernel-local changes to the soft-fp code needed at all.

Tested for powerpc-nofpu that installed stripped shared libraries are
unchanged by the patch.  One explicit <stdlib.h> include had to be
added to a file that was relying on the include from soft-fp.h.

	* soft-fp/soft-fp.h (_FP_STATIC_ASSERT): New macro.
	[_LIBC]: Do not include <stdlib.h>.
	[!_LIBC] (abort): Remove declaration.
	* soft-fp/op-2.h (_FP_MUL_MEAT_2_120_240_double): Use
	_FP_STATIC_ASSERT instead of conditionally calling abort.
	* soft-fp/op-common.h (_FP_FROM_INT): Likewise.
	(_FP_EXTEND_CNAN): Likewise.
	(FP_TRUNC): Likewise.
	(__FP_CLZ): Likewise.
	* sysdeps/powerpc/nofpu/flt-rounds.c: Include <stdlib.h>.
2015-03-12 18:43:21 +00:00
..
adddf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
addsf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
addtf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Banner Update. 1999-12-29 18:11:48 +00:00
divdf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
divsf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
divtf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
double.h soft-fp: Use multiple-include guards. 2015-03-10 00:32:29 +00:00
eqdf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
eqsf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
eqtf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
extenddftf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
extended.h soft-fp: Use multiple-include guards. 2015-03-10 00:32:29 +00:00
extendsfdf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
extendsftf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
extendxftf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixdfdi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixdfsi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixdfti.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixsfdi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixsfsi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixsfti.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixtfdi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixtfsi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixtfti.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunsdfdi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunsdfsi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunsdfti.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunssfdi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunssfsi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunssfti.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunstfdi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunstfsi.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fixunstfti.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatdidf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatdisf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatditf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatsidf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatsisf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatsitf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floattidf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floattisf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floattitf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatundidf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatundisf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatunditf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatunsidf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatunsisf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatunsitf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatuntidf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatuntisf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
floatuntitf.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fmadf4.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fmasf4.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fmatf4.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gedf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gesf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ledf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
lesf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
letf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
muldf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mulsf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
multf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
negdf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
negsf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
negtf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
op-1.h soft-fp: Use multiple-include guards. 2015-03-10 00:32:29 +00:00
op-2.h soft-fp: Define and use _FP_STATIC_ASSERT. 2015-03-12 18:43:21 +00:00
op-4.h soft-fp: Use multiple-include guards. 2015-03-10 00:32:29 +00:00
op-8.h soft-fp: Use multiple-include guards. 2015-03-10 00:32:29 +00:00
op-common.h soft-fp: Define and use _FP_STATIC_ASSERT. 2015-03-12 18:43:21 +00:00
quad.h soft-fp: Use multiple-include guards. 2015-03-10 00:32:29 +00:00
single.h soft-fp: Use multiple-include guards. 2015-03-10 00:32:29 +00:00
soft-fp.h soft-fp: Define and use _FP_STATIC_ASSERT. 2015-03-12 18:43:21 +00:00
sqrtdf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sqrtsf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sqrttf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
subdf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
subsf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
subtf3.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
testit.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
truncdfsf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
trunctfdf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
trunctfsf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
trunctfxf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
unorddf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
unordsf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
unordtf2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00