summaryrefslogtreecommitdiffstats
path: root/libm/ldouble_wrappers.c
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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/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-241-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* rename exp(onent) to exBernhard Reutner-Fischer2010-01-211-8/+8
| | | | | | | | | to avoid shadow warnings Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit f331f6d2eff5fb623bcc42213ccec12c7dbf95fd) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.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-141-0/+39
| | | | | | | | 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-141-39/+0
| | | | | | | 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>
* honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer2009-08-301-0/+10
| | | | | | | | 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>
* libm/Makefile.in: reformat the list of wrappersDenis Vlasenko2009-02-171-5/+7
| | | | | | | | | | | | | | | 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-171-2/+29
| | | | | *: fix everything which prevents above from building
* - use existing __stringify macroBernhard Reutner-Fischer2009-02-131-6/+4
|
* ldouble_wrappers.c: add long and long long optimized wrappersDenis Vlasenko2009-02-091-24/+49
| | | | | | | | | | 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-091-63/+6
| | | | | | remove wrong casts to long double of long return values. remove lots of empty lines.
* libm/ldouble_wrappers.c: add libm_hidden_def's to fix testsuite buildDenis Vlasenko2009-02-021-0/+2
| | | | | | | test/Rules.mak: don't pass target options to host build test/math/basic-test.c: fix test build error patching file test/unistd/errno.c: fix test build warning
* ldouble_wrappers.c: remove erroneous libm_hidden_def'sDenis Vlasenko2009-01-201-5/+0
|
* - fix fpclassify, signbit, isfinite, isnan, isinf macros for long double ↵Bernhard Reutner-Fischer2008-12-221-0/+56
| | | | | | math support - add rule to create preprocessor output for float- and long double math wrapper
* *: document __USE_EXTERN_INLINES better;Denis Vlasenko2008-12-131-0/+3
| | | | | fix uclibc build if it is forcibly enabled
* - add long double math wrappers (Ned Ludd)Bernhard Reutner-Fischer2008-10-031-0/+523