|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0 |
|
| #
b2969efa |
| 02-Nov-2021 |
Andrew Turner <[email protected]> |
Use a builtin where possible in msun
Some of the functions in msun can be implemented using a compiler builtin function to generate a small number of instructions. Implement this support in fma, fma
Use a builtin where possible in msun
Some of the functions in msun can be implemented using a compiler builtin function to generate a small number of instructions. Implement this support in fma, fmax, fmin, and sqrt on arm64.
Care must be taken as the builtin can be implemented as a function call on some architectures that lack direct support. In these cases we need to use the original code path.
As we don't set errno on failure build with -fno-math-errno so the toolchain doesn't convert a builtin into a function call when it detects a failure, e.g. gcc will add a call to sqrt when the input is negative leading to an infinite loop.
Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32801
(cherry picked from commit b2e843161dc3b79777e873183447c92ed9c3703a)
show more ...
|
| #
4ac2d431 |
| 05-Nov-2021 |
Steve Kargl <[email protected]> |
Implementations of cexpl()
PR: 216862
(cherry picked from commit 046e2d5db1e8afd2d09ea28e5d2a7550535d4b77)
|
| #
6207f135 |
| 26-Oct-2021 |
Steve Kargl <[email protected]> |
lib/msun: Move the files to appropriate locations in the Makefile
(cherry picked from commit ca3d8cb087cd5b40369478b1693f3e4038b5fa23)
|
| #
a49617ab |
| 25-Oct-2021 |
Steve Kargl <[email protected]> |
[LIBM] implementations of sinpi[fl], cospi[fl], and tanpi[fl]
PR: 218514
(cherry picked from commit dce5f3abed7181cc533ca5ed3de44517775e78dd)
|
| #
a6898ea0 |
| 15-Apr-2021 |
Alex Richardson <[email protected]> |
lib/msun: Exclude ignored-pragmas from -Werror
This avoids build failures due to the clang 12 warning: '#pragma FENV_ACCESS' is not supported on this target - ignored
Clang 12 currently emits t
lib/msun: Exclude ignored-pragmas from -Werror
This avoids build failures due to the clang 12 warning: '#pragma FENV_ACCESS' is not supported on this target - ignored
Clang 12 currently emits this warning for all non-x86 architectures. While this can result in incorrect code generation (e.g. on AArch64 some exceptions are not raised as expected), this is a pre-existing issue and we should not fail the build due to this warning.
Reviewed By: dim, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29743
(cherry picked from commit 168234fa67c38f898b784b3265dd77ace0b0a2f9)
show more ...
|
| #
bda3bf09 |
| 09-Apr-2021 |
Dimitry Andric <[email protected]> |
Avoid raising unexpected floating point exceptions in libm
When using clang with x86_64 CPUs that support AVX, some floating point transformations may raise exceptions that would not have been raise
Avoid raising unexpected floating point exceptions in libm
When using clang with x86_64 CPUs that support AVX, some floating point transformations may raise exceptions that would not have been raised by the original code. To avoid this, use the -fp-exception-behavior=maytrap flag, introduced in clang 10.0.0.
In particular, this fixes a number of test failures with ctanhf(3) and ctanf(3), when libm is compiled with -mavx. An unexpected FE_INVALID exception is then raised, because clang emits vdivps instructions to perform certain divides. (The vdivps instruction operates on multiple single-precision float operands simultaneously, but the exceptions may be influenced by unused parts of the XMM registers. In this particular case, it was calculating 0 / 0, which results in FE_INVALID.)
If -fp-exception-behavior=maytrap is specified however, clang uses vdivss instructions instead, which work on one operand, and should not raise unexpected exceptions.
Reported by: olivier Reviewed by: arichardson PR: 254911 Differential Revision: https://reviews.freebsd.org/D29686
(cherry picked from commit 3b00222f156dca5700c839d73e36daf479fa640c)
Only use -fp-exception-behavior=maytrap on x86, for now
After 3b00222f156d, it turns out that clang only supports strict floating point semantics for SystemZ and x86 at the moment, while for other architectures it is still experimental.
Therefore, only use -fp-exception-behavior=maytrap on x86 for now, otherwise this option results in "error: overriding currently unsupported use of floating point exceptions on this target [-Werror,-Wunsupported-floating-point-opt]" on other architectures.
Fixes: 3b00222f156d PR: 254911
(cherry picked from commit bae9fd0b33462e9506c3ac3400089c6dbc4aee8f)
show more ...
|
|
Revision tags: release/13.0.0, release/12.2.0, release/11.4.0 |
|
| #
fac6dee9 |
| 12-May-2020 |
Eric van Gyzen <[email protected]> |
Remove tests for obsolete compilers in the build system
Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions f
Remove tests for obsolete compilers in the build system
Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers.
Reviewed by: imp (earlier version), emaste, jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24802
show more ...
|
|
Revision tags: release/12.1.0, release/11.3.0 |
|
| #
50b06886 |
| 01-Feb-2019 |
Eric van Gyzen <[email protected]> |
libm: squelch -Woverflow from gcc6
Sponsored by: Dell EMC Isilon
|
|
Revision tags: release/12.0.0 |
|
| #
5a4c3b83 |
| 20-Jul-2018 |
Dimitry Andric <[email protected]> |
Recommit r336497: Fix powl, cpow, cpowf, and cpowl imports from OpenBSD
This is a follow-up to r336299.
* lib/msun/Makefile: . Remove polevll.c
* lib/msun/ld80/e_powl.c: . Copy contents of pol
Recommit r336497: Fix powl, cpow, cpowf, and cpowl imports from OpenBSD
This is a follow-up to r336299.
* lib/msun/Makefile: . Remove polevll.c
* lib/msun/ld80/e_powl.c: . Copy contents of polevll.c to here. This is the only consumer of these functions. Make functions 'static inline'. . Make reducl a 'static inline' function.
* lib/msun/man/exp.3: . Remove BUGS section that no longer applies.
* lib/msun/src/math_private.h: . Remove prototypes of __p1evll() and __polevll()
* lib/msun/src/s_cpow.c: * lib/msun/src/s_cpowf.c: * lib/msun/src/s_cpowl.c . Include math_private.h. . Use the CMPLX macro from either C99 or math_private.h (depends on compiler support) instead of the problematic use of complex I.
Submitted by: Steve Kargl <[email protected]> PR: 229876 MFC after: 1 week
show more ...
|
| #
c422fbac |
| 19-Jul-2018 |
Dimitry Andric <[email protected]> |
Revert r336497 for now, as it breaks on architectures using gcc, with:
cc1: warnings being treated as errors /usr/src/lib/msun/src/s_cpow.c: In function 'cpow': /usr/src/lib/msun/src/s_cpow.c:63: wa
Revert r336497 for now, as it breaks on architectures using gcc, with:
cc1: warnings being treated as errors /usr/src/lib/msun/src/s_cpow.c: In function 'cpow': /usr/src/lib/msun/src/s_cpow.c:63: warning: implicit declaration of function 'CMPLX'
show more ...
|
| #
2ae9055f |
| 19-Jul-2018 |
Dimitry Andric <[email protected]> |
Fix powl, cpow, cpowf, and cpowl imports from OpenBSD
This is a follow-up to r336299.
* lib/msun/Makefile: . Remove polevll.c
* lib/msun/ld80/e_powl.c: . Copy contents of polevll.c to here. T
Fix powl, cpow, cpowf, and cpowl imports from OpenBSD
This is a follow-up to r336299.
* lib/msun/Makefile: . Remove polevll.c
* lib/msun/ld80/e_powl.c: . Copy contents of polevll.c to here. This is the only consumer of these functions. Make functions 'static inline'. . Make reducl a 'static inline' function.
* lib/msun/man/exp.3: . Remove BUGS section that no longer applies.
* lib/msun/src/math_private.h: . Remove prototypes of __p1evll() and __polevll()
* lib/msun/src/s_cpow.c: * lib/msun/src/s_cpowf.c: * lib/msun/src/s_cpowl.c . Use the CMPLX macro from either C99 or math_private.h (depends of compiler support) instead of the problematic use of complex I.
Submitted by: Steve Kargl <[email protected]> PR: 229876 MFC after: 1 week
show more ...
|
| #
6813d08f |
| 15-Jul-2018 |
Matt Macy <[email protected]> |
msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd
This corresponds to the latest status (hasn't changed in 9+ years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, cpowl (the comp
msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd
This corresponds to the latest status (hasn't changed in 9+ years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, cpowl (the complex power functions for float complex, double complex, and long double complex) which are required for C99 compliance and were missing from FreeBSD. Also required for some numerical codes using complex numbered Hamiltonians.
Thanks to jhb for tracking down the issue with making weak_reference compile on powerpc.
When asked to review, bde said "I don't like it" - but provided no actionable feedback or superior implementations.
Discussed with: jhb Submitted by: jmd Differential Revision: https://reviews.freebsd.org/D15919
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
0c0288a2 |
| 13-May-2018 |
Konstantin Belousov <[email protected]> |
Add implementations for clog(3), clogf(3), and clog(3).
PR: 216863 Submitted by: bde, Steven G. Kargl <[email protected]> MFC after: 2 weeks
|
|
Revision tags: release/10.4.0 |
|
| #
d511b20a |
| 02-Aug-2017 |
Enji Cooper <[email protected]> |
Add HAS_TESTS to all Makefiles that are currently using the `SUBDIR.${MK_TESTS}+= tests` idiom.
This is a follow up to r321912.
|
| #
4b330699 |
| 02-Aug-2017 |
Enji Cooper <[email protected]> |
Convert traditional ${MK_TESTS} conditional idiom for including test directories to SUBDIR.${MK_TESTS} idiom
This is being done to pave the way for future work (and homogenity) in ^/projects/make-ch
Convert traditional ${MK_TESTS} conditional idiom for including test directories to SUBDIR.${MK_TESTS} idiom
This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox .
No functional change intended.
MFC after: 1 weeks
show more ...
|
|
Revision tags: release/11.1.0 |
|
| #
e1b98d07 |
| 28-May-2017 |
Michal Meloun <[email protected]> |
Implement sincos, sincosf, and sincosl. The primary benefit of these functions is that argument reduction is done once instead of twice in independent calls to sin() and cos().
* lib/msun/Makefile:
Implement sincos, sincosf, and sincosl. The primary benefit of these functions is that argument reduction is done once instead of twice in independent calls to sin() and cos().
* lib/msun/Makefile: . Add s_sincos[fl].c to the build. . Add sincos.3 documentation. . Add appropriate MLINKS.
* lib/msun/Symbol.map: . Expose sincos[fl] symbols in dynamic libm.so.
* lib/msun/man/sincos.3: . Documentation for sincos[fl].
* lib/msun/src/k_sincos.h: . Kernel for sincos() function. This merges the individual kernels for sin() and cos(). The merger offered an opportunity to re-arrange the individual kernels for better performance.
* lib/msun/src/k_sincosf.h: . Kernel for sincosf() function. This merges the individual kernels for sinf() and cosf(). The merger offered an opportunity to re-arrange the individual kernels for better performance.
* lib/msun/src/k_sincosl.h: . Kernel for sincosl() function. This merges the individual kernels for sinl() and cosl(). The merger offered an opportunity to re-arrange the individual kernels for better performance.
* lib/msun/src/math.h: . Add prototytpes for sincos[fl]().
* lib/msun/src/math_private.h: . Add RETURNV macros. This is needed to reset fpsetprec on I386 hardware for a function with type void.
* lib/msun/src/s_sincos.c: . Implementation of sincos() where sin() and cos() were merged into one routine and possibly re-arranged for better performance.
* lib/msun/src/s_sincosf.c: . Implementation of sincosf() where sinf() and cosf() were merged into one routine and possibly re-arranged for better performance.
* lib/msun/src/s_sincosl.c: . Implementation of sincosl() where sinl() and cosl() were merged into one routine and possibly re-arranged for better performance.
PR: 215977, 218300 Submitted by: Steven G. Kargl <[email protected]> MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10765
show more ...
|
| #
a2877353 |
| 17-Feb-2017 |
Mahdi Mokhtari <[email protected]> |
Fix building of r313761 on platforms that `long double` is alias of `double` (MIPS, etc)
PR: 216850 216851 216852 216856 216857 216858 Reported by: emsate Reviewed by: bde emaste hselasky Approved
Fix building of r313761 on platforms that `long double` is alias of `double` (MIPS, etc)
PR: 216850 216851 216852 216856 216857 216858 Reported by: emsate Reviewed by: bde emaste hselasky Approved by: bde emaste hselasky Differential Revision: https://reviews.freebsd.org/D9491
show more ...
|
| #
a11c5077 |
| 15-Feb-2017 |
Mahdi Mokhtari <[email protected]> |
Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msun to improve C11 conformance.
PR: 216850 216851 216852 216856 216857 216858 Submitted by: mmokhi Reported by: [email protected]
Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msun to improve C11 conformance.
PR: 216850 216851 216852 216856 216857 216858 Submitted by: mmokhi Reported by: [email protected] Reviewed by: bde, mat, theraven Approved by: bde (src committer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D9491
show more ...
|
| #
fae95359 |
| 11-Oct-2016 |
Ruslan Bukin <[email protected]> |
Don't use fmaxl/fminl on platforms with no long double support, use fmax/fmin instead.
This fixes fmaxmin test failure on MIPS64.
Reviewed by: emaste Sponsored by: DARPA, AFRL Sponsored by: HEIF5 D
Don't use fmaxl/fminl on platforms with no long double support, use fmax/fmin instead.
This fixes fmaxmin test failure on MIPS64.
Reviewed by: emaste Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D8216
show more ...
|
|
Revision tags: release/11.0.1 |
|
| #
d6e65178 |
| 28-Sep-2016 |
Ed Maste <[email protected]> |
libm: simplify i387 subdir logic with make's :S substitution
|
|
Revision tags: release/11.0.0, release/10.3.0 |
|
| #
c389411c |
| 05-Feb-2016 |
Glen Barber <[email protected]> |
Remove libc, librtld_db, libthr packages, and further increase the constraints on what needs to be installed in a specific to maintain consistency during upgrades.
Create a new clibs package contain
Remove libc, librtld_db, libthr packages, and further increase the constraints on what needs to be installed in a specific to maintain consistency during upgrades.
Create a new clibs package containing libraries that are needed as a bare minimum for consistency.
With much help and input from: kib Sponsored by: The FreeBSD Foundation
show more ...
|
| #
a70cba95 |
| 04-Feb-2016 |
Glen Barber <[email protected]> |
First pass through library packaging.
Sponsored by: The FreeBSD Foundation
|
| #
3c89d6b0 |
| 01-Dec-2015 |
Bryan Drewery <[email protected]> |
Don't override LIB*DIR variables from src.libnames.mk.
In some cases switch to the LIB*SRCDIR value.
These recently were defined in r291327 and r291619.
Sponsored by: EMC / Isilon Storage Division
|
| #
6922f800 |
| 09-Nov-2015 |
Enji Cooper <[email protected]> |
Document powl(3)
PR: 191751 Sponsored by: EMC / Isilon Storage Division
|
|
Revision tags: release/10.2.0 |
|
| #
18b2ee82 |
| 15-Jun-2015 |
Baptiste Daroussin <[email protected]> |
Revert r284417 it is not necessary anymore
|