glibc/sysdeps/powerpc/nofpu
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
..
Makefile Fix soft-float ldbl-128ibm atan2l signs of zero results (bug 16390). 2014-01-03 20:56:40 +00:00
Subdirs Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
Versions Don't make soft-fp symbols compat symbols for powerpc-nofpu. 2013-12-19 21:26:36 +00:00
atomic-feclearexcept.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
atomic-feholdexcept.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
atomic-feupdateenv.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fegetround.c Fix libm fegetround namespace (bug 17748). 2015-01-02 20:44:42 +00:00
feholdexcpt.c Fix powerpc-nofpu fesetenv namespace (bug 17748). 2015-01-14 21:35:40 +00:00
fenv_const.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fesetenv.c Fix libm fesetenv namespace (bug 17748). 2015-01-06 23:36:20 +00:00
fesetround.c Fix libm fesetround namespace (bug 17748). 2015-01-07 00:41:23 +00:00
feupdateenv.c Fix libm feupdateenv namespace (bug 17748). 2015-01-07 19:01:20 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
flt-rounds.c soft-fp: Define and use _FP_STATIC_ASSERT. 2015-03-12 18:43:21 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
libm-test-ulps Regenerate powerpc-nofpu libm-test-ulps. 2014-06-30 21:26:49 +00:00
sim-full.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
soft-supp.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00