summaryrefslogtreecommitdiff
path: root/libm
AgeCommit message (Collapse)Author
2024-03-28libm: fix nexttoward failures, fixed by sorearWaldemar Brodkorb
2024-03-04libm/w_j0f.c: Call correct ieee754 functionMarcus Haehnel
The j0f implementation should, like the other float implementations, call the __ieee754_y0 variant for doubles. A float variant is not declared and leads to a compile error on c99 builds.
2022-04-12libm: fix bug in lrint.cWaldemar Brodkorb
Following test case returns 2, which should be 0. int main() { long x = lrint(0.5); printf("%ld", x); return 0; } Fix from glibc commit 6624dbc07b5a9fb316ed188ef01f65b8eea8b47c
2020-10-02kvx: add support for kvx arch to uClibc-ngYann Sionneau
This commit adds support for Kalray VLIW family (kvx) Kalray kv3 core is embedded in Kalray Coolidge SoC. This core which is the third of the KV family has the following features: 32/64 bits execution mode 6-issue VLIW architecture 64 x 64bits general purpose registers SIMD instructions little-endian In order to build a usable toolchain, build scripts are provided at the following address: https://github.com/kalray/build-scripts. Kalray uses FOSS which is available at https://github.com/kalray This includes Linux kernel, uClibc-ng, gcc, binutils, etc. Signed-off-by: Clément Léger <cleger@kalray.eu> Signed-off-by: Guillaume Thouvenin <gthouvenin@kalray.eu> Signed-off-by: Laurent Thevenoux <lthevenoux@kalray.eu> Signed-off-by: Marc Poulhies <mpoulhies@kalray.eu> Signed-off-by: Marius Gligor <mgligor@kalray.eu> Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
2018-08-10isnan: Add isnan weak alias to __isnanChristophe Lyon
* libm/s_isnan.c: Add isnan weak alias. Signed-off-by: Mickaël Guêné <mickael.guene@st.com> Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
2018-02-17libm: fix compile errorWaldemar Brodkorb
Fix a compile error when __UCLIBC_SUSV3_LEGACY__ is disabled. Reported-by: Paolo Mantegazza <paolo.mantegazza@polimi.it>
2018-01-02quieten compiler warnings when __UCLIBC_HAS_FENV__ isn't definedWaldemar Brodkorb
2017-12-03x86_64: add fenv support from glibcWaldemar Brodkorb
2017-11-28Fix build regression with DO_XSI_MATH disabledRonald Wahl
Commit ea38f4d89 (math: add exception handling functionality) adds a regression so that build configurations that have DO_C99_MATH enabled and DO_XSI_MATH disabled will not link. This commit moves the files with the bessel functions from DO_C99_MATH to DO_XSI_MATH. It looks like they are not even contained in C99. Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
2017-11-03math: add exception handling functionalitySergey Cherkashin
According to standards SVID and SYSV. Modified lgamma calling in case when 'signgam' variable should not be used. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-06-21remove editor hints for viWaldemar Brodkorb
2017-06-06fix gcc warning with -Wmisleading-indentationWaldemar Brodkorb
2017-01-22nds32: add NPTL/TLS, *context function, libm changes and code cleanupVincent Ren-Wei Chen
This commit includes following features. 1. Support NPTL/TLS 2. Add libm function which is used to handle FP rounding and excpetions (ex: fclrexcpt,fedisblxcpti,feenablxcpt... ) 3. Add *context function for operating user context (ex: setcontext,getcontext,makecontext... ) 4. Change the return flow from signal handler 5. Cleanup of old code The testsuite only has 2 errors, tst-cpuclock1 and tst-cputimer1, which are related to timing accuracy. (math and locale tests are disabled) Signed-off-by: Vincent Ren-Wei Chen <vincentc@andestech.com>
2016-09-26use a single libc and deduplicate threading codeWaldemar Brodkorb
Similar to musl libc a single libc has many benefits and solves some open issues with uClibc-ng. - no pthread_mutex_* weak symbols exported anymore - applications no longer failing to link when either -lrt or -lpthread are missing for dynamic and static linking mode - smaller C library - slightly better runtime performance
2016-08-27remove DOMULTI supportWaldemar Brodkorb
A single test with targeting ARM showed that this feature seems bit rotted. Remove DOMULTI and simplify Makefiles.
2016-06-23libs: install backward compatibility symlinksAlexey Brodkin
Simplify the switch from uClibc to uClibc-ng. Apps already built against uClibc-0.9.x.y require .so.0 libs to present on target which in case of current uClibc-ng is not the case and those apps could not be run. This change creates symlinks from .so.1 to .so.0 for most of other libs in the same way as it was done by 23e96d89b6ab "ldso: install backward compatibility symlink by default" Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Waldemar Brodkorb <wbx@uclibc-ng.org> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Anton Kolesov <akolesov@synopsys.com>
2016-04-15replace FSF addresses with URLsNikola Forró
License notices in most of the source files refer to an outdated FSF address. Replace it with URL, like in the rest of the source files.Signed-off-by: Nikola Forró <nforro@redhat.com>
2016-02-19libm: remove dead codeWaldemar Brodkorb
_IEEE_LIBM is always defined, so the other code is never used. I don't know when it was actively used.
2016-01-30add exp10() from glibcWaldemar Brodkorb
Some software make use of exp10, so add it. Basic testing with LTP. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-03-24libm: honor NO_LONG_DOUBLE in ldouble_wrappersBernhard Reutner-Fischer
Fixes SH build breakage due to attempts to define hidden defs for unavailable long double functions. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-18libm: Add missing C99 float/ld wrappersBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-09-16buildsys: fix IS_IN_lib*Bernhard Reutner-Fischer
define NOT_IN_libc / IS_IN_libxxx appropriately to fix pthread_once Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14libm: Add support for the Meta architectureMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-15s_scalbn.c: since we have strong_alias_untyped now, use itPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15math: avoid jump relocation in libmPeter S. Mazinger
add hidden significand, lgamma_r, scalb, log2, gamma Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15k_standard.c: guard scalb[f] related (unused) code with SUSV3_LEGACYPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15libm: remove superfluos attribute_hidden, the one in prototype is enoughPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15libm: change j0 to _j0 and y1 to _y1 to avoid shadow warningPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-08libm: pass CFLAGS to e500 fenvBernhard Reutner-Fischer
As noted by Jason Woodward Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-08honor UCLIBC_HAS_FENV for e500Jason Woodward
Signed-off-by: Jason Woodward <jason.woodward@timesys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-08Fix e500 fpu libm buildJason Woodward
Define libm_ARCH_fpu_OUT in libm/powerpc/e500/Makefile.arch as it is used in libm/powerpc/e500/fpu/Makefile.arch libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_fpu_DIR)/%.c,$(libm_ARCH_fpu_OUT)/%.o,$(libm_ARCH_SRC)) This appears to have been broken since cd3a494e99fa4bcad1c2a621b71361005528bead Signed-off-by: Jason Woodward <jason.woodward@timesys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-04libm: implement a generic sincos().William Pitcock
We already provide sincos() on some archs, so we should ship a generic version. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-04libm: add cabsf() and cabsl() functions.William Pitcock
Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-04libm: implement generic cexp(), cexpf() and cexpl().William Pitcock
The cexp*() family of functions is defined by the C99 math standard as implementing exponential functions for complex types. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-12libm: fix building out-of-treeBernhard Reutner-Fischer
Thanks to Thierry Reding for noticing! Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-03-05Add Makefile support for DSBT ELF.Bernd Schmidt bernds_cb1@t-online.de
This adds support for a new binary format, DSBT ELF, to the Makefiles. Every shared library is assigned a DSBT index, and the link.so macro is adjusted to ensure the correct linker argument is passed. Configuration and ldso support will follow in separate commits. Signed-off-by: Bernd Schmidt <bernds@codesourcery.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-12-17libm_sh: add optimised assembly implementation of lroundf and lrintfChristian Bruel
* libc/sysdeps/linux/sh/sysdep.h: Add LOCAL macro * libm/sh/sh4/Makefile.arch: Include asm source in the build * libm/sh/sh4/s_lrintf.S [NEW]: optimised asm lrintf * libm/sh/sh4/s_lroundf.S [NEW]: optimised asm lroundf Signed-off-by: Christian Bruel <christian.bruel@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-12-17libm_powerpc: update buildsys to use TARGET_SUBARCHCarmelo Amoroso
Update the powerpc buildsys of libm to use the TARGET_SUBARCH. Further fix the e500 Makefile.arch by adding the definition of libm_ARCH_fpu_DIR that was actually missing. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-12-17libm_sh: Move fenv functions into sh4 sub-folderCarmelo Amoroso
Indeed fenv funxtions are SH4 specific, so move them into an SH4 specific sub-folder. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-11-02ldouble_wrappers: make code less verbose via WRAPPER2 macroDenys Vlasenko
Tested: ran testsuite Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-02ldouble_wrappers: remove i386-specific optimizationDenys Vlasenko
It is deemed too unsafe. Quoting Timo: If I'm building with "-fPIC -pg" it instruments all C functions with profiler stuff which is called via PLT and causes EBX reloads --> crash -fno-omit-frame-pointer is sometimes useful for profiling too --> crash Also the upcoming -fsplit-stack will be broken by this too (that might need additional uclibc support though). And I'm pretty sure there's also other similar compiler features. There's no predefined #defines in gcc for any of these. What I'm trying to say that there are *numerous* situations when the compiler can create stack frame for you without you ever knowing it. And if you want to do a tail jump, you really should be doing it from .S file where you control fully the prologue/epilogue code. (GCC naked attribute does not seem to work on x86.) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-31libm: disable tail jump trick if __SSP_ALL__ (was using wrong conditional)Denys Vlasenko
Thanks, Timo! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-31libm: fix tgamma to actually do return true gamma functionDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-31libm: remove int_WRAPPER_C99 macro, add test which checks that I did not ↵Denys Vlasenko
break it Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-31libm: revert wrong ldouble wrapper hack "fix"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-31libm: fix remaining failures in test-floatDenys Vlasenko
These two failures are fixed: Failure: Test: ilogb (0.0) == FP_ILOGB0 plus exceptions allowed Failure: Test: ilogb (NaN) == FP_ILOGBNAN plus exceptions allowed Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-30libm: fix rint/scalb testcase failuresDenys Vlasenko
These failures no longer happen: Failure: Test: scalb (2.0, 0.5) == NaN plus invalid exception Failure: Test: scalb (3.0, -2.5) == NaN plus invalid exception Failure: Test: rint (0.5) == 0.0 Failure: Test: rint (1.5) == 2.0 Failure: Test: rint (2.5) == 2.0 Failure: Test: rint (3.5) == 4.0 Failure: Test: rint (4.5) == 4.0 Failure: Test: rint (-0.5) == -0.0 Failure: Test: rint (-1.5) == -2.0 Failure: Test: rint (-2.5) == -2.0 Failure: Test: rint (-3.5) == -4.0 Failure: Test: rint (-4.5) == -4.0 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-30libm: fix powf testcase failuresDenys Vlasenko
Fixed failures: Failure: Test: pow (1, NaN) == 1 Failure: Test: pow (1, inf) == 1 Failure: Test: pow (-1, inf) == 1 Failure: Test: pow (1, -inf) == 1 Failure: Test: pow (-1, -inf) == 1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-30libm: fix scalb testsuite failuresDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>