about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Consolidate fallocate{64} implementationsAdhemerval Zanella2016-10-0713-102/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates all the fallocate{64} implementation for Linux in only one (sysdeps/unix/sysv/linux/fallocate{64}.c). It also removes the syscall from the auto-generation using assembly macros. The new macro SYSCALL_LL{64} is used to handle the offset argument. Checked on x86_64, x32, i386, aarch64, and ppc64le. * sysdeps/unix/sysv/linux/Makefile (test): Add tst-fallocate and tst-fallocate64. * sysdeps/unix/sysv/linux/tst-fallocate.c: New file. * sysdeps/unix/sysv/linux/tst-fallocate64.c: Likewise. * sysdeps/unix/sysv/linux/tst-fallocate-common.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c: Remove file. * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/fallocate.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/fallocate64.c: Likewise. * sysdeps/unix/sysv/linux/fallocate.c (fallocate): Use SYSCALL_LL macro on offset argument. * sysdeps/unix/sysv/linux/fallocate64.c (fallocate64): Use SYSCALL_LL64 on offset argument. * test-skeleton.c (FAIL_RET): Add macro. (FAIL_EXIT): Likewise. (FAIL_EXIT1): Likewise. (_FAIL): Likewise.
* resolv: Remove RES_USEBSTRING and its implementation [BZ #20629]Florian Weimer2016-10-077-266/+26
| | | | | | In ns_name_ntop, the NS_CMPRSFLGS check is no longer needed because labellen (called earlier) already rejects everything which is not a plain label (compression references and extended label types).
* resolv: Remove RES_NOIP6DOTINT and its implementationFlorian Weimer2016-10-077-20/+17
|
* resolv: Deprecate unimplemented flagsFlorian Weimer2016-10-076-9/+33
| | | | | | RES_AAONLY, RES_PRIMARY, RES_NOCHECKNAME, RES_KEEPTSIG result in compile-time warnings. Some of these flags are still used in applications.
* Use libc_ifunc macro for siglongjmp, longjmp in libpthread.Stefan Liebler2016-10-073-20/+14
| | | | | | | | | | | | | This patch uses the libc_ifunc macro to create already existing ifunc functions longjmp_ifunc, siglongjmp_ifunc if HAVE_IFUNC is defined. The s390 pt-longjmp.c includes the common pt-longjmp.c and uses strong_alias to create the longjmp, siglongjmp symbols for glibc version 2.19. ChangeLog: * nptl/pt-longjmp.c (DEFINE_LONGJMP): Use libc_ifunc macro. * sysdeps/unix/sysv/linux/s390/pt-longjmp.c (longjmp, siglongjmp): Use strong_alias to create symbols for glibc verison 2.19.
* Use libc_ifunc macro for vfork in libpthread.Stefan Liebler2016-10-072-17/+9
| | | | | | | | | This patch uses the libc_ifunc macro to create already existing ifunc functions vfork_ifunc and __vfork_ifunc if HAVE_IFUNC is defined. ChangeLog: * nptl/pt-vfork.c (DEFINE_VFORK): Use libc_ifunc macro.
* Use libc_ifunc macro for system in libpthread.Stefan Liebler2016-10-072-15/+8
| | | | | | | | | This patch uses the libc_ifunc macro to create already existing ifunc function system_ifunc if HAVE_IFUNC is defined. ChangeLog: * nptl/pt-system.c (system_ifunc): Use libc_ifunc macro.
* Use libc_ifunc macro for clock_* symbols in librt.Stefan Liebler2016-10-072-19/+19
| | | | | | | | | | | | This patch uses the libc_ifunc macro to create already existing ifunc functions clock_getres, clock_gettime, clock_settime, clock_getcpuclockid and clock_nanosleep. If HAVE_IFUNC is defined, the macro COMPAT_REDIRECT uses the libc_ifunc macro. Furthermore some whitespace damage is cleaned. ChangeLog: * rt/clock-compat.c (COMPAT_REDIRECT): Use libc_ifunc macro.
* ppc: Use libc_ifunc macro for time, gettimeofday.Stefan Liebler2016-10-073-62/+73
| | | | | | | | | | | | | | | | This patch uses the libc_ifunc_hidden macro to create already existing ifunc functions time and gettimeofday on power. This way, the libc_hidden_def macro can be used instead of inline assemblies. On ppc32, the __GI_* symbols do not target the ifunc symbol and thus the redirection construct has to be applied here. ChangeLog: * sysdeps/unix/sysv/linux/powerpc/gettimeofday.c (__gettimeofday): Use libc_ifunc_hidden and libc_hidden_def macro. Redirect ifunced function in header for using it as type for ifunc function because __GI_* symbols for ppc32 do not target the ifunc symbols. * sysdeps/unix/sysv/linux/powerpc/time.c (time): Likewise.
* i386, x86: Use libc_ifunc macro for time, gettimeofday.Stefan Liebler2016-10-076-49/+62
| | | | | | | | | | | | | | | | | | | | | | | This patch uses the libc_ifunc_hidden macro to create already existing ifunc functions time and gettimeofday on intel. This way, the libc_hidden_def macro can be used instead of the libc_ifunc_hidden_def one which was only used here. Thus the macro is removed from libc-symbols.h. On i386, the __GI_* symbols do not target the ifunc symbol and thus the redirection construct has to be applied here. ChangeLog: * sysdeps/unix/sysv/linux/x86/gettimeofday.c (__gettimeofday): Use libc_ifunc_hidden macro. Use libc_hidden_def instead of libc_ifunc_hidden_def. * sysdeps/unix/sysv/linux/x86/time.c (time): Likewise. * sysdeps/unix/sysv/linux/i386/gettimeofday.c (__gettimeofday): Redirect ifunced function in header for using it as type of ifunc'ed function. Redefine libc_hidden_def to use fallback non ifunc'ed function for __GI_* symbol. * sysdeps/unix/sysv/linux/i386/time.c (time): Likewise. * include/libc-symbols.h (libc_ifunc_hidden_def, libc_ifunc_hidden_def1): Delete macro.
* s390: Refactor ifunc resolvers due to false debuginfo.Stefan Liebler2016-10-0731-85/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adjusts the s390 specific ifunc helper macros in ifunc-resolve.h to use the common __ifunc macro, which uses gcc attribute ifunc to get rid of the false debuginfo. Therefore the redirection construct is applied where needed. Perhaps in future we can switch some of the internal symbols __GI_* from the fallback variant to the ifunc function. But this change is not straightforward due to a segmentation fault while linking libc.so with older binutils on s390. ChangeLog: [BZ #20478] * sysdeps/s390/multiarch/ifunc-resolve.h (s390_vx_libc_ifunc2, s390_libc_ifunc): Use __ifunc from libc-symbols.h to create ifunc symbols. (s390_vx_libc_ifunc_init, s390_vx_libc_ifunc_redirected , s390_vx_libc_ifunc2_redirected, s390_libc_ifunc_init): New define. * sysdeps/s390/multiarch/memchr.c: Redirect ifunced function in header for using it as type for ifunc function. * sysdeps/s390/multiarch/mempcpy.c: Likewise. * sysdeps/s390/multiarch/rawmemchr.c: Likewise. * sysdeps/s390/multiarch/stpcpy.c: Likewise. * sysdeps/s390/multiarch/stpncpy.c: Likewise. * sysdeps/s390/multiarch/strcat.c: Likewise. * sysdeps/s390/multiarch/strchr.c: Likewise. * sysdeps/s390/multiarch/strcmp.c: Likewise. * sysdeps/s390/multiarch/strcpy.c: Likewise. * sysdeps/s390/multiarch/strcspn.c: Likewise. * sysdeps/s390/multiarch/strlen.c: Likewise. * sysdeps/s390/multiarch/strncmp.c: Likewise. * sysdeps/s390/multiarch/strncpy.c: Likewise. * sysdeps/s390/multiarch/strnlen.c: Likewise. * sysdeps/s390/multiarch/strpbrk.c: Likewise. * sysdeps/s390/multiarch/strrchr.c: Likewise. * sysdeps/s390/multiarch/strspn.c: Likewise. * sysdeps/s390/multiarch/wcschr.c: Likewise. * sysdeps/s390/multiarch/wcscmp.c: Likewise. * sysdeps/s390/multiarch/wcspbrk.c: Likewise. * sysdeps/s390/multiarch/wcsspn.c: Likewise. * sysdeps/s390/multiarch/wmemchr.c: Likewise. * sysdeps/s390/multiarch/wmemset.c: Likewise. * sysdeps/s390/s390-32/multiarch/memcmp.c: Likewise. * sysdeps/s390/s390-32/multiarch/memcpy.c: Likewise. * sysdeps/s390/s390-32/multiarch/memset.c: Likewise. * sysdeps/s390/s390-64/multiarch/memcmp.c: Likewise. * sysdeps/s390/s390-64/multiarch/memcpy.c: Likewise. * sysdeps/s390/s390-64/multiarch/memset.c: Likewise.
* Use gcc attribute ifunc in libc_ifunc macro instead of inline assembly due ↵Stefan Liebler2016-10-0739-238/+513
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to false debuginfo. The current s390 ifunc resolver for vector optimized functions and the common libc_ifunc macro in include/libc-symbols.h uses something like that to generate ifunc'ed functions: extern void *__resolve___strlen(unsigned long int dl_hwcap) asm (strlen); asm (".type strlen, %gnu_indirect_function"); This leads to false debug information: objdump --dwarf=info libc.so: ... <1><1e6424>: Abbrev Number: 43 (DW_TAG_subprogram) <1e6425> DW_AT_external : 1 <1e6425> DW_AT_name : (indirect string, offset: 0x1146e): __resolve___strlen <1e6429> DW_AT_decl_file : 1 <1e642a> DW_AT_decl_line : 23 <1e642b> DW_AT_linkage_name: (indirect string, offset: 0x1147a): strlen <1e642f> DW_AT_prototyped : 1 <1e642f> DW_AT_type : <0x1e4ccd> <1e6433> DW_AT_low_pc : 0x998e0 <1e643b> DW_AT_high_pc : 0x16 <1e6443> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa) <1e6445> DW_AT_GNU_all_call_sites: 1 <1e6445> DW_AT_sibling : <0x1e6459> <2><1e6449>: Abbrev Number: 44 (DW_TAG_formal_parameter) <1e644a> DW_AT_name : (indirect string, offset: 0x1845): dl_hwcap <1e644e> DW_AT_decl_file : 1 <1e644f> DW_AT_decl_line : 23 <1e6450> DW_AT_type : <0x1e4c8d> <1e6454> DW_AT_location : 0x122115 (location list) ... The debuginfo for the ifunc-resolver function contains the DW_AT_linkage_name field, which names the real function name "strlen". If you perform an inferior function call to strlen in lldb, then it fails due to something like that: "error: no matching function for call to 'strlen' candidate function not viable: no known conversion from 'const char [6]' to 'unsigned long' for 1st argument" The unsigned long is the dl_hwcap argument of the resolver function. The strlen function itself has no debufinfo. The s390 ifunc resolver for memset & co uses something like that: asm (".globl FUNC" ".type FUNC, @gnu_indirect_function" ".set FUNC, __resolve_FUNC"); This way the debuginfo for the ifunc-resolver function does not conain the DW_AT_linkage_name field and the real function has no debuginfo, too. Using this strategy for the vector optimized functions leads to some troubles for functions like strnlen. Here we have __strnlen and a weak alias strnlen. The __strnlen function is the ifunc function, which is realized with the asm- statement above. The weak_alias-macro can't be used here due to undefined symbol: gcc ../sysdeps/s390/multiarch/strnlen.c -c ... In file included from <command-line>:0:0: ../sysdeps/s390/multiarch/strnlen.c:28:24: error: ‘strnlen’ aliased to undefined symbol ‘__strnlen’ weak_alias (__strnlen, strnlen) ^ ./../include/libc-symbols.h:111:26: note: in definition of macro ‘_weak_alias’ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); ^ ../sysdeps/s390/multiarch/strnlen.c:28:1: note: in expansion of macro ‘weak_alias’ weak_alias (__strnlen, strnlen) ^ make[2]: *** [build/string/strnlen.o] Error 1 As the __strnlen function is defined with asm-statements the function name __strnlen isn't known by gcc. But the weak alias can also be done with an asm statement to resolve this issue: __asm__ (".weak strnlen\n\t" ".set strnlen,__strnlen\n"); In order to use the weak_alias macro, gcc needs to know the ifunc function. The minimum gcc to build glibc is currently 4.7, which supports attribute((ifunc)). See https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html. It is only supported if gcc is configured with --enable-gnu-indirect-function or gcc supports it by default for at least intel and s390x architecture. This patch uses the old behaviour if gcc support is not available. Usage of attribute ifunc is something like that: __typeof (FUNC) FUNC __attribute__ ((ifunc ("__resolve_FUNC"))); Then gcc produces the same .globl, .type, .set assembler instructions like above. And the debuginfo does not contain the DW_AT_linkage_name field and there is no debuginfo for the real function, too. But in order to get it work, there is also some extra work to do. Currently, the glibc internal symbol on s390x e.g. __GI___strnlen is not the ifunc symbol, but the fallback __strnlen_c symbol. Thus I have to omit the libc_hidden_def macro in strnlen.c (here is the ifunc function __strnlen) because it is already handled in strnlen-c.c (here is __strnlen_c). Due to libc_hidden_proto (__strnlen) in string.h, compiling fails: gcc ../sysdeps/s390/multiarch/strnlen.c -c ... In file included from <command-line>:0:0: ../sysdeps/s390/multiarch/strnlen.c:53:24: error: ‘strnlen’ aliased to undefined symbol ‘__strnlen’ weak_alias (__strnlen, strnlen) ^ ./../include/libc-symbols.h:111:26: note: in definition of macro ‘_weak_alias’ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); ^ ../sysdeps/s390/multiarch/strnlen.c:53:1: note: in expansion of macro ‘weak_alias’ weak_alias (__strnlen, strnlen) ^ make[2]: *** [build/string/strnlen.os] Error 1 I have to redirect the prototypes for __strnlen in string.h and create a copy of the prototype for using as ifunc function: __typeof (__redirect___strnlen) __strnlen __attribute__ ((ifunc ("__resolve_strnlen"))); weak_alias (__strnlen, strnlen) This way there is no trouble with the internal __GI_* symbols. Glibc builds fine with this construct and the debuginfo is "correct". For functions without a __GI_* symbol like memccpy this redirection is not needed. This patch adjusts the common libc_ifunc and libm_ifunc macro to use gcc attribute ifunc. Due to this change, the macro users where the __GI_* symbol does not target the ifunc symbol have to be prepared with the redirection construct. Furthermore a configure check to test gcc support is added. If it is not supported, the old behaviour is used. This patch also prepares the libc_ifunc macro to be useable in s390-ifunc-macro. The s390 ifunc-resolver-functions do have an hwcaps parameter and not all resolvers need the same initialization code. The next patch in this series changes the s390 ifunc macros to use this common one. ChangeLog: * include/libc-symbols.h (__ifunc_resolver): New macro is used by __ifunc* macros. (__ifunc): New macro uses gcc attribute ifunc or inline assembly depending on HAVE_GCC_IFUNC. (libc_ifunc, libm_ifunc): Use __ifunc as base macro. (libc_ifunc_redirected, libc_ifunc_hidden, libm_ifunc_init): New macro. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c: Redirect ifunced function in header for using as type for ifunc function. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memset.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/mempcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpncpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcat.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strnlen.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strstr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf.c: Add libc_hidden_def() and use libc_ifunc_hidden() macro instead of libc_ifunc() macro. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Likewise.
* Add configure check to test if gcc supports attribute ifunc.Stefan Liebler2016-10-077-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a configure check to test if gcc supports attribute ifunc. The support can either be enabled in <gcc-src>/gcc/config.gcc for one architecture in general by setting default_gnu_indirect_function variable to yes or by configuring gcc with --enable-gnu-indirect-function. The next patch rewrites libc_ifunc macro to use gcc attribute ifunc instead of inline assembly to generate the IFUNC symbols due to false debuginfo. If gcc does not support attribute ifunc, the old approach for generating ifunc'ed symbols is used. Then the debug-information is false. Thus it is recommended to use a gcc with indirect function support (See notes in INSTALL). After this patch-series these inline assemblies for ifunc-handling are not scattered in multiple files but are used only indirect via ifunc-macros and can simply removed in libc-symbols.h in future. If glibc is configured with --enable-multi-arch and gcc does not support attribute ifunc, a configure warning is dumped! ChangeLog: * config.h.in (HAVE_GCC_IFUNC): New undef. * configure.ac: Add check if gcc supports attribute ifunc feature. * configure: Regenerated. * manual/install.texi: Add recommendation for gcc with indirect-function support. * INSTALL: Regenerated.
* Add iseqsig.Joseph Myers2016-10-0640-5/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TS 18661-1 adds an iseqsig type-generic comparison macro to <math.h>. This macro is like the == operator except that unordered operands result in the "invalid" exception and errno being set to EDOM. This patch implements this macro for glibc. Given the need to set errno, this is implemented with out-of-line functions __iseqsigf, __iseqsig and __iseqsigl (of which the last only exists at all if long double is ABI-distinct from double, so no function aliases or compat support are needed). The present patch ignores excess precision issues; I intend to deal with those in a followup patch. (Like comparison operators, type-generic comparison macros should *not* convert operands to their semantic types but should preserve excess range and precision, meaning that for some argument types and values of FLT_EVAL_METHOD, an underlying function should be called for a wider type than that of the arguments.) The underlying functions are implemented with the type-generic template machinery. Comparing x <= y && x >= y is sufficient in ISO C to achieve an equality comparison with "invalid" raised for unordered operands (and the results of those two comparisons can also be used to tell whether errno needs to be set). However, some architectures have GCC bugs meaning that unordered comparison instructions are used instead of ordered ones. Thus, a mechanism is provided for architectures to use an explicit call to feraiseexcept to raise exceptions if required. If your architecture has such a bug you should add a fix-fp-int-compare-invalid.h header for it, with a comment pointing to the relevant GCC bug report; if such a GCC bug is fixed, that header's contents should have a __GNUC_PREREQ conditional added so that the workaround can eventually be removed for that architecture. Tested for x86_64, x86, mips64, arm and powerpc. * math/math.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (iseqsig): New macro. * math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (__iseqsig): New declaration. * math/s_iseqsig_template.c: New file. * math/Versions (__iseqsigf): New libm symbol at version GLIBC_2.25. (__iseqsig): Likewise. (__iseqsigl): Likewise. * math/libm-test.inc (iseqsig_test_data): New array. (iseqsig_test): New function. (main): Call iseqsig_test. * math/Makefile (gen-libm-calls): Add s_iseqsigF. * manual/arith.texi (FP Comparison Functions): Document iseqsig. * manual/libm-err-tab.pl: Update comment on interfaces without ulps tabulated. * sysdeps/generic/fix-fp-int-compare-invalid.h: New file. * sysdeps/powerpc/fpu/fix-fp-int-compare-invalid.h: Likewise. * sysdeps/x86/fpu/fix-fp-int-compare-invalid.h: Likewise. * sysdeps/nacl/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
* Update comments for some functions in s_sin.cSiddhesh Poyarekar2016-10-062-22/+20
| | | | | Update comments for some functions to bring them in sync with what the functions are actually doing.
* Adjust calls to do_sincos_1 and do_sincos_2 in s_sincos.cSiddhesh Poyarekar2016-10-062-4/+7
| | | | | | | Adjust calls to do_sincos_1 and do_sincos_2 to pass a boolean shift_quadrant instead of the numeric 0 and 1. This does not affect codegen.
* Make quadrant shift a boolean in reduce_and_compute in s_sin.cSiddhesh Poyarekar2016-10-062-4/+11
| | | | | | | | Like the previous change, make the quadrant shift a boolean to make it clearer that we will do at most a single rotation of the quadrants to compute the cosine from the sine function. This does not affect codegen.
* Manual typos: System Databases and Name Service SwitchSiddhesh Poyarekar2016-10-062-18/+23
| | | | * manual/nss.texi: Fix typos in the manual.
* Manual typos: Contributors toRical Jasan2016-10-062-3/+5
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/contrib.texi: Fix typos in the manual.
* Manual typos: Library MaintenanceRical Jasan2016-10-062-1/+3
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/maint.texi: Fix typos in the manual.
* Manual typos: InstallingRical Jasan2016-10-063-7/+10
| | | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/install.texi: Fix typos in the manual. * INSTALL: Regenerated.
* Manual typos: C Language Facilities in the LibraryRical Jasan2016-10-062-2/+4
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/lang.texi: Fix typos in the manual.
* Manual typos: Internal probesRical Jasan2016-10-062-2/+4
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/probes.texi: Fix typos in the manual.
* Manual typos: POSIX ThreadsRical Jasan2016-10-062-1/+3
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/threads.texi: Fix typos in the manual.
* Manual typos: Debugging supportRical Jasan2016-10-062-2/+4
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/debug.texi: Fix typos in the manual.
* Manual typos: DES Encryption and Password HandlingRical Jasan2016-10-062-4/+6
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/crypt.texi: Fix typos in the manual.
* Manual typos: System Configuration ParametersRical Jasan2016-10-062-5/+7
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/conf.texi: Fix typos in the manual.
* Manual typos: System ManagementRical Jasan2016-10-062-25/+27
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/sysinfo.texi: Fix typos in the manual.
* Manual typos: Users and GroupsRical Jasan2016-10-062-17/+18
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/users.texi: Fix typos in the manual.
* Manual typos: Job ControlRical Jasan2016-10-062-1/+3
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/job.texi: Fix typos in the manual.
* Manual typos: ProcessesRical Jasan2016-10-062-1/+3
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/process.texi: Fix typos in the manual.
* Manual typos: The Basic Program/System InterfaceRical Jasan2016-10-064-14/+18
| | | | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/argp.texi: Fix typos in the manual. * manual/getopt.texi: Likewise. * manual/startup.texi: Likewise.
* Manual typos: Signal HandlingRical Jasan2016-10-062-3/+5
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/signal.texi: Fix typos in the manual.
* Manual typos: Non-Local ExitsRical Jasan2016-10-062-4/+6
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/setjmp.texi: Fix typos in the manual.
* Manual typos: Resource Usage and LimitationRical Jasan2016-10-062-26/+28
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/resource.texi: Fix typos in the manual.
* Manual typos: Date and TimeRical Jasan2016-10-062-19/+21
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/time.texi: Fix typos in the manual.
* Manual typos: Arithmetic FunctionsRical Jasan2016-10-062-8/+10
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/arith.texi: Fix typos in the manual.
* Manual typos: MathematicsRical Jasan2016-10-062-18/+20
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/math.texi: Fix typos in the manual.
* Manual typos: SyslogRical Jasan2016-10-062-2/+4
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/syslog.texi: Fix typos in the manual.
* Manual typos: Low-Level Terminal InterfaceRical Jasan2016-10-062-9/+11
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/terminal.texi: Fix typos in the manual.
* Manual typos: SocketsRical Jasan2016-10-062-14/+16
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/socket.texi: Fix typos in the manual.
* Manual typos: File System InterfaceRical Jasan2016-10-062-21/+23
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/filesys.texi: Fix typos in the manual.
* Manual typos: Low-Level Input/OutputRical Jasan2016-10-062-37/+39
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/llio.texi: Fix typos in the manual.
* Manual typos: Input/Output on StreamsRical Jasan2016-10-062-41/+46
| | | | | | 2016-05-06 Rical Jasan <ricaljasan@pacific.net> * manual/stdio.text: Fix typos in the manual.
* Check n instead of k1 to decide on sign of sin/cos resultSiddhesh Poyarekar2016-10-062-1/+4
| | | | | | | | | | | | | | | | | | | | | For k1 in 1 and 3, n can only have values of 0 and 2, so checking k1 & 2 is equivalent to checking n & 2. We prefer the latter so that we don't use k1 for anything other than selecting the quadrant in do_sincos_1, thus dropping it completely. The previous logic was: "Compute sine for the value and based on the new rotated quadrant (k1) negate the value if we're in the fourth quadrant." With this change, the logic now is: "Compute sine for the value and negate it if we were either (1) in the fourth quadrant or (2) we actually wanted the cosine and were in the third quadrant." * sysdeps/ieee754/dbl-64/s_sin.c (do_sincos_1): Check N instead of K1.
* Make the quadrant shift K a bool in do_sincos_* functionsSiddhesh Poyarekar2016-10-062-19/+29
| | | | | | | | | | | | | | | | The do_sincos_* functions are helpers to compute sin/cos, where they get cosine by computing sine for the next quadrant. This is decided with the value of K passed to it, which is the amount by which to shift the quadrant. Since we will only need the shift to be 0 or 1, we make K a bool to make that explicit. * sysdeps/ieee754/dbl-64/s_sin.c (do_sincos_1): Rename K to SHIFT_QUADRANT and make it bool. (do_sincos_2): Likewise. (sloww): Likewise. (sloww1): Likewise. (__sin): Adjust calls to do_sincos_1 and do_sincos_2. (__cos): Likewise.
* powerpc: Regenerate ULPsTulio Magno Quites Machado Filho2016-10-052-55/+59
| | | | * sysdeps/powerpc/fpu/libm-test-ulps: Regenerated.
* Fix LONG_WIDTH, ULONG_WIDTH include ordering issue.Joseph Myers2016-10-042-14/+12
| | | | | | | | | | | | | | | | | | | As described in <https://sourceware.org/ml/libc-alpha/2016-10/msg00047.html>, there is an include ordering issue with the integer width macros in glibc's <limits.h>, where definitions conditional on LONG_MAX do not work as intended because when the headers are installed, this part of glibc's <limits.h> is processed before the part of GCC's <limits.h> that will define LONG_MAX. This patch changes the definitions just to use __WORDSIZE for the expansion of LONG_WIDTH and ULONG_WIDTH rather than making those definitions conditional on LONG_MAX. Tested for x86_64 and x86. * include/limits.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (LONG_WIDTH): Define to __WORDSIZE, not conditional on [LONG_MAX == 0x7fffffffL]. [__GLIBC_USE (IEC_60559_BFP_EXT)] (ULONG_WIDTH): Likewise.
* powerpc: Installed-header hygieneTulio Magno Quites Machado Filho2016-10-044-9/+23
| | | | | | | | Fix powerpc-specific headers: - Make it compatible to C89 by replace references to inline by __inline__. - Get the definition of sigset_t used by sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h. - Includes missing header file.
* S390: Regenerate ULPsStefan Liebler2016-10-042-8/+6
| | | | | | | | Regenerated ulps file after recent commit "Use __builtin_fma more in dbl-64 code.". ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.