about summary refs log tree commit diff
path: root/sysdeps/sparc/fpu
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix libm fegetenv namespace (bug 17748).Joseph Myers2014-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some C90 libm functions call fegetenv via libc_feholdsetround* functions in math_private.h. This patch makes them call __fegetenv instead, making fegetenv into a weak alias for __fegetenv as needed. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fegetenv failures disappear from the linknamespace test failures (however, similar fixes will also be needed for fegetround, feholdexcept, fesetenv, fesetround and feupdateenv before this set of namespace issues covered by bug 17748 is fully fixed and those linknamespace tests start passing). [BZ #17748] * include/fenv.h (__fegetenv): Use libm_hidden_proto. * math/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/aarch64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/alpha/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/arm/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/hppa/fpu/fegetenv.c (fegetenv): Likewise. * sysdeps/i386/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/ia64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/mips/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/powerpc/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/powerpc/nofpu/fegetenv.c (__fegetenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c (__fegetenv): Likewise. * sysdeps/s390/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Likewise. * sysdeps/sparc/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/tile/math_private.h (__fegetenv): New inline function. * sysdeps/x86_64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/generic/math_private.h (libc_feholdsetround_ctx): Use __fegetenv instead of fegetenv. (libc_feholdsetround_noex_ctx): Likewise.
* Fix libm feraiseexcept namespace (bug 17723).Joseph Myers2014-12-302-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various C90 and UNIX98 libm functions call feraiseexcept, which is not in those standards. This causes linknamespace test failures - except on x86 / x86_64, where feraiseexcept is inline (for the relevant constant arguments) in bits/fenv.h. This patch fixes this by making those functions call __feraiseexcept instead. All changes are applied to all architectures rather than considering the possibility that some might not be needed in some cases (e.g. x86) as it seems most maintainable to keep architectures consistent. Where __feraiseexcept does not exist, it is added, with feraiseexcept made a weak alias; where it is a strong alias, it is made weak. libm_hidden_def / libm_hidden_proto are used with __feraiseexcept (this might in some cases improve code generation for existing calls to __feraiseexcept in some code on some architectures). Where there are dummy feraiseexcept macros (on architectures without floating-point exceptions support, to avoid compile errors from references to undefined FE_* macros), corresponding dummy __feraiseexcept macros are added. And on x86, to ensure __feraiseexcept calls still get inlined, the inline function in bits/fenv.h is refactored so that most of it can be reused in an inline __feraiseexcept in a separate include/bits/fenv.h. Calls are changed in C90/UNIX98 functions, but generally not in functions missing from those standards. They are also changed in libc_fe* functions (on the basis that those might be used in any libm function), and in feupdateenv (on the same basis - may be used, via default libc_*, in any libm function - of course feupdateenv will need changing to __feupdateenv in a subsequent patch to make that fully namespace-clean). No __feraiseexcept is added corresponding to the feraiseexcept in powerpc bits/fenvinline.h, because that macro definition is conditional on !defined __NO_MATH_INLINES, and glibc libm is built with -D__NO_MATH_INLINES, so changing internal calls to use __feraiseexcept should make no difference. Tested for x86_64 (testsuite; the only change in disassembly of installed shared libraries is a slight code reordering in clog10, of no apparent significance). Also tested for MIPS, where (in the configuration tested) it eliminates math.h linknamespace failures for n32 and n64 (some for o32 remain because of other issues). [BZ #17723] * include/fenv.h (__feraiseexcept): Use libm_hidden_proto. * math/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. * sysdeps/aarch64/fpu/fraiseexcpt.c (feraiseexcept): Rename to __feraiseexcept and define as weak alias of __feraiseexcept. Use libm_hidden_weak. * sysdeps/arm/fraiseexcpt.c (feraiseexcept): Likewise. * sysdeps/hppa/fpu/fraiseexcpt.c (feraiseexcept): Likewise. * sysdeps/i386/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. * sysdeps/ia64/fpu/fraiseexcpt.c (feraiseexcept): Rename to __feraiseexcept and define as weak alias of __feraiseexcept. Use libm_hidden_weak. * sysdeps/m68k/coldfire/fpu/fraiseexcpt.c (feraiseexcept): Likewise. * sysdeps/microblaze/math_private.h (__feraiseexcept): New macro. * sysdeps/mips/fpu/fraiseexcpt.c (feraiseexcept): Rename to __feraiseexcept and define as weak alias of __feraiseexcept. Use libm_hidden_weak. * sysdeps/powerpc/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. * sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcpt.c (__feraiseexcept): Likewise. * sysdeps/s390/fpu/fraiseexcpt.c (feraiseexcept): Rename to __feraiseexcept and define as weak alias of __feraiseexcept. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Likewise. * sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. * sysdeps/tile/math_private.h (__feraiseexcept): New macro. * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S (__feraiseexcept): Use libm_hidden_def. * sysdeps/x86_64/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. (feraiseexcept): Define as weak not strong alias. Use libm_hidden_weak. * sysdeps/x86/fpu/bits/fenv.h (__feraiseexcept_invalid_divbyzero): New inline function. Factored out of ... (feraiseexcept): ... here. Use __feraiseexcept_invalid_divbyzero. * sysdeps/x86/fpu/include/bits/fenv.h: New file. * math/e_scalb.c (invalid_fn): Call __feraiseexcept instead of feraiseexcept. * math/w_acos.c (__acos): Likewise. * math/w_asin.c (__asin): Likewise. * math/w_ilogb.c (__ilogb): Likewise. * math/w_j0.c (y0): Likewise. * math/w_j1.c (y1): Likewise. * math/w_jn.c (yn): Likewise. * math/w_log.c (__log): Likewise. * math/w_log10.c (__log10): Likewise. * sysdeps/aarch64/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/aarch64/fpu/math_private.h (libc_feupdateenv_test_aarch64): Likewise. * sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/arm/fenv_private.h (libc_feupdateenv_test_vfp): Likewise. * sysdeps/arm/feupdateenv.c (feupdateenv): Likewise. * sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Likewise. * sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise.
* Update sparc ULPS.David S. Miller2014-07-091-6/+96
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update Sparc ULPs.David S. Miller2014-06-141-0/+24
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update Sparc ULPS.David S. Miller2014-06-011-0/+85
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Add round-mode context support to sparc.David S. Miller2014-04-301-0/+64
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* Regenerate sparc ULPs.David S. Miller2014-04-131-4/+1022
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Don't include individual test ulps in libm-test-ulps.Joseph Myers2014-03-051-17853/+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.
* Adjust sparc ULPs.David S. Miller2014-02-041-0/+5
| | | | | * sysdeps/sparc/fpu/libm-test-ulps: Update for some 64-bit differences from 32-bit.
* Rebuild sparc ULPs.David S. Miller2014-01-241-1203/+9817
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Regenerate.
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-0117-17/+17
|
* Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271).Joseph Myers2013-11-281-0/+1
|
* Update sparc ULPs.David S. Miller2013-10-101-0/+125
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Fix typos.Ondřej Bílka2013-08-211-1/+1
|
* Update Sparc ULPs.David S. Miller2013-07-201-0/+5
| | | | | * sysdeps/sparc/fpu/libm-test-ulps: Update ULPs to handle minor difference between 32-bit and 64-bit.
* Full from-scratch rebuild of sparc ULPs.David S. Miller2013-07-071-238/+73
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Regenerate from scratch.
* Update sparc ULPs.David S. Miller2013-07-021-0/+46
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Don't include expected results in libm-test test names.Joseph Myers2013-05-221-2470/+2470
|
* Handle sincos with generic libm-test logic.Joseph Myers2013-05-191-7/+7
|
* Update Sparc ULPs.David S. Miller2013-05-141-6/+853
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update Sparc ULPs.David S. Miller2013-05-021-24/+4125
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPs.David S. Miller2013-03-221-4/+1002
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update Sparc ULPs.David S. Miller2013-03-171-2/+14
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Add long-double sparc ULPs updates missing in previous commit.David S. Miller2013-02-041-0/+36
|
* Update sparc ULPs after Joseph's casin fixes.David S. Miller2013-02-041-0/+126
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPs.David S. Miller2013-01-171-0/+74
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPs for new casin{,h} tests.David S. Miller2013-01-101-0/+114
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update Sparc ULPs.David S. Miller2013-01-041-0/+5
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-0217-18/+17
|
* Update sparc ULPs for recently added pow tests.David S. Miller2012-11-281-0/+25
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Fix spurious underflows in ldbl-128 atan implementation.David S. Miller2012-11-191-0/+3
| | | | | | | | | | With help from Joseph Myers. * sysdeps/ieee754/ldbl-128/s_atanl.c (__atanl): Handle tiny and very large arguments properly. * math/libm-test.inc (atan_test): New tests. (atan2_test): New tests. * sysdeps/sparc/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Update.
* Correct tinyness handling in long-double and float y0/y1.David S. Miller2012-11-181-1/+46
| | | | | | | | | | | | | | | | | With help from Joseph Myers. * sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_y0f): Adjust tinyness cutoff to 2**-13. * sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Adjust tinyness cutoff to 2**-25. * sysdeps/ieee754/ldbl-128/e_j0l.c (U0): New constant. ( __ieee754_y0l): Avoid arithmetic underflow when 'x' is very small. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise. * math/libm-test.inc (y0_test): New tests. (y1_test): New tests. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Update. * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796).Joseph Myers2012-11-032-1/+14
|
* Make fenv.h FE_* macros usable in #if (bug 3439).Joseph Myers2012-11-031-18/+27
|
* Uncorrupt Sparc ULPS file.David S. Miller2012-09-281-2/+1
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Fix garbage in file.
* Revert "Add missed ildouble case in yesterday's sparc ULPs update for ↵David S. Miller2012-09-281-2/+0
| | | | | | | | clog/clog10." This reverts commit 084b8fabd28ab541efbe5ce7ef6008107a4b86ea. Sorry something put garbage into the string, will debug this.
* Add missed ildouble case in yesterday's sparc ULPs update for clog/clog10.David S. Miller2012-09-281-0/+2
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPS for recent clog/clog10 activity.David S. Miller2012-09-271-2/+176
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPs for recently added math tests.David S. Miller2012-09-051-0/+12
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update SPARC ULPs.David S. Miller2012-08-031-4/+51
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPs.David S. Miller2012-07-311-0/+8
|
* Update sparc ULPs.David S. Miller2012-07-271-0/+53
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPs.David S. Miller2012-07-111-0/+449
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ulps after Joseph's math.h fixes.David S. Miller2012-05-311-9/+0
| | | | | * sysdeps/sparc/fpu/libm-test-ulps: Remove sqrt(2) and sqrt test entries.
* Don't include exceptions in libm-test-ulps test names.Joseph Myers2012-05-241-10/+10
|
* Update sparc ULPs for ccos, csin, ccosh, csinh tests.David S. Miller2012-05-191-0/+290
|
* Mark sparc %fsr load and store inline asms as volatile.David S. Miller2012-05-112-6/+6
| | | | | | * sysdeps/sparc/fpu/bits/fenv.h (__fenv_stfsr): Add __volatile__. * sysdeps/sparc/fpu/fpu_control.h (_FPU_GETCW): Likewise. (_FPU_SETCW): Likewise.
* With -frounding-math, some sparc ULPs need to be adjusted.David S. Miller2012-05-081-0/+33
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPs for recently added exp tests.David S. Miller2012-05-071-0/+17
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Update sparc ULPs for recently added acos/asin tests.David S. Miller2012-05-021-0/+100
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.