aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc
AgeCommit message (Collapse)Author
2014-05-01Fix v9/64-bit strcmp when string ends in multiple zero bytes.David S. Miller
[BZ #16885] * sysdeps/sparc/sparc64/strcmp.S: Fix end comparison handling when multiple zero bytes exist at the end of a string. Reported by Aurelien Jarno <aurelien@aurel32.net> * string/test-strcmp.c (check): Add explicit test for situations where there are multiple zero bytes after the first.
2014-04-30Add round-mode context support to sparc.David S. Miller
* sysdeps/sparc/fpu/fenv_private.h (HAVE_RM_CTX): Define. (libc_feholdexcept_setround_sparc_ctx): New function. (libc_fesetenv_sparc_ctx): Likewise. (libc_feupdateenv_sparc_ctx): Likewise. (libc_feholdsetround_sparc_ctx): Likewise. (libc_feholdexcept_setround_ctx): Define. (libc_feholdexcept_setroundf_ctx): Likewise. (libc_feholdexcept_setroundl_ctx): Likewise. (libc_fesetenv_ctx): Likewise. (libc_fesetenvf_ctx): Likewise. (libc_fesetenvl_ctx): Likewise. (libc_feupdateenv_ctx): Likewise. (libc_feupdateenvf_ctx): Likewise. (libc_feupdateenvl_ctx): Likewise. (libc_feresetround_ctx): Likewise. (libc_feresetroundf_ctx): Likewise. (libc_feresetroundl_ctx): Likewise. (libc_feholdsetround_ctx): Likewise. (libc_feholdsetroundf_ctx): Likewise. (libc_feholdsetroundl_ctx): Likewise.
2014-04-30Fix some sparc -Wundef build warnings.David S. Miller
* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Define to 0.
2014-04-13Regenerate sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2014-03-05Don't include individual test ulps in libm-test-ulps.Joseph Myers
As recently discussed <https://sourceware.org/ml/libc-alpha/2014-02/msg00670.html>, it doesn't seem particularly useful for libm-test-ulps files to contain huge amounts of data on ulps for individual tests; just the global maximum observed ulps for each function, together with the verification of exceptions, errno and special results such as infinities and NaNs for each test, suffices to verify that a function's behavior on the given test inputs is within the expected accuracy. Removing this data reduces source tree churn caused by updates to these files when libm tests are added, and reduces the frequency with which testsuite additions actually need libm-test-ulps changes at all. Accordingly, this patch removes that data, so that individual tests get checked against the global bounds for the given function and only generate an error if those are exceeded. Tested x86_64 (including verifying that if an ulps value is artificially reduced, the tests do indeed fail as they should and "make regen-ulps" generates the expected changes). * math/libm-test.inc (struct ulp_data): Don't refer to ulps for individual tests in comment. (libm-test-ulps.h): Don't refer to test_ulps in #include comment. (prev_max_error): New variable. (prev_real_max_error): Likewise. (prev_imag_max_error): Likewise. (compare_ulp_data): Don't refer to test names in comment. (find_test_ulps): Remove function. (find_function_ulps): Likewise. (find_complex_function_ulps): Likewise. (init_max_error): Take function name as argument. Look up ulps for that function. (print_ulps): Remove function. (print_max_error): Use prev_max_error instead of calling find_function_ulps. (print_complex_max_error): Use prev_real_max_error and prev_imag_max_error instead of calling find_complex_function_ulps. (check_float_internal): Take max_ulp parameter instead of calling find_test_ulps. Don't call print_ulps. (check_float): Update call to check_float_internal. (check_complex): Update calls to check_float_internal. (START): Pass argument to init_max_error. * math/gen-libm-test.pl (%results): Don't include "kind" information. (parse_ulps): Don't handle ulps of individual tests. (print_ulps_file): Likewise. (output_ulps): Likewise. * math/README.libm-test: Update. * manual/libm-err-tab.pl (parse_ulps): Don't handle ulps of individual tests. * sysdeps/aarch64/libm-test-ulps: Remove individual test ulps. * sysdeps/alpha/fpu/libm-test-ulps: Likewise. * sysdeps/arm/libm-test-ulps: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/ia64/fpu/libm-test-ulps: Likewise. * sysdeps/m68k/coldfire/fpu/libm-test-ulps: Likewise. * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Likewise. * sysdeps/microblaze/libm-test-ulps: Likewise. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps: Likewise. * sysdeps/s390/fpu/libm-test-ulps: Likewise. * sysdeps/sh/libm-test-ulps: Likewise. * sysdeps/sparc/fpu/libm-test-ulps: Likewise. * sysdeps/tile/libm-test-ulps: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. * sysdeps/hppa/fpu/libm-test-ulps: Remove individual test ulps.
2014-02-21Allow sys/auxv.h to be used from the testsuite on powerpc and sparc.Adam Conrad
elf/tst-auxv.c includes misc/sys/auxv.h, which ends up not actually being included due to the guard overlap, and getauxval becomes an implicit declaration and implicit pointer conversion which means, at best, the test isn't actually testing what it thinks it is and, at worst, it'll crash and burn on platforms where implict pointer conversion is a Very Bad Thing. * sysdeps/powerpc/bits/hwcap.h: Allow _SYSDEPS_SYSDEP_H guard as a synonym for _SYS_AUXV_H to allow direct inclusion. * sysdeps/sparc/bits/hwcap.h: Likewise. * sysdeps/powerpc/sysdep.h: Define _SYSDEPS_SYSDEP_H instead of _SYS_AUXV_H so we can include sysdep.h and sys/auxv.h together. * sysdeps/sparc/sysdep.h: Likewise.
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-02-04Adjust sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update for some 64-bit differences from 32-bit.
2014-01-24Rebuild sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Regenerate.
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-11-28Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271).Joseph Myers
2013-11-12Fix sparc 64-bit GMP ifunc resolution in static builds.David S. Miller
[BZ #16150] * sysdeps/sparc/sparc64/multiarch/add_n.S: Resolve to the correct generic symbol in the non-vis3 case in static builds. * sysdeps/sparc/sparc64/multiarch/addmul_1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/mul_1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/sub_n.S: Likewise. * sysdeps/sparc/sparc64/multiarch/submul_1.S: Likewise.
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-30rename configure.in to configure.acMike Frysinger
Autoconf has been deprecating configure.in for quite a long time. Rename all our configure.in and preconfigure.in files to .ac. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-10-10Update sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
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-08-21Fix typos.Ondřej Bílka
2013-07-20Update Sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update ULPs to handle minor difference between 32-bit and 64-bit.
2013-07-07Full from-scratch rebuild of sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Regenerate from scratch.
2013-07-02Update sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-06-28Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type.Ryan S. Arnold
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-22Don't include expected results in libm-test test names.Joseph Myers
2013-05-19Handle sincos with generic libm-test logic.Joseph Myers
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-05-14Update Sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-05-02Update Sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-03-22Update sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-03-20Move system-specific settings out of toplevel configure.in and config.make.in.Joseph Myers
2013-03-17Update Sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-02-15Remove bounded-pointers build system support.Joseph Myers
2013-02-13Remove __ptrvalue, __bounded and __unbounded.Joseph Myers
2013-02-04Add long-double sparc ULPs updates missing in previous commit.David S. Miller
2013-02-04Update sparc ULPs after Joseph's casin fixes.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2013-02-04Remove CHECK_STRING, CHECK_STRING_NULL_OK and __ubp_memchr.Joseph Myers
2013-02-01Remove BOUNDED_N and BOUNDED_1.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-17Update sparc ULPs.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
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-14Fix up log format, wrap a long line.Roland McGrath
2013-01-11Add 64-bit VIS3 optimized GMP routines for sparc.David S. Miller
* math/Makefile: Recognize gmp-sysdep_routines. * sysdeps/sparc/sparc64/multiarch/Makefile: Add VIS3 optimized GMP routines to sysdeps. * sysdeps/sparc/sparc64/multiarch/add_n-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/add_n.S: New file. * sysdeps/sparc/sparc64/multiarch/addmul_1-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/addmul_1.S: New file. * sysdeps/sparc/sparc64/multiarch/mul_1-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/mul_1.S: New file. * sysdeps/sparc/sparc64/multiarch/sub_n-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/sub_n.S: New file. * sysdeps/sparc/sparc64/multiarch/submul_1-vis3.S: New file. * sysdeps/sparc/sparc64/multiarch/submul_1.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.