glibc/sysdeps/ieee754/ldbl-opt/Versions
Joseph Myers 632a6cbe44 Add narrowing divide functions.
This patch adds the narrowing divide functions from TS 18661-1 to
glibc's libm: fdiv, fdivl, ddivl, f32divf64, f32divf32x, f32xdivf64
for all configurations; f32divf64x, f32divf128, f64divf64x,
f64divf128, f32xdivf64x, f32xdivf128, f64xdivf128 for configurations
with _Float64x and _Float128; __nldbl_ddivl for ldbl-opt.

The changes are mostly essentially the same as for the other narrowing
functions, so the description of those generally applies to this patch
as well.

Tested for x86_64, x86, mips64 (all three ABIs, both hard and soft
float) and powerpc, and with build-many-glibcs.py.

	* math/Makefile (libm-narrow-fns): Add div.
	(libm-test-funcs-narrow): Likewise.
	* math/Versions (GLIBC_2.28): Add narrowing divide functions.
	* math/bits/mathcalls-narrow.h (div): Use __MATHCALL_NARROW.
	* math/gen-auto-libm-tests.c (test_functions): Add div.
	* math/math-narrow.h (CHECK_NARROW_DIV): New macro.
	(NARROW_DIV_ROUND_TO_ODD): Likewise.
	(NARROW_DIV_TRIVIAL): Likewise.
	* sysdeps/ieee754/float128/float128_private.h (__fdivl): New
	macro.
	(__ddivl): Likewise.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fdiv and
	ddiv.
	(CFLAGS-nldbl-ddiv.c): New variable.
	(CFLAGS-nldbl-fdiv.c): Likewise.
	* sysdeps/ieee754/ldbl-opt/Versions (GLIBC_2.28): Add
	__nldbl_ddivl.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl_ddivl): New
	prototype.
	* manual/arith.texi (Misc FP Arithmetic): Document fdiv, fdivl,
	ddivl, fMdivfN, fMdivfNx, fMxdivfN and fMxdivfNx.
	* math/auto-libm-test-in: Add tests of div.
	* math/auto-libm-test-out-narrow-div: New generated file.
	* math/libm-test-narrow-div.inc: New file.
	* sysdeps/i386/fpu/s_f32xdivf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_f32xdivf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_fdiv.c: Likewise.
	* sysdeps/ieee754/float128/s_f32divf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64divf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64xdivf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_ddivl.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_f64xdivf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_fdivl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_ddivl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fdivl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_ddivl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_fdivl.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-ddiv.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-fdiv.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_ddivl.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fdiv.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fdivl.c: Likewise.
	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
	* sysdeps/mach/hurd/i386/libm.abilist: Likewise.
	* 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/riscv/rv64/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/x86_64/64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2018-05-17 00:40:52 +00:00

107 lines
4.7 KiB
Plaintext

%include <nldbl-abi.h>
%ifndef NLDBL_VERSION
% error "nldbl-abi.h must define NLDBL_VERSION"
%endif
libc {
NLDBL_VERSION {
# IEEE quad long double functions (older symver is for
# IEEE double long double).
ldexpl; copysignl; finitel; frexpl; isinfl; isnanl; modfl;
__isinfl; __isnanl; __finitel; __signbitl;
scalbnl;
qecvt; qfcvt; qgcvt; qecvt_r; qfcvt_r;
strtold; __strtold_internal; wcstold; __wcstold_internal;
__strtold_l; strtold_l; __wcstold_l; wcstold_l;
strfmon; __strfmon_l; strfmon_l;
__nldbl_strfmon; __nldbl___strfmon_l; __nldbl_strfmon_l;
__nldbl___vstrfmon; __nldbl___vstrfmon_l;
syslog; vsyslog;
__nldbl_syslog; __nldbl_vsyslog;
__nldbl___syslog_chk; __nldbl___vsyslog_chk;
# *printf* family, using IEEE quad long double
__asprintf; asprintf; dprintf; fprintf; fwprintf; _IO_fprintf;
_IO_printf; _IO_sprintf; _IO_vfprintf; _IO_vsprintf; obstack_printf;
obstack_vprintf; printf; __printf_fp; printf_size; snprintf; sprintf;
swprintf; vasprintf; vdprintf; vfprintf; vfwprintf; vprintf; vsnprintf;
__vsnprintf; vsprintf; vswprintf; vwprintf; wprintf;
# *printf* family, using IEEE double as long double
# The standard functions are __REDIRECTed to these if -mlong-double-64
__nldbl___asprintf; __nldbl_asprintf; __nldbl_dprintf; __nldbl_fprintf;
__nldbl_fwprintf; __nldbl__IO_fprintf; __nldbl__IO_printf;
__nldbl__IO_sprintf; __nldbl__IO_vfprintf; __nldbl__IO_vsprintf;
__nldbl_obstack_printf; __nldbl_obstack_vprintf; __nldbl_printf;
__nldbl___printf_fp; __nldbl_printf_size; __nldbl_snprintf;
__nldbl_sprintf; __nldbl_swprintf; __nldbl_vasprintf; __nldbl_vdprintf;
__nldbl_vfprintf; __nldbl_vfwprintf; __nldbl_vprintf; __nldbl_vsnprintf;
__nldbl___vsnprintf; __nldbl_vsprintf; __nldbl_vswprintf;
__nldbl_vwprintf; __nldbl_wprintf;
# *scanf family, using IEEE quad long double
_IO_sscanf; _IO_vfscanf; __vfscanf; __vsscanf; fscanf; fwscanf; scanf;
sscanf; swscanf; vfscanf; vfwscanf; vscanf; vsscanf; vswscanf; vwscanf;
wscanf;
# *scanf family, using IEEE double as long double
__nldbl__IO_sscanf; __nldbl__IO_vfscanf; __nldbl___vfscanf;
__nldbl___vsscanf; __nldbl_fscanf; __nldbl_fwscanf; __nldbl_scanf;
__nldbl_sscanf; __nldbl_swscanf; __nldbl_vfscanf; __nldbl_vfwscanf;
__nldbl_vscanf; __nldbl_vsscanf; __nldbl_vswscanf; __nldbl_vwscanf;
__nldbl_wscanf;
# checking versions, using IEEE quad long double
__sprintf_chk; __vsprintf_chk; __snprintf_chk; __vsnprintf_chk;
__printf_chk; __fprintf_chk; __vprintf_chk; __vfprintf_chk;
# checking versions, using IEEE double as long double
__nldbl___sprintf_chk; __nldbl___vsprintf_chk; __nldbl___snprintf_chk;
__nldbl___vsnprintf_chk; __nldbl___printf_chk; __nldbl___fprintf_chk;
__nldbl___vprintf_chk; __nldbl___vfprintf_chk;
__nldbl___swprintf_chk; __nldbl___vswprintf_chk; __nldbl___fwprintf_chk;
__nldbl___wprintf_chk; __nldbl___vfwprintf_chk; __nldbl___vwprintf_chk;
}
GLIBC_2.7 {
__nldbl___isoc99_scanf; __nldbl___isoc99_fscanf;
__nldbl___isoc99_sscanf; __nldbl___isoc99_vscanf;
__nldbl___isoc99_vfscanf; __nldbl___isoc99_vsscanf;
__nldbl___isoc99_wscanf; __nldbl___isoc99_fwscanf;
__nldbl___isoc99_swscanf; __nldbl___isoc99_vwscanf;
__nldbl___isoc99_vfwscanf; __nldbl___isoc99_vswscanf;
}
GLIBC_2.8 {
__nldbl___asprintf_chk; __nldbl___vasprintf_chk;
__nldbl___dprintf_chk; __nldbl___vdprintf_chk;
__nldbl___obstack_printf_chk; __nldbl___obstack_vprintf_chk;
}
}
libm {
NLDBL_VERSION {
# IEEE quad long double functions (older symver is for
# IEEE double as long double).
cabsl; cargl; cimagl; conjl; creall; cacosl; cacoshl; casinl;
catanl; catanhl; ccosl; ccoshl; casinhl; cexpl; clogl; __clog10l;
clog10l; cpowl; cprojl; csinl; csinhl; csqrtl; ctanl; ctanhl;
fdiml; fmal; fmaxl; fminl; ldexpl; nanl; nextafterl; nexttowardl;
significandl; acosl; acoshl; asinl; atan2l; atanhl; coshl; dreml;
exp10l; pow10l; exp2l; fmodl; hypotl; j0l; y0l; j1l; y1l; jnl; ynl;
lgammal; gammal; lgammal_r; logl; log10l; log2l; powl; remainderl;
scalbl; sinhl; sqrtl; tgammal; asinhl; atanl; cbrtl; ceill; copysignl;
erfl; erfcl; expm1l; fabsl; finitel; floorl; frexpl; ilogbl;
llrintl; llroundl; log1pl; logbl; lrintl; lroundl; modfl;
nearbyintl; remquol; rintl; roundl; scalblnl; scalbnl; sinl; cosl;
sincosl; tanl; tanhl; truncl; expl; __finitel; __signbitl;
__fpclassifyl; nexttowardf; nexttoward; __nldbl_nexttowardf;
}
GLIBC_2.28 {
# Functions taking long double = double argument and rounding
# result to double (same as f32x*f64 functions, but those names
# are not reserved in TS 18661-1).
__nldbl_daddl; __nldbl_ddivl; __nldbl_dmull; __nldbl_dsubl;
}
}