Print offending diff when check-abi fails

The earlier version of check-abi would print a diff of the expected
ABI vs the built ABI when there was a difference.  Bring back this
behaviour.
Fix build warning in pthread_rwlock_*

The first argument of elision_adapt and that of ELISION_*LOCK have
different signs since __elision_rwcount is signed char * and the
argument of elision_adapt is uint8_t *.  Modified elision_adapt to
accept signed char * instead of uint8_t *.
Use libc calls defined by fenv_private.h to implement several fenv functions
rather than duplicating functionality. To make this work for softfp builds,
ensure functions in fenv_private are not conditionally compiled.

2014-06-24  Wilco  <wdijkstr@arm.com>

	* sysdeps/arm/fegetround.c (fegetround): Call get_rounding_mode.
	* sysdeps/arm/feholdexcpt.c (feholdexcept): Call libc_feholdexcept_vfp.
	* sysdeps/arm/fesetround.c (fesetround): Call libc_fesetround_vfp.
	* sysdeps/arm/fgetexcptflg.c (fegetexceptflag):
	Call libc_fetestexcept_vfp.
	* sysdeps/arm/ftestexcept.c (fetestexcept): Call libc_fetestexcept_vfp.
	* sysdeps/arm/fenv_private.h: Move libc_*_vfp functions outside of
	__SOFTFP__ ifdef so that they can be built for softfp.
Speed up the ARM fenv implementation by avoiding unnecessary FPSCR
writes if the FPSCR remains unchanged.

2014-06-24  Wilco  <wdijkstr@arm.com>

	* sysdeps/arm/fclrexcpt.c (feclearexcept):
	Optimize to avoid unnecessary FPSCR writes.
	* sysdeps/arm/fedisblxcpt.c (fedisableexcept): Likewise.
	* sysdeps/arm/feenablxcpt.c (feenableexcept): Likewise.
	* sysdeps/arm/fsetexcptflg.c (fesetexceptflag): Likewise.
	* sysdeps/arm/setfpucw.c (__setfpucw): Likewise.
Rewrite feupdateenv

This patch rewrites feupdateenv to improve performance by avoiding
unnecessary FPSCR reads/writes. It fixes bug 16918 by passing the
correct return value.

2014-06-24  Wilco  <wdijkstr@arm.com>

	[BZ #16918]
	* sysdeps/arm/feupdateenv.c (feupdateenv):
	Rewrite to reduce FPSCR accesses and fix return value.
Add bug 16918 to NEWS.
Cleanup fenv implementation

Remove some spaces before libm_hidden_def.

2014-06-24  Wilco  <wdijkstr@arm.com>

	* sysdeps/arm/feholdexcpt.c (feholdexcept): Remove space.
	* sysdeps/arm/fesetenv.c (fesetenv): Remove space.
	* sysdeps/arm/fesetround.c (fesetround): Remove space.
	* sysdeps/arm/fraiseexcpt.c (feraiseexcept): Remove space.
Remove an unused include.

2014-06-24  Wilco  <wdijkstr@arm.com>

	* sysdeps/arm/fsetexcptflg.c (fesetexceptflag): Remove unused include.
Add _FPU_MASK_RM and use it instead of FE_TOWARDZERO.

2014-06-24  Wilco  <wdijkstr@arm.com>

	* sysdeps/arm/fpu_control.h (_FPU_MASK_RM): Define.
	* sysdeps/arm/fenv_private.h (libc_fesetround_vfp)
	(libc_feholdexcept_setround_vfp) (libc_feholdsetround_vfp)
	(libc_feresetround_vfp) (libc_feholdsetround_vfp_ctx)
	(libc_feresetround_vfp_ctx): Use _FPU_MASK_RM.
	* sysdeps/arm/fesetround.c (fesetround): Use _FPU_MASK_RM.
	* sysdeps/arm/get-rounding-mode.h (get_rounding_mode):
	Use _FPU_MASK_RM.
Optimize fesetenv

Improve fesetenv to use an optimized implementation similar to
feupdateenv.

2014-06-24  Wilco  <wdijkstr@arm.com>

	* sysdeps/arm/fesetenv.c (fesetenv): Optimize implementation.
Revert "Add bug 16918 to NEWS."

This reverts commit 222b787a6fd36601f5c5d22378176798327fcf31.
Add bug 16918 to NEWS.
Fix namespace violation in pthreadtypes.h (BZ #17084)

This was causing conformtest failures on i386.
Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac.

Continuing the process of making non-ex-ports architectures follow the
preferred sysdeps practices followed by ex-ports architectures - that
is, putting things in architecture-specific sysdeps files rather than
having architecture-specific cases in architecture-independent files -
this patch moves architecture cases out of
sysdeps/unix/sysv/linux/configure.ac into (new or existing) configure
fragments for each architecture.  (In the case of the
arch_minimum_kernel setting for x32,
sysdeps/unix/sysv/linux/x86_64/x32/configure already has such a
setting so the setting in sysdeps/unix/sysv/linux/configure.ac was a
duplicate that could just be removed - though I haven't tested for
x32.)

Tested for x86_64 and x86 that the patch causes no changes to the
installed shared libraries or ldd (or any part of the installation
except for the parts that always change because the files contain
timestamps - nscd and static libraries).

	* sysdeps/unix/sysv/linux/configure.ac: Remove cases for
	individual architectures.
	* sysdeps/unix/sysv/linux/configure: Regenerated.
	* sysdeps/unix/sysv/linux/i386/configure.ac: New file.
	* sysdeps/unix/sysv/linux/i386/configure: New generated file.
	* sysdeps/unix/sysv/linux/powerpc/configure.ac
	(ldd_rewrite_script): Define variable.
	* sysdeps/unix/sysv/linux/powerpc/configure: Regenerated.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/configure.ac: New
	file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/configure: New
	generated file.
	* sysdeps/unix/sysv/linux/s390/configure.ac: New file.
	* sysdeps/unix/sysv/linux/s390/configure: New generated file.
	* sysdeps/unix/sysv/linux/sh/configure.ac: New file.
	* sysdeps/unix/sysv/linux/sh/configure: New generated file.
	* sysdeps/unix/sysv/linux/sparc/configure.ac: New file.
	* sysdeps/unix/sysv/linux/sparc/configure: New generated file.
	* sysdeps/unix/sysv/linux/x86_64/configure.ac: New file.
	* sysdeps/unix/sysv/linux/x86_64/configure: New generated file.
Fix ldbl-128 erfl spurious underflows (bug 16287).

This patch fixes bug 16287, spurious underflows from ldbl-128 erfl
arising from it calling erfcl for arguments with absolute value at
least 1.0, although for large positive arguments erfcl correctly
underflows but erfl shouldn't.  The fix is simply to avoid calling
erfcl, and just return 1, for arguments above a cut-off large enough
that erfl correctly rounds to-nearest as 1 but not so large that erfcl
underflows.

Tested mips64.  Also tested x86_64 and x86 to confirm the new tests
(taken from the tests of erfc) don't cause any problems there; no ulps
updates needed.

	[BZ #16287]
	* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfl): Return 1 without
	calling __erfcl for arguments at least 16.
	* math/auto-libm-test-in: Add more tests of erf.
	* math/auto-libm-test-out: Regenerated.
Fix x86/x86_64 expm1l spurious underflow exceptions (bug 16539).

This patch fixes bug 16539, spurious underflow exceptions from x86 /
x86-64 expm1l.  The problem is that the computation of a base-2
exponent with extra precision involves spurious underflows for
arguments that are small but not subnormal, so a check is added to
just return the argument in those cases.  (If the argument *is*
subnormal, underflowing is correct and the existing code will always
underflow, so it suffices to keep using the existing code in that
case; some expm1 implementations have a bug (bug 16353) with missing
underflow exceptions, but I don't think there's such a bug in this
particular version.)

Tested x86_64 and x86; no ulps updates needed.

(auto-libm-test-out diffs omitted below.)

	[BZ #16539]
	* sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]: Just
	return the argument for normal arguments with exponent below -64.
	* sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]:
	Likewise.
	* math/auto-libm-test-in: Add another test of expm1.
	* math/auto-libm-test-out: Regenerated.