summaryrefslogtreecommitdiff
path: root/libm
AgeCommit message (Collapse)Author
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>
2010-10-30libm: fix testuite failure in modfDenys Vlasenko
This error is gone: Failure: Test: modf (NaN, &x) == NaN Result: is: -0.00000000000000000000e+00 -0 should be: nan nan Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-22libm/x86: use call instead of jump for wrappersTimo Teräs
GCC can emit prologue/epilogue code for the functions in various different cases: - frame pointers - PIC build (to load ebx for indirect calls/jumps) - forced stack smashing protection If we used jump in such cases, we'd corrupt the call stack and crash. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-06-24use uniform form of C99 keywordsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-15libm: typo fix NO_LONG_DOUBLE variant of gamma_rBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-10libm: unbreak scalbn for 64-bit processorsRoman I Khimov
Obvious typo. Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-10lgamma: fix sign handlingBernhard Reutner-Fischer
add testcase from http://sourceware.org/bugzilla/show_bug.cgi?id=4407 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-10libm: unhide signgamRoman I Khimov
Fixes signgam checks in math tests on x86_64. It's R_X86_64_COPY for program, so the program didn't see any changes from libm. Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-04-22nptl: proper soname handlingNatanael Copa
Since sublevel releases are not ABI compatible we need to adjust the soname to include the sublevel version. This makes it possible to install ABI incompatible versions of the library side by side so clean upgrades are possible. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-03-25prettify make cleanBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-04libm: explain why some funcs are not implemented (yet)Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-04libm: enable log2f and exp2fAurelien Jacobs
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-01-21rename exp(onent) to _expBernhard Reutner-Fischer
to avoid shadow warnings Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-16rename exp(onent) to exBernhard Reutner-Fischer
to avoid shadow warnings Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-19DO_XSI_MATH: add config knobBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-15libm: use int_WRAPPER_C99 macroBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-14Revert "libm: fix C99_MATH on __NO_LONG_DOUBLE_MATH hosts"Bernhard Reutner-Fischer
This reverts commit 73d6e5c41b61633e22ea74e3aa2df721512dca57. barking up the wrong tree Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-14libm: fix C99_MATH on __NO_LONG_DOUBLE_MATH hostsBernhard Reutner-Fischer
alias l to their normal double counterparts. Works around problems with libgcc blindly calling __finitel on e.g. ppc32 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-18convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer
This fixes compilation errors on hosts that turn off long double support for C99 like powerpc32. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-17support building out-of-treeBernhard Reutner-Fischer
Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-07-05Add a few missing includesRon
elf.h needs __BYTE_ORDER, and s_scalbn.c needs {LONG,INT}_MAX. shm.c complains about no prototypes for shm_{open,unlink} without its header. Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-17libm/Makefile.in: reformat the list of wrappersDenis Vlasenko
so that it is easier to modify, sort, etc; use __ in filenames of wrappers which wrap __functions (it may be useful to have function and file names ALWAYS match); remove names of not implemented wrappers (it was generating useless empty .o files). libm/ldouble_wrappers.c: comment out the wrapper which is not compiled anyway test/math/compile_test.c: improve this test, it was optimizing out some calls, and we don't want that. No actual code changes.
2009-02-17test/math/compile_test.c: "are long double functions even compile/link?" testDenis Vlasenko
*: fix everything which prevents above from building
2009-02-14math.h: fix libm_hidden_proto leak into sanitized headersDenis Vlasenko
libm/s_nextafterf.c: use /* */ comments
2009-02-13- scalb{,f,l} depend on UCLIBC_SUSV3_LEGACYBernhard Reutner-Fischer
2009-02-13- use existing __stringify macroBernhard Reutner-Fischer
2009-02-11docs/probe_math_exception.c:Denis Vlasenko
update example libc/sysdeps/linux/i386/bits/mathinline.h: improve __finite() macro, add __finitef macro (why they aren't always macros? why aren't they arch independent?) libm/math_private.h: much better comments on math_opt_barrier() and math_force_eval() libm/s_finite[f].c: improve out-of-line __finite[f]() too (one byte less, yay...)
2009-02-09ldouble_wrappers.c: add long and long long optimized wrappersDenis Vlasenko
float_wrappers.c: add xxxWRAPPER1(func) macros. no code changes, but makes this file much shorter. text data bss dec hex filename - 42504 188 4 42696 a6c8 lib/libm-0.9.30-svn.so + 42488 188 4 42680 a6b8 lib/libm-0.9.30-svn.so
2009-02-09Hand-optimize wrappers on i386:Denis Vlasenko
-83 ec 10 sub $0x10,%esp -db 6c 24 14 fldt 0x14(%esp) -dd 5c 24 08 fstpl 0x8(%esp) -dd 44 24 08 fldl 0x8(%esp) -dd 1c 24 fstpl (%esp) -e8 fc ff ff ff call __GI_trunc -83 c4 10 add $0x10,%esp +db 6c 24 04 fldt 0x4(%esp) +dd 5c 24 04 fstpl 0x4(%esp) +e9 fc ff ff ff jmp __GI_trunc c3 ret text data bss dec hex filename - 42749 176 4 42929 a7b1 lib/libm-0.9.30-svn.so + 42085 176 4 42265 a519 lib/libm-0.9.30-svn.so