glibc/sysdeps/unix/sysv/linux/x86_64
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
..
64 Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
x32 Add narrowing divide functions. 2018-05-17 00:40:52 +00:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
__start_context.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
brk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
cancellation.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
clone.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
compat-timer.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
configure Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
configure.ac Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
dl-cache.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-procinfo.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
dl-procinfo.h x86: Set dl_platform and dl_hwcap from CPU features [BZ #21391] 2017-05-03 13:44:35 -07:00
get_clockfreq.c Update. 2003-05-09 07:53:33 +00:00
getcontext.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
init-first.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ipc_priv.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
kernel_stat.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
kernel-features.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ldconfig.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ldd-rewrite.sed Add x32 support to ldd-rewrite.sed 2012-03-19 15:18:44 -07:00
libc-cancellation.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libc-lowlevellock.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
libmvec.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
librt-cancellation.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
lll_timedlock_wait.c Split timed-wait functions out of nptl/lowlevellock.c. 2015-05-26 14:49:13 -07:00
lll_timedwait_tid.c Split timed-wait functions out of nptl/lowlevellock.c. 2015-05-26 14:49:13 -07:00
lowlevellock.h Define GEN_AS_CONST_HEADERS when generating header files [BZ #22792] 2018-02-23 11:29:39 -08:00
lowlevellock.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
makecontext.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Makefile Add x86 32 bit vDSO time function support 2015-01-12 16:03:58 -02:00
profil-counter.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pthread_setaffinity.c Move remaining nptl/sysdeps/unix/sysv/linux/x86_64/ files. 2014-05-14 12:33:43 -07:00
readelflib.c Add x32 support to ldconfig 2012-03-16 15:20:45 -07:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sched_setaffinity.c * sysdeps/unix/sysv/linux/sched_setaffinity.c 2007-05-10 23:38:55 +00:00
setcontext.S x86-64/setcontext: Pop the pointer into %rdx after syscall 2018-05-02 06:21:24 -07:00
sigaction.c linux: Consolidate sigaction implementation 2018-04-05 17:09:50 -03:00
sigaltstack-offsets.sym Use R*_LP, sizeSS, oSS_FLAGS, oSS_SP and oSS_SIZE 2012-05-15 16:43:11 -07:00
sigcontextinfo.h Remove unused frame.h header, sigcontextinfo.h macros. 2018-03-22 16:40:51 +00:00
sigprocmask.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
swapcontext.S x86-64/swapcontext: Restore the pointer into %rdx after syscall 2018-05-02 06:26:19 -07:00
syscall.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
syscalls.list Remove p{read,write}{v} and fallocate from x86 auto-generation list 2017-08-22 17:27:18 -03:00
sysdep.h x86_64: Fix build with RTLD_PRIVATE_ERRNO defined to 1 2018-03-18 02:11:56 +01:00
sysdep.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
timer_create.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
timer_delete.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
timer_getoverr.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
timer_gettime.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
timer_settime.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ucontext_i.sym . 2007-07-31 13:33:18 +00:00
Versions Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
vfork.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00