diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-17 12:13:38 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-17 12:13:38 +0000 |
commit | 050aa62a226723e9b8420a41edb821aec9bb1ff9 (patch) | |
tree | 81c970a7fbc722143610b59caed3037592bd3cf0 | |
parent | 845b3a4460ee9447edb66137461570299965f5f8 (diff) |
libm/Makefile.in: reformat the list of wrappers
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.
-rw-r--r-- | libm/Makefile.in | 137 | ||||
-rw-r--r-- | libm/ldouble_wrappers.c | 12 | ||||
-rw-r--r-- | test/math/compile_test.c | 126 |
3 files changed, 191 insertions, 84 deletions
diff --git a/libm/Makefile.in b/libm/Makefile.in index 9ff59b46c..6b8224600 100644 --- a/libm/Makefile.in +++ b/libm/Makefile.in @@ -71,25 +71,128 @@ libm_CSRC := \ s_isnan.c s_isnanf.c s_isinf.c s_isinff.c s_finitef.c \ s_fdim.c s_fma.c s_fmax.c s_fmin.c \ s_remquo.c w_exp2.c + +# Not implemented [yet?], see comment in float_wrappers.c: +# exp2f.o fdimf.o fmaf.o fmaxf.o fminf.o log2f.o +# nearbyintf.o remquof.o scalblnf.o tgammaf.o FL_MOBJ := \ - acosf.o acoshf.o asinf.o asinhf.o atan2f.o atanf.o atanhf.o cbrtf.o \ - ceilf.o copysignf.o cosf.o coshf.o erfcf.o erff.o exp2f.o expf.o \ - expm1f.o fabsf.o fdimf.o floorf.o fmaf.o fmaxf.o fminf.o fmodf.o \ - frexpf.o hypotf.o ilogbf.o ldexpf.o lgammaf.o llroundf.o log10f.o \ - log1pf.o log2f.o logbf.o logf.o lrintf.o lroundf.o modff.o nearbyintf.o \ - powf.o remainderf.o remquof.o rintf.o roundf.o \ - scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \ - tgammaf.o truncf.o cargf.o llrintf.o scalbf.o gammaf.o significandf.o - -LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cargl.o cbrtl.o \ - ceill.o copysignl.o coshl.o cosl.o erfcl.o erfl.o exp2l.o expl.o \ - expm1l.o fabsl.o finitel.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o fpclassifyl.o \ - frexpl.o gammal.o hypotl.o ilogbl.o isinfl.o isnanl.o ldexpl.o lgammal.o llrintl.o \ - llroundl.o log10l.o log1pl.o log2l.o logbl.o logl.o lrintl.o lroundl.o \ - modfl.o nearbyintl.o nextafterl.o XXXnexttowardl.o powl.o remainderl.o \ - remquol.o rintl.o roundl.o scalblnl.o scalbnl.o __signbitl.o sinhl.o sinl.o sqrtl.o \ - tanhl.o tanl.o tgammal.o truncl.o significandl.o + acosf.o \ + acoshf.o \ + asinf.o \ + asinhf.o \ + atan2f.o \ + atanf.o \ + atanhf.o \ + cargf.o \ + cbrtf.o \ + ceilf.o \ + copysignf.o \ + cosf.o \ + coshf.o \ + erfcf.o \ + erff.o \ + expf.o \ + expm1f.o \ + fabsf.o \ + floorf.o \ + fmodf.o \ + frexpf.o \ + gammaf.o \ + hypotf.o \ + ilogbf.o \ + ldexpf.o \ + lgammaf.o \ + llrintf.o \ + llroundf.o \ + log10f.o \ + log1pf.o \ + logbf.o \ + logf.o \ + lrintf.o \ + lroundf.o \ + modff.o \ + powf.o \ + remainderf.o \ + rintf.o \ + roundf.o \ + scalbf.o \ + scalbnf.o \ + significandf.o \ + sinf.o \ + sinhf.o \ + sqrtf.o \ + tanf.o \ + tanhf.o \ + truncf.o \ + +# Not implemented [yet?]: nexttowardl.o +LD_MOBJ := \ + __finitel.o \ + __fpclassifyl.o \ + __isinfl.o \ + __isnanl.o \ + __signbitl.o \ + acoshl.o \ + acosl.o \ + asinhl.o \ + asinl.o \ + atan2l.o \ + atanhl.o \ + atanl.o \ + cargl.o \ + cbrtl.o \ + ceill.o \ + copysignl.o \ + coshl.o \ + cosl.o \ + erfcl.o \ + erfl.o \ + exp2l.o \ + expl.o \ + expm1l.o \ + fabsl.o \ + fdiml.o \ + floorl.o \ + fmal.o \ + fmaxl.o \ + fminl.o \ + fmodl.o \ + frexpl.o \ + gammal.o \ + hypotl.o \ + ilogbl.o \ + ldexpl.o \ + lgammal.o \ + llrintl.o \ + llroundl.o \ + log10l.o \ + log1pl.o \ + log2l.o \ + logbl.o \ + logl.o \ + lrintl.o \ + lroundl.o \ + modfl.o \ + nearbyintl.o \ + nextafterl.o \ + powl.o \ + remainderl.o \ + remquol.o \ + rintl.o \ + roundl.o \ + scalblnl.o \ + scalbnl.o \ + significandl.o \ + sinhl.o \ + sinl.o \ + sqrtl.o \ + tanhl.o \ + tanl.o \ + tgammal.o \ + truncl.o \ + else + # This list of math functions was taken from POSIX/IEEE 1003.1b-1993 libm_CSRC := \ s_atan.c s_ceil.c s_cos.c \ diff --git a/libm/ldouble_wrappers.c b/libm/ldouble_wrappers.c index 211a2c00b..61940cb12 100644 --- a/libm/ldouble_wrappers.c +++ b/libm/ldouble_wrappers.c @@ -401,11 +401,13 @@ long double nextafterl (long double x, long double y) } #endif -#ifdef L_nexttowardl +/* Disabled in Makefile.in */ +#if 0 /* def L_nexttowardl */ long double nexttowardl (long double x, long double y) { return (long double) nexttoward( (double)x, (double)y ); } +libm_hidden_def(nexttowardl) #endif #ifdef L_powl @@ -492,12 +494,12 @@ long double significandl(long double x) #ifdef __DO_C99_MATH__ -#ifdef L_fpclassifyl +#ifdef L___fpclassifyl int_WRAPPER1(__fpclassify) libm_hidden_def(__fpclassifyl) #endif -#ifdef L_finitel +#ifdef L___finitel int_WRAPPER1(__finite) libm_hidden_def(__finitel) #endif @@ -507,12 +509,12 @@ int_WRAPPER1(__signbit) libm_hidden_def(__signbitl) #endif -#ifdef L_isnanl +#ifdef L___isnanl int_WRAPPER1(__isnan) libm_hidden_def(__isnanl) #endif -#ifdef L_isinfl +#ifdef L___isinfl int_WRAPPER1(__isinf) libm_hidden_def(__isinfl) #endif diff --git a/test/math/compile_test.c b/test/math/compile_test.c index 57eb00927..2e7be1a93 100644 --- a/test/math/compile_test.c +++ b/test/math/compile_test.c @@ -1,68 +1,70 @@ #include <math.h> -void testl(long double long_double_x, int int_x, long long_x) +int testl(long double long_double_x, int int_x, long long_x) { -__finitel(long_double_x); -__fpclassifyl(long_double_x); -__isinfl(long_double_x); -__isnanl(long_double_x); -__signbitl(long_double_x); -acoshl(long_double_x); -acosl(long_double_x); -asinhl(long_double_x); -asinl(long_double_x); -atan2l(long_double_x, long_double_x); -atanhl(long_double_x); -atanl(long_double_x); -cbrtl(long_double_x); -ceill(long_double_x); -copysignl(long_double_x, long_double_x); -coshl(long_double_x); -cosl(long_double_x); -erfcl(long_double_x); -erfl(long_double_x); -exp2l(long_double_x); -expl(long_double_x); -expm1l(long_double_x); -fabsl(long_double_x); -fdiml(long_double_x, long_double_x); -floorl(long_double_x); -fmal(long_double_x, long_double_x, long_double_x); -fmaxl(long_double_x, long_double_x); -fminl(long_double_x, long_double_x); -fmodl(long_double_x, long_double_x); -frexpl(long_double_x, &int_x); -hypotl(long_double_x, long_double_x); -ilogbl(long_double_x); -ldexpl(long_double_x, int_x); -lgammal(long_double_x); -llrintl(long_double_x); -llroundl(long_double_x); -log10l(long_double_x); -log1pl(long_double_x); -log2l(long_double_x); -logbl(long_double_x); -logl(long_double_x); -lrintl(long_double_x); -lroundl(long_double_x); -modfl(long_double_x, &long_double_x); -nearbyintl(long_double_x); -nextafterl(long_double_x, long_double_x); -nexttowardl(long_double_x, long_double_x); -powl(long_double_x, long_double_x); -remainderl(long_double_x, long_double_x); -remquol(long_double_x, long_double_x, &int_x); -rintl(long_double_x); -roundl(long_double_x); -scalblnl(long_double_x, long_x); -scalbnl(long_double_x, int_x); -sinhl(long_double_x); -sinl(long_double_x); -sqrtl(long_double_x); -tanhl(long_double_x); -tanl(long_double_x); -tgammal(long_double_x); -truncl(long_double_x); +int r = 0; +r += __finitel(long_double_x); +r += __fpclassifyl(long_double_x); +r += __isinfl(long_double_x); +r += __isnanl(long_double_x); +r += __signbitl(long_double_x); +r += acoshl(long_double_x); +r += acosl(long_double_x); +r += asinhl(long_double_x); +r += asinl(long_double_x); +r += atan2l(long_double_x, long_double_x); +r += atanhl(long_double_x); +r += atanl(long_double_x); +r += cbrtl(long_double_x); +r += ceill(long_double_x); +r += copysignl(long_double_x, long_double_x); +r += coshl(long_double_x); +r += cosl(long_double_x); +r += erfcl(long_double_x); +r += erfl(long_double_x); +r += exp2l(long_double_x); +r += expl(long_double_x); +r += expm1l(long_double_x); +r += fabsl(long_double_x); +r += fdiml(long_double_x, long_double_x); +r += floorl(long_double_x); +r += fmal(long_double_x, long_double_x, long_double_x); +r += fmaxl(long_double_x, long_double_x); +r += fminl(long_double_x, long_double_x); +r += fmodl(long_double_x, long_double_x); +r += frexpl(long_double_x, &int_x); +r += hypotl(long_double_x, long_double_x); +r += ilogbl(long_double_x); +r += ldexpl(long_double_x, int_x); +r += lgammal(long_double_x); +r += llrintl(long_double_x); +r += llroundl(long_double_x); +r += log10l(long_double_x); +r += log1pl(long_double_x); +r += log2l(long_double_x); +r += logbl(long_double_x); +r += logl(long_double_x); +r += lrintl(long_double_x); +r += lroundl(long_double_x); +r += modfl(long_double_x, &long_double_x); +r += nearbyintl(long_double_x); +r += nextafterl(long_double_x, long_double_x); +/* r += nexttowardl(long_double_x, long_double_x); - uclibc doesn't provide this [yet?] */ +r += powl(long_double_x, long_double_x); +r += remainderl(long_double_x, long_double_x); +r += remquol(long_double_x, long_double_x, &int_x); +r += rintl(long_double_x); +r += roundl(long_double_x); +r += scalblnl(long_double_x, long_x); +r += scalbnl(long_double_x, int_x); +r += sinhl(long_double_x); +r += sinl(long_double_x); +r += sqrtl(long_double_x); +r += tanhl(long_double_x); +r += tanl(long_double_x); +r += tgammal(long_double_x); +r += truncl(long_double_x); +return r; } int main(int argc, char **argv) |