aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32
AgeCommit message (Collapse)Author
2015-03-05Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPYH.J. Lu
ELF_RTYPE_CLASS_NOCOPY in comments is a typo. It should be ELF_RTYPE_CLASS_COPY. [BZ #18082] * sysdeps/alpha/dl-machine.h (elf_machine_type_class): Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY in comments. * sysdeps/arm/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/hppa/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/ia64/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/microblaze/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/nios2/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/s390/s390-32/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/s390/s390-64/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/sh/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/tile/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Likewise.
2015-01-31Fix two bugs in sparc atomics.David S. Miller
* sysdeps/sparc/sparc32/bits/atomic.h (__sparc32_atomic_do_unlock24): Put the memory barrier before the unlock not after it. (__v9_compare_and_exchange_val_32_acq): Use unions to avoid getting volatile register usage warnings from the compiler.
2015-01-31Fix sparc semaphore implementation after recent changes.David S. Miller
* sysdeps/sparc/nptl/sem_init.c: Delete. * sysdeps/sparc/nptl/sem_post.c: Delete. * sysdeps/sparc/nptl/sem_timedwait.c: Delete. * sysdeps/sparc/nptl/sem_wait.c: Delete. * sysdeps/sparc/sparc32/sem_init.c: New file. * sysdeps/sparc/sparc32/sem_waitcommon.c: New file. * sysdeps/sparc/sparc32/sem_open.c: Generic nptl version with padding explicitly initialized. * sysdeps/sparc/sparc32/sem_post.c: Generic nptl version using padding for in-semaphore spinlock. * sysdeps/sparc/sparc32/sem_wait.c: Likewise. * sysdeps/sparc/sparc32/sem_trywait.c: Delete. * sysdeps/sparc/sparc32/sem_timedwait.c: Delete. * sysdeps/sparc/sparc32/sparcv9/sem_init.c: New file. * sysdeps/sparc/sparc32/sparcv9/sem_open.c: New file. * sysdeps/sparc/sparc32/sparcv9/sem_post.c: New file. * sysdeps/sparc/sparc32/sparcv9/sem_waitcommon.c: New file. * sysdeps/sparc/sparc32/sparcv9/sem_wait.c: Redirect to nptl version. * sysdeps/sparc/sparc32/sparcv9/sem_timedwait.c: Delete. * sysdeps/sparc/sparc32/sparcv9/sem_trywait.c: Delete.
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-12-19Fix soft-fp build warning on sparc about strict aliasing.David S. Miller
* sysdeps/sparc/sparc32/soft-fp/q_neg.c (_Q_neg): Use a union to access the quad as both a long double and as a series of 4 words.
2014-11-24Remove IS_IN_libmSiddhesh Poyarekar
Replace with IS_IN (libm). Generated code unchanged on x86_64. * include/math.h: Use IS_IN instead of IS_IN_libm. * sysdeps/alpha/fpu/s_copysign.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_finitel.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_isinfl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_isnanl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_modfl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_scalbnl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_signbitl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_copysignl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_finitel.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_frexpl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_isinfl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_isnanl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_modfl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_scalbnl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/s_signbitl.c: Likewise. * sysdeps/ieee754/ldbl-64-128/w_scalblnl.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_copysign.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_finite.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_frexp.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_isinf.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_isnan.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_ldexp.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_ldexpl.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_modf.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_scalbln.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_scalbn.c: Likewise. * sysdeps/powerpc/power5+/fpu/s_modf.c: Likewise. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/s_copysignl.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c: Likewise. * sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S: Likewise. * sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S: Likewise. * sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S: Likewise. * sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise. * sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Likewise. * sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise. * sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S: Likewise. * sysdeps/sparc/sparc32/fpu/s_signbitl.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S: Likewise. * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S: Likewise.
2014-11-24Remove IS_IN_libpthreadSiddhesh Poyarekar
Replace with IS_IN (libpthread). Generated code unchanged on x86_64. * nptl/lowlevellock.c: Use IS_IN instead of IS_IN_libpthread. * nptl/pthreadP.h: Likewise. * nptl_db/structs.def: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/nptl/bits/libc-lock.h: Likewise. * sysdeps/nptl/bits/libc-lockP.h: Likewise. * sysdeps/sparc/sparc32/lowlevellock.c: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2014-11-20Add arch-specific configuration for C11 atomics support.Torvald Riegel
This sets __HAVE_64B_ATOMICS if provided. It also sets USE_ATOMIC_COMPILER_BUILTINS to true if the existing atomic ops use the __atomic* builtins (aarch64, mips partially) or if this has been tested (x86_64); otherwise, this is set to false so that C11 atomics will be based on the existing atomic operations.
2014-11-04Don't use INTDEF/INTUSE with _dl_init (bug 14132).Joseph Myers
Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this patch eliminates its use for _dl_init. Since _dl_init was already declared with hidden visibility, creating a second hidden alias for it was completely pointless, so this patch replaces all uses of _dl_init_internal with plain _dl_init instead of using hidden_proto / hidden_def (which are only needed when you want a hidden alias for a non-hidden symbol; it's quite possible there are cases where they are used but don't need to be because the symbol in question is not part of the public ABI and is only used within a single library, so using attributes_hidden instead would suffice). Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. [BZ #14132] * elf/dl-init.c (_dl_init): Don't use INTDEF. * sysdeps/aarch64/dl-machine.h (RTLD_START): Use _dl_init instead of _dl_init_internal. * sysdeps/alpha/dl-machine.h (RTLD_START): Likewise. * sysdeps/arm/dl-machine.h (RTLD_START): Likewise. * sysdeps/hppa/dl-machine.h (RTLD_START): Likewise. * sysdeps/i386/dl-machine.h (RTLD_START): Likewise. * sysdeps/ia64/dl-machine.h (RTLD_START): Likewise. * sysdeps/m68k/dl-machine.h (RTLD_START): Likewise. * sysdeps/microblaze/dl-machine.h (RTLD_START): Likewise. * sysdeps/mips/dl-machine.h (RTLD_START): Likewise. * sysdeps/powerpc/powerpc32/dl-start.S (_start): Likewise. * sysdeps/s390/s390-32/dl-machine.h (RTLD_START): Likewise. * sysdeps/s390/s390-64/dl-machine.h (RTLD_START): Likewise. * sysdeps/sh/dl-machine.h (RTLD_START): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise. * sysdeps/tile/dl-start.S (_start): Likewise. * sysdeps/x86_64/dl-machine.h (RTLD_START): Likewise. * sysdeps/x86_64/x32/dl-machine.h (RTLD_START): Likewise.
2014-10-31Fix SPARC atomic_write_barrier.Torvald Riegel
2014-10-09soft-fp: Refactor exception handling for comparisons.Joseph Myers
This patch refactors how soft-fp comparisons handle setting exceptions for NaN operands, so that exceptions are set through the FP_CMP macros rather than directly in the C files calling them. The _FP_CMP* and FP_CMP* macros gain an extra argument to specify when exceptions should be set, 0 for no exception setting (I'm not sure this is actually needed - at least it's not needed for IEEE operations in glibc / libgcc, but might be relevant in some cases for kernel use), 1 for exceptions only for signaling NaNs and 2 for exceptions for all NaNs. This argument is handled through _FP_CMP_CHECK_NAN, newly called by the _FP_CMP* macros when a NaN is encountered. Calls to these macros are updated, which eliminates all the existing checking and exception setting in soft-fp *.c files in glibc. Tested for powerpc-nofpu. (The __unord* functions have no code changes; the __eq* / __ge* / __le* functions get slightly larger, but I don't think that's significant.) * soft-fp/op-common.h (_FP_CMP_CHECK_NAN): New macro. (_FP_CMP): Add extra argument EX. Call _FP_CMP_CHECK_NAN. (_FP_CMP_EQ): Likewise. (_FP_CMP_UNORD): Likewise. * soft-fp/double.h (FP_CMP_D): Add extra argument EX. (FP_CMP_EQ_D): Likewise. (FP_CMP_UNORD_D): Likewise. * soft-fp/extended.h (FP_CMP_E): Likewise. (FP_CMP_EQ_E): Likewise. (FP_CMP_UNORD_E): Likewise. * soft-fp/quad.h (FP_CMP_Q): Likewise. (FP_CMP_EQ_Q): Likewise. (FP_CMP_UNORD_Q): Likewise. * soft-fp/single.h (FP_CMP_S): Likewise. (FP_CMP_EQ_S): Likewise. (FP_CMP_UNORD_S): Likewise. * soft-fp/eqdf2.c (__eqdf2): Update call to FP_CMP_EQ_D. * soft-fp/eqsf2.c (__eqsf2): Update call to FP_CMP_EQ_S. * soft-fp/eqtf2.c (__eqtf2): Update call to FP_CMP_EQ_Q. * soft-fp/gedf2.c (__gedf2): Update call to FP_CMP_D. * soft-fp/gesf2.c (__gesf2): Update call to FP_CMP_S. * soft-fp/getf2.c (__getf2): Update call to FP_CMP_Q. * soft-fp/ledf2.c (__ledf2): Update call to FP_CMP_D. * soft-fp/lesf2.c (__lesf2): Update call to FP_CMP_S. * soft-fp/letf2.c (__letf2): Update call to FP_CMP_Q. * soft-fp/unorddf2.c (__unorddf2): Update call to FP_CMP_UNORD_D. * soft-fp/unordsf2.c (__unordsf2): Update call to FP_CMP_UNORD_S. * soft-fp/unordtf2.c (__unordtf2): Update call to FP_CMP_UNORD_Q. * sysdeps/alpha/soft-fp/ots_cmpe.c (internal_compare): Update call to FP_CMP_Q. * sysdeps/sparc/sparc32/soft-fp/q_cmp.c (_Q_cmp): Update call to FP_CMP_Q. * sysdeps/sparc/sparc32/soft-fp/q_cmpe.c (_Q_cmpe): Likewise. * sysdeps/sparc/sparc32/soft-fp/q_feq.c (_Q_feq): Update call to FP_CMP_EQ_Q. * sysdeps/sparc/sparc32/soft-fp/q_fge.c (_Q_fge): Update call to FP_CMP_Q. * sysdeps/sparc/sparc32/soft-fp/q_fgt.c (_Q_fgt): Likewise. * sysdeps/sparc/sparc32/soft-fp/q_fle.c (_Q_fle): Likewise. * sysdeps/sparc/sparc32/soft-fp/q_flt.c (_Q_flt): Likewise. * sysdeps/sparc/sparc32/soft-fp/q_fne.c (_Q_fne): Update call to FP_CMP_EQ_Q. * sysdeps/sparc/sparc64/soft-fp/qp_cmp.c (_Qp_cmp): Update call to FP_CMP_Q. * sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c (_Qp_cmpe): Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_feq.c (_Qp_feq): Update call to FP_CMP_EQ_Q. * sysdeps/sparc/sparc64/soft-fp/qp_fge.c (_Qp_fge): Update call to FP_CMP_Q. * sysdeps/sparc/sparc64/soft-fp/qp_fgt.c (_Qp_fgt): Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_fle.c (_Qp_fle): Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_flt.c (_Qp_flt): Likewise. * sysdeps/sparc/sparc64/soft-fp/qp_fne.c (_Qp_fne): Update call to FP_CMP_EQ_Q.
2014-10-09soft-fp: Remove FP_CLEAR_EXCEPTIONS.Joseph Myers
As noted in <https://sourceware.org/ml/libc-alpha/2013-10/msg00516.html>, the soft-fp macro FP_CLEAR_EXCEPTIONS should not be necessary, as soft-fp code should never set an exception and later clear it. In fact, all four uses in glibc (for SPARC) are indeed unnecessary: they appear in files that convert 32-bit or 64-bit integers to IEEE binary128, an operation that can never raise any exceptions. If this was intended to enable the compiler to optimize away any FP_FROM_INT code testing for exceptional cases, we now have a better way of doing this: defining FP_NO_EXCEPTIONS before including soft-fp.h causes all code handling exceptions to be stubbed out, and the rounding mode to be hardwired for round-to-zero, to allow such optimizations for source files where (a) the operation in question, for the particular types in question, can never raise exceptions, but (b) some instances of the operation for other types can, so the macros used in the file do contain references to rounding or exceptions, albeit dead in that particular file. The uses in the Linux kernel are also unnecessary (clearing exceptions at a point where they are already cleared). This patch duly removes FP_CLEAR_EXCEPTIONS, making the SPARC code in question use FP_NO_EXCEPTIONS and stop using exception-related macros. * soft-fp/soft-fp.h (FP_CLEAR_EXCEPTIONS): Remove macro. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Define FP_NO_EXCEPTIONS. (_Q_itoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Define FP_NO_EXCEPTIONS. (_Q_lltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Define FP_NO_EXCEPTIONS. (_Q_ulltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Define FP_NO_EXCEPTIONS. (_Q_utoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or FP_HANDLE_EXCEPTIONS.
2014-07-09Get rid of sparc specific NPTL internaltypes.h header.David S. Miller
* sysdeps/sparc/nptl/internaltypes.h: Delete. * sysdeps/sparc/nptl/sparc-nptl.h: New file. * sysdeps/sparc/nptl/pthread_barrier_destroy.c: Include it. * sysdeps/sparc/nptl/pthread_barrier_init.c: Likewise. * sysdeps/sparc/nptl/pthread_barrier_wait.c: Likewise. * sysdeps/sparc/nptl/sem_init.c: Likewise. * sysdeps/sparc/nptl/sem_post.c: Likewise. * sysdeps/sparc/nptl/sem_timedwait.c: Likewise. * sysdeps/sparc/nptl/sem_wait.c: Likewise. * sysdeps/sparc/sparc32/nptl/pthread_barrier_wait.c: Likewise. * sysdeps/sparc/sparc32/nptl/sem_post.c: Likewise. * sysdeps/sparc/sparc32/nptl/sem_timedwait.c: Likewise. * sysdeps/sparc/sparc32/nptl/sem_wait.c: Likewise.
2014-07-07Get rid of nptl/sysdeps/ entirely!Roland McGrath
2014-07-03Always provide HP_SMALL_TIMING_AVAILRichard Henderson
2014-07-03Unify hp-timing implementationsRichard Henderson
Provide an hp-timing-common.h for ports to use.
2014-07-03Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overheadRichard Henderson
Without HP_TIMING_ACCUM, dl_hp_timing_overhead is write-only. If we remove it, there's no point in HP_TIMING_DIFF_INIT either.
2014-07-03Removing HP_TIMING_ACCUM as unusedRichard Henderson
2014-07-03Removing HP_TIMING_ZERO as unusedRichard Henderson
2014-06-26Fix Wundef warning for ELF_MACHINE_NO_RELASiddhesh Poyarekar
This patch defines ELF_MACHINE_NO_RELA on all architectures. Tested only on x86_64 to verify that the sources before and after are identical except for two instructions that pass the current line number in dl-machine.h to assert_fail.
2014-06-25SPARC: Consolidate unnecessary nptl/ subdirectories.Roland McGrath
2014-06-20Move remaining SPARC code out of nptl/.Roland McGrath
2014-06-12Move SPARC code out of nptl/sysdeps/sparc/.Roland McGrath
2014-02-12soft-fp: support after-rounding tininess detection.Joseph Myers
IEEE 754-2008 defines two ways in which tiny results can be detected, "before rounding" (based on the infinite-precision result) and "after rounding" (based on the result when rounded to normal precision as if the exponent range were unbounded). All binary operations on an architecture must use the same choice of how tininess is detected. soft-fp has so far implemented only before-rounding tininess detection. This patch adds support for after-rounding tininess detection. A new macro _FP_TININESS_AFTER_ROUNDING is added that sfp-machine.h must define (soft-fp is meant to be self-contained so the existing tininess.h files aren't used here, though the information going in sfp-machine.h has been taken from them). The soft-fp macros dealing with raising underflow exceptions then handle the cases where the choice matters specially, rounding a copy of the input to the appropriate precision to see if a value that's tiny before rounding isn't tiny after rounding. Tested for mips64 using GCC trunk (which now uses soft-fp on MIPS, so supporting exceptions and rounding modes for long double where not previously supported - this is the immediate motivation for doing this patch now) together with (a) a patch to sysdeps/mips/math-tests.h to enable exceptions / rounding modes tests for long double for GCC 4.9 and later, and (b) corresponding changes applied to libgcc's soft-fp and sfp-machine.h files. In the libgcc context this is also tested on x86_64 (also an after-rounding architecture) with testcases for __float128 that I intend to add to the GCC testsuite when updating soft-fp there. (To be clear: this patch does not fix any glibc bugs that were user-visible in past releases, since after-rounding architectures didn't use soft-fp in any affected case with support for floating-point exceptions - so there is no corresponding Bugzilla bug. Rather, it works together with the GCC changes to use soft-fp on MIPS to allow previously absent long double functionality to work properly, and allows soft-fp to be used in glibc on after-rounding architectures in cases where it couldn't previously be used.) * soft-fp/op-common.h (_FP_DECL): Mark exponent as possibly unused. (_FP_PACK_SEMIRAW): Determine tininess based on rounding shifted value if _FP_TININESS_AFTER_ROUNDING and unrounded value is in subnormal range. (_FP_PACK_CANONICAL): Determine tininess based on rounding to normal precision if _FP_TININESS_AFTER_ROUNDING and unrounded value has largest subnormal exponent. * soft-fp/soft-fp.h [FP_NO_EXCEPTIONS] (_FP_TININESS_AFTER_ROUNDING): Undefine and redefine to 0. * sysdeps/aarch64/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): New macro. * sysdeps/alpha/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/arm/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/mips/mips64/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/mips/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/powerpc/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/sh/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/sparc/sparc32/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise. * sysdeps/tile/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Likewise.
2014-02-10Use glibc_likely instead __builtin_expect.Ondřej Bílka
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-11-06Fix build on pre-v9 32-bit Sparc.David S. Miller
We cannot use fnegd in this code, as fnegd was added in v9. Only fnegs exists in v8 and earlier. [BZ #15985] * sysdeps/sparc/sparc32/fpu/s_fdim.S (__fdim): Do not use fnegd on pre-v9 cpus, use a fnegs+fmovs sequence instead.
2013-10-10soft-fp: fix negation NaN handling (bug 16034).Joseph Myers
2013-09-23BZ #15754: CVE-2013-4788Carlos O'Donell
The pointer guard used for pointer mangling was not initialized for static applications resulting in the security feature being disabled. The pointer guard is now correctly initialized to a random value for static applications. Existing static applications need to be recompiled to take advantage of the fix. The test tst-ptrguard1-static and tst-ptrguard1 add regression coverage to ensure the pointer guards are sufficiently random and initialized to a default value.
2013-06-06Fix leading whitespaces.Ondrej Bilka
2013-06-05Remove trailing whitespace.Joseph Myers
2013-05-29Avoid crashing in LD_DEBUG when program name is unavailableSiddhesh Poyarekar
Resolves: #15465 The program name may be unavailable if the user application tampers with argc and argv[]. Some parts of the dynamic linker caters for this while others don't, so this patch consolidates the check and fallback into a single macro and updates all users.
2013-05-16MIPS: soft-fp NaN representation correctionsMaciej W. Rozycki
[BZ #15442] This adds support for the inverse interpretation of the quiet bit of IEEE 754 floating-point NaN data that some processors use. This includes in particular MIPS architecture processors; the payload used for the canonical qNaN encoding is updated accordingly so as not to interfere with the quiet bit.
2013-02-15Remove bounded-pointers build system support.Joseph Myers
2013-02-04Remove CHECK_STRING, CHECK_STRING_NULL_OK and __ubp_memchr.Joseph Myers
2013-01-23Add a minor 'cas' atomic optimization on sparc.David S. Miller
* sysdeps/sparc/sparc32/sparcv9/bits/atomic.h (__arch_compare_and_exchange_val_32_acq): Use %g0 as second argument of CAS if possible. * sysdeps/sparc/sparc64/bits/atomic.h (__arch_compare_and_exchange_val_32_acq): Likewise. (__arch_compare_and_exchange_val_64_acq): Likewise.
2013-01-21Use libgcc unwinder for sparc backtraces, if available.David S. Miller
* sysdeps/sparc/backtrace.c: New file. * sysdeps/sparc/sparc32/backtrace.h: New file. * sysdeps/sparc/sparc32/sparcv9/backtrace.h: New file. * sysdeps/sparc/sparc64/backtrace.h: New file. * sysdeps/sparc/sparc64/backtrace.c: Delete. * sysdeps/sparc/Makefile (CFLAGS-backtrace.c): Add -funwind-tables.
2013-01-16Optimize trunc{,f} on sparc.David S. Miller
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add vis3 trunc{,f} to libm-sysdep_routes. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_trunc.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_truncf-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_truncf.S: New file. * sysdeps/sparc/sparc64/fpu/s_trunc.S: New file. * sysdeps/sparc/sparc64/fpu/s_truncf.S: New file.
2013-01-15Optimize nearbyint{,f} on sparc.David S. Miller
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add vis3 nearbyint{,f} to libm-sysdep_routes. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyint.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyintf-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_nearbyintf.S: New file. * sysdeps/sparc/sparc64/fpu/s_nearbyint.S: New file. * sysdeps/sparc/sparc64/fpu/s_nearbyintf.S: New file.
2013-01-14Optimize sparc {ceil,floor}{,f} using vis2 'siam' instruction.David S. Miller
* sysdeps/sparc/sparc-ifunc.h (SPARC_ASM_IFUNC2): New macro. (SPARC_ASM_VIS2_IFUNC): Likewise. (SPARC_ASM_VIS3_VIS2_IFUNC): Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S: Make use of 'siam' instruction. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-vis3.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-vis3.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor-vis3.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-vis2.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-vis2.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor-vis2.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-vis2.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S: Hook in new VIS2 routines. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add new VIS2 routines to libm-sysdep_routines. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Likewise.
2013-01-14Optimize fdim/fdimf on sparc.David S. Miller
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add vis3 fdim/fdimf to libm-sysdep_routines. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S: New file. * sysdeps/sparc/sparc32/fpu/s_fdim.S: New file. * sysdeps/sparc/sparc32/fpu/s_fdimf.S: New file. * sysdeps/sparc/sparc64/fpu/s_fdim.S: New file. * sysdeps/sparc/sparc64/fpu/s_fdimf.S: New file.
2013-01-11Redo sparc 32-bit V9 GMP optimizations with fixed copyrights.David S. Miller
* sysdeps/sparc/sparc32/sparcv9/mul_1.S: Properly optimize for 32-bit sparc V9 rather than using V8 code. * sysdeps/sparc/sparc32/sparcv9/addmul_1.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/submul_1.S: Likewise.
2013-01-11Adjust sparc for Roland's multiarch sysdep directory changes.David S. Miller
* sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/Implies: Move to... * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/fpu/multiarch/Implies: Here.
2013-01-10Undo receive sparc 32-bit V9 gmp routine commit.David S. Miller
* sysdeps/sparc/sparc32/sparcv9/mul_1.S: Revert previous changes. * sysdeps/sparc/sparc32/sparcv9/addmul_1.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/submul_1.S: Likewise.
2013-01-10Optimize sparc 32-bit V9 GMP multiply routines.David S. Miller
* sysdeps/sparc/sparc32/sparcv9/mul_1.S: Properly optimize for 32-bit sparc V9 rather than using V8 code. * sysdeps/sparc/sparc32/sparcv9/addmul_1.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/submul_1.S: Likewise.
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers
2012-11-13Add support for sparc cryptographic hash opcodes.David S. Miller
* crypt/Makefile: Move test targets after toplevel Rules inclusion. Grab any necessary sysdep routines when linking. * crypt/md5.c (md5_process_block): Remove define, we will always name it __md5_process_block. (md5_finish_ctx): Update md5_process_block call. (md5_stream): Likewise. (md5_process_bytes): Likewise. (md5_process_block): Rename to __md5_process_block and move to ... * crypt/md5-block.c: ... here. * crypt/sha256.c (sha256_process_block): Move to ... * crypt/sha256-block.c: ... here. * crypt/sha512.c (sha512_process_block): Move to ... * crypt/sha512-block.c: ... here. * locale/Makefile (CFLAGS-md5.c): Define to add crypt/ to include path. * sysdeps/sparc/sparc-ifunc.c (sparc_libc_ifunc): Define. * sysdeps/sparc/sparc64/multiarch/Makefile (libcrypt-sysdep_routines): Add crypto assembler sysdeps when in crypt subdir. (localedef-aux): Add md5 crypto assembler when in locale subdir. * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Mirror sparc64 multiarch changes. * sysdeps/sparc/sparc64/multiarch/md5-block.c: New file. * sysdeps/sparc/sparc64/multiarch/md5-crop.S: New file. * sysdeps/sparc/sparc64/multiarch/sha256-block.c: New file. * sysdeps/sparc/sparc64/multiarch/sha256-crop.S: New file. * sysdeps/sparc/sparc64/multiarch/sha512-block.c: New file. * sysdeps/sparc/sparc64/multiarch/sha512-crop.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/md5-block.c: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/md5-crop.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-block.c: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-crop.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-block.c: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-crop.S: New file.
2012-10-25Add IFUNC test lists for memcpy/mempcpy/memset on sparc.David S. Miller
* sysdeps/sparc/sparc64/multiarch/memcpy.S: Add comments for ifunc-impl-list.c * sysdeps/sparc/sparc64/multiarch/memset.S: Likewise. * sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c: New file.
2012-10-05Add Niagara-4 optimized memset/bzero implementation.David S. Miller
* sysdeps/sparc/sparc64/multiarch/memset-niagara4.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S: New file. * sysdeps/sparc/sparc64/multiarch/Makefile: Add to sysdep_routines. * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Likewise. * sysdeps/sparc/sparc64/multiarch/memset.S: Use Niagara-4 memset and bzero when HWCAP_SPARC_CRYPTO is present.
2012-09-28Add Niagara-4 optimized memcpy and mempcpy.David S. Miller
* sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-niagara4.S: New file. * sysdeps/sparc/sparc64/multiarch/Makefile: Add to sysdep_routines. * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy.S: Use Niagara-4 memcpy and mempcpy when HWCAP_SPARC_CRYPTO is set.