about summary refs log tree commit diff
path: root/sysdeps/sparc
Commit message (Collapse)AuthorAgeFilesLines
...
* [BZ #20271] Add newlines in __libc_fatal calls.Paul Pluzhnikov2018-08-312-2/+2
|
* Split fenv_private.h out of math_private.h more consistently.Joseph Myers2018-08-282-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some architectures, the parts of math_private.h relating to the floating-point environment are in a separate file fenv_private.h included from math_private.h. As this is purely an architecture-specific convention used by several architectures, however, all such architectures still need their own math_private.h, even if it has nothing to do beyond #include <fenv_private.h> and peculiarity of including the i386 file directly instead of having a shared file in sysdeps/x86. This patch makes the fenv_private.h name an architecture-independent convention in glibc. The include of fenv_private.h from math_private.h becomes architecture-independent (until callers are updated to include fenv_private.h directly so the include from math_private.h is no longer needed). Some architecture math_private.h headers are removed if no longer needed, or renamed to fenv_private.h if all they define belongs in that header; architecture fenv_private.h headers now do require #include_next <fenv_private.h>. The i386 fenv_private.h file moves to sysdeps/x86/fpu/ to reflect how it is actually shared with x86_64. The generic math_private.h gets a new include of <stdbool.h>, as needed for bool in some prototypes in that header (previously that was indirectly included via include/fenv.h, which now only gets included too late in math_private.h, after those prototypes). Tested for x86_64 and x86, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * sysdeps/aarch64/fpu/fenv_private.h: New file. Based on .... * sysdeps/aarch64/fpu/math_private.h: ... this file. All contents moved to fenv_private.h except for ... (TOINT_INTRINSICS): Kept in math_private.h. (roundtoint): Likewise. (converttoint): Likewise. * sysdeps/arm/fenv_private.h: Change multiple-include guard to [ARM_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/arm/math_private.h: Remove. * sysdeps/generic/fenv_private.h: New file. Contents moved from .... * sysdeps/generic/math_private.h: ... this file. Include <stdbool.h>. Do not include <fenv.h> or <get-rounding-mode.h>. Include <fenv_private.h>. Remove functions and macros moved to fenv_private.h. * sysdeps/i386/fpu/math_private.h: Remove. * sysdeps/mips/math_private.h: Move to .... * sysdeps/mips/fpu/fenv_private.h: ... here. Change multiple-include guard to [MIPS_FENV_PRIVATE_H]. Remove [__mips_hard_float] conditional. Include next <fenv_private.h>. * sysdeps/powerpc/fpu/fenv_private.h: Change multiple-include guard to [POWERPC_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/powerpc/fpu/math_private.h: Do not include <fenv_private.h>. * sysdeps/riscv/rvf/math_private.h: Move to .... * sysdeps/riscv/rvf/fenv_private.h: ... here. Change multiple-include guard to [RISCV_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/sparc/fpu/fenv_private.h: Change multiple-include guard to [SPARC_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/sparc/fpu/math_private.h: Remove. * sysdeps/i386/fpu/fenv_private.h: Move to .... * sysdeps/x86/fpu/fenv_private.h: ... here. Change multiple-include guard to [X86_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/x86_64/fpu/math_private.h: Do not include <sysdeps/i386/fpu/fenv_private.h>.
* Mark _init and _fini as hidden [BZ #23145]H.J. Lu2018-06-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _init and _fini are special functions provided by glibc for linker to define DT_INIT and DT_FINI in executable and shared library. They should never be put in dynamic symbol table. This patch marks them as hidden to remove them from dynamic symbol table. Tested with build-many-glibcs.py. [BZ #23145] * elf/Makefile (tests-special): Add $(objpfx)check-initfini.out. ($(all-built-dso:=.dynsym): New target. (common-generated): Add $(all-built-dso:$(common-objpfx)%=%.dynsym). ($(objpfx)check-initfini.out): New target. (generated): Add check-initfini.out. * scripts/check-initfini.awk: New file. * sysdeps/aarch64/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/alpha/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/arm/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/hppa/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/i386/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/ia64/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/m68k/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/microblaze/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/mips/mips32/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/mips/mips64/n32/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/mips/mips64/n64/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/nios2/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/powerpc/powerpc32/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/powerpc/powerpc64/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/s390/s390-32/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/s390/s390-64/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/sh/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/sparc/crti.S (_init): Mark as hidden. (_fini): Likewise. * sysdeps/x86_64/crti.S (_init): Mark as hidden. (_fini): Likewise.
* Remove sysdeps/sparc/sparc64/soft-fp directory.Joseph Myers2018-05-2534-121/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>, there should not be separate sysdeps/<arch>/soft-fp directories when those are used by all configurations that use sysdeps/<arch>, and, more generally, should not be sysdeps/foo/Implies files pointing to a subdirectory foo/bar. This patch eliminates the sysdeps/sparc/sparc64/soft-fp directory accordingly, merging its contents into sysdeps/sparc/sparc64. This completes removing the unnecessary <arch>/soft-fp sysdeps directories. sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c is removed rather than moved. It was not in fact used previously - the ldbl-128 version of e_ilogbl.c was used instead - and moving it into sysdeps/sparc/sparc64 results in it being used, but causing a build failure because of FP_DECL_EX declaring an unused variable (as I noted in <https://sourceware.org/ml/libc-alpha/2013-10/msg00457.html> that file doesn't appear to use FP_DECL_EX). Given that the file was previously unused and so presumably not tested recently, removing it is the safe way to avoid this patch changing what actually gets built into glibc (if this file should turn out more efficient than the ldbl-128 e_ilogbl.c, it can always be added back in future with the build failure fixed). Tested with build-many-glibcs.py that installed stripped shared libraries for sparc configurations are unchanged by this patch. * sysdeps/sparc/sparc64/Implies: Remove sparc/sparc64/soft-fp. * sysdeps/sparc/sparc64/Makefile [$(subdir) = soft-fp] (sparc64-quad-routines): New variable. Moved from .... [$(subdir) = soft-fp] (sysdep_routines): Add $(sparc64-quad-routines). Moved from .... [$(subdir) = math] (CPPFLAGS): Add -I../soft-fp/. Moved from .... * sysdeps/sparc/sparc64/soft-fp/Makefile: ... here. Remove file. * sysdeps/sparc/sparc64/Versions (libc): Add GLIBC_2.2 symbols moved from .... * sysdeps/sparc/sparc64/soft-fp/Versions: ... here. Remove file. * sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c: Remove file. * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Move to .... * sysdeps/sparc/sparc64/qp_add.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_cmp.c: Move to .... * sysdeps/sparc/sparc64/qp_cmp.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c: Move to .... * sysdeps/sparc/sparc64/qp_cmpe.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_div.c: Move to .... * sysdeps/sparc/sparc64/qp_div.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Move to .... * sysdeps/sparc/sparc64/qp_dtoq.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_feq.c: Move to .... * sysdeps/sparc/sparc64/qp_feq.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_fge.c: Move to .... * sysdeps/sparc/sparc64/qp_fge.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_fgt.c: Move to .... * sysdeps/sparc/sparc64/qp_fgt.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_fle.c: Move to .... * sysdeps/sparc/sparc64/qp_fle.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_flt.c: Move to .... * sysdeps/sparc/sparc64/qp_flt.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_fne.c: Move to .... * sysdeps/sparc/sparc64/qp_fne.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Move to .... * sysdeps/sparc/sparc64/qp_itoq.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_mul.c: Move to .... * sysdeps/sparc/sparc64/qp_mul.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_neg.S: Move to .... * sysdeps/sparc/sparc64/qp_neg.S: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Move to .... * sysdeps/sparc/sparc64/qp_qtod.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Move to .... * sysdeps/sparc/sparc64/qp_qtoi.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Move to .... * sysdeps/sparc/sparc64/qp_qtos.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Move to .... * sysdeps/sparc/sparc64/qp_qtoui.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Move to .... * sysdeps/sparc/sparc64/qp_qtoux.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Move to .... * sysdeps/sparc/sparc64/qp_qtox.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c: Move to .... * sysdeps/sparc/sparc64/qp_sqrt.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Move to .... * sysdeps/sparc/sparc64/qp_stoq.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Move to .... * sysdeps/sparc/sparc64/qp_sub.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Move to .... * sysdeps/sparc/sparc64/qp_uitoq.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_util.c: Move to .... * sysdeps/sparc/sparc64/qp_util.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Move to .... * sysdeps/sparc/sparc64/qp_uxtoq.c: ... here. * sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Move to .... * sysdeps/sparc/sparc64/qp_xtoq.c: ... here. * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Move to .... * sysdeps/sparc/sparc64/sfp-machine.h: ... here.
* Remove sysdeps/sparc/sparc32/soft-fp directory.Joseph Myers2018-05-2533-38/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>, there should not be separate sysdeps/<arch>/soft-fp directories when those are used by all configurations that use sysdeps/<arch>, and, more generally, should not be sysdeps/foo/Implies files pointing to a subdirectory foo/bar. This patch eliminates the sysdeps/sparc/sparc32/soft-fp directory accordingly, merging its contents into sysdeps/sparc/sparc32. Tested with build-many-glibcs.py that installed stripped shared libraries for sparc configurations are unchanged by this patch. * sysdeps/sparc/sparc32/Implies: Remove sparc/sparc32/soft-fp. * sysdeps/sparc/sparc32/Makefile [$(subdir) = soft-fp] (sparc32-quad-routines): New variable. Moved from .... [$(subdir) = soft-fp] (sysdep_routines): Add $(sparc32-quad-routines). Moved from .... * sysdeps/sparc/sparc32/soft-fp/Makefile: ... here. Remove file. * sysdeps/sparc/sparc32/Versions (libc): Add GLIBC_2.4 symbols moved from .... * sysdeps/sparc/sparc32/soft-fp/Versions: ... here. Remove file. * sysdeps/sparc/sparc32/soft-fp/q_add.c: Move to .... * sysdeps/sparc/sparc32/q_add.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_cmp.c: Move to .... * sysdeps/sparc/sparc32/q_cmp.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_cmpe.c: Move to .... * sysdeps/sparc/sparc32/q_cmpe.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_div.c: Move to .... * sysdeps/sparc/sparc32/q_div.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Move to .... * sysdeps/sparc/sparc32/q_dtoq.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_feq.c: Move to .... * sysdeps/sparc/sparc32/q_feq.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_fge.c: Move to .... * sysdeps/sparc/sparc32/q_fge.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_fgt.c: Move to .... * sysdeps/sparc/sparc32/q_fgt.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_fle.c: Move to .... * sysdeps/sparc/sparc32/q_fle.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_flt.c: Move to .... * sysdeps/sparc/sparc32/q_flt.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_fne.c: Move to .... * sysdeps/sparc/sparc32/q_fne.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Move to .... * sysdeps/sparc/sparc32/q_itoq.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Move to .... * sysdeps/sparc/sparc32/q_lltoq.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_mul.c: Move to .... * sysdeps/sparc/sparc32/q_mul.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_neg.c: Move to .... * sysdeps/sparc/sparc32/q_neg.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Move to .... * sysdeps/sparc/sparc32/q_qtod.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Move to .... * sysdeps/sparc/sparc32/q_qtoi.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Move to .... * sysdeps/sparc/sparc32/q_qtoll.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Move to .... * sysdeps/sparc/sparc32/q_qtos.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Move to .... * sysdeps/sparc/sparc32/q_qtou.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Move to .... * sysdeps/sparc/sparc32/q_qtoull.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_sqrt.c: Move to .... * sysdeps/sparc/sparc32/q_sqrt.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Move to .... * sysdeps/sparc/sparc32/q_stoq.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_sub.c: Move to .... * sysdeps/sparc/sparc32/q_sub.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Move to .... * sysdeps/sparc/sparc32/q_ulltoq.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_util.c: Move to .... * sysdeps/sparc/sparc32/q_util.c: ... here. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Move to .... * sysdeps/sparc/sparc32/q_utoq.c: ... here. * sysdeps/sparc/sparc32/soft-fp/sfp-machine.h: Move to .... * sysdeps/sparc/sparc32/sfp-machine.h: ... here.
* nptl: Remove __ASSUME_PRIVATE_FUTEXH.J. Lu2018-05-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since __ASSUME_PRIVATE_FUTEX is always defined, this patch removes the !__ASSUME_PRIVATE_FUTEX paths. Tested with build-many-glibcs.py. * nptl/allocatestack.c (allocate_stack): Remove the !__ASSUME_PRIVATE_FUTEX paths. * nptl/descr.h (header): Remove the !__ASSUME_PRIVATE_FUTEX path. * nptl/nptl-init.c (__pthread_initialize_minimal_internal): Likewise. * sysdeps/i386/nptl/tcb-offsets.sym (PRIVATE_FUTEX): Removed. * sysdeps/powerpc/nptl/tcb-offsets.sym (PRIVATE_FUTEX): Likewise. * sysdeps/sh/nptl/tcb-offsets.sym (PRIVATE_FUTEX): Likewise. * sysdeps/x86_64/nptl/tcb-offsets.sym (PRIVATE_FUTEX): Likewise. * sysdeps/i386/nptl/tls.h: (tcbhead_t): Remve the !__ASSUME_PRIVATE_FUTEX path. * sysdeps/s390/nptl/tls.h (tcbhead_t): Likewise. * sysdeps/sparc/nptl/tls.h (tcbhead_t): Likewise. * sysdeps/x86_64/nptl/tls.h (tcbhead_t): Likewise. * sysdeps/unix/sysv/linux/i386/lowlevellock.S: Remove the !__ASSUME_PRIVATE_FUTEX macros. * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PRIVATE_FUTEX): Removed.
* Update SPARC libm-test-ulps.Adhemerval Zanella2018-04-051-0/+6
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* elf: Unify symbol address run-time calculation [BZ #19818]Maciej W. Rozycki2018-04-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap symbol address run-time calculation into a macro and use it throughout, replacing inline calculations. There are a couple of variants, most of them different in a functionally insignificant way. Most calculations are right following RESOLVE_MAP, at which point either the map or the symbol returned can be checked for validity as the macro sets either both or neither. In some places both the symbol and the map has to be checked however. My initial implementation therefore always checked both, however that resulted in code larger by as much as 0.3%, as many places know from elsewhere that no check is needed. I have decided the size growth was unacceptable. Having looked closer I realized that it's the map that is the culprit. Therefore I have modified LOOKUP_VALUE_ADDRESS to accept an additional boolean argument telling it to access the map without checking it for validity. This in turn has brought quite nice results, with new code actually being smaller for i686, and MIPS o32, n32 and little-endian n64 targets, unchanged in size for x86-64 and, unusually, marginally larger for big-endian MIPS n64, as follows: i686: text data bss dec hex filename 152255 4052 192 156499 26353 ld-2.27.9000-base.so 152159 4052 192 156403 262f3 ld-2.27.9000-elf-symbol-value.so MIPS/o32/el: text data bss dec hex filename 142906 4396 260 147562 2406a ld-2.27.9000-base.so 142890 4396 260 147546 2405a ld-2.27.9000-elf-symbol-value.so MIPS/n32/el: text data bss dec hex filename 142267 4404 260 146931 23df3 ld-2.27.9000-base.so 142171 4404 260 146835 23d93 ld-2.27.9000-elf-symbol-value.so MIPS/n64/el: text data bss dec hex filename 149835 7376 408 157619 267b3 ld-2.27.9000-base.so 149787 7376 408 157571 26783 ld-2.27.9000-elf-symbol-value.so MIPS/o32/eb: text data bss dec hex filename 142870 4396 260 147526 24046 ld-2.27.9000-base.so 142854 4396 260 147510 24036 ld-2.27.9000-elf-symbol-value.so MIPS/n32/eb: text data bss dec hex filename 142019 4404 260 146683 23cfb ld-2.27.9000-base.so 141923 4404 260 146587 23c9b ld-2.27.9000-elf-symbol-value.so MIPS/n64/eb: text data bss dec hex filename 149763 7376 408 157547 2676b ld-2.27.9000-base.so 149779 7376 408 157563 2677b ld-2.27.9000-elf-symbol-value.so x86-64: text data bss dec hex filename 148462 6452 400 155314 25eb2 ld-2.27.9000-base.so 148462 6452 400 155314 25eb2 ld-2.27.9000-elf-symbol-value.so [BZ #19818] * sysdeps/generic/ldsodefs.h (LOOKUP_VALUE_ADDRESS): Add `set' parameter. (SYMBOL_ADDRESS): New macro. [!ELF_FUNCTION_PTR_IS_SPECIAL] (DL_SYMBOL_ADDRESS): Use SYMBOL_ADDRESS for symbol address calculation. * elf/dl-runtime.c (_dl_fixup): Likewise. (_dl_profile_fixup): Likewise. * elf/dl-symaddr.c (_dl_symbol_address): Likewise. * elf/rtld.c (dl_main): Likewise. * sysdeps/aarch64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/arm/dl-machine.h (elf_machine_rel): Likewise. (elf_machine_rela): Likewise. * sysdeps/hppa/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/hppa/dl-symaddr.c (_dl_symbol_address): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise. (elf_machine_rela): Likewise. * sysdeps/ia64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/microblaze/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/mips/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Likewise. (elf_machine_reloc): Likewise. (elf_machine_got_rel): Likewise. * sysdeps/mips/dl-trampoline.c (__dl_runtime_resolve): Likewise. * sysdeps/nios2/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/riscv/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/tile/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Remove powerpc, sparc fdim inlines (bug 22987).Joseph Myers2018-03-201-57/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The powerpc and sparc bits/mathinline.h include inlines of fdim and fdimf. These are not restricted to -fno-math-errno, but do not set errno, and wrongly use ordered <= comparisons instead of the required islessequal comparisons (this latter issue is latent on powerpc because GCC wrongly uses unordered comparison instructions for operations that should use ordered comparison instructions). Since we wish to avoid such header inlines anyway, leaving it to the compiler to inline such standard functions under appropriate conditions, this patch fixes those issues by removing the inlines in question (and thus removing the sparc bits/mathinline.h header which had no other inlines left in it). I've filed <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85003> for adding correct fdim inlines to GCC, since the function is simple enough that a correct inline is a perfectly reasonable architecture-independent optimization with -fno-math-errno and in the absence of implicit excess precision. Tested with build-many-glibcs.py for all its powerpc and sparc configurations. [BZ #22987] * sysdeps/powerpc/bits/mathinline.h (fdim): Remove inline function. (fdimf): Likewise. * sysdeps/sparc/fpu/bits/mathinline.h: Remove file.
* Remove all target specific __ieee754_sqrt(f/l) inlinesWilco Dijkstra2018-03-151-80/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the now unused target specific__ieee754_sqrt(f/l) inlines. Also remove inlines of sqrt which are for really old GCC versions. Removing these is desirable, under the general principle of leaving such inlining to the compiler rather than trying to do it in installed headers, especially when only very old compilers are affected. Note that removing inlines for __ieee754_sqrt disables inlining in the sqrt wrapper functions. Given the sqrt function will typically only be called for negative arguments, it doesn't matter whether the inlining happens or not. * sysdeps/aarch64/fpu/math_private.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. * sysdeps/alpha/fpu/math_private.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. * sysdeps/generic/math-type-macros.h (M_SQRT): Use sqrt. * sysdeps/m68k/m680x0/fpu/mathimpl.h (__ieee754_sqrt): Remove. * sysdeps/powerpc/fpu/math_private.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. * sysdeps/s390/fpu/bits/mathinline.h: Remove file. * sysdeps/sparc/fpu/bits/mathinline.h (sqrt) Remove. (sqrtf): Remove. (sqrtl): Remove. (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. (__ieee754_sqrtl): Remove. * sysdeps/m68k/m680x0/fpu/mathimpl.h (__ieee754_sqrt): Remove. * sysdeps/x86/fpu/math_private.h (__ieee754_sqrt): Remove. * sysdeps/x86_64/fpu/math_private.h (__ieee754_sqrt): Remove. (__ieee754_sqrtf): Remove. (__ieee754_sqrtl): Remove.
* hurd: add gscope supportSamuel Thibault2018-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf/dl-support.c [!THREAD_GSCOPE_IN_TCB] (_dl_thread_gscope_count): Define variable. * sysdeps/generic/ldsodefs.h [!THREAD_GSCOPE_IN_TCB] (struct rtld_global): Add _dl_thread_gscope_count member. * sysdeps/mach/hurd/tls.h: Include <atomic.h>. [!defined __ASSEMBLER__] (THREAD_GSCOPE_GLOBAL, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define macros. * sysdeps/generic/tls.h: Document THREAD_GSCOPE_IN_TCB. * sysdeps/aarch64/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/alpha/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/arm/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/hppa/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/i386/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/ia64/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/m68k/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/microblaze/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/mips/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/nios2/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/powerpc/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/riscv/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/s390/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/sh/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/sparc/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/tile/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1. * sysdeps/x86_64/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
* Update sparc ulpsAdhemerval Zanella2018-02-221-0/+2
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* sparc: Check PIC instead of SHARED in start.S [BZ #22638]H.J. Lu2018-02-052-4/+4
| | | | | | | | | | Since start.o may be compiled as PIC, we should check PIC instead of SHARED. [BZ #22638] * sysdeps/sparc/sparc32/start.S (_start): Check PIC instead of SHARED. * sysdeps/sparc/sparc64/start.S (_start): Likewise.
* Update sparc ULPs.Patrick McGehearty2018-01-261-26/+26
| | | | | * sysdeps/sparc/fpu/libm-test-ulps: Update cpow, ctan, ctanh, j0, j1, y0, yn ulps.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-01321-321/+321
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update SPARC divrem generation to match output.Joseph Myers2017-12-156-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While working on another patch I noticed that (a) sysdeps/sparc/sparc32/Makefile is the only place with special realclean settings, apart from po/, and (b) the generated files with a rule in that Makefile to generate them (using m4) had been patched manually so no longer corresponded with the output of the generator - so if the timestamps were wrong, a build would result in changes to the files in the source directory. (They also didn't correspond because of changes in make 3.81 to how make handles whitespace at the start of a line in a sequence of backslash-newline continuation lines within a recipe.) This patch fixes the generation and output files to match. The issue with make and whitespace at start of continuation lines is fixed by putting those newlines outside of arguments to echo, so the number of spaces in the argument matches the number in the existing generated files. Then divrem.m4 is changed to avoid generating whitespace-only lines (my fix to the outputs from 2013; this fix to the generator also changes the indentation of a label in the output files) and to generate an alias in udiv.S (Adhemerval's fix from March). build-many-glibcs.py doesn't have a non-v9 SPARC configuration, because non-v9 32-bit SPARC didn't build when I set up build-many-glibcs.py but sparcv9 did build. Whether or not non-v9 32-bit SPARC now builds (or indeed whether or not support for it is obsolete), I tested by removing the sparcv8 and sparcv9 versions of the four files in question, so forcing the generated files to be built and used, and the compilation parts of the glibc testsuite passed. * sysdeps/sparc/sparc32/Makefile ($(divrem:%=$(sysdep_dir)/sparc/sparc32/%.S)): Do not include start-of-line whitespace in argument of echo. * sysdeps/sparc/sparc32/divrem.m4: Avoid generating lines starting with whitespace. Generate __wrap_.udiv alias. * sysdeps/sparc/sparc32/rem.S: Regenerated. * sysdeps/sparc/sparc32/sdiv.S: Likewise. * sysdeps/sparc/sparc32/udiv.S: Likewise. * sysdeps/sparc/sparc32/urem.S: Likewise.
* sparc: M7 optimized memset/bzeroPatrick McGehearty2017-12-146-2/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support added to identify Sparc M7/T7/S7/M8/T8 processor capability. Performance tests run on Sparc S7 using new code and old niagara4 code. Optimizations for memset also apply to bzero as they share code. For memset/bzero, performance comparison with niagara4 code: For memset nonzero data, 256-1023 bytes - 60-90% gain (in cache); 5% gain (out of cache) 1K+ bytes - 80-260% gain (in cache); 40-80% gain (out of cache) For memset zero data (and bzero), 256-1023 bytes - 80-120% gain (in cache), 0% gain (out of cache) 1024+ bytes - 2-4x gain (in cache), 10-35% gain (out of cache) Tested in sparcv9-*-* and sparc64-*-* targets in both multi and non-multi arch configurations. Patrick McGehearty <patrick.mcgehearty@oracle.com> Adhemerval Zanella <adhemerval.zanella@linaro.org> * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile (sysdeps_routines): Add memset-niagara7. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdes_rotuines): Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara7.S: New file. * sysdeps/sparc/sparc64/multiarch/memset-niagara7.S: Likewise. * sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add __bzero_niagara7 and __memset_niagara7. * sysdeps/sparc/sparc64/multiarch/ifunc-memset.h (IFUNC_SELECTOR): Add niagara7 option. * NEWS: Mention sparc m7 optimized memcpy, mempcpy, memmove, and memset.
* sparc: M7 optimized memcpy/mempcpy/memmovePatrick McGehearty2017-12-1412-2/+1072
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support added to identify Sparc M7/T7/S7/M8/T8 processor capability. Performance tests run on Sparc S7 using new code and old niagara4 code. Optimizations for memcpy also apply to mempcpy and memmove where they share code. Optimizations for memset also apply to bzero as they share code. For memcpy/mempcpy/memmove, performance comparison with niagara4 code: Long word aligned data 0-127 bytes - minimal changes 128-1023 bytes - 7-30% gain 1024+ bytes - 1-7% gain (in cache); 30-100% gain (out of cache) Word aligned data 0-127 bytes - 50%+ gain 128-1023 bytes - 10-200% gain 1024+ bytes - 0-15% gain (in cache); 5-50% gain (out of cache) Unaligned data 0-127 bytes - 0-70%+ gain 128-447 bytes - 40-80%+ gain 448-511 bytes - 1-3% loss 512-4096 bytes - 2-3% gain (in cache); 0-20% gain (out of cache) 4096+ bytes - ± 3% (in cache); 20-50% gain (out of cache) Tested in sparcv9-*-* and sparc64-*-* targets in both multi and non-multi arch configurations. Patrick McGehearty <patrick.mcgehearty@oracle.com> Adhemerval Zanella <adhemerval.zanella@linaro.org> * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile (sysdeps_routines): Add memcpy-memmove-niagara7 and memmove-ultra1. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdeps_routines): Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-memmove-niagara7.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/memmove-ultra1.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memmove.c: Likewise. * sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add __memcpy_niagara7, __mempcpy_niagara7, and __memmove_niagara7. * sysdeps/sparc/sparc64/multiarch/ifunc-memcpy.h (IFUNC_SELECTOR): Add niagara7 option. * sysdeps/sparc/sparc64/multiarch/memmove.c: New file. * sysdeps/sparc/sparc64/multiarch/ifunc-memmove.h: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-memmove-niagara7.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memmove-ultra1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/rtld-memmove.c: Likewise.
* sparc: assembly version of memmove for ultra1+Jose E. Marchesi2017-12-144-0/+191
| | | | | | | | | | | | Tested in sparcv9-*-* and sparc64-*-* targets in both non-multi-arch and multi-arch configurations. * sysdeps/sparc/sparc32/sparcv9/memmove.S: New file. * sysdeps/sparc/sparc32/sparcv9/rtld-memmove.c: Likewise. * sysdeps/sparc/sparc64/memmove.S: Likewise. * sysdeps/sparc/sparc64/rtld-memmove.c: Likewise. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: support the ADP hw capabilityJose E. Marchesi2017-12-143-3/+4
| | | | | | | | | | | | | | | This patch adds support for the ADP (also known as adi) hardware capability, as reported by the kernel sparc port when running on M7 machines. Tested in both sparcv9-*-* and sparc64-*-* targets. * sysdeps/sparc/bits/hwcap.h (HWCAP_SPARC_ADP): Defined. * sysdeps/sparc/dl-procinfo.c: Added "adp" to the _dl_sparc_cap_flags array. * sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Increment. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Sparc ulp update.David S. Miller2017-12-061-0/+6
| | | | | * sysdeps/sparc/fpu/libm-test-ulps: Update exp_{downward,towardzero,upward} ulps.
* sparc: Remove ununsed ifunc assembly macrosAdhemerval Zanella2017-12-011-142/+10
| | | | | | | | | | | | | Now that all SPARC ifunc converted to C implementation there is no need for both C and assembly macros. This patch removes the assembly ones. Checked on sparcv9-linux-gnu and sparc64-linux-gnu. * sysdeps/sparc/sparc-ifunc.h (SPARC_ASM_IFUNC_DFLT, SPARC_ASM_IFUNC1, SPARC_ASM_IFUNC2, SET, SPARC_ASM_VIS2_IFUNC, SPARC_ASM_VIS3_IFUNC, SPARC_ASM_VIS3_VIS2_IFUNC): Remove macros. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: Fix sparv9 multiarch buildAdhemerval Zanella2017-12-011-1/+1
| | | | | | | Fix build caused by 5b4e5e78690c4938de312a8b176f4b14eb7bea4a. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.c: Fix build due redirect macro.
* sparc: refactor cpu_relax to CAdhemerval Zanella2017-12-014-68/+39
| | | | | | | | | * sysdeps/sparc/sparc64/cpu_relax.c: New file. * sysdeps/sparc/sparc32/sparcv9/cpu_relax.c: Likewise. * sysdeps/sparc/sparc64/cpu_relax.S: Remove file. * sysdeps/sparc/sparc32/sparcv9/cpu_relax.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc32 nearbyint{f} selector to CAdhemerval Zanella2017-12-017-32/+75
| | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the sparc32 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_nearbyint{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_nearbyintf-generic and s_nearbyint-generic. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-generic.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-generic.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S: Remove file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc32 rint{f} selector to CAdhemerval Zanella2017-12-017-30/+74
| | | | | | | | | | | | | | | | | | | | | This patch refactors the sparc32 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_rint{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_rintf-generic and s_rint-generic. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-generic.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-generic.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Remove file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc32 llrint{f} selector to CAdhemerval Zanella2017-12-017-33/+73
| | | | | | | | | | | | | | | | | | | | | This patch refactors the sparc32 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_llrint{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_llrintf-generic and s_llrint-generic. * sysdeps/sparc/sparcv9/fpu/multiarch/s_llrint-generic.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-generic.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: Remove file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc32 fabs{f} selector to CAdhemerval Zanella2017-12-017-30/+74
| | | | | | | | | | | | | | | | | | | | | This patch refactors the sparc32 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_fabs{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_fabsf-generic and s_fabs-generic. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Remove file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc32 copysign selector to CAdhemerval Zanella2017-12-017-36/+91
| | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the sparc32 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_copysign{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile (sysdep_calls): New rule. (sysdep_routines): Use sysdep_calls as base. (libm-sysdep_routines): Add generic rule for symbols shared with libc. Add s_copysign-generic and s_copysign-generic objects. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: Remove file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 __mpn_add_n selector to CAdhemerval Zanella2017-11-304-58/+32
| | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file add_n-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdep_routines): Add add_n-generic. * sysdeps/sparc/sparc64/multiarch/add_n-generic.S: New file. * sysdeps/sparc/sparc64/multiarch/add_n.c: Likewise. * sysdeps/sparc/sparc64/multiarch/add_n.S: Remove file. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 __mpn_submul_1 selector to CAdhemerval Zanella2017-11-304-57/+32
| | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file submul_1-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdep_routines): Add submul_1-generic. * sysdeps/sparc/sparc64/multiarch/submul_1-generic.S: New file. * sysdeps/sparc/sparc64/multiarch/submul_1.c: Likewise. * sysdeps/sparc/sparc64/multiarch/submul_1.S: Remove file. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 __mpn_addmul_1 selector to CAdhemerval Zanella2017-11-304-58/+32
| | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file addmul_1-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdep_routines): Add addmul_1-generic. * sysdeps/sparc/sparc64/multiarch/addmul_1-generic.S: New file. * sysdeps/sparc/sparc64/multiarch/addmul_1.c: Likewise. * sysdeps/sparc/sparc64/multiarch/addmul_1.S: Remove file. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 __mpn_sub_n selector to CAdhemerval Zanella2017-11-304-57/+31
| | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file sub_n-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdep_routines): Add sub_n-generic. * sysdeps/sparc/sparc64/multiarch/sub_n-generic.S: New file. * sysdeps/sparc/sparc64/multiarch/sub_n.c: Likewise. * sysdeps/sparc/sparc64/multiarch/sub_n.S: Remove file. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 __mpn_mul_1 selector to CAdhemerval Zanella2017-11-304-57/+32
| | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file mul_1-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdep_routines): Add mul_1-generic. * sysdeps/sparc/sparc64/multiarch/mul_1-generic.S: New file. * sysdeps/sparc/sparc64/multiarch/mul_1.c: Likewise. * sysdeps/sparc/sparc64/multiarch/mul_1.S: Remove file. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Remove SPARC lllrint aliases.Joseph Myers2017-11-302-6/+0
| | | | | | | | | | | | | | | | | | | The sparc32/sparcv9/fpu/multiarch implementations of llrint / llrintf have aliases lllrint / lllrintf. No such function is exported from or used in libm and these aliases should not be there; I expect they arose accidentally in the course of converting a 64-bit implementation (where lrint and llrint can be aliases) to a 32-bit llrint implementation. This patch removes those spurious aliases. Tested (compilation only) with build-many-glibcs.py for sparcv9-linux-gnu. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S (__lllrint): Remove alias. (lllrint): Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S (__lllrintf): Likewise. (lllrintf): Likewise.
* Use libm_alias_float for sparc.Joseph Myers2017-11-3025-27/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes sparc libm function implementations use libm_alias_float to define function aliases. Tested with build-many-glibcs.py for all its sparc configurations that installed stripped shared libraries are unchanged by the patch. * sysdeps/sparc/sparc32/fpu/s_copysignf.S: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/sparc/sparc32/fpu/s_fabsf.S: Include <libm-alias-float.h>. (fabsf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S: Include <libm-alias-float.h>. (fabsf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c: Include <libm-alias-float.h>. (fdimf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c: Include <libm-alias-float.h>. (fmaf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S: Include <libm-alias-float.h>. (nearbyintf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S: Include <libm-alias-float.h>. (rintf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S: Include <libm-alias-float.h>. (lrintf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S: Include <libm-alias-float.h>. (nearbyintf): Define using libm_alias_float. * sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S: Include <libm-alias-float.h>. (rintf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c: Include <libm-alias-float.h>. (ceilf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.c: Include <libm-alias-float.h>. (floorf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c: Include <libm-alias-float.h>. (fmaf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.c: Include <libm-alias-float.h>. (lrintf): Define using libm_alias_float. (llrintf): Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyintf.c: Include <libm-alias-float.h>. (nearbyintf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.c: Include <libm-alias-float.h>. (rintf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.c: Include <libm-alias-float.h>. (truncf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/s_copysignf.S: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/s_fabsf.c: Include <libm-alias-float.h>. (fabsf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/s_lrintf.S: Include <libm-alias-float.h>. (lrintf): Define using libm_alias_float. (llrintf): Likewise. * sysdeps/sparc/sparc64/fpu/s_nearbyintf.S: Include <libm-alias-float.h>. (nearbyintf): Define using libm_alias_float. * sysdeps/sparc/sparc64/fpu/s_rintf.S: Include <libm-alias-float.h>. (rintf): Define using libm_alias_float.
* Use libm_alias_double for sparc.Joseph Myers2017-11-2925-72/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes sparc libm function implementations use libm_alias_double to define function aliases (with consequent simplification where compat symbol handling is now done by those macros rather than locally in architecture-specific code). Tested with build-many-glibcs.py for all its sparc configurations that installed stripped shared libraries are unchanged by the patch. * sysdeps/sparc/sparc32/fpu/s_copysign.S: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/sparc/sparc32/fpu/s_fabs.S: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c: Include <libm-alias-double.h>. (fdim): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: Include <libm-alias-double.h>. (fma): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: Include <libm-alias-double.h>. (llrint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S: Include <libm-alias-double.h>. (llrint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Include <libm-alias-double.h>. (ceil): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c: Include <libm-alias-double.h>. (floor): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: Include <libm-alias-double.h>. (fma): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c: Include <libm-alias-double.h>. (lrint): Define using libm_alias_double. (llrint): Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c: Include <libm-alias-double.h>. (trunc): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/s_copysign.S: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/s_fabs.c: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/s_lrint.S: Include <libm-alias-double.h>. (lrint): Define using libm_alias_double. (llrint): Likewise. * sysdeps/sparc/sparc64/fpu/s_nearbyint.S: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/sparc/sparc64/fpu/s_rint.S: Include <libm-alias-double.h>. (rint): Define using libm_alias_double.
* Fix missing sparcv9 --disable-multi-arch fabsl compat symbol (bug 22229).Joseph Myers2017-11-291-0/+4
| | | | | | | | | | | | | | | | | | The --disable-multi-arch case of sparcv9 libm is missing a fabsl compat symbol for when long double had the same ABI as double. This patch adds the missing compat symbol to this implementation. As my fix for other instances of this missing compat symbol postdates the last release, I'm considering this as being part of bug 22229 that was missing from my previous fix rather than as a separate issue, and so as not needing a new bug report in Bugzilla. Tested (compilation only) with build-many-glibcs.py for sparcv9-linux-gnu --disable-multi-arch. [BZ #22229] * sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S: Include <math_ldbl_opt.h>. (fabsl): Define as compat symbol at version GLIBC_2_0 for libm.
* sparc: refactor sparc64 rint{f} selector to CAdhemerval Zanella2017-11-297-24/+67
| | | | | | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_rint{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_rintf-generic and s_rint-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_rint-generic.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 lrint{f} selector to CAdhemerval Zanella2017-11-297-35/+92
| | | | | | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_lrint{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_lrint-generic and s_lrint-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint-generic.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 nearbyint{f} selector to CAdhemerval Zanella2017-11-297-24/+67
| | | | | | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_nearbyint{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_nearbyint-generic and s_nearbyintf-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint-generic.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyintf-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyintf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyintf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 finite{f} selector to CAdhemerval Zanella2017-11-297-30/+83
| | | | | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_finite{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdeps_calls): Add s_finitef-generic and s_finite-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_finite-generic.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_finite.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_finitef-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S: Remove file. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 isinf{f} selector to CAdhemerval Zanella2017-11-297-32/+84
| | | | | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file s_isinf{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdeps_calls): Add isinff-generic and s_isinf-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-generic.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 isnan{f} selector to CAdhemerval Zanella2017-11-297-31/+83
| | | | | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file (s_isnan{f}-generic.S). Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdeps_calls): Add s_isnanf-generic and s_isnan-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_isnan-generic.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: refactor sparc64 signbit{f} selector to CAdhemerval Zanella2017-11-298-38/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the sparc64 ifunc selector to a C implementation. Also, the generic symbol is moved to its own implementation file (s_signbit{f}-generic.S). It also simplifies the multiarch Makefile by moving the common objects from libm-sysdeps_routines and sysdeps_routines to a new sysdeps_call rule and including it where required with the correct prefix. Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * sysdeps/sparc/sparc-ifunc.h (sparc_libm_ifunc_redirected): New macro. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (sysdep_calls): New rule. (sysdep_routines): Use sysdep_calls as base. (libm-sysdep_routines): Add generic rule for symbols shared with libc. Add s_signbit-generic and s_signbitf-generic objects. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf-generic.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: Assume VIS3 supportAdhemerval Zanella2017-11-2931-229/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch assumes VIS3 support by binutils, which is supported since version 2.22. This leads to some code simplification, mostly on multiarch build where there is only one variant instead of previously two (whether binutils supports VIS3 instructions or not). For multiarch files where HAVE_AS_VIS3_SUPPORT was checked and the default implementation was built with a different name, a new file with (implementation with -generic appended) is added. Checked on sparc64-linux-gnu and sparcv9-linux-gnu. * config.h.in (HAVE_AS_VIS3_SUPPORT): Remove check for VIS3 support. * sysdeps/sparc/configure.ac (HAVE_AS_VIS3_SUPPORT): Likewise. * sysdeps//sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c: Likewise. * sysdeps//sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.c: Likewise. * sysdeps//sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: Likewise. * sysdeps//sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.c: Likewise. * sysdeps/sparc/sparc-ifunc.h [!HAVE_AS_VIS3_SUPPORT] (SPARC_ASM_VIS3_IFUNC, SPARC_ASM_VIS3_VIS2_IFUNC): Remove macros. * sysdeps/sparc/sparc32/sparcv9/Makefile [$(have-as-vis3) != yes] (ASFLAGS.o, ASFLAGS-.os, ASFLAGS-.op, ASFLAGS-.oS): Remove rules. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile ($(have-as-vis3) == yes): Remove conditional. * sysdeps/sparc/sparc64/Makefile (($(have-as-vis3) == yes)): Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-generic.c: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-generic.c: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-generic.c: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fma-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc-generic.c: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_truncf-generic.c: New file. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: Implement memset/bzero ifunc selection in CAdhemerval Zanella2017-11-2811-130/+164
| | | | | | | | | | | | | | | | | | | | | | | | This patch refactor the SPARC64 ifunc selector to a C implementation. No functional change is expected, including ifunc resolution rules. Checked on sparc64-linux-gnu, sparcv9-linux-gnu and x86_64-linux-gnu. * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile [$(subdir) = string] (sysdep_routines): Add memset-ultra1. * sysdeps/sparc/sparc64/multiarch/Makefile [$(subdir) = string] (sysdep_routines): Add memset-ultra1. * sysdeps/sparc/sparc32/sparcv9/multiarch/memset-ultra1.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/memset.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/bzero.c: Likewise. * sysdeps/sparc/sparc64/multiarch/ifunc-memset.h: Likewise. * sysdeps/sparc/sparc64/multiarch/memset-ultra1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset.c: Likewise. * sysdeps/sparc/sparc64/multiarch/bzero.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/memset.S: Remove file. * sysdeps/sparc/sparc64/multiarch/memset.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sparc: Implement memcpy/mempcpy ifunc selection in CAdhemerval Zanella2017-11-2812-173/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactor the SPARC64 ifunc selector to a C implementation. The x86_64 implementation is used as default, which resulted in common definitions (ifunc-init.h) used on both architectures. No functional change is expected, including ifunc resolution rules. Checked on sparc64-linux-gnu, sparcv9-linux-gnu and x86_64-linux-gnu. * sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-ultra1.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/mempcpy.c: Likewise. * sysdeps/sparc/sparc64/multiarch/ifunc-memcpy.h: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-ultra1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy.c: Likewise. * sysdeps/sparc/sparc64/multiarch/mempcpy.c: Likewise. * sysdeps/sparc/sparc-ifunc.h (sparc_libc_ifunc_redirected): New macro. * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile [$(subdir) = string] (sysdep_routines): Add memcpy-ultra1. * sysdeps/sparc/sparc64/multiarch/Makefile [$(subdir) = string] (sysdep_routines): Add memcpy-ultra1. * sysdeps/sparc/sparc64/multiarch/memcpy.S: Remove file. * sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy.S: Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Remove unused sparc64/soft-fp libm function implementations.Joseph Myers2017-11-223-155/+0
| | | | | | | | | | | | | | sysdeps/sparc/sparc64/soft-fp has files s_frexpl.c, s_scalblnl.c and s_scalbnl.c that are never used because the ldbl-128 versions always come first in the sysdeps directory ordering. This patch removes the unused files. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * sysdeps/sparc/sparc64/soft-fp/s_frexpl.c: Remove file. * sysdeps/sparc/sparc64/soft-fp/s_scalblnl.c: Likewise. * sysdeps/sparc/sparc64/soft-fp/s_scalbnl.c: Likewise.
* nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION}Adhemerval Zanella2017-11-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds two new internal defines to set the internal pthread_mutex_t layout required by the supported ABIS: 1. __PTHREAD_MUTEX_NUSERS_AFTER_KIND which control whether to define __nusers fields before or after __kind. The preferred value for is 0 for new ports and it sets __nusers before __kind. 2. __PTHREAD_MUTEX_USE_UNION which control whether internal __spins and __list members will be place inside an union for linuxthreads compatibility. The preferred value is 0 for ports and it sets to not use an union to define both fields. It fixes the wrong offsets value for __kind value on x86_64-linux-gnu-x32. Checked with a make check run-built-tests=no on all afected ABIs. [BZ #22298] * nptl/allocatestack.c (allocate_stack): Check if __PTHREAD_MUTEX_HAVE_PREV is non-zero, instead if __PTHREAD_MUTEX_HAVE_PREV is defined. * nptl/descr.h (pthread): Likewise. * nptl/nptl-init.c (__pthread_initialize_minimal_internal): Likewise. * nptl/pthread_create.c (START_THREAD_DEFN): Likewise. * sysdeps/nptl/fork.c (__libc_fork): Likewise. * sysdeps/nptl/pthread.h (PTHREAD_MUTEX_INITIALIZER): Likewise. * sysdeps/nptl/bits/thread-shared-types.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): New defines. (__pthread_internal_list): Check __PTHREAD_MUTEX_USE_UNION instead of __WORDSIZE for internal layout. (__pthread_mutex_s): Check __PTHREAD_MUTEX_NUSERS_AFTER_KIND instead of __WORDSIZE for internal __nusers layout and __PTHREAD_MUTEX_USE_UNION instead of __WORDSIZE whether to use an union for __spins and __list fields. (__PTHREAD_MUTEX_HAVE_PREV): Define also for __PTHREAD_MUTEX_USE_UNION case. * sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): New defines. * sysdeps/alpha/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/arm/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/hppa/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/ia64/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/m68k/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/microblaze/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/mips/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/nios2/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/powerpc/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/s390/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/sh/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/sparc/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/tile/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. * sysdeps/x86/nptl/bits/pthreadtypes-arch.h (__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): Likewise. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>