aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sh
AgeCommit message (Collapse)AuthorFilesLines
2014-03-05Don't include individual test ulps in libm-test-ulps.Joseph Myers1-5724/+0
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-12soft-fp: support after-rounding tininess detection.Joseph Myers1-0/+2
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ílka1-2/+2
2014-01-28Add -mieee to SH sysdep-CFLAGS for older SH compilers.Kaz Kojima1-0/+3
2014-01-27Regenerate SH libm-test-ulps with proper compiler options.Kaz Kojima1-9/+716
2014-01-25Move SH libm-test-ulps to sysdeps/sh and regenerate it.Kaz Kojima2-1094/+5486
2014-01-24Restore ucontext ABI for soft-float sh4.Kaz Kojima1-98/+0
2014-01-23Adjust SH specific fpu_control.h and ucontext.h files.Kaz Kojima1-0/+14
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae50-50/+50
2013-12-17Make soft-float sh use soft-fp fma/fmaf.Kaz Kojima4-0/+66
2013-12-14Move sysdeps/sh/sh4/fpu/bits/fenv.h to sysdeps/sh/bits/.Kaz Kojima1-0/+0
2013-12-06Add SH implementation of sotruss-lib.c and c++-types.data.Kaz Kojima1-0/+50
2013-11-28Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271).Joseph Myers1-0/+1
2013-10-30rename configure.in to configure.acMike Frysinger2-1/+1
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-09-27Add SH implementation of stackguard-macros.h.Kaz Kojima1-0/+6
2013-06-21Add sh4 implementation of fegetexceptflag.Kaz Kojima1-0/+38
2013-06-05Remove trailing whitespace.Joseph Myers4-6/+6
2013-05-29Avoid crashing in LD_DEBUG when program name is unavailableSiddhesh Poyarekar1-2/+1
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 Myers1-169/+169
2013-05-19Handle sincos with generic libm-test logic.Joseph Myers1-9/+9
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers48-50/+48
2012-11-20sysdeps/sh/dl-machine.h: Define ELF_MACHINE_RUNTIME_FIXUP_PARAMS.Thomas Schwinge1-2/+2
Fixes fallout from commit 2e64d2659d3edaebc792ac596a9863f1626e5c25.
2012-11-05Fix types of FE_DFL_ENV and FE_NOMASK_ENV (bug 14805).Joseph Myers1-1/+1
2012-11-03Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796).Joseph Myers1-0/+1
2012-11-03Make fenv.h FE_* macros usable in #if (bug 3439).Joseph Myers1-14/+21
2012-11-01Build SH backtrace with -funwind-tables.Joseph Myers1-0/+4
2012-10-30Fix strtod handling of underflow (bug 14047).Joseph Myers1-0/+1
2012-10-09Add missing magic to GLIBC_PROVIDES.Roland McGrath1-0/+1
2012-10-01Clean up init-first.c files.Roland McGrath1-78/+0
2012-08-16Fifth argument of la_pltenter() is not constant.Carlos O'Donell1-1/+1
The original runtime linker auditing interface described by Solaris allows the 5th argument of la_pltenter() to be modified. This patch cleans up the ldsodefs.h definitions such that the 5th argument is not constant. At one point the 5th argument *was* constant but this was changed with commit 2413fdba7a02ba8916f75d17199a6e9133a8f7b0. This patch updates alpha, ia64, mips, sh and sparc with similar changes.
2012-08-02Get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}.Marek Polacek2-5/+3
2012-07-26Move testsuite audit definitions to sysdeps tst-audit.h files.Joseph Myers1-0/+25
2012-07-25Move ldsodefs.h audit definitions to sysdeps directories.Joseph Myers1-0/+40
2012-07-17Remove TLS configure checks.Marek Polacek2-141/+0
2012-07-17Split tls-macros.h into sysdeps directories.Joseph Myers1-0/+143
2012-07-10Get rid of ASM_GLOBAL_DIRECTIVE.Marek Polacek2-2/+2
2012-06-23Some missing bits from sysdeps/*/elf dismissal.Thomas Schwinge1-1/+1
This fixes up commits 735095ae9566b2b14e8210e5ed44b3d5b51495f1, 09ae94c11b4309b425fbbfaa095e64cac2ae8cb8, and ff962fb6a10c46052535d482c889b3a9e5236637.
2012-06-23SH: Preserve more registers for frame unwinding purposes, add CFI directives.Thomas Schwinge1-2/+15
2012-06-23SH: Optimize assembler code in context of call to __fortify_fail.Thomas Schwinge1-9/+5
__fortify_fail has »__attribute__ ((__noreturn__))«.
2012-06-23SH: ABORT_INSTRUCTION.Thomas Schwinge1-0/+3
2012-06-09SH: No FE_UPWARD, FE_DOWNWARD.Thomas Schwinge3-11/+9
2012-06-09SH: Do not re-write fpscr after reading it.Thomas Schwinge5-12/+3
2012-05-28SH: Use fpu_control_t for the temporary FPU control word.Thomas Schwinge12-19/+18
2012-05-28SH: feraiseexcept: Restore fpscr flag fields.Kaz Kojima1-0/+8
2012-05-28SH: Add CFI directives.Chung-Lin Tang1-1/+10
2012-04-25SH: Replace <endian.h> usage with pre-processor macros.Chung-Lin Tang2-8/+6
Follow-up to f8887d0a5feda97244613135822b0439addc2b1f.
2012-04-05Fix return value of SH fesetround.Kaz Kojima1-3/+3
2012-04-05Set SH fpcsr register which read again.Kaz Kojima2-1/+8
2012-04-05Fix SH4 fraiseexcpt so to generate exceptions appropriately.Kaz Kojima1-6/+36
2012-04-05Add support fedisableexcept, feenableexcept, fegetexcept and feupdateenvKaz Kojima4-0/+151
for SH.