summaryrefslogtreecommitdiffstats
path: root/libm
Commit message (Collapse)AuthorAgeFilesLines
* libm: pass CFLAGS to e500 fenvBernhard Reutner-Fischer2011-11-081-0/+2
| | | | | | As noted by Jason Woodward Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* honor UCLIBC_HAS_FENV for e500Jason Woodward2011-11-081-0/+2
| | | | | Signed-off-by: Jason Woodward <jason.woodward@timesys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Fix e500 fpu libm buildJason Woodward2011-11-081-0/+1
| | | | | | | | | | | | 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>
* libm: fix building out-of-treeBernhard Reutner-Fischer2011-05-121-1/+1
| | | | | | Thanks to Thierry Reding for noticing! Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add Makefile support for DSBT ELF.Bernd Schmidt bernds_cb1@t-online.de2011-03-051-0/+1
| | | | | | | | | | | 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>
* libm_sh: add optimised assembly implementation of lroundf and lrintfChristian Bruel2010-12-173-3/+96
| | | | | | | | | | * 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>
* libm_powerpc: update buildsys to use TARGET_SUBARCHCarmelo Amoroso2010-12-173-13/+3
| | | | | | | | 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>
* libm_sh: Move fenv functions into sh4 sub-folderCarmelo Amoroso2010-12-174-3/+11
| | | | | | | Indeed fenv funxtions are SH4 specific, so move them into an SH4 specific sub-folder. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* ldouble_wrappers: make code less verbose via WRAPPER2 macroDenys Vlasenko2010-11-021-44/+16
| | | | | | Tested: ran testsuite Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ldouble_wrappers: remove i386-specific optimizationDenys Vlasenko2010-11-021-102/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libm: disable tail jump trick if __SSP_ALL__ (was using wrong conditional)Denys Vlasenko2010-10-311-1/+1
| | | | | | Thanks, Timo! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libm: fix tgamma to actually do return true gamma functionDenys Vlasenko2010-10-311-19/+23
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libm: remove int_WRAPPER_C99 macro, add test which checks that I did not ↵Denys Vlasenko2010-10-311-27/+21
| | | | | | break it Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libm: revert wrong ldouble wrapper hack "fix"Denys Vlasenko2010-10-311-8/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libm: fix remaining failures in test-floatDenys Vlasenko2010-10-311-16/+31
| | | | | | | | 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>
* libm: fix rint/scalb testcase failuresDenys Vlasenko2010-10-301-19/+35
| | | | | | | | | | | | | | | | | | | 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>
* libm: fix powf testcase failuresDenys Vlasenko2010-10-301-28/+35
| | | | | | | | | | | 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>
* libm: fix scalb testsuite failuresDenys Vlasenko2010-10-301-7/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libm: fix testuite failure in modfDenys Vlasenko2010-10-302-11/+7
| | | | | | | | | | 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>
* libm/x86: use call instead of jump for wrappersTimo Teräs2010-10-221-4/+8
| | | | | | | | | | | | | | 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>
* use uniform form of C99 keywordsBernhard Reutner-Fischer2010-06-242-13/+13
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: typo fix NO_LONG_DOUBLE variant of gamma_rBernhard Reutner-Fischer2010-06-151-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: unbreak scalbn for 64-bit processorsRoman I Khimov2010-06-101-1/+1
| | | | | | | Obvious typo. Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* lgamma: fix sign handlingBernhard Reutner-Fischer2010-06-101-1/+5
| | | | | | | add testcase from http://sourceware.org/bugzilla/show_bug.cgi?id=4407 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: unhide signgamRoman I Khimov2010-06-101-1/+0
| | | | | | | | 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>
* nptl: proper soname handlingNatanael Copa2010-04-221-2/+2
| | | | | | | | | | | 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>
* prettify make cleanBernhard Reutner-Fischer2010-03-251-2/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: explain why some funcs are not implemented (yet)Bernhard Reutner-Fischer2010-02-041-1/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: enable log2f and exp2fAurelien Jacobs2010-02-042-3/+5
| | | | | Signed-off-by: Aurelien Jacobs <aurel@gnuage.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* rename exp(onent) to _expBernhard Reutner-Fischer2010-01-211-2/+2
| | | | | | to avoid shadow warnings Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* rename exp(onent) to exBernhard Reutner-Fischer2010-01-161-8/+8
| | | | | | to avoid shadow warnings Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* DO_XSI_MATH: add config knobBernhard Reutner-Fischer2009-11-191-2/+6
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: use int_WRAPPER_C99 macroBernhard Reutner-Fischer2009-11-151-10/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "libm: fix C99_MATH on __NO_LONG_DOUBLE_MATH hosts"Bernhard Reutner-Fischer2009-11-148-28/+44
| | | | | | | | This reverts commit 73d6e5c41b61633e22ea74e3aa2df721512dca57. barking up the wrong tree Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: fix C99_MATH on __NO_LONG_DOUBLE_MATH hostsBernhard Reutner-Fischer2009-11-148-44/+28
| | | | | | | 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>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-181-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer2009-08-302-1/+11
| | | | | | | | 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>
* support building out-of-treeBernhard Reutner-Fischer2009-08-171-0/+2
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add a few missing includesRon2009-07-051-0/+1
| | | | | | | | 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>
* libm/Makefile.in: reformat the list of wrappersDenis Vlasenko2009-02-172-22/+127
| | | | | | | | | | | | | | | 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.
* test/math/compile_test.c: "are long double functions even compile/link?" testDenis Vlasenko2009-02-172-4/+31
| | | | | *: fix everything which prevents above from building
* math.h: fix libm_hidden_proto leak into sanitized headersDenis Vlasenko2009-02-141-4/+4
| | | | | libm/s_nextafterf.c: use /* */ comments
* - scalb{,f,l} depend on UCLIBC_SUSV3_LEGACYBernhard Reutner-Fischer2009-02-131-1/+1
|
* - use existing __stringify macroBernhard Reutner-Fischer2009-02-131-6/+4
|
* docs/probe_math_exception.c:Denis Vlasenko2009-02-113-21/+41
| | | | | | | | | | | | 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...)
* ldouble_wrappers.c: add long and long long optimized wrappersDenis Vlasenko2009-02-092-240/+113
| | | | | | | | | | 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
* Hand-optimize wrappers on i386:Denis Vlasenko2009-02-091-156/+104
| | | | | | | | | | | | | | | | | | | -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
* ldouble_wrappers.c: fix __signbitl, it was calling itself by mistake.Denis Vlasenko2009-02-092-64/+7
| | | | | | remove wrong casts to long double of long return values. remove lots of empty lines.
* nextafterf: trying to correct FP exception handlingDenis Vlasenko2009-02-082-11/+59
|
* libm/s_nextafterf.c: forgot to "svn add" itDenis Vlasenko2009-02-061-0/+103
|