glibc/sysdeps/nacl/libm.abilist
Joseph Myers 55a38f8236 Add llogb, llogbf, llogbl.
TS 18661-1 defines llogb functions that are like ilogb except that
they return long int instead of int.  Corresponding FP_LLOGB* macros
are defined, whose values are required to have the obvious
correspondence to those of the FP_ILOGB* macros.

This patch implements these functions and macros for glibc.  llogb
uses the type-generic infrastructure, with an implementation similar
to the wrapper for ilogb but with additional conversion from FP_ILOGB*
to FP_LLOGB*; this approach avoids needing to modify or duplicate any
of the architecture-specific ilogb implementations.  Tests are also
based on those for ilogb.

Ideally the llogb functions would alias the ilogb ones when long is
32-bit, but such aliasing requires the associated header declarations
of the different-type alias to be hidden, typically by defining macros
before including the header (see e.g. how
sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c defines lround to
__hidden_lround before including <math.h>).  The infrastructure for
type-generic function implementations does not support defining such
macros at present (since C code can't define a macro whose name is
determined by other macros).  So this patch leaves them as separate
functions (similar to e.g. scalbln and scalbn being separate in such a
case as well), but with the remapping of FP_ILOGB* to FP_LLOGB*
conditioned out in the case where it would be the identity map.

Tested for x86_64, x86, mips64 and powerpc.

	* math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (llogb):
	New declaration.
	* math/tgmath.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (llogb): New
	macro.
	* math/math.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (__FP_LONG_MAX):
	New macro.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (FP_LLOGB0): Likewise.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (FP_LLOGBNAN): Likewise.
	* math/Versions (llogb): New libm symbol at version GLIBC_2.25.
	(llogbf): Likewise.
	(llogbl): Likewise.
	* math/Makefile (gen-libm-calls): Add w_llogbF.
	(tests): Add test-fp-llogb-constants.
	* math/w_llogb_template.c: New file.  Based on
	math/w_ilogb_template.c.
	* math/libm-test.inc (llogb_test_data): New array.
	(llogb_test): New function.
	(main): Call llogb_test.
	* math/test-fp-llogb-constants.c: New file.  Based on
	math/test-fp-ilogb-constants.c.
	* math/test-tgmath-ret.c (llogb): New CHECK_RET_CONST call.
	(do_test): Call check_return_llogb.
	* math/test-tgmath.c (NCALLS): Increase to 126.
	(F(compile_test)): Call llogb.
	(F(llogb)): New function.
	* manual/math.texi (Exponents and Logarithms): Document llogb,
	llogbf, llogbl, FP_LLOGB0 and FP_LLOGBNAN.
	* manual/libm-err-tab.pl (@all_functions): Add llogb.
	* sysdeps/ieee754/ldbl-opt/nldbl-llogb.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_llogbl.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add llogb.
	(CFLAGS-nldbl-llogb.c): New variable.
	* sysdeps/nacl/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2016-12-02 01:42:49 +00:00

410 lines
8.5 KiB
Plaintext

GLIBC_2.22 GLIBC_2.22 A
GLIBC_2.22 _LIB_VERSION D 0x4
GLIBC_2.22 __acos_finite F
GLIBC_2.22 __acosf_finite F
GLIBC_2.22 __acosh_finite F
GLIBC_2.22 __acoshf_finite F
GLIBC_2.22 __asin_finite F
GLIBC_2.22 __asinf_finite F
GLIBC_2.22 __atan2_finite F
GLIBC_2.22 __atan2f_finite F
GLIBC_2.22 __atanh_finite F
GLIBC_2.22 __atanhf_finite F
GLIBC_2.22 __clog10 F
GLIBC_2.22 __clog10f F
GLIBC_2.22 __clog10l F
GLIBC_2.22 __cosh_finite F
GLIBC_2.22 __coshf_finite F
GLIBC_2.22 __exp10_finite F
GLIBC_2.22 __exp10f_finite F
GLIBC_2.22 __exp2_finite F
GLIBC_2.22 __exp2f_finite F
GLIBC_2.22 __exp_finite F
GLIBC_2.22 __expf_finite F
GLIBC_2.22 __finite F
GLIBC_2.22 __finitef F
GLIBC_2.22 __finitel F
GLIBC_2.22 __fmod_finite F
GLIBC_2.22 __fmodf_finite F
GLIBC_2.22 __fpclassify F
GLIBC_2.22 __fpclassifyf F
GLIBC_2.22 __gamma_r_finite F
GLIBC_2.22 __gammaf_r_finite F
GLIBC_2.22 __hypot_finite F
GLIBC_2.22 __hypotf_finite F
GLIBC_2.22 __issignaling F
GLIBC_2.22 __issignalingf F
GLIBC_2.22 __j0_finite F
GLIBC_2.22 __j0f_finite F
GLIBC_2.22 __j1_finite F
GLIBC_2.22 __j1f_finite F
GLIBC_2.22 __jn_finite F
GLIBC_2.22 __jnf_finite F
GLIBC_2.22 __lgamma_r_finite F
GLIBC_2.22 __lgammaf_r_finite F
GLIBC_2.22 __log10_finite F
GLIBC_2.22 __log10f_finite F
GLIBC_2.22 __log2_finite F
GLIBC_2.22 __log2f_finite F
GLIBC_2.22 __log_finite F
GLIBC_2.22 __logf_finite F
GLIBC_2.22 __pow_finite F
GLIBC_2.22 __powf_finite F
GLIBC_2.22 __remainder_finite F
GLIBC_2.22 __remainderf_finite F
GLIBC_2.22 __scalb_finite F
GLIBC_2.22 __scalbf_finite F
GLIBC_2.22 __signbit F
GLIBC_2.22 __signbitf F
GLIBC_2.22 __sinh_finite F
GLIBC_2.22 __sinhf_finite F
GLIBC_2.22 __sqrt_finite F
GLIBC_2.22 __sqrtf_finite F
GLIBC_2.22 __y0_finite F
GLIBC_2.22 __y0f_finite F
GLIBC_2.22 __y1_finite F
GLIBC_2.22 __y1f_finite F
GLIBC_2.22 __yn_finite F
GLIBC_2.22 __ynf_finite F
GLIBC_2.22 acos F
GLIBC_2.22 acosf F
GLIBC_2.22 acosh F
GLIBC_2.22 acoshf F
GLIBC_2.22 acoshl F
GLIBC_2.22 acosl F
GLIBC_2.22 asin F
GLIBC_2.22 asinf F
GLIBC_2.22 asinh F
GLIBC_2.22 asinhf F
GLIBC_2.22 asinhl F
GLIBC_2.22 asinl F
GLIBC_2.22 atan F
GLIBC_2.22 atan2 F
GLIBC_2.22 atan2f F
GLIBC_2.22 atan2l F
GLIBC_2.22 atanf F
GLIBC_2.22 atanh F
GLIBC_2.22 atanhf F
GLIBC_2.22 atanhl F
GLIBC_2.22 atanl F
GLIBC_2.22 cabs F
GLIBC_2.22 cabsf F
GLIBC_2.22 cabsl F
GLIBC_2.22 cacos F
GLIBC_2.22 cacosf F
GLIBC_2.22 cacosh F
GLIBC_2.22 cacoshf F
GLIBC_2.22 cacoshl F
GLIBC_2.22 cacosl F
GLIBC_2.22 carg F
GLIBC_2.22 cargf F
GLIBC_2.22 cargl F
GLIBC_2.22 casin F
GLIBC_2.22 casinf F
GLIBC_2.22 casinh F
GLIBC_2.22 casinhf F
GLIBC_2.22 casinhl F
GLIBC_2.22 casinl F
GLIBC_2.22 catan F
GLIBC_2.22 catanf F
GLIBC_2.22 catanh F
GLIBC_2.22 catanhf F
GLIBC_2.22 catanhl F
GLIBC_2.22 catanl F
GLIBC_2.22 cbrt F
GLIBC_2.22 cbrtf F
GLIBC_2.22 cbrtl F
GLIBC_2.22 ccos F
GLIBC_2.22 ccosf F
GLIBC_2.22 ccosh F
GLIBC_2.22 ccoshf F
GLIBC_2.22 ccoshl F
GLIBC_2.22 ccosl F
GLIBC_2.22 ceil F
GLIBC_2.22 ceilf F
GLIBC_2.22 ceill F
GLIBC_2.22 cexp F
GLIBC_2.22 cexpf F
GLIBC_2.22 cexpl F
GLIBC_2.22 cimag F
GLIBC_2.22 cimagf F
GLIBC_2.22 cimagl F
GLIBC_2.22 clog F
GLIBC_2.22 clog10 F
GLIBC_2.22 clog10f F
GLIBC_2.22 clog10l F
GLIBC_2.22 clogf F
GLIBC_2.22 clogl F
GLIBC_2.22 conj F
GLIBC_2.22 conjf F
GLIBC_2.22 conjl F
GLIBC_2.22 copysign F
GLIBC_2.22 copysignf F
GLIBC_2.22 copysignl F
GLIBC_2.22 cos F
GLIBC_2.22 cosf F
GLIBC_2.22 cosh F
GLIBC_2.22 coshf F
GLIBC_2.22 coshl F
GLIBC_2.22 cosl F
GLIBC_2.22 cpow F
GLIBC_2.22 cpowf F
GLIBC_2.22 cpowl F
GLIBC_2.22 cproj F
GLIBC_2.22 cprojf F
GLIBC_2.22 cprojl F
GLIBC_2.22 creal F
GLIBC_2.22 crealf F
GLIBC_2.22 creall F
GLIBC_2.22 csin F
GLIBC_2.22 csinf F
GLIBC_2.22 csinh F
GLIBC_2.22 csinhf F
GLIBC_2.22 csinhl F
GLIBC_2.22 csinl F
GLIBC_2.22 csqrt F
GLIBC_2.22 csqrtf F
GLIBC_2.22 csqrtl F
GLIBC_2.22 ctan F
GLIBC_2.22 ctanf F
GLIBC_2.22 ctanh F
GLIBC_2.22 ctanhf F
GLIBC_2.22 ctanhl F
GLIBC_2.22 ctanl F
GLIBC_2.22 drem F
GLIBC_2.22 dremf F
GLIBC_2.22 dreml F
GLIBC_2.22 erf F
GLIBC_2.22 erfc F
GLIBC_2.22 erfcf F
GLIBC_2.22 erfcl F
GLIBC_2.22 erff F
GLIBC_2.22 erfl F
GLIBC_2.22 exp F
GLIBC_2.22 exp10 F
GLIBC_2.22 exp10f F
GLIBC_2.22 exp10l F
GLIBC_2.22 exp2 F
GLIBC_2.22 exp2f F
GLIBC_2.22 exp2l F
GLIBC_2.22 expf F
GLIBC_2.22 expl F
GLIBC_2.22 expm1 F
GLIBC_2.22 expm1f F
GLIBC_2.22 expm1l F
GLIBC_2.22 fabs F
GLIBC_2.22 fabsf F
GLIBC_2.22 fabsl F
GLIBC_2.22 fdim F
GLIBC_2.22 fdimf F
GLIBC_2.22 fdiml F
GLIBC_2.22 feclearexcept F
GLIBC_2.22 fedisableexcept F
GLIBC_2.22 feenableexcept F
GLIBC_2.22 fegetenv F
GLIBC_2.22 fegetexcept F
GLIBC_2.22 fegetexceptflag F
GLIBC_2.22 fegetround F
GLIBC_2.22 feholdexcept F
GLIBC_2.22 feraiseexcept F
GLIBC_2.22 fesetenv F
GLIBC_2.22 fesetexceptflag F
GLIBC_2.22 fesetround F
GLIBC_2.22 fetestexcept F
GLIBC_2.22 feupdateenv F
GLIBC_2.22 finite F
GLIBC_2.22 finitef F
GLIBC_2.22 finitel F
GLIBC_2.22 floor F
GLIBC_2.22 floorf F
GLIBC_2.22 floorl F
GLIBC_2.22 fma F
GLIBC_2.22 fmaf F
GLIBC_2.22 fmal F
GLIBC_2.22 fmax F
GLIBC_2.22 fmaxf F
GLIBC_2.22 fmaxl F
GLIBC_2.22 fmin F
GLIBC_2.22 fminf F
GLIBC_2.22 fminl F
GLIBC_2.22 fmod F
GLIBC_2.22 fmodf F
GLIBC_2.22 fmodl F
GLIBC_2.22 frexp F
GLIBC_2.22 frexpf F
GLIBC_2.22 frexpl F
GLIBC_2.22 gamma F
GLIBC_2.22 gammaf F
GLIBC_2.22 gammal F
GLIBC_2.22 hypot F
GLIBC_2.22 hypotf F
GLIBC_2.22 hypotl F
GLIBC_2.22 ilogb F
GLIBC_2.22 ilogbf F
GLIBC_2.22 ilogbl F
GLIBC_2.22 j0 F
GLIBC_2.22 j0f F
GLIBC_2.22 j0l F
GLIBC_2.22 j1 F
GLIBC_2.22 j1f F
GLIBC_2.22 j1l F
GLIBC_2.22 jn F
GLIBC_2.22 jnf F
GLIBC_2.22 jnl F
GLIBC_2.22 ldexp F
GLIBC_2.22 ldexpf F
GLIBC_2.22 ldexpl F
GLIBC_2.22 lgamma F
GLIBC_2.22 lgamma_r F
GLIBC_2.22 lgammaf F
GLIBC_2.22 lgammaf_r F
GLIBC_2.22 lgammal F
GLIBC_2.22 lgammal_r F
GLIBC_2.22 llrint F
GLIBC_2.22 llrintf F
GLIBC_2.22 llrintl F
GLIBC_2.22 llround F
GLIBC_2.22 llroundf F
GLIBC_2.22 llroundl F
GLIBC_2.22 log F
GLIBC_2.22 log10 F
GLIBC_2.22 log10f F
GLIBC_2.22 log10l F
GLIBC_2.22 log1p F
GLIBC_2.22 log1pf F
GLIBC_2.22 log1pl F
GLIBC_2.22 log2 F
GLIBC_2.22 log2f F
GLIBC_2.22 log2l F
GLIBC_2.22 logb F
GLIBC_2.22 logbf F
GLIBC_2.22 logbl F
GLIBC_2.22 logf F
GLIBC_2.22 logl F
GLIBC_2.22 lrint F
GLIBC_2.22 lrintf F
GLIBC_2.22 lrintl F
GLIBC_2.22 lround F
GLIBC_2.22 lroundf F
GLIBC_2.22 lroundl F
GLIBC_2.22 matherr F
GLIBC_2.22 modf F
GLIBC_2.22 modff F
GLIBC_2.22 modfl F
GLIBC_2.22 nan F
GLIBC_2.22 nanf F
GLIBC_2.22 nanl F
GLIBC_2.22 nearbyint F
GLIBC_2.22 nearbyintf F
GLIBC_2.22 nearbyintl F
GLIBC_2.22 nextafter F
GLIBC_2.22 nextafterf F
GLIBC_2.22 nextafterl F
GLIBC_2.22 nexttoward F
GLIBC_2.22 nexttowardf F
GLIBC_2.22 nexttowardl F
GLIBC_2.22 pow F
GLIBC_2.22 pow10 F
GLIBC_2.22 pow10f F
GLIBC_2.22 pow10l F
GLIBC_2.22 powf F
GLIBC_2.22 powl F
GLIBC_2.22 remainder F
GLIBC_2.22 remainderf F
GLIBC_2.22 remainderl F
GLIBC_2.22 remquo F
GLIBC_2.22 remquof F
GLIBC_2.22 remquol F
GLIBC_2.22 rint F
GLIBC_2.22 rintf F
GLIBC_2.22 rintl F
GLIBC_2.22 round F
GLIBC_2.22 roundf F
GLIBC_2.22 roundl F
GLIBC_2.22 scalb F
GLIBC_2.22 scalbf F
GLIBC_2.22 scalbl F
GLIBC_2.22 scalbln F
GLIBC_2.22 scalblnf F
GLIBC_2.22 scalblnl F
GLIBC_2.22 scalbn F
GLIBC_2.22 scalbnf F
GLIBC_2.22 scalbnl F
GLIBC_2.22 signgam D 0x4
GLIBC_2.22 significand F
GLIBC_2.22 significandf F
GLIBC_2.22 significandl F
GLIBC_2.22 sin F
GLIBC_2.22 sincos F
GLIBC_2.22 sincosf F
GLIBC_2.22 sincosl F
GLIBC_2.22 sinf F
GLIBC_2.22 sinh F
GLIBC_2.22 sinhf F
GLIBC_2.22 sinhl F
GLIBC_2.22 sinl F
GLIBC_2.22 sqrt F
GLIBC_2.22 sqrtf F
GLIBC_2.22 sqrtl F
GLIBC_2.22 tan F
GLIBC_2.22 tanf F
GLIBC_2.22 tanh F
GLIBC_2.22 tanhf F
GLIBC_2.22 tanhl F
GLIBC_2.22 tanl F
GLIBC_2.22 tgamma F
GLIBC_2.22 tgammaf F
GLIBC_2.22 tgammal F
GLIBC_2.22 trunc F
GLIBC_2.22 truncf F
GLIBC_2.22 truncl F
GLIBC_2.22 y0 F
GLIBC_2.22 y0f F
GLIBC_2.22 y0l F
GLIBC_2.22 y1 F
GLIBC_2.22 y1f F
GLIBC_2.22 y1l F
GLIBC_2.22 yn F
GLIBC_2.22 ynf F
GLIBC_2.22 ynl F
GLIBC_2.23 GLIBC_2.23 A
GLIBC_2.23 __signgam D 0x4
GLIBC_2.23 lgamma F
GLIBC_2.23 lgammaf F
GLIBC_2.23 lgammal F
GLIBC_2.24 GLIBC_2.24 A
GLIBC_2.24 nextdown F
GLIBC_2.24 nextdownf F
GLIBC_2.24 nextdownl F
GLIBC_2.24 nextup F
GLIBC_2.24 nextupf F
GLIBC_2.24 nextupl F
GLIBC_2.25 GLIBC_2.25 A
GLIBC_2.25 __iseqsig F
GLIBC_2.25 __iseqsigf F
GLIBC_2.25 canonicalize F
GLIBC_2.25 canonicalizef F
GLIBC_2.25 canonicalizel F
GLIBC_2.25 fegetmode F
GLIBC_2.25 fesetexcept F
GLIBC_2.25 fesetmode F
GLIBC_2.25 fetestexceptflag F
GLIBC_2.25 getpayload F
GLIBC_2.25 getpayloadf F
GLIBC_2.25 getpayloadl F
GLIBC_2.25 llogb F
GLIBC_2.25 llogbf F
GLIBC_2.25 llogbl F
GLIBC_2.25 setpayload F
GLIBC_2.25 setpayloadf F
GLIBC_2.25 setpayloadl F
GLIBC_2.25 setpayloadsig F
GLIBC_2.25 setpayloadsigf F
GLIBC_2.25 setpayloadsigl F
GLIBC_2.25 totalorder F
GLIBC_2.25 totalorderf F
GLIBC_2.25 totalorderl F
GLIBC_2.25 totalordermag F
GLIBC_2.25 totalordermagf F
GLIBC_2.25 totalordermagl F