about summary refs log tree commit diff
path: root/sysdeps/mips/mips32
Commit message (Collapse)AuthorAgeFilesLines
* Update MIPS libm-test-ulps.Joseph Myers2018-05-161-0/+8
| | | | | * sysdeps/mips/mips32/libm-test-ulps: Update. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* Update MIPS libm-test-ulps.Joseph Myers2018-01-021-28/+34
| | | | | * sysdeps/mips/mips32/libm-test-ulps: Update. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-014-4/+4
| | | | | | | * 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.
* Add sysdeps/ieee754/soft-fp.Joseph Myers2017-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default sysdeps/ieee754 fma implementations rely on exceptions and rounding modes to achieve correct results through internal use of round-to-odd. Thus, glibc configurations without support for exceptions and rounding modes instead need to use implementations of fma based on soft-fp. At present, this is achieved via having implementation files in soft-fp/ that are #included by sysdeps files for each glibc configuration that needs them. In general this means such a configuration has its own s_fma.c and s_fmaf.c. TS 18661-1 adds functions that do an operation (+ - * / sqrt fma) on arguments wider than the return type, with a single rounding of the infinite-precision result to that return type. These are also naturally implemented using round-to-odd on platforms with hardware support for rounding modes and exceptions but lacking hardware support for these narrowing operations themselves. (Platforms that have direct hardware support for such narrowing operations include at least ia64, and Power ISA 2.07 or later, which I think means POWER8 or later.) So adding the remaining TS 18661-1 functions would mean at least six narrowing function implementations (fadd fsub fmul fdiv ffma fsqrt), with aliases for other types and further implementations in some configurations, that need to be overridden for configurations lacking hardware exceptions and rounding modes. Requiring all such configurations (currently seven of them) to have their own source files for all those functions seems undesirable. Thus, this patch adds a directory sysdeps/ieee754/soft-fp to contain libm function implementations based on soft-fp. This directory is then used via Implies from all the configurations that need it, so no more files need adding to every such configuration when adding more functions with soft-fp implementations. A configuration can still selectively #include a particular file from this directory if desired; thus, the MIPS #include of the fmal implementation is retained, since that's appropriate even for hard float (because long double is always implementated in software for MIPS64, so the soft-fp implementation of fmal is better than the ldbl-128 one). This also provides additional motivation for my recent patch removing --with-fp / --without-fp: previously there was no need for correct use of --without-fp for no-FPU ARM or SH3, and now we have autodetection nofpu/ sysdeps directories can be used by this patch for those configurations without imposing any new requirements on how glibc is configured. (The mips64/*/fpu/s_fma.c files added by this patch are needed to keep the dbl-64 version of fma for double, rather than the ldbl-128 one, used in that case.) Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * soft-fp/fmadf4.c: Move to .... * sysdeps/ieee754/soft-fp/s_fma.c: ... here. * soft-fp/fmasf4.c: Move to .... * sysdeps/ieee754/soft-fp/s_fmaf.c: ... here. * soft-fp/fmatf4.c: Move to .... * sysdeps/ieee754/soft-fp/s_fmal.c: ... here. * sysdeps/ieee754/soft-fp/Makefile: New file. * sysdeps/arm/preconfigure.ac: Define with_fp_cond. * sysdeps/arm/preconfigure: Regenerated. * sysdeps/arm/nofpu/Implies: New file. * sysdeps/arm/s_fma.c: Remove file. * sysdeps/arm/s_fmaf.c: Likewise. * sysdeps/m68k/coldfire/nofpu/Implies: New file. * sysdeps/m68k/coldfire/nofpu/s_fma.c: Remove file. * sysdeps/m68k/coldfire/nofpu/s_fmaf.c: Likewise. * sysdeps/microblaze/Implies: Add ieee754/soft-fp. * sysdeps/microblaze/s_fma.c: Remove file. * sysdeps/microblaze/s_fmaf.c: Likewise. * sysdeps/mips/mips32/nofpu/Implies: New file. * sysdeps/mips/mips64/n32/fpu/s_fma.c: Likewise. * sysdeps/mips/mips64/n32/nofpu/Implies: Likewise. * sysdeps/mips/mips64/n64/fpu/s_fma.c: Likewise. * sysdeps/mips/mips64/n64/nofpu/Implies: Likewise. * sysdeps/mips/ieee754/s_fma.c: Remove file. * sysdeps/mips/ieee754/s_fmaf.c: Likewise. * sysdeps/mips/ieee754/s_fmal.c: Update include for move of fmal implementation. * sysdeps/nios2/Implies: Add ieee754/soft-fp. * sysdeps/nios2/s_fma.c: Remove file. * sysdeps/nios2/s_fmaf.c: Likewise. * sysdeps/sh/nofpu/Implies: New file. * sysdeps/sh/s_fma.c: Remove file. * sysdeps/sh/s_fmaf.c: Likewise. * sysdeps/tile/Implies: Add ieee754/soft-fp. * sysdeps/tile/s_fma.c: Remove file. * sysdeps/tile/s_fmaf.c: Likewise.
* Obsolete pow10 functions.Joseph Myers2017-09-011-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch obsoletes the pow10, pow10f and pow10l functions (makes them into compat symbols, not available for new ports or static linking). The exp10 names for these functions are standardized (in TS 18661-4) and were added in the same glibc version (2.1) as pow10 so source code can change to use them without any loss of portability. Since pow10 is deliberately not provided for _Float128, only exp10, this slightly simplifies moving to the new wrapper templates in the !LIBM_SVID_COMPAT case, by avoiding needing to arrange for pow10, pow10f and pow10l to be defined by those templates. Tested for x86_64, and with build-many-glibcs.py. * manual/math.texi (pow10): Do not document. (pow10f): Likewise. (pow10l): Likewise. * math/bits/mathcalls.h [__USE_GNU] (pow10): Do not declare. * math/bits/math-finite.h [__USE_GNU] (pow10): Likewise. * math/libm-test-exp10.inc (pow10_test): Remove. (do_test): Do not call pow10. * math/w_exp10_compat.c (pow10): Make into compat symbol. [NO_LONG_DOUBLE] (pow10l): Likewise. * math/w_exp10f_compat.c (pow10f): Likewise. * math/w_exp10l_compat.c (pow10l): Likewise. * sysdeps/ia64/fpu/e_exp10.S: Include <shlib-compat.h>. (pow10): Make into compat symbol. * sysdeps/ia64/fpu/e_exp10f.S: Include <shlib-compat.h>. (pow10f): Make into compat symbol. * sysdeps/ia64/fpu/e_exp10l.S: Include <shlib-compat.h>. (pow10l): Make into compat symbol. * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Remove pow10. (CFLAGS-nldbl-pow10.c): Remove variable.. * sysdeps/ieee754/ldbl-opt/nldbl-pow10.c: Remove file. * sysdeps/ieee754/ldbl-opt/w_exp10_compat.c (pow10l): Condition on [SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)]. * sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c (compat_symbol): Undefine and redefine. (pow10l): Make into compat symbol. * sysdeps/aarch64/libm-test-ulps: Remove pow10 ulps. * sysdeps/alpha/fpu/libm-test-ulps: Likewise. * sysdeps/arm/libm-test-ulps: Likewise. * sysdeps/hppa/fpu/libm-test-ulps: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise. * sysdeps/microblaze/libm-test-ulps: Likewise. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/nios2/libm-test-ulps: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps: Likewise. * sysdeps/s390/fpu/libm-test-ulps: Likewise. * sysdeps/sh/libm-test-ulps: Likewise. * sysdeps/sparc/fpu/libm-test-ulps: Likewise. * sysdeps/tile/libm-test-ulps: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Update arm, mips, powerpc-nofpu libm-test-ulps.Joseph Myers2017-02-171-52/+60
| | | | | | | * sysdeps/arm/libm-test-ulps: Update. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps: Likewise.
* Make MIPS soft-fp preserve NaN payloads for NAN2008.Joseph Myers2017-01-041-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | This corresponds to a patch applied to libgcc. In glibc it doesn't actually affect much (only fma, I think). The MIPS sfp-machine.h files have an _FP_CHOOSENAN implementation which emulates hardware semantics of not preserving signaling NaN payloads for an operation with two NaN arguments (although that doesn't suffice to avoid sNaN payload preservation in any case with just one NaN argument). However, those are only hardware semantics in the legacy NaN case; in the NAN2008 case, the architecture documentation says hardware preserves payloads in such cases. Furthermore, this implementation assumes legacy NaN semantics, so in the NAN2008 case the implementation actually has the effect of preserving sNaN payloads but not preserving qNaN payloads, when both should be preserved. This patch fixes the code just to copy from the first argument. Tested for mips64 soft-float. * sysdeps/mips/mips32/sfp-machine.h (_FP_CHOOSENAN): Always preserve NaN payload if [__mips_nan2008]. * sysdeps/mips/mips64/sfp-machine.h (_FP_CHOOSENAN): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-014-4/+4
|
* MIPS: Use R_MICROMIPS_JALR rather than R_MIPS_JALR in microMIPS codeMaciej W. Rozycki2016-11-231-2/+8
| | | | | | | | | | | | | | In a microMIPS compilation of `.init' code use the R_MICROMIPS_JALR relocation intended for PIC call relaxation in microMIPS code rather than the corresponding R_MIPS_JALR relocation meant for regular MIPS code only. * sysdeps/mips/mips32/crti.S (JALR_RELOC): New macro. (_init): Use it in place of hardcoded R_MIPS_JALR. * sysdeps/mips/mips64/n32/crti.S (JALR_RELOC): New macro. (_init): Use it in place of hardcoded R_MIPS_JALR. * sysdeps/mips/mips64/n64/crti.S (JALR_RELOC): New macro. (_init): Use it in place of hardcoded R_MIPS_JALR.
* MIPS: Add `.insn' to ensure a text label is defined as code not dataMaciej W. Rozycki2016-11-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid a build error with microMIPS compilation and recent versions of GAS which complain if a branch targets a label which is marked as data rather than microMIPS code: ../sysdeps/mips/mips32/crti.S: Assembler messages: ../sysdeps/mips/mips32/crti.S:72: Error: branch to a symbol in another ISA mode make[2]: *** [.../csu/crti.o] Error 1 as commit 9d862524f6ae ("MIPS: Verify the ISA mode and alignment of branch and jump targets") closed a hole in branch processing, making relocation calculation respect the ISA mode of the symbol referred. This allowed diagnosing the situation where an attempt is made to pass control from code assembled for one ISA mode to code assembled for a different ISA mode and either relaxing the branch to a cross-mode jump or if that is not possible, then reporting this as an error rather than letting such code build and then fail unpredictably at the run time. This however requires the correct annotation of branch targets as code, because the ISA mode is not relevant for data symbols and is therefore not recorded for them. The `.insn' pseudo-op is used for this purpose and has been supported by GAS since: Wed Feb 12 14:36:29 1997 Ian Lance Taylor <ian@cygnus.com> * config/tc-mips.c (mips_pseudo_table): Add "insn". (s_insn): New static function. * doc/c-mips.texi: Document .insn. so there has been no reason to avoid it where required. More recently this pseudo-op has been documented, by the microMIPS architecture specification[1][2], as required for the correct interpretation of any code label which is not followed by an actual instruction in an assembly source. Use it in our crti.S files then, to mark that the trailing label there with no instructions following is indeed not a code bug and the branch is legitimate. References: [1] "MIPS Architecture for Programmers, Volume II-B: The microMIPS32 Instruction Set", MIPS Technologies, Inc., Document Number: MD00582, Revision 5.04, January 15, 2014, Section 7.1 "Assembly-Level Compatibility", p. 533 [2] "MIPS Architecture for Programmers, Volume II-B: The microMIPS64 Instruction Set", MIPS Technologies, Inc., Document Number: MD00594, Revision 5.04, January 15, 2014, Section 8.1 "Assembly-Level Compatibility", p. 623 2016-11-18 Matthew Fortune <Matthew.Fortune@imgtec.com> Maciej W. Rozycki <macro@imgtec.com> * sysdeps/mips/mips32/crti.S (_init): Add `.insn' pseudo-op at `.Lno_weak_fn' label. * sysdeps/mips/mips64/n32/crti.S (_init): Likewise. * sysdeps/mips/mips64/n64/crti.S (_init): Likewise.
* Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139).Joseph Myers2016-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | manual/libm-err-tab.pl hardcodes a list of names for particular platforms (mapping from sysdeps directory name to friendly name for the manual). This goes against the principle of keeping information about individual platforms in their corresponding sysdeps directory, and the list is also very out-of-date regarding supported platforms and their corresponding sysdeps directories. This patch fixes this by adding a libm-test-ulps-name file alongside each libm-test-ulps file. The script then gets the friendly name from that file, which is required to exist, so it no longer needs to allow for the mapping being missing. Tested for x86_64. [BZ #14139] * manual/libm-err-tab.pl (%pplatforms): Initialize to empty. (find_files): Obtain platform name from libm-test-ulps-name and store in %pplatforms. (canonicalize_platform): Remove. (print_platforms): Use $pplatforms directly. (by_platforms): Do not allow for platforms missing from %pplatforms. * sysdeps/aarch64/libm-test-ulps-name: New file. * sysdeps/alpha/fpu/libm-test-ulps-name: Likewise. * sysdeps/arm/libm-test-ulps-name: Likewise. * sysdeps/generic/libm-test-ulps-name: Likewise. * sysdeps/hppa/fpu/libm-test-ulps-name: Likewise. * sysdeps/i386/fpu/libm-test-ulps-name: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps-name: Likewise. * sysdeps/ia64/fpu/libm-test-ulps-name: Likewise. * sysdeps/m68k/coldfire/fpu/libm-test-ulps-name: Likewise. * sysdeps/m68k/m680x0/fpu/libm-test-ulps-name: Likewise. * sysdeps/microblaze/libm-test-ulps-name: Likewise. * sysdeps/mips/mips32/libm-test-ulps-name: Likewise. * sysdeps/mips/mips64/libm-test-ulps-name: Likewise. * sysdeps/nios2/libm-test-ulps-name: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps-name: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps-name: Likewise. * sysdeps/s390/fpu/libm-test-ulps-name: Likewise. * sysdeps/sh/libm-test-ulps-name: Likewise. * sysdeps/sparc/fpu/libm-test-ulps-name: Likewise. * sysdeps/tile/libm-test-ulps-name: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps-name: Likewise.
* Fix ulps regeneration for *-finite tests.Joseph Myers2016-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On running tests after from-scratch ulps regeneration, I found that some libm tests failed with ulps in excess of those recorded in the from-scratch regeneration, which should never happen unless those ulps exceed the limit on ulps that can go in libm-test-ulps files. Failure: Test: atan2_upward (inf, -inf) Result: is: 2.35619498e+00 0x1.2d97ccp+1 should be: 2.35619450e+00 0x1.2d97c8p+1 difference: 4.76837159e-07 0x1.000000p-21 ulp : 2.0000 max.ulp : 1.0000 Maximal error of `atan2_upward' is : 2 ulp accepted: 1 ulp Failure: Test: carg_upward (-inf + inf i) Result: is: 2.35619498e+00 0x1.2d97ccp+1 should be: 2.35619450e+00 0x1.2d97c8p+1 difference: 4.76837159e-07 0x1.000000p-21 ulp : 2.0000 max.ulp : 1.0000 Maximal error of `carg_upward' is : 2 ulp accepted: 1 ulp The problem comes from the addition of tests for the finite-math-only versions of libm functions. Those tests share ulps with the default function variants. make regen-ulps runs the default tests before the finite-math-only tests, concatenating the resulting ulps before feeding them to gen-libm-test.pl to generate a new libm-test-ulps file. But gen-libm-test.pl always takes the last ulps value given for any (function, type) pair. So, if the largest ulps for a function come from non-finite inputs, a from-scratch regeneration loses those ulps. This patch fixes gen-libm-test.pl, in the case where there are multiple ulps values for a (function, type) pair - which can only happen as part of a regeneration - to take the largest ulps value rather than the last one. Tested for ARM / MIPS / powerpc-nofpu. * math/gen-libm-test.pl (parse_ulps): Do not reduce already-recorded ulps. * sysdeps/arm/libm-test-ulps: Regenerated. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps: Likewise.
* Regenerate MIPS libm-test-ulps.Joseph Myers2016-01-181-2/+4
| | | | | * sysdeps/mips/mips32/libm-test-ulps: Regenerated. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* S/390: Do not raise inexact exception in lrint/lround. [BZ #19486]Stefan Liebler2016-01-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I get some math test-failures on s390 for float/double/ldouble for various lrint/lround functions like: lrint (0x1p64): Exception "Inexact" set lrint (-0x1p64): Exception "Inexact" set lround (0x1p64): Exception "Inexact" set lround (-0x1p64): Exception "Inexact" set ... GCC emits "convert to fixed" instructions for casting floating point values to integer values. These instructions raise invalid and inexact exceptions if the floating point value exceeds the integer type ranges. This patch enables the various FIX_DBL_LONG_CONVERT_OVERFLOW macros in order to avoid a cast from floating point to integer type and raise the invalid exception with feraiseexcept. The ldbl-128 rint/round functions are now using the same logic. ChangeLog: [BZ #19486] * sysdeps/s390/fix-fp-int-convert-overflow.h: New File. * sysdeps/generic/fix-fp-int-convert-overflow.h (FIX_LDBL_LONG_CONVERT_OVERFLOW, FIX_LDBL_LLONG_CONVERT_OVERFLOW): New define. * sysdeps/arm/fix-fp-int-convert-overflow.h: Likewise. * sysdeps/mips/mips32/fpu/fix-fp-int-convert-overflow.h: Likewise. * sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Avoid conversions to long int where inexact exceptions could be raised. * sysdeps/ieee754/ldbl-128/s_lroundl.c (__lroundl): Likewise. * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Avoid conversions to long long int where inexact exceptions could be raised. * sysdeps/ieee754/ldbl-128/s_llroundl.c (__llroundl): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-044-4/+4
|
* Regenerate MIPS libm-test-ulps.Joseph Myers2015-10-091-42/+42
| | | | | * sysdeps/mips/mips32/libm-test-ulps: Regenerated. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* Fix lrint, llrint, lround, llround missing exceptions for MIPS (bug 16399).Joseph Myers2015-10-091-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 32-bit MIPS and some other systems, various of the lrint, llrint, lround, llround functions can be missing exceptions on overflow because casts do not (in current GCC) result in the proper exceptions. In the MIPS case there are two problems here: MIPS I code generation uses an assembler macro that doesn't raise exceptions, while the libgcc conversions of floating-point values to long long also do not raise "invalid" on all overflow cases (and can raise spurious "inexact"). This patch adds support in the generic code (only the functions for which this problem has actually been seen) for forcing the "invalid" exception in the problem cases, and enables that support for the affected MIPS cases. Tested for MIPS; also tested for x86_64 and x86 that installed stripped shared libraries are unchanged by this patch. [BZ #16399] * sysdeps/generic/fix-fp-int-convert-overflow.h: New file. * sysdeps/ieee754/dbl-64/s_llrint.c: Include <fenv.h>, <limits.h> and <fix-fp-int-convert-overflow.h>. (__llrint) [FE_INVALID]: Force FE_INVALID exception as needed if FIX_DBL_LLONG_CONVERT_OVERFLOW. * sysdeps/ieee754/dbl-64/s_llround.c: Include <fenv.h>, <limits.h> and <fix-fp-int-convert-overflow.h>. (__llround) [FE_INVALID]: Force FE_INVALID exception as needed if FIX_DBL_LLONG_CONVERT_OVERFLOW. * sysdeps/ieee754/dbl-64/s_lrint.c: Include <fix-fp-int-convert-overflow.h>. (__lrint) [FE_INVALID]: Force FE_INVALID exception as needed if FIX_DBL_LLONG_CONVERT_OVERFLOW. * sysdeps/ieee754/dbl-64/s_lround.c: Include <fix-fp-int-convert-overflow.h>. (__lround) [FE_INVALID]: Force FE_INVALID exception as needed if FIX_DBL_LLONG_CONVERT_OVERFLOW. * sysdeps/ieee754/flt-32/s_llrintf.c: Include <fenv.h>, <limits.h> and <fix-fp-int-convert-overflow.h>. (__llrintf) [FE_INVALID]: Force FE_INVALID exception as needed if FIX_DBL_LLONG_CONVERT_OVERFLOW. * sysdeps/ieee754/flt-32/s_llroundf.c: Include <fenv.h>, <limits.h> and <fix-fp-int-convert-overflow.h>. (__llroundf) [FE_INVALID]: Force FE_INVALID exception as needed if FIX_DBL_LLONG_CONVERT_OVERFLOW. * sysdeps/ieee754/flt-32/s_lrintf.c: Include <fenv.h>, <limits.h> and <fix-fp-int-convert-overflow.h>. (__lrintf) [FE_INVALID]: Force FE_INVALID exception as needed if FIX_DBL_LLONG_CONVERT_OVERFLOW. * sysdeps/ieee754/flt-32/s_lroundf.c: Include <fenv.h>, <limits.h> and <fix-fp-int-convert-overflow.h>. (__lroundf) [FE_INVALID]: Force FE_INVALID exception as needed if FIX_DBL_LLONG_CONVERT_OVERFLOW. * sysdeps/mips/mips32/fpu/fix-fp-int-convert-overflow.h: New file.
* Add more random libm test inputs (mainly for ldbl-128).Joseph Myers2015-09-121-2/+6
| | | | | | | | | | | | | | | | | | | | | This patch adds more libm test inputs found through random test generation to increase previously known ulps. This particular test generation was run for mips64, so most of the increased ulps are for ldbl-128 (float and double having been fairly well covered by such testing for x86_64), but there's the odd ulps increase for other formats. Tested for x86_64, x86 and mips64. * math/auto-libm-test-in: Add more tests of acos, acosh, asin, asinh, atan, atan2, atanh, cabs, carg, cos, csqrt, erfc, exp, exp10, exp2, log, log1p, log2, pow, sin, sincos, sinh, tan and tanh. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Update libm-test-ulps for MIPS.Joseph Myers2015-09-111-78/+78
| | | | | * sysdeps/mips/mips32/libm-test-ulps: Update. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* Regenerate MIPS libm-test-ulps.Joseph Myers2015-07-011-265/+457
| | | | | * sysdeps/mips/mips32/libm-test-ulps: Regenerated. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* Fix mips16 __fpu_control static linking (bug 18397).Joseph Myers2015-05-112-1/+4
| | | | | | | | | | | | | | | | | | | | | Programs are supposed to be able to define the __fpu_control variable, overriding the library's version to cause the floating-point control word to be set to the chosen value at startup. This is broken for mips16 for static linking because the library's __fpu_control variable is in the same object file as the helper functions used by fpu_control.h for mips16, so test-fpucw-ieee-static fails to link with multiple definitions of __fpu_control. This patch fixes this by putting the helpers in a separate file rather than overriding fpu_control.c. Tested for mips16 that this fixes the link failure and the ABI tests still pass. [BZ #18397] * sysdeps/mips/mips32/fpu/fpu_control.c: Move to .... * sysdeps/mips/mips32/fpu/fpucw-helpers.c: ... here. Include <fpu_control.h> instead of <math/fpu_control.c>. * sysdeps/mips/mips32/fpu/Makefile: New file.
* Remove sysdeps/mips soft-fp subdirectories.Joseph Myers2015-02-102-1/+68
| | | | | | | | | | | | | | | | | | | | | | | As noted in <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>, soft-fp sysdeps subdirectories (and more generally, subdirectories where sysdeps/foo/Implies contains foo/bar) are unnecessary and should be eliminated. This patch does so for MIPS. Tested for MIPS64 (all three ABIs, soft-float) that installed stripped shared libraries are unchanged by this patch. * sysdeps/mips/soft-fp/sfp-machine.h: Move to .... * sysdeps/mips/mips32/sfp-machine.h: ... here. * sysdeps/mips/mips64/soft-fp/Makefile: Move to .... * sysdeps/mips/mips64/Makefile: ... here. * sysdeps/mips/mips64/soft-fp/e_sqrtl.c: Move to .... * sysdeps/mips/mips64/e_sqrtl.c: ... here. * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Move to .... * sysdeps/mips/mips64/sfp-machine.h: ... here. * sysdeps/mips/mips32/Implies: Remove mips/soft-fp. * sysdeps/mips/mips64/n32/Implies: Remove mips/mips64/soft-fp. * sysdeps/mips/mips64/n64/Implies: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-023-3/+3
|
* Regenerate MIPS libm-test-ulps.Joseph Myers2014-06-301-49/+904
| | | | | | | This patch regenerates libm-test-ulps for MIPS. * sysdeps/mips/mips32/libm-test-ulps: Regenerated. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* Don't include individual test ulps in libm-test-ulps.Joseph Myers2014-03-051-7399/+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.
* Move mips from ports to libc.Joseph Myers2014-02-1017-0/+8238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I've moved the MIPS port from ports to the main sysdeps hierarchy. Beyond the README update, the move of the files was simply git mv ports/sysdeps/mips sysdeps/mips git mv ports/sysdeps/unix/mips sysdeps/unix/mips git mv ports/sysdeps/unix/sysv/linux/mips sysdeps/unix/sysv/linux/mips and in addition to the ChangeLog entries here, I put a note at the top of ports/ChangeLog.mips similar to those in other files. Tested that disassembly of installed shared libraries for mips is the same before and after this patch (except for ld.so where paths in assertions are involved, as for arm). * sysdeps/mips: Move directory from ports/sysdeps/mips. * sysdeps/unix/mips: Move directory from ports/sysdeps/unix/mips. * sysdeps/unix/sysv/linux/mips: Move directory from ports/sysdeps/unix/sysv/linux/mips. * README: Update listing for mips-*-linux-gnu and mips64-*-linux-gnu. * sysdeps/mips: Move directory to ../sysdeps/mips. * sysdeps/unix/mips: Move directory to ../sysdeps/unix/mips. * sysdeps/unix/sysv/linux/mips: Move directory to ../sysdeps/unix/sysv/linux/mips.
* [BZ #2329]Roland McGrath2006-02-212-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-02-20 Roland McGrath <roland@redhat.com> * sysdeps/mips: Directory removed, saved in ports repository. * sysdeps/unix/mips: Likewise. * sysdeps/unix/sysv/linux/mips: Likewise. * sysdeps/mach/mips: Likewise. * sysdeps/mach/hurd/mips: Likewise. * shlib-versions: Remove mips matches, now in ports fragment. * sysdeps/unix/sysv/linux/kernel-features.h: Likewise. * configure.in (machine): Likewise. * configure: Regenerated. 2006-02-15 Thomas Schwinge <tschwinge@gnu.org> [BZ #2329] * include/unistd.h (__getresuid, __getresgid, __setresuid) (__setresgid): Fix argument name order in prototypes. * posix/unistd.h (getresuid, getresgid, setresuid, setresgid): Likewise. * posix/getresuid.c (__getresuid): Fix argument order in definition. * posix/getresgid.c (__getresgid): Likewise. * posix/setresuid.c (__setresuid): Likewise. * posix/setresgid.c (__setresgid): Likewise. * sysdeps/mach/hurd/getresuid.c (__getresuid): Likewise. * sysdeps/mach/hurd/getresgid.c (__getresgid): Likewise. * sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise. * sysdeps/mach/hurd/setresgid.c (__setresgid): Likewise. Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-222-0/+5
|
* 2.5-18.1Jakub Jelinek2007-07-122-5/+0
|
* * configure.in: Add mips64* support. * configure: Rebuilt. * ↵Alexandre Oliva2003-03-292-0/+5
sysdeps/mips/bits/endian.h: Make it bi-endian. * sysdeps/mips/mipsel/bits/endian.h: Removed. * sysdeps/mips/mips64/n32/el/bits/endian.h: Removed. * sysdeps/mips/mips64/n64/el/bits/endian.h: Removed. * sysdeps/mips/mips32/Makefile (CC): Add -mabi=32. * sysdeps/mips/mips64/n32/Makefile (CC): Add -mabi=n32. * sysdeps/mips/mips64/n64/Makefile (CC): Add -mabi=64. * sysdeps/mips/Implies: Moved wordsize-32 to... * sysdeps/mips/mips32/Implies: New file. * sysdeps/unix/mips/sysdep.h (PSEUDO_NOERRNO, PSEUDO_END_NOERRNO, ret_NOERRNO): New. (ret, PSEUDO_END): Moved past END. (PSEUDO): Moved to... * sysdeps/unix/mips/mips32/sysdep.h: New file. * sysdeps/unix/mips/mips64/n32/sysdep.h: Removed #undef PSEUDO. * sysdeps/unix/mips/mips64/n64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep.h: Move to... * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: New file. * sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h: New file. * configure.in: Add mips64* support. * configure: Rebuilt. * sysdeps/mips/bits/endian.h: Make it bi-endian. * sysdeps/mips/mipsel/bits/endian.h: Removed. * sysdeps/mips/mips64/n32/el/bits/endian.h: Removed. * sysdeps/mips/mips64/n64/el/bits/endian.h: Removed. * sysdeps/mips/mips32/Makefile (CC): Add -mabi=32. * sysdeps/mips/mips64/n32/Makefile (CC): Add -mabi=n32. * sysdeps/mips/mips64/n64/Makefile (CC): Add -mabi=64. * sysdeps/mips/Implies: Moved wordsize-32 to... * sysdeps/mips/mips32/Implies: New file. * sysdeps/unix/mips/sysdep.h (PSEUDO_NOERRNO, PSEUDO_END_NOERRNO, ret_NOERRNO): New. (ret, PSEUDO_END): Moved past END. (PSEUDO): Moved to... * sysdeps/unix/mips/mips32/sysdep.h: New file. * sysdeps/unix/mips/mips64/n32/sysdep.h: Removed #undef PSEUDO. * sysdeps/unix/mips/mips64/n64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep.h: Move to... * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: New file. * sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h: New file.