aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
AgeCommit message (Collapse)AuthorFilesLines
2017-09-01Obsolete pow10 functions.Joseph Myers24-397/+33
This patch obsoletes the pow10, pow10f and pow10l functions (makes them into compat symbols, not available for new ports or static linking). The exp10 names for these functions are standardized (in TS 18661-4) and were added in the same glibc version (2.1) as pow10 so source code can change to use them without any loss of portability. Since pow10 is deliberately not provided for _Float128, only exp10, this slightly simplifies moving to the new wrapper templates in the !LIBM_SVID_COMPAT case, by avoiding needing to arrange for pow10, pow10f and pow10l to be defined by those templates. Tested for x86_64, and with build-many-glibcs.py. * manual/math.texi (pow10): Do not document. (pow10f): Likewise. (pow10l): Likewise. * math/bits/mathcalls.h [__USE_GNU] (pow10): Do not declare. * math/bits/math-finite.h [__USE_GNU] (pow10): Likewise. * math/libm-test-exp10.inc (pow10_test): Remove. (do_test): Do not call pow10. * math/w_exp10_compat.c (pow10): Make into compat symbol. [NO_LONG_DOUBLE] (pow10l): Likewise. * math/w_exp10f_compat.c (pow10f): Likewise. * math/w_exp10l_compat.c (pow10l): Likewise. * sysdeps/ia64/fpu/e_exp10.S: Include <shlib-compat.h>. (pow10): Make into compat symbol. * sysdeps/ia64/fpu/e_exp10f.S: Include <shlib-compat.h>. (pow10f): Make into compat symbol. * sysdeps/ia64/fpu/e_exp10l.S: Include <shlib-compat.h>. (pow10l): Make into compat symbol. * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Remove pow10. (CFLAGS-nldbl-pow10.c): Remove variable.. * sysdeps/ieee754/ldbl-opt/nldbl-pow10.c: Remove file. * sysdeps/ieee754/ldbl-opt/w_exp10_compat.c (pow10l): Condition on [SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)]. * sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c (compat_symbol): Undefine and redefine. (pow10l): Make into compat symbol. * sysdeps/aarch64/libm-test-ulps: Remove pow10 ulps. * sysdeps/alpha/fpu/libm-test-ulps: Likewise. * sysdeps/arm/libm-test-ulps: Likewise. * sysdeps/hppa/fpu/libm-test-ulps: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise. * sysdeps/microblaze/libm-test-ulps: Likewise. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/nios2/libm-test-ulps: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps: Likewise. * sysdeps/s390/fpu/libm-test-ulps: Likewise. * sysdeps/sh/libm-test-ulps: Likewise. * sysdeps/sparc/fpu/libm-test-ulps: Likewise. * sysdeps/tile/libm-test-ulps: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2017-09-01Include <string.h> for strcmp call from sysdeps/unix/sysv/linux/gentempfd.c.Joseph Myers1-0/+1
* sysdeps/unix/sysv/linux/gentempfd.c: Include <string.h>.
2017-09-01linux: Implement tmpfile with O_TMPFILE (BZ#21530)Adhemerval Zanella1-0/+34
This patch adds O_TMPFILE support to tmpfile on Linux. This is similar to the previous suggestion by Andreas Schwab [1] with the difference the file descriptor creation is parameterized to compartmentalize Linux only open flags (O_TMPFILE) on sysdeps. Checked on x86_64-linux-gnu. Adhemerval Zanella <adhemerval.zanella@linaro.org> Andreas Schwab <schwab@suse.de> [BZ #21530] * include/stdio.h (__gen_tempfd): New function. * stdio-common/Makefile (routines): Add gentempfd. * stdio-common/gentempfd.c: New file. * sysdeps/unix/sysv/linux/gentempfd.c: Likewise. * stdio-common/tmpfile.c (tmpfile): First try to use a system specific unnamed file first. [1] https://sourceware.org/ml/libc-alpha/2017-06/msg01293.html
2017-09-01getaddrinfo: Fix error handling in gethosts [BZ #21915] [BZ #21922]Florian Weimer1-22/+20
The old code uses errno as the primary indicator for success or failure. This is wrong because errno is only set for specific combinations of the status return value and the h_errno variable.
2017-09-01getaddrinfo: Return EAI_NODATA if gethostbyname2_r reports NO_DATA [BZ #21922]Florian Weimer1-0/+8
2017-09-01getaddrinfo: In gaih_inet, use h_errno for certain status values onlyFlorian Weimer1-1/+4
h_errno is not set for NSS_STATUS_SUCCESS, so its value might not be accurate at this point.
2017-09-01getaddrinfo: Properly set errno for NSS function lookup failureFlorian Weimer1-6/+10
2017-09-01getaddrinfo: Use &h_errno has the h_errno pointerFlorian Weimer1-28/+18
This simplifies the code because it is not necessary to propagate the temporary h_errno value to the thread-local variable. It also increases compatibility with NSS modules which update only one of the two places.
2017-09-01getaddrinfo: Use &errno has the errno pointerFlorian Weimer1-13/+10
Similar code in nss/getXXbyYY_r.c is already using &errno as the argument.
2017-08-31ILP32 math changesSteve Ellcey8-12/+87
* sysdeps/aarch64/fpu/s_llrint.c (OREG_SIZE): New macro. * sysdeps/aarch64/fpu/s_llround.c (OREG_SIZE): Likewise. * sysdeps/aarch64/fpu/s_llrintf.c (OREGS, IREGS): Remove. (IREG_SIZE, OREG_SIZE): New macros. * sysdeps/aarch64/fpu/s_llroundf.c: (OREGS, IREGS): Remove. (IREG_SIZE, OREG_SIZE): New macros. * sysdeps/aarch64/fpu/s_lrintf.c (IREGS): Remove. (IREG_SIZE): New macro. * sysdeps/aarch64/fpu/s_lroundf.c (IREGS): Remove. (IREG_SIZE): New macro. * sysdeps/aarch64/fpu/s_lrint.c (get-rounding-mode.h, stdint.h): New includes. (IREG_SIZE, OREG_SIZE): Initialize if not already set. (OREGS, IREGS): Set based on IREG_SIZE and OREG_SIZE. (__CONCATX): Handle exceptions correctly on large values that may set FE_INVALID. * sysdeps/aarch64/fpu/s_lround.c (IREG_SIZE, OREG_SIZE): Initialize if not already set. (OREGS, IREGS): Set based on IREG_SIZE and OREG_SIZE.
2017-08-31Remove NO_CANCELLATION macroAdhemerval Zanella20-30/+16
The NO_CANCELLATION macro is used currently on generic headers to define non cancellable syscalls and on Linux fcntl to implement the non cancellable variation. Former should be single-handled by not-cancel.h header and former could be simplified build both cancellable and non cancellable for default objects and alias the non-cancellable to default one for rtld ones (since Linux already support cancellation as default). This patch thus removes the NO_CANCELLATION macro and its usage. The generic non cancellable fcntl is route to internal fcntl. Checked on x86_64-linux-gnu and i686-linux-gnu. Also checked with a build again major ABIs. * sysdeps/generic/not-cancel.h (NO_CANCELLATION): Remove macro. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (NO_CANCELLATION): Likewise * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (NO_CANCELLATION): Likewise. * sysdeps/unix/sysv/linux/not-cancel.h (__fcntl_nocancel): Add hidden prototype. * sysdeps/unix/sysv/linux/fcntl.c (__fcntl_nocancel): Define only for !IS_IN (rtld) and remove NO_CANCELLATION usage.
2017-08-31Change argument type passed to ifunc resolversSteve Ellcey1-1/+1
* sysdeps/aarch64/dl-irel.h: (elf_ifunc_invoke): Change argument type in resolver call.
2017-08-31posix: Remove internal_function attributeFlorian Weimer8-18/+14
2017-08-31inet: Remove internal_function attributeFlorian Weimer2-2/+0
2017-08-31Simplify NAN definitions.Joseph Myers2-119/+0
Similar to my patches for HUGE_VAL and INFINITY. this patch eliminates the bits/nan.h headers. __builtin_nanf ("") is used to define NAN for GCC 3.3 and later; the fallback is (0.0f / 0.0f), which is a constant expression for a quiet NaN of type float, but raises a spurious "invalid" exception outside static initializers, which seems the best that can be done purely in standard C. Again, if anyone actually uses a compiler with its own incompatible extension for producing a constant quiet NaN, we can add compiler conditionals. Tested for x86_64. * math/math.h [__USE_ISOC99] (NAN): Define directly here. Do not include <bits/nan.h>. * math/Makefile (headers): Remove bits/nan.h. * bits/nan.h: Remove. * sysdeps/ieee754/bits/nan.h: Likewise. * sysdeps/mips/bits/nan.h: Likewise.
2017-08-31Simplify INFINITY definitions.Joseph Myers1-29/+0
Similar to my patch for HUGE_VAL, this patch eliminates the bits/inf.h headers and just unconditionally uses the same definitions as the sysdeps/ieee754 version did (__builtin_inff () for GCC >= 3.3, otherwise HUGE_VALF), directly in math.h, so removing an unnecessary level of indirection. Tested for x86_64. * math/math.h [__USE_ISOC99] (INFINITY): Define directly here. Do not include <bits/inf.h>. * math/Makefile (headers): Remove bits/inf.h. * bits/inf.h: Remove. * sysdeps/ieee754/bits/inf.h: Likewise.
2017-08-31Simplify HUGE_VAL definitions.Joseph Myers7-328/+0
There are various bits/huge_val*.h headers to define HUGE_VAL and related macros. All of them use __builtin_huge_val etc. for GCC 3.3 and later. Then there are various fallbacks, such as using a large hex float constant for GCC 2.96 and later, or using unions (with or without compound literals) to construct the bytes of an infinity, with this last being the reason for having architecture-specific files. Supporting TS 18661-3 _FloatN / _FloatNx types that have the same format as other supported types will mean adding more such macros; needing to add more headers for them doesn't seem very desirable. The fallbacks based on bytes of the representation of an infinity do not meet the standard requirements for a constant expression. At least one of them is also wrong: sysdeps/sh/bits/huge_val.h is producing a mixed-endian representation which does not match what GCC does. This patch eliminates all those headers, defining the macros directly in math.h. For GCC 3.3 and later, the built-in functions are used as now. For other compilers, a large constant 1e10000 (with appropriate suffix) is used. This is like the fallback for GCC 2.96 and later, but without using hex floats (which have no apparent advantage here). It is unambiguously valid standard C for all floating-point formats with infinities, which covers all formats supported by glibc or likely to be supported by glibc in future (C90 DR#025 said that if a floating-point format represents infinities, all real values lie within the range of representable values, so the constraints for constant expressions are not violated), but may generate compiler warnings and wouldn't handle the TS 18661-1 FENV_ROUND pragma correctly. If someone is actually using a compiler with glibc that does not claim to be GCC 3.3 or later, but which has a better way to define the HUGE_VAL macros, we can always add compiler conditionals in with alternative definitions. I intend to make similar changes for INF and NAN. The SNAN macros already just use __builtin_nans etc. with no fallback for compilers not claiming to be GCC 3.3 or later. Tested for x86_64. * math/math.h: Do not include bits/huge_val.h, bits/huge_valf.h, bits/huge_vall.h or bits/huge_val_flt128.h. (HUGE_VAL): Define directly here. [__USE_ISOC99] (HUGE_VALF): Likewise. [__USE_ISOC99] (HUGE_VALL): Likewise. [__HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (HUGE_VAL_F128): Likewise. * math/Makefile (headers): Remove bits/huge_val.h, bits/huge_valf.h, bits/huge_vall.h and bits/huge_val_flt128.h. * bits/huge_val.h: Remove. * bits/huge_val_flt128.h: Likewise. * bits/huge_valf.h: Likewise. * bits/huge_vall.h: Likewise. * sysdeps/ia64/bits/huge_vall.h: Likewise. * sysdeps/ieee754/bits/huge_val.h: Likewise. * sysdeps/ieee754/bits/huge_valf.h: Likewise. * sysdeps/m68k/m680x0/bits/huge_vall.h: Likewise. * sysdeps/sh/bits/huge_val.h: Likewise. * sysdeps/sparc/bits/huge_vall.h: Likewise. * sysdeps/x86/bits/huge_vall.h: Likewise.
2017-08-31elf: Remove internal_function attributeFlorian Weimer20-87/+50
2017-08-31gmon: Remove internal_function attributeFlorian Weimer2-4/+4
2017-08-31resolv: Remove internal_function attributeFlorian Weimer1-1/+0
2017-08-31dirent: Remove internal_function attributeFlorian Weimer4-6/+1
2017-08-31Linux getcwd: Remove internal_function attributeFlorian Weimer1-2/+2
2017-08-31aio: Remove internal_function function attributeFlorian Weimer5-23/+9
2017-08-30Fix mcontext_t sigcontext namespace (bug 21457).Joseph Myers26-81/+280
This patch completes the ucontext.h namespace fixes by fixing issues related to the use of struct sigcontext as mcontext_t, and inclusion of <bits/sigcontext.h> even when struct sigcontext is not so used. Inclusion of <bits/sigcontext.h> by <sys/ucontext.h> is removed; the way to get the sigcontext structure is by including <signal.h> (in a context where __USE_MISC is defined); the sysdeps/generic version of sys/ucontext.h keeps the inclusion by necessity, with a comment about how this is not namespace-clean, but the only configuration that used it, MicroBlaze, gets its own version of the header in this patch. Where mcontext_t was typedefed to struct sigcontext, the contents of struct sigcontext are inserted (with appropriate namespace handling to prefix fields with __ when __USE_MISC is not defined); review should check that this has been done correctly in each case, whether the definition of struct sigcontext comes from glibc headers or from the Linux kernel. This changes C++ name mangling on affected architectures (which do not include x86_64/x86). Tested for x86_64, and with build-many-glibcs.py. 2017-08-14 Joseph Myers <joseph@codesourcery.com> [BZ #21457] * sysdeps/arm/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/generic/sys/ucontext.h: Add comment about use of struct sigcontext and namespace requirements. * sysdeps/i386/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/m68k/sys/ucontext.h: Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. Include <bits/types.h>. * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym (oEXTENSION): Use __glibc_reserved1 instead of __reserved. * sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym: Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym: Use mcontext_t instead of struct sigcontext. * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): New macro. (struct __ia64_fpreg_mcontext): New type. (mcontext_t): Define structure contents rather than using struct sigcontext. (_SC_GR0_OFFSET): Use mcontext_t instead of struct sigcontext. (uc_sigmask): Define using __ctx. (uc_stack): Likewise. * sysdeps/unix/sysv/linux/ia64/sys/procfs.h: Include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h: New file. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Do not include <bits/sigcontext.h>. * sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Do not include <bits/sigcontext.h>. (__ctx): Define earlier. (mcontext_t): Define structure contents rather than using struct sigcontext. * sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Do not include <bits/sigcontext.h>. Include <bits/types.h>. * conform/Makefile (test-xfail-XPG42/signal.h/conform): Remove. (test-xfail-XPG42/sys/wait.h/conform): Likewise. (test-xfail-XPG42/ucontext.h/conform): Likewise. (test-xfail-UNIX98/signal.h/conform): Likewise. (test-xfail-UNIX98/sys/wait.h/conform): Likewise. (test-xfail-UNIX98/ucontext.h/conform): Likewise. (test-xfail-XOPEN2K/signal.h/conform): Likewise. (test-xfail-XOPEN2K/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K/ucontext.h/conform): Likewise. (test-xfail-POSIX2008/signal.h/conform): Likewise. (test-xfail-POSIX2008/sys/wait.h/conform): Likewise. (test-xfail-XOPEN2K8/signal.h/conform): Likewise. (test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise.
2017-08-30aarch64: Fix tst-makecontext3 in ILP32 mode.Steve Ellcey1-5/+5
* sysdeps/unix/sysv/linux/aarch64/makecontext.c (__makecontext): Use pointer to uint64_t instead of long int for sp.
2017-08-29Fix m68k bits/math-inline.h macro namespace (bug 22035).Joseph Myers1-33/+40
As shown by build bot failures <https://sourceware.org/ml/libc-testresults/2017-q3/msg00349.html> the m68k bits/mathinline.h is not namespace-clean: it fails to compile if the user has defined macros f or l before it is included, because of expansions of those arguments to __inline_functions. This patch changes the __inline_functions definitions to take not the suffix but a macro that concatenates it with the function name, to avoid the spurious macro expansions. Tested for m68k with build-many-glibcs.py. [BZ #22035] * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__inline_functions): Define to take a second argument that is a macro that concatentates a suffix, not the suffix itself. (__CONCAT_d): New macro. (__CONCAT_f): Likewise. (__CONCAT_l): Likewise.
2017-08-29MIPS/o32: Fix internal_syscall5/6/7Adhemerval Zanella14-186/+147
Fix a commit cc25c8b4c119 ("New pthread rwlock that is more scalable.") regression and prevent uncontrolled stack space usage from happening when a 5-, 6- or 7-argument syscall wrapper is placed in a loop. The cause of the problem is the use of `alloca' in regular MIPS/Linux wrappers to force the use of the frame pointer register in any function using one or more of these wrappers. Using the frame pointer register is required so as not to break frame unwinding as the the stack pointer is lowered within the inline asm used by these wrappers to make room for the stack arguments, which 5-, 6- and 7-argument syscalls use with the o32 ABI. The regular MIPS/Linux wrappers are macros however, expanded inline, and stack allocations made with `alloca' are not discarded until the return of the function they are made in. Consequently if called in a loop, then virtual memory is wasted, and if the loop goes through enough iterations, then ultimately available memory can get exhausted causing the program to crash. Address the issue by replacing the inline code with standalone assembly functions, which rely on the compiler arranging syscall arguments according to the o32 function calling convention, which MIPS/Linux syscalls also use, except for the syscall number passed and the error flag returned. This way there is no need to fiddle with the stack pointer anymore and all that has to be handled in the new standalone functions is the special handling of the syscall number and the error flag. Redirect 5-, 6- or 7-argument MIPS16/Linux syscall wrappers to these new functions as well, so as to avoid an unnecessary double call the existing wrappers would cause with the new arrangement. [BZ #21956] * sysdeps/unix/sysv/linux/mips/mips32/mips16/Makefile [subdir = misc] (sysdep_routines): Remove `mips16-syscall5', `mips16-syscall6' and `mips16-syscall7'. (CFLAGS-mips16-syscall5.c, CFLAGS-mips16-syscall6.c) (CFLAGS-mips16-syscall7.c): Remove. * sysdeps/unix/sysv/linux/mips/mips32/mips16/Versions (libc): Remove `__mips16_syscall5', `__mips16_syscall6' and `__mips16_syscall7'. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall0.c (__mips16_syscall0): Rename `__mips16_syscall_return' to `__mips_syscall_return'. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall1.c (__mips16_syscall1): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall2.c (__mips16_syscall2): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall3.c (__mips16_syscall3): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall4.c (__mips16_syscall4): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall5.c: Remove. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall6.c: Remove. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall7.c: Remove. * sysdeps/unix/sysv/linux/mips/mips32/mips16/mips16-syscall.h (__mips16_syscall5): Expand to `__mips_syscall5' rather than `__mips16_syscall5'. Remove prototype. (__mips16_syscall6): Expand to `__mips_syscall6' rather than `__mips16_syscall6'. Remove prototype. (__mips16_syscall7): Expand to `__mips_syscall7' rather than `__mips16_syscall7'. Remove prototype. (__nomips16, __mips16_syscall_return): Move to... * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (__nomips16, __mips_syscall_return): ... here. [__mips16] (INTERNAL_SYSCALL_NCS): Rename `__mips16_syscall_return' to `__mips_syscall_return'. [__mips16] (INTERNAL_SYSCALL_MIPS16): Pass `number' to `internal_syscall##nr'. [!__mips16] (INTERNAL_SYSCALL): Pass `SYS_ify (name)' to `internal_syscall##nr'. (FORCE_FRAME_POINTER): Remove. (__mips_syscall5): New prototype. (internal_syscall5): Rewrite to call `__mips_syscall5'. (__mips_syscall6): New prototype. (internal_syscall6): Rewrite to call `__mips_syscall6'. (__mips_syscall7): New prototype. (internal_syscall7): Rewrite to call `__mips_syscall7'. * sysdeps/unix/sysv/linux/mips/mips32/mips-syscall5.S: New file. * sysdeps/unix/sysv/linux/mips/mips32/mips-syscall6.S: New file. * sysdeps/unix/sysv/linux/mips/mips32/mips-syscall7.S: New file. * sysdeps/unix/sysv/linux/mips/mips32/Makefile [subdir = misc] (sysdep_routines): Add libc-do-syscall. * sysdeps/unix/sysv/linux/mips/mips32/Versions (libc): Add `__mips_syscall5', `__mips_syscall6' and `__mips_syscall7'.
2017-08-29[AArch64] Fix procfs.h not to expose stdint.h typesSzabolcs Nagy1-2/+1
Commit 39e7a5a66828a60008543db5f03f46dc7081668b added stdint.h to sys/procfs.h, but it is included into signal.h by default and there is code that does not expect stdint.h to be visible there, so use __uint64_t instead of uint64_t.
2017-08-28Provide a C++ version of iszero that does not use __MATH_TG (bug 21930)Gabriel F. T. Gomes1-1/+2
When signaling nans are enabled (with -fsignaling-nans), the C++ version of iszero uses the fpclassify macro, which is defined with __MATH_TG. However, when support for float128 is available, __MATH_TG uses the builtin __builtin_types_compatible_p, which is only available in C mode. This patch refactors the C++ version of iszero so that it uses function overloading to select between the floating-point types, instead of relying on fpclassify and __MATH_TG. Tested for powerpc64le, s390x, x86_64, and with build-many-glibcs.py. [BZ #21930] * math/math.h [defined __cplusplus && defined __SUPPORT_SNAN__] (iszero): New C++ implementation that does not use fpclassify/__MATH_TG/__builtin_types_compatible_p, when signaling nans are enabled, since __builtin_types_compatible_p is a C-only feature. * math/test-math-iszero.cc: When __HAVE_DISTINCT_FLOAT128 is defined, include ieee754_float128.h for access to the union and member ieee854_float128.ieee. [__HAVE_DISTINCT_FLOAT128] (do_test): Call check_float128. [__HAVE_DISTINCT_FLOAT128] (check_float128): New function. * sysdeps/powerpc/powerpc64le/Makefile [subdir == math] (CXXFLAGS-test-math-iszero.cc): Add -mfloat128 to the build options of test-math-zero on powerpc64le.
2017-08-28x86_64 __redirect_ieee754_expf: Change double to floatH.J. Lu1-1/+1
__redirect_ieee754_expf has type float, not double. * sysdeps/x86_64/fpu/multiarch/e_expf.c (__redirect_ieee754_expf): Change double to float.
2017-08-28Simplify math-svid-compat code.Joseph Myers1-6/+1
Now there are no more assembly wrappers using _LIB_VERSION or __kernel_standard, the math-svid-compat code can be slighly simplified. math-svid-compat.h no longer needs __ASSEMBLER__ conditionals, and the _LIB_VERSION variable no longer needs to be built for static libm, since all references are now in C code that includes math-svid-compat.h and so gets the macro definition of _LIB_VERSION to _POSIX_ outside the compat case. This patch makes those cleanups. Tested for x86_64, and with build-many-glibcs.py. * math/math-svid-compat.h [!__ASSEMBLER__]: Make code unconditional. * sysdeps/ieee754/s_lib_version.c [!defined SHARED]: Remove conditional code; define contents only for [LIBM_SVID_COMPAT].
2017-08-28Remove abi-*-options compiler flagsFlorian Weimer8-53/+0
These options are no longer needed since commit 2dba5ce7b8115d6a2789bf279892263621088e74 (<bits/syscall.h>: Use an arch-independent system call list on Linux).
2017-08-28<bits/syscall.h>: Use an arch-independent system call list on LinuxFlorian Weimer5-68/+859
This commit changes the way the list of SYS_* system call macros is created on Linux. glibc now contains a list of all known system calls, and the generated <bits/syscall.h> file defines the SYS_ macro only if the correspnding __NR_ macro is defined by the kernel headers. As a result, glibc does not have to be rebuilt to pick up system calls if the glibc sources already know about them. This means that glibc can be built with older kernel headers, and if the installed kernel headers are upgraded afterwards, additional SYS_ macros become available as long as glibc has a record for those system calls.
2017-08-27hurd: Add system-specific sysmacros.hSamuel Thibault1-0/+60
* sysdeps/mach/hurd/bits/sysmacros.h: New file.
2017-08-25x86: Remove assembly versions of index_cpu_*/index_arch_*H.J. Lu1-42/+1
Since assembly versions of HAS_CPU_FEATURE and HAS_ARCH_FEATURE have been removed, assembly versions of index_cpu_* and index_arch_* can also be removed. Tested on i686 and x86-64 with and without --disable-multi-arch. * sysdeps/x86/cpu-features.h [__ASSEMBLER__] (index_cpu_*, index_arch_*): Removed.
2017-08-25[AArch64] Fix elf_greg_t on ILP32Szabolcs Nagy1-1/+2
Use uint64_t instead of unsigned long.
2017-08-25Remove powerpc32 sqrt wrappers.Joseph Myers11-604/+0
This patch removes the powerpc32-specific wrappers for sqrt and sqrtf. These wrappers, by adding architecture-specific uses of _LIB_VERSION and __kernel_standard, unnecessarily complicate cleanups of libm error handling. They also do not serve a useful optimization purpose. GCC knows about sqrt as a built-in function, and can generate direct calls to a hardware square root instruction, either on its own, in the -fno-math-errno case, or together with an inline check for the argument being negative and a call to the out-of-line sqrt function for error handling only in that case (and has been able to do so for a long time). Thus in practice the wrapper will only be called only in the case of negative arguments, which is not a case it is useful to optimize for. Tested with build-many-glibcs.py for powerpc-linux-gnu-power4. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-power5.S: Remove file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt_compat.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-power5.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf_compat.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt_compat.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf_compat.S: Likewise. * sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt_compat.S: Likewise. * sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf_compat.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile (libm-sysdep-routines): Remove w_sqrt_compat-power5, w_sqrt_compat-ppc32, w_sqrtf_compat-power5 and w_sqrtf_compat-ppc32.
2017-08-24Remove cancellation support for syscall generationAdhemerval Zanella24-2766/+172
This patch removes the cancellation mark from the auto-generation syscall script. Now all the cancellable syscalls are done throught C code using the SYSCALL_CANCEL macro. It simplifies the assembly required to each architecture port, since the SYSCALL_CANCEL uses the already defined INLINE_SYSCALL macros, and allows a more straigh fix on cancellation machanism (since no more specific assembly fixes will be required). Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.A Also with build-many-glibc.py with remaning touched architectures. * sysdeps/unix/make-syscalls.sh: Remove cancellable tagging for syscall definitions. * sysdeps/unix/syscall-template.S (SYSCALL_CANCELLABLE): Remove definition. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (__local_enable_asynccancel): Likewise. [IS_IN (libpthread)] (__local_disable_asynccancel): Likewise. [IS_IN (libc)] (__local_enable_asynccancel): Likewise. [IS_IN (libc)] (__local_enable_asynccancel): Likewise. [IS_IN (librt)] (__local_disable_asynccancel): Likewise. [IS_IN (librt)] (__local_disable_asynccancel): Likewise. (CENABLE): Likewise. (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Remove defintion. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Remove file. * sysdeps/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h: New file. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h: New file. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
2017-08-24Fix CFLAGS override in sysdeps/ieee754/dbl-64Szabolcs Nagy1-3/+3
Use += instead of = to avoid overriding target specific CFLAGS settings. Ideally the settings in target Makefiles would have precedence, but the Makefile inclusion order does not allow that, with this fix at least the target settings are not dropped.
2017-08-23x86-64: Regenerate libm-test-ulps for AVX512 mathvec testsH.J. Lu1-2/+2
Update libm-test-ulps for AVX512 mathvec tests by running “make regen-ulps” on Intel Xeon processor with AVX512. * sysdeps/x86_64/fpu/libm-test-ulps: Regenerated.
2017-08-23Consolidate remaning non cancellable definitionsAdhemerval Zanella2-0/+5
This patch consolidate the remaning non cancellable syscall definitions on not-cancel.h header. They are: * __fcntl_nocancel: Moved from fcntl.h to not-cancel.h. * __sigsuspend_nocancel: Removed since 988f991b50 it is not used or defined anymore. * __nanosleep_nocancel: Removed since 6f33fd046b it is defined on not-cancel.h. Now all non-cancellable syscall definition are defined on not-cancel (the only exceptions is the stdio symbol __fxprintf_nocancel which uses non cancellable open and it is used on getopt implementation). Checked on x86_64-linux-gnu and with build-many-glibc.py. * include/fcntl.h (__fcntl_nocancel): Remove definition. * include/signal.h (__sigsuspend_nocancel): Likewise. * include/time.h (__nanosleep_nocancel): Likewise. * sysdeps/generic/not-cancel.h (__fcntl_nocancel): New macro. * login/utmp_file.c: Include non cancellable syscall header. * sysdeps/unix/sysv/linux/not-cancel.h (__fcntl_nocancel): New prototype.
2017-08-23x86_64: Replace AVX512F .byte sequences with instructionsH.J. Lu6-290/+32
Since binutils 2.25 or later is required to build glibc, we can replace AVX512F .byte sequences with AVX512F instructions. Tested on x86-64 and x32. There are no code differences in libmvec.so and libmvec.a. * sysdeps/x86_64/fpu/svml_d_sincos8_core.S: Replace AVX512F .byte sequences with AVX512F instructions. * sysdeps/x86_64/fpu/svml_d_wrapper_impl.h: Likewise. * sysdeps/x86_64/fpu/svml_s_sincosf16_core.S: Likewise. * sysdeps/x86_64/fpu/svml_s_wrapper_impl.h: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S: Likewise.
2017-08-22aarch64: Use PTR_REG macro to fix ILP32 bug and make code consistentSteve Ellcey1-1/+1
* sysdeps/aarch64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Use PTR_REG macro in cmp instruction.
2017-08-22Remove p{read,write}{v} and fallocate from x86 auto-generation listAdhemerval Zanella2-5/+0
With {INLINE,INTERNAL}_SYSCALL macros fixed for 64-bits arguments on x32, we can remove the p{read,write}{v} from auto-generation list. Tested on x86_64 and x32. * sysdeps/unix/sysv/linux/x86_64/syscalls.list (pread64): Remove. (preadv64): Likewise. (pwrite64(: Likewise. (pwritev64): Likewise.
2017-08-22Fix {INLINE,INTERNAL}_SYSCALL macros for x32Adhemerval Zanella2-120/+155
The problem for x32 is the {INTERNAL,INLINE}_SYSCALL C macros explicit cast the arguments to 'long int', thus passing as 32 bits arguments that should be passed to 64 bits. Previous x32 implementation uses the auto-generated syscalls from assembly macros (syscalls.list), so the {INTERNAL,INLINE}_SYSCALL macros are never used with 64 bit argument in x32 (which are internally broken for this ILP). To fix it I used a strategy similar to MIPS64n32 (although both ABI differs for some syscalls on how top pass 64-bits arguments) where argument types for kernel call are defined using GCC extension 'typeof' with a arithmetic operation. This allows 64-bits arguments to be defined while 32-bits argument will still passed as 32-bits. I also cleanup the {INLINE,INTERNAL}_SYSCALL definition by defining 'inline_syscallX' instead of constructing the argument passing using macros (it adds some readability) and removed the ununsed INTERNAL_SYSCALL_NCS_TYPES define (since the patch idea is exactly to avoid requiric explicit types passing). Tested on x86_64 and x32. * sysdeps/unix/sysv/linux/x86_64/sysdep.h (INTERNAL_SYSCALL_NCS_TYPES): Remove define. (LOAD_ARGS_0): Likewise. (LOAD_ARGS_1): Likewise. (LOAD_ARGS_2): Likewise. (LOAD_ARGS_3): Likewise. (LOAD_ARGS_4): Likewise. (LOAD_ARGS_5): Likewise. (LOAD_ARGS_6): Likewise. (LOAD_REGS_0): Likewise. (LOAD_REGS_1): Likewise. (LOAD_REGS_2): Likewise. (LOAD_REGS_3): Likewise. (LOAD_REGS_4): Likewise. (LOAD_REGS_5): Likewise. (LOAD_REGS_6): Likewise. (ASM_ARGS_0): Likewise. (ASM_ARGS_1): Likewise. (ASM_ARGS_2): Likewise. (ASM_ARGS_3): Likewise. (ASM_ARGS_4): Likewise. (ASM_ARGS_5): Likewise. (ASM_ARGS_6): Likewise. (LOAD_ARGS_TYPES_1): Likewise. (LOAD_ARGS_TYPES_2): Likewise. (LOAD_ARGS_TYPES_3): Likewise. (LOAD_ARGS_TYPES_4): Likewise. (LOAD_ARGS_TYPES_5): Likewise. (LOAD_ARGS_TYPES_6): Likewise. (LOAD_REGS_TYPES_1): Likewise. (LOAD_REGS_TYPES_2): Likewise. (LOAD_REGS_TYPES_3): Likewise. (LOAD_REGS_TYPES_4): Likewise. (LOAD_REGS_TYPES_5): Likewise. (LOAD_REGS_TYPES_6): Likewise. (TYPEFY): New define. (ARGIFY): Likewise. (internal_syscall0): Likewise. (internal_syscall1): Likewise. (internal_syscall2): Likewise. (internal_syscall3): Likewise. (internal_syscall4): Likewise. (internal_syscall5): Likewise. (internal_syscall6): Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/times.c (INTERNAL_SYSCALL_NCS): Remove define. (internal_syscall1): Add define.
2017-08-22powerpc: Shrink ULPs for float128Gabriel F. T. Gomes1-26/+10
During the development of float128 on powerpc64le, the ulps have been generated since early versions of the patches. On those versions, the functions gamma and pow10 were mistakenly thought to be part of the API. After review, the functions were removed, however the ulps for them were carried in the ulps file. This patch removes such entries from the ulps file, as well as it shrinks the ulps for the cpow and lgamma functions. Tested for powerpc64le. * sysdeps/powerpc/fpu/libm-test-ulps: Update.
2017-08-22Remove non cancellable sigsuspend definitionAdhemerval Zanella3-7/+0
There is no current internal usage for non cancellable sigsuspend calls. Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu. * sysdeps/generic/not-cancel.h (sigsuspend_not_cancel): remove macro. * sysdeps/mach/hurd/sigsuspend.c (sigsuspend_not_cancel): remove alias. * sysdeps/unix/sysv/linux/not-cancel.h (sigsuspend_not_cancel): likewise.
2017-08-22Consolidate non cancellable nanosleep callAdhemerval Zanella3-3/+13
This patch consolidates all the non cancellable nanosleep calls to use the __nanosleep_nocancel identifier. For non cancellable targets it will be just a macro to call the default respective symbol while on Linux will be a internal one. Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu. * nptl/pthread_mutex_timedlock.c (__pthread_mutex_timedlock): Replace nanosleep_not_cancel with __nanosleep_nocancel. * sysdeps/generic/not-cancel.h (nanosleep_not_cancel): Remove macro. (__nanosleep_nocancel): New macro. * sysdeps/unix/sysv/linux/nanosleep.c (__nanosleep_nocancel): New function. * sysdeps/unix/sysv/linux/not-cancel.h (nanosleep_not_cancel): Remove macro. (__nanosleep_nocancel): New prototype.
2017-08-22Consolidate non cancellable pause callAdhemerval Zanella4-25/+15
This patch consolidates all the non cancellable pause calls to use the __pause_nocancel identifier. For non cancellable targets it will be just a macro to call the default respective symbol while on Linux will be a internal one. Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu. * nptl/pthread_mutex_lock.c (__pthread_mutex_lock_full): Replace pause_not_cancel with __pause_nocancel. * sysdeps/generic/not-cancel.h (pause_not_cancel): Remove macro. (__pause_nocancel): New macro. * sysdeps/unix/sysv/linux/not-cancel.h (pause_not_cancel): Remove macro. (__pause_nocancel): New prototype. * sysdeps/unix/sysv/linux/pause.c (__pause_nocancel): New function.
2017-08-22Provide a C++ version of issignaling that does not use __MATH_TGGabriel F. T. Gomes1-0/+1
The macro __MATH_TG contains the logic to select between long double and _Float128, when these types are ABI-distinct. This logic relies on __builtin_types_compatible_p, which is not available in C++ mode. On the other hand, C++ function overloading provides the means to distinguish between the floating-point types. The overloading resolution will match the correct parameter regardless of type qualifiers, i.e.: const and volatile. Tested for powerpc64le, s390x, and x86_64. * math/math.h [defined __cplusplus] (issignaling): Provide a C++ definition for issignaling that does not rely on __MATH_TG, since __MATH_TG uses __builtin_types_compatible_p, which is only available in C mode. (CFLAGS-test-math-issignaling.cc): New variable. * math/Makefile [CXX] (tests): Add test-math-issignaling. * math/test-math-issignaling.cc: New test for C++ implementation of type-generic issignaling. * sysdeps/powerpc/powerpc64le/Makefile [subdir == math] (CXXFLAGS-test-math-issignaling.cc): Add -mfloat128 to the build options of test-math-issignaling on powerpc64le.