glibc/math/Makefile

481 lines
19 KiB
Makefile
Raw Normal View History

# Copyright (C) 1996-2017 Free Software Foundation, Inc.
1995-02-18 02:27:10 +01:00
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
1995-02-18 02:27:10 +01:00
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
1995-02-18 02:27:10 +01:00
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
update from main arhive 970119 Mon Jan 20 03:02:50 1997 Ulrich Drepper <drepper@cygnus.com> * Make-dist: Update and reformat copyright. * Makeconfig: Likewise. * assert/Makefile: Likewise. * bare/Makefile: Likewise. * ctype/Makefile: Likewise. * dirent/Makefile: Likewise. * gmon/Makefile: Likewise. * gnulib/Makefile: Likewise. * grp/Makefile: Likewise. * hurd/Makefile: Likewise. * intl/Makefile: Likewise. * mach/Makefile: Likewise. * malloc/Makefile: Likewise. * manual/Makefile: Likewise. * math/Makefile: Likewise. * po/Makefile: Likewise. * pwd/Makefile: Likewise. * resource/Makefile: Likewise. * setjmp/Makefile: Likewise. * socket/Makefile: Likewise. * string/Makefile: Likewise. * sunrpc/Makefile: Likewise. * sysdeps/alpha/Makefile: Likewise. * sysdeps/gnu/Makefile: Likewise. * sysdeps/m68k/fpu/switch/Makefile: Likewise. * sysdeps/m68k/fpu/switch/68881-sw.h: Likewise. * sysdeps/m68k/fpu/switch/switch.c: Likewise. * sysdeps/mach/Makefile: Likewise. * sysdeps/hurd/Makefile: Likewise. * sysdeps/sparc/Makefile: Likewise. * sysdeps/standalone/i960/nindy960/Makefile: Likewise. * sysdeps/standalone/m68k/m68020/mvme136/Makefile: Likewise. * sysdeps/unix/common/Makefile: Likewise. * sysdeps/unix/sysv/Makefile: Likewise. * sysdeps/unix/sysv/irix4/Makefile: Likewise. * sysdeps/unix/sysv/sco3.2/Makefile: Likewise. * sysdeps/unix/sysv/sysv4/Makefile: Likewise. * sysdeps/vax/Makefile: Likewise. * sysvipc/Makefile: Likewise. * wcsmbs/Makefile: Likewise. * wctype/Makefile: Likewise. * elf/rtld.c (dl_main): Objects in LD_PRELOAD environment variable are separated according to Sun docs by white space not colon. * locale/C-time.c (_nl_C_LC_TIME): Use empty string to initialize fields which are not defined for the C locale. * sysdeps/m68k/fpu/switch/Makefile: Don't use ansidecl.h in constructed files. * sysdeps/m68k/fpu/switch/68881-sw.h: Likewise. * sysdeps/m68k/fpu/switch/switch.c: Likewise. Sun Jan 19 19:43:31 1997 Andreas Jaeger <aj@arthur.pfalz.de> * time/strptime.c: Provide prototype for strptime_internal. Sun Jan 19 23:46:27 1997 Ulrich Drepper <drepper@cygnus.com> * glibcbug.in: We don't guarantee confidential handling. Set field to always contain `no'. Sun Jan 19 21:28:01 1997 Philippe De Muyter <phdm@info.ucl.ac.be> * intl/explodename.c: Include sys/types.h. * intl/l10nflist.c: Likewise. Sat Jan 18 22:15:26 1997 Richard Henderson <rth@tamu.edu> * config.make.in (install_root): New variable to make it easy to install glibc somewhere other than /. * shlib-versions: alpha-*-linux-* libc=6.1. Since sigset_t no longer fits in a register, we can't pass in the thread's initial mask so easily. Take this opportunity to simplify the clone implementation by only accepting a single void* argument. * sysdeps/unix/sysv/linux/alpha/clone.S: Only take one argument. * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. * sysdeps/unix/sysv/linux/m68k/clone.S: Likewise. * sysdeps/unix/sysv/linux/sparc/clone.S: Likewise. * sysdeps/unix/sysv/linux/schedbits.h: Update clone prototypes. * sysdeps/unix/sysv/linux/alpha/ioctl-types.h: Remove. Default Linux version should be sufficient. * sysdeps/unix/sysv/linux/alpha/sigprocmask.c: The osf_sigprocmask system call wants the sigset dereferenced. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add entries for __syscall_ustat and __syscall_xmknod. * sysdeps/unix/sysv/linux/alpha/xmknod.c: Include sys/sysmacros.h. * sysdeps/unix/sysv/linux/sigset.h: Use longs instead of ints. * sysdeps/unix/sysv/linux/tcsetattr.c: Fix pointer dereferences. * sysdeps/unix/sysv/linux/alpha/sigsuspend.c: Add comment about dependency to kernel type. * sysdeps/unix/sysv/linux/alpha/termbits.h: Correct comment.
1997-01-20 03:49:49 +01:00
# Makefile for the math library.
1995-02-18 02:27:10 +01:00
subdir := math
Consistently include Makeconfig after defining subdir. In <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html> I noted it was necessary to add includes of Makeconfig early in various subdirectory makefiles for the tests-special variable settings added by that patch to be conditional on configuration information. No-one commented on the general question there of whether Makeconfig should always be included immediately after the definition of subdir. This patch implements that early inclusion of Makeconfig in each directory (which is a lot easier than consistent placement of includes of Rules). Includes are added if needed, or moved up if already present. Subdirectory "all:" targets are removed, since Makeconfig provides one. There is potential for further cleanups I haven't done. Rules and Makerules have code such as ifneq "$(findstring env,$(origin headers))" "" headers := endif to override to empty any value of various variables that came from the environment. I think there is a case for Makeconfig setting all the subdirectory variables (other than subdir) to empty to ensure no outside value is going to take effect if a subdirectory fails to define a variable. (A list of such variables, possibly out of date and incomplete, is in manual/maint.texi.) Rules and Makerules would give errors if Makeconfig hadn't already been included, instead of including it themselves. The special code to override values coming from the environment would then be obsolete and could be removed. Tested x86_64, including that installed binaries are identical before and after the patch. * argp/Makefile: Include Makeconfig immediately after defining subdir. * assert/Makefile: Likewise. * benchtests/Makefile: Likewise. * catgets/Makefile: Likewise. * conform/Makefile: Likewise. * crypt/Makefile: Likewise. * csu/Makefile: Likewise. (all): Remove target. * ctype/Makefile: Include Makeconfig immediately after defining subdir. * debug/Makefile: Likewise. * dirent/Makefile: Likewise. * dlfcn/Makefile: Likewise. * gmon/Makefile: Likewise. * gnulib/Makefile: Likewise. * grp/Makefile: Likewise. * gshadow/Makefile: Likewise. * hesiod/Makefile: Likewise. * hurd/Makefile: Likewise. (all): Remove target. * iconvdata/Makefile: Include Makeconfig immediately after defining subdir. * inet/Makefile: Likewise. * intl/Makefile: Likewise. * io/Makefile: Likewise. * libio/Makefile: Likewise. (all): Remove target. * locale/Makefile: Include Makeconfig immediately after defining subdir. * login/Makefile: Likewise. * mach/Makefile: Likewise. (all): Remove target. * malloc/Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. * manual/Makefile: Include Makeconfig immediately after defining subdir. * math/Makefile: Likewise. * misc/Makefile: Likewise. * nis/Makefile: Likewise. * nss/Makefile: Likewise. * po/Makefile: Likewise. (all): Remove target. * posix/Makefile: Include Makeconfig immediately after defining subdir. * pwd/Makefile: Likewise. * resolv/Makefile: Likewise. * resource/Makefile: Likewise. * rt/Makefile: Likewise. * setjmp/Makefile: Likewise. * shadow/Makefile: Likewise. * signal/Makefile: Likewise. * socket/Makefile: Likewise. * soft-fp/Makefile: Likewise. * stdio-common/Makefile: Likewise. * stdlib/Makefile: Likewise. * streams/Makefile: Likewise. * string/Makefile: Likewise. * sunrpc/Makefile: Likewise. (all): Remove target. * sysvipc/Makefile: Include Makeconfig immediately after defining subdir. * termios/Makefile: Likewise. * time/Makefile: Likewise. * timezone/Makefile: Likewise. (all): Remove target. * wcsmbs/Makefile: Include Makeconfig immediately after defining subdir. * wctype/Makefile: Likewise. libidn/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. localedata/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. nptl/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. nptl_db/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir.
2014-02-27 00:12:03 +01:00
include ../Makeconfig
# Installed header files.
Update. 1997-06-21 02:48 Ulrich Drepper <drepper@cygnus.com> * config.h.in: Add DO_STATIC_NSS. * config.make.in: Add build-static-nss. * elf/eval.c: Use __getdelim instead of __getline. * locale/programs/locale.c: Correct comment. * manual/libc.texinfo: Update copyright and date. Remove A4 option. * sysdeps/libm-ieee754/k_standard.c: Always return HUGE_VAL for gamma overflow. * sysdeps/libm-ieee754/w_gamma.c: Handle SVID and ISO C behaviour. * sysdeps/libm-ieee754/w_gammaf.c: Likewise. * sysdeps/libm-ieee754/w_gammalp.c: Likewise. * po/ko.po: Update. 1997-06-13 10:06 Richard Henderson <rth@tamu.edu> The Great Bit File Move: * configure.in (AC_INIT): Look in include/ for features.h. (sysnames): Add include as the final search directory. (AC_OUTPUT): Create a bits directory in the build directory. * Makeconfig (CPPFLAGS): Look in include/ for libc-symbols.h. * Makefile: Make sure the target directory exists when installing <gnu/stubs.h> and <gnu/lib-names.h>. * csu/Makefile: Use $(compile.S) and $(compile.c) instead of invoking $(CC) directly, as the former have the full include path. * ansidecl.h: Removed. * aliases.h: Moved to include/. * alloca.h: Likewise. * argp.h: Likewise. * argz.h: Likewise. * arpa/ftp.h: Likewise. * arpa/inet.h: Likewise. * arpa/nameser.h: Likewise. * arpa/telnet.h: Likewise. * arpa/tftp.h: Likewise. * assert.h: Likewise. * ctype.h: Likewise. * db.h: Likewise. * dirent.h: Likewise. * dlfcn.h: Likewise. * elf.h: Likewise. * endian.h: Likewise. * envz.h: Likewise. * err.h: Likewise. * errno.h: Likewise. * error.h: Likewise. * fcntl.h: Likewise. * features.h: Likewise. * fnmatch.h: Likewise. * ftw.h: Likewise. * getopt.h: Likewise. * glob.h: Likewise. * gnu-versions.h: Likewise. * grp.h: Likewise. * langinfo.h: Likewise. * libc-symbols.h: Likewise. * libgen.h: Likewise. * libintl.h: Likewise. * limits.h: Likewise. * linewrap.h: Likewise. * link.h: Likewise. * locale.h: Likewise. * malloc.h: Likewise. * math.h: Likewise. * mathcalls.h: Likewise. * mcheck.h: Likewise. * memory.h: Likewise. * netdb.h: Likewise. * netgroup.h: Likewise. * netinet/ether.h: Likewise. * netinet/in.h: Likewise. * nlist.h: Likewise. * nss.h: Likewise. * nsswitch.h: Likewise. * obstack.h: Likewise. * poll.h: Likewise. * posix1_lim.h: Likewise. * posix2_lim.h: Likewise. * printf.h: Likewise. * protocols/routed.h: Likewise. * protocols/rwhod.h: Likewise. * protocols/talkd.h: Likewise. * protocols/timed.h: Likewise. * pwd.h: Likewise. * regex.h: Likewise. * resolv.h: Likewise. * rpc/auth_unix.h: Likewise. * rpc/clnt.h: Likewise. * rpc/netdb.h: Likewise. * rpc/pmap_clnt.h: Likewise. * rpc/pmap_prot.h: Likewise. * rpc/pmap_rmt.h: Likewise. * rpc/rpc.h: Likewise. * rpc/rpc_msg.h: Likewise. * rpc/svc.h: Likewise. * rpc/svc_auth.h: Likewise. * rpc/types.h: Likewise. * rpc/xdr.h: Likewise. * sched.h: Likewise. * search.h: Likewise. * set-hooks.h: Likewise. * setjmp.h: Likewise. * sgtty.h: Likewise. * shadow.h: Likewise. * signal.h: Likewise. * stab.def: Likewise. * stab.h: Likewise. * stdio.h: Likewise. * stdlib.h: Likewise. * string.h: Likewise. * strings.h: Likewise. * sys/bitypes.h: Likewise. * sys/cdefs.h: Likewise. * sys/dir.h: Likewise. * sys/errno.h: Likewise. * sys/fcntl.h: Likewise. * sys/file.h: Likewise. * sys/gmon.h: Likewise. * sys/ioctl.h: Likewise. * sys/ipc.h: Likewise. * sys/msg.h: Likewise. * sys/poll.h: Likewise. * sys/queue.h: Likewise. * sys/resource.h: Likewise. * sys/select.h: Likewise. * sys/sem.h: Likewise. * sys/shm.h: Likewise. * sys/signal.h: Likewise. * sys/socket.h: Likewise. * sys/stat.h: Likewise. * sys/statfs.h: Likewise. * sys/syslog.h: Likewise. * sys/termios.h: Likewise. * sys/time.h: Likewise. * sys/timeb.h: Likewise. * sys/times.h: Likewise. * sys/types.h: Likewise. * sys/uio.h: Likewise. * sys/un.h: Likewise. * sys/unistd.h: Likewise. * sys/utsname.h: Likewise. * sys/vlimit.h: Likewise. * sys/vtimes.h: Likewise. * sys/wait.h: Likewise. * syscall.h: Likewise. * syslog.h: Likewise. * tar.h: Likewise. * termios.h: Likewise. * time.h: Likewise. * ttyent.h: Likewise. * unistd.h: Likewise. * utime.h: Likewise. * utmp.h: Likewise. * values.h: Likewise. * wchar.h: Likewise. * wctype.h: Likewise. * wordexp.h: Likewise. * xlocale.h: Likewise. * xopen_lim.h: Likewise. * linuxthreads/sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h. * linuxthreads/sysdeps/powerpc/semaphorebits.h: Likewise. * linuxthreads/sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise. * linuxthreads/sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise. * linuxthreads/sysdeps/pthread/libc-lock.h: -> bits/ * sysdeps/mach/libc-lock.h: Likewise. * sysdeps/stub/libc-lock.h: Likewise. * linuxthreads/sysdeps/pthread/stdio-lock.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/local_lim.h: Likewise. * sysdeps/mach/hurd/local_lim.h: Likewise. * sysdeps/stub/local_lim.h: Likewise. * sysdeps/unix/sysv/linux/local_lim.h: Likewise. * sysdeps/unix/sysv/local_lim.h: Likewise. * sysdeps/unix/sysv/sco3.2/local_lim.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/posix_opt.h: Likewise. * sysdeps/mach/hurd/posix_opt.h: Likewise. * sysdeps/stub/posix_opt.h: Likewise. * sysdeps/unix/bsd/posix_opt.h: Likewise. * sysdeps/unix/bsd/ultrix4/posix_opt.h: Likewise. * sysdeps/unix/sysv/linux/posix_opt.h: Likewise. * math/cmathcalls.h: -> bits/ * math/mathcalls.h: Likewise. * misc/stab.def: -> bits/ * posix/posix1_lim.h: -> bits/ * posix/posix2_lim.h: Likewise. * sysdeps/alpha/__math.h: -> .../fpu/bits/mathinline.h * sysdeps/i386/fpu/__math.h: Likewise. * sysdeps/m68k/fpu/__math.h: Likewise. * sysdeps/m68k/fpu/switch/__math.h: Likewise. * sysdeps/powerpc/__math.h: Likewise. * sysdeps/stub/__math.h: Likewise. * sysdeps/alpha/bytesex.h: -> .../bits/endian.h * sysdeps/arm/bytesex.h: Likewise. * sysdeps/i386/bytesex.h: Likewise. * sysdeps/m68k/bytesex.h: Likewise. * sysdeps/mips/bytesex.h: Likewise. * sysdeps/mips/dec/bytesex.h: Likewise. * sysdeps/mips/mipsel/bytesex.h: Likewise. * sysdeps/mips/p40/bytesex.h: Likewise. * sysdeps/sparc/bytesex.h: Likewise. * sysdeps/stub/bytesex.h: Likewise. * sysdeps/alpha/fpu/fenvbits.h: -> .../bits/fenv.h * sysdeps/i386/fpu/fenvbits.h: Likewise. * sysdeps/m68k/fpu/fenvbits.h: Likewise. * sysdeps/powerpc/fenvbits.h: Likewise. * sysdeps/stub/fenvbits.h: Likewise. * sysdeps/alpha/jmp_buf.h: -> .../bits/setenv.h * sysdeps/arm/jmp_buf.h: Likewise. * sysdeps/i386/jmp_buf.h: Likewise. * sysdeps/m68k/jmp_buf.h: Likewise. * sysdeps/mips/jmp_buf.h: Likewise. * sysdeps/sparc/jmp_buf.h: Likewise. * sysdeps/powerpc/jmp_buf.h: Likewise. * sysdeps/stub/jmp_buf.h: Likewise. * sysdeps/vax/jmp_buf.h: Likewise. * sysdeps/generic/confname.h: -> bits/ * sysdeps/unix/sysv/irix4/confname.h: Likewise. * sysdeps/unix/sysv/sco3.2.4/confname.h: Likewise. * sysdeps/generic/gnu/types.h: -> ../bits/types.h * sysdeps/unix/sysv/linux/alpha/gnu/types.h: Likewise. * sysdeps/unix/sysv/linux/gnu/types.h: Likewise. * sysdeps/generic/ioctl-types.h: -> bits/ * sysdeps/unix/sysv/linux/ioctl-types.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Likewise. * sysdeps/generic/iovec.h: -> .../bits/uio.h * sysdeps/unix/sysv/linux/iovec.h: Likewise. * sysdeps/generic/mathbits.h: -> .../bits/mathdef.h * sysdeps/i386/fpu/mathbits.h: Likewise. * sysdeps/m68k/fpu/mathbits.h: Likewise. * sysdeps/powerpc/mathbits.h: Likewise. * sysdeps/generic/resourcebits.h: -> .../bits/resource.h * sysdeps/unix/bsd/sun/sunos4/resourcebits.h: Likewise. * sysdeps/unix/sysv/linux/resourcebits.h: Likewise. * sysdeps/generic/schedbits.h: -> .../bits/sched.h * sysdeps/unix/sysv/linux/schedbits.h: Likewise. * sysdeps/generic/selectbits.h: -> .../bits/select.h * sysdeps/i386/selectbits.h: Likewise. * sysdeps/generic/sigaction.h: -> bits/ * sysdeps/unix/bsd/osf/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sigaction.h: Likewise. * sysdeps/unix/sysv/minix/sigaction.h: Likewise. * sysdeps/unix/sysv/sco3.2.4/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/sigaction.h: Likewise. * sysdeps/generic/sigset.h: -> bits/ * sysdeps/unix/sysv/linux/sigset.h: Likewise. * sysdeps/unix/sysv/sysv4/sigset.h: Likewise. * sysdeps/generic/sockaddrcom.h: -> .../bits/sockaddr.h * sysdeps/unix/bsd/bsd4.4/sockaddrcom.h: Likewise. * sysdeps/generic/socketbits.h: -> .../bits/socket.h * sysdeps/unix/sysv/linux/socketbits.h: Likewise. * sysdeps/generic/statfsbuf.h: -> .../bits/statfs.h * sysdeps/unix/sysv/linux/statfsbuf.h: Likewise. * sysdeps/generic/termbits.h: -> .../bits/termios.h * sysdeps/unix/bsd/sun/sunos4/termbits.h: Likewise. * sysdeps/unix/sysv/linux/alpha/termbits.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/termbits.h: Likewise. * sysdeps/unix/sysv/linux/sparc/termbits.h: Likewise. * sysdeps/unix/sysv/linux/termbits.h: Likewise. * sysdeps/generic/ustatbits.h: -> .../bits/ustat.h * sysdeps/unix/sysv/linux/ustatbits.h: Likewise. * sysdeps/generic/utmpbits.h: -> .../bits/utmp.h * sysdeps/gnu/utmpbits.h: Likewise. * sysdeps/unix/sysv/utmpbits.h: Likewise. * sysdeps/generic/utsnamelen.h: -> .../bits/utsname.h * sysdeps/unix/bsd/sun/sunos4/utsnamelen.h: Likewise. * sysdeps/unix/bsd/ultrix4/utsnamelen.h: Likewise. * sysdeps/unix/sysv/linux/utsnamelen.h: Likewise. * sysdeps/unix/sysv/sysv4/utsnamelen.h: Likewise. * sysdeps/unix/sysv/utsnamelen.h: Likewise. * sysdeps/generic/waitstatus.h: -> bits/ * sysdeps/i386/huge_val.h: -> bits/ * sysdeps/ieee754/huge_val.h: Likewise. * sysdeps/m68k/huge_val.h: Likewise. * sysdeps/stub/huge_val.h: Likewise. * sysdeps/vax/huge_val.h: Likewise. * sysdeps/ieee754/nan.h: Likewise. * sysdeps/stub/nan.h: Likewise. * sysdeps/mach/hurd/alpha/sigcontext.h: -> bits/ * sysdeps/mach/hurd/hppa/sigcontext.h: Likewise. * sysdeps/mach/hurd/i386/sigcontext.h: Likewise. * sysdeps/mach/hurd/mips/sigcontext.h: Likewise. * sysdeps/stub/sigcontext.h: Likewise. * sysdeps/unix/bsd/sun/m68k/sigcontext.h: Likewise. * sysdeps/unix/bsd/sun/sparc/sigcontext.h: Likewise. * sysdeps/unix/bsd/ultrix4/mips/sigcontext.h: Likewise. * sysdeps/unix/sysv/linux/sigcontext.h: Likewise. * sysdeps/mach/hurd/errnos.h: -> .../bits/errno.h * sysdeps/standalone/arm/errnos.h: Likewise. * sysdeps/stub/errnos.h: Likewise. * sysdeps/unix/bsd/bsd4.4/errnos.h: Likewise. * sysdeps/unix/sysv/linux/errnos.h: Likewise. * sysdeps/mach/hurd/fcntlbits.h: -> .../bits/fcntl.h * sysdeps/stub/fcntlbits.h: Likewise. * sysdeps/unix/bsd/bsd4.4/fcntlbits.h: Likewise. * sysdeps/unix/bsd/fcntlbits.h: Likewise. * sysdeps/unix/bsd/sun/sunos4/fcntlbits.h: Likewise. * sysdeps/unix/bsd/ultrix4/fcntlbits.h: Likewise. * sysdeps/unix/common/fcntlbits.h: Likewise. * sysdeps/unix/sysv/fcntlbits.h: Likewise. * sysdeps/unix/sysv/irix4/fcntlbits.h: Likewise. * sysdeps/unix/sysv/linux/alpha/fcntlbits.h: Likewise. * sysdeps/unix/sysv/linux/fcntlbits.h: Likewise. * sysdeps/unix/sysv/linux/sparc/fcntlbits.h: Likewise. * sysdeps/mach/hurd/ioctls.h: -> bits/ * sysdeps/stub/ioctls.h: Likewise. * sysdeps/unix/bsd/bsd4.4/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/alpha/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/ioctls.h: Likewise. * sysdeps/unix/sysv/linux/sparc/ioctls.h: Likewise. * sysdeps/mach/hurd/statbuf.h: -> .../bits/stat.h * sysdeps/stub/statbuf.h: Likewise. * sysdeps/unix/bsd/osf/alpha/statbuf.h: Likewise. * sysdeps/unix/bsd/statbuf.h: Likewise. * sysdeps/unix/sysv/irix4/statbuf.h: Likewise. * sysdeps/unix/sysv/linux/alpha/statbuf.h: Likewise. * sysdeps/unix/sysv/linux/statbuf.h: Likewise. * sysdeps/unix/sysv/statbuf.h: Likewise. * sysdeps/unix/sysv/sysv4/i386/statbuf.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/statbuf.h: Likewise. * sysdeps/standalone/stdio_lim.h: -> bits/ * sysdeps/stub/stdio_lim.h: Likewise. * sysdeps/stub/direntry.h: -> ../bits/dirent.h * sysdeps/unix/bsd/bsd4.4/direntry.h: Likewise. * sysdeps/unix/bsd/direntry.h: Likewise. * sysdeps/unix/common/direntry.h: Likewise. * sysdeps/unix/sysv/direntry.h: Likewise. * sysdeps/unix/sysv/linux/direntry.h: Likewise. * sysdeps/stub/elfclass.h: -> bits/ * sysdeps/wordsize-32/elfclass.h: Likewise. * sysdeps/wordsize-64/elfclass.h: Likewise. * sysdeps/stub/signum.h: -> bits/ * sysdeps/unix/bsd/signum.h: Likewise. * sysdeps/unix/bsd/sun/signum.h: Likewise. * sysdeps/unix/sysv/irix4/signum.h: Likewise. * sysdeps/unix/sysv/linux/alpha/signum.h: Likewise. * sysdeps/unix/sysv/linux/signum.h: Likewise. * sysdeps/unix/sysv/linux/sparc/signum.h: Likewise. * sysdeps/unix/sysv/signum.h: Likewise. * sysdeps/unix/sysv/sysv4/signum.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/signum.h: Likewise. * sysdeps/stub/sys/ipc_buf.h: -> .../bits/ipc.h * sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h: Likewise. * sysdeps/unix/sysv/linux/sys/ipc_buf.h: Likewise. * sysdeps/stub/sys/msq_buf.h: -> .../bits/msq.h * sysdeps/unix/sysv/linux/sys/msq_buf.h: Likewise. * sysdeps/stub/sys/sem_buf.h: -> .../bits/sem.h * sysdeps/unix/sysv/linux/sys/sem_buf.h: Likewise. * sysdeps/stub/sys/shm_buf.h: -> .../bits/shm.h * sysdeps/unix/sysv/linux/sys/shm_buf.h: Likewise. * sysdeps/stub/timebits.h: -> .../bits/time.h * sysdeps/unix/sysv/linux/alpha/timebits.h: Likewise. * sysdeps/unix/sysv/linux/timebits.h: Likewise. * sysdeps/stub/waitflags.h: -> bits/ * sysdeps/unix/bsd/waitflags.h: Likewise. * sysdeps/unix/sysv/linux/waitflags.h: Likewise. * sysdeps/unix/sysv/sysv4/waitflags.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h: -> ../ * sysdeps/unix/sysv/linux/powerpc/sys/kernel_termios.h: Likewise. * sysdeps/unix/sysv/linux/sys/kernel_termios.h: Likewise. * sysdeps/unix/sysv/linux/sys/socketcall.h: -> ../ * argp/argp-fmtstream.h: Standardize the multiple-include protect. * argp/argp.h: Likewise. * catgets/nl_types.h: Likewise. * crypt/sysdeps/unix/crypt.h: Likewise. * ctype/ctype.h: Likewise. * db/db.h: Likewise. * db/mpool.h: Likewise. * db/ndbm.h: Likewise. * dirent/dirent.h: Likewise. * elf/dlfcn.h: Likewise. * elf/elf.h: Likewise. * elf/link.h: Likewise. * gmon/sys/gmon.h: Likewise. * gmon/sys/gmon_out.h: Likewise. * grp/grp.h: Likewise. * inet/aliases.h: Likewise. * inet/arpa/ftp.h: Likewise. * inet/arpa/inet.h: Likewise. * inet/arpa/telnet.h: Likewise. * inet/arpa/tftp.h: Likewise. * inet/netinet/ether.h: Likewise. * inet/netinet/icmp6.h: Likewise. * inet/netinet/in.h: Likewise. * inet/netinet/ip6.h: Likewise. * inet/protocols/routed.h: Likewise. * inet/protocols/rwhod.h: Likewise. * inet/protocols/talkd.h: Likewise. * inet/protocols/timed.h: Likewise. * intl/libintl.h: Likewise. * io/fcntl.h: Likewise. * io/fts.h: Likewise. * io/ftw.h: Likewise. * io/sys/poll.h: Likewise. * io/sys/stat.h: Likewise. * io/sys/statfs.h: Likewise. * io/utime.h: Likewise. * linuxthreads/semaphore.h: Likewise. * linuxthreads/sysdeps/pthread/pthread.h: Likewise. * locale/locale.h: Likewise. * login/pty.h: Likewise. * login/utmp.h: Likewise. * malloc/malloc.h: Likewise. * malloc/obstack.h: Likewise. * math/complex.h: Likewise. * math/fenv.h: Likewise. * math/math.h: Likewise. * md5-crypt/md5.h: Likewise. * misc/ar.h: Likewise. * misc/err.h: Likewise. * misc/error.h: Likewise. * misc/fstab.h: Likewise. * misc/libgen.h: Likewise. * misc/nlist.h: Likewise. * misc/sys/cdefs.h: Likewise. * misc/sys/file.h: Likewise. * misc/sys/ioctl.h: Likewise. * misc/sys/queue.h: Likewise. * misc/sys/select.h: Likewise. * misc/sys/syslog.h: Likewise. * misc/sys/uio.h: Likewise. * misc/sysexits.h: Likewise. * misc/ttyent.h: Likewise. * nss/nss.h: Likewise. * posix/fnmatch.h: Likewise. * posix/getopt.h: Likewise. * posix/glob.h: Likewise. * posix/regex.h: Likewise. * posix/sys/times.h: Likewise. * posix/sys/types.h: Likewise. * posix/sys/utsname.h: Likewise. * posix/sys/wait.h: Likewise. * posix/tar.h: Likewise. * posix/unistd.h: Likewise. * posix/wordexp.h: Likewise. * pwd/pwd.h: Likewise. * resolv/arpa/nameser.h: Likewise. * resolv/netdb.h: Likewise. * resolv/resolv.h: Likewise. * resource/sys/resource.h: Likewise. * resource/sys/vlimit.h: Likewise. * resource/sys/vtimes.h: Likewise. * setjmp/setjmp.h: Likewise. * shadow/shadow.h: Likewise. * socket/sys/socket.h: Likewise. * socket/sys/un.h: Likewise. * stdlib/exit.h: Likewise. * stdlib/fmtmsg.h: Likewise. * stdlib/monetary.h: Likewise. * stdlib/stdlib.h: Likewise. * string/argz.h: Likewise. * string/envz.h: Likewise. * string/memory.h: Likewise. * string/string.h: Likewise. * string/strings.h: Likewise. * sunrpc/rpc/rpc.h: Likewise. * sunrpc/rpc/svc.h: Likewise. * sunrpc/rpc/types.h: Likewise. * sunrpc/rpc/xdr.h: Likewise. * termios/sys/ttychars.h: Likewise. * termios/termios.h: Likewise. * argp/argp-parse.c: <foo.h> -> <bits/foo.h>. * crypt/sysdeps/unix/crypt_util.c: Likewise. * dirent/dirent.h: Likewise. * elf/link.h: Likewise. * grp/fgetgrent.c: Likewise. * grp/grp.h: Likewise. * hurd/hurd/ioctl.h: Likewise. * inet/getnameinfo.c: Likewise. * inet/getnetgrent_r.c: Likewise. * inet/inet_ntoa.c: Likewise. * inet/netinet/in.h: Likewise. * io/fcntl.h: Likewise. * io/ftw.h: Likewise. * io/sys/stat.h: Likewise. * io/sys/statfs.h: Likewise. * io/utime.h: Likewise. * libio/_G_config.h: Likewise. * libio/libio.h: Likewise. * libio/libioP.h: Likewise. * libio/stdio.h: Likewise. * linuxthreads/lockfile.c: Likewise. * linuxthreads/semaphore.h: Likewise. * locale/duplocale.c: Likewise. * locale/freelocale.c: Likewise. * locale/lc-time.c: Likewise. * locale/setlocale.c: Likewise. * login/getutent_r.c: Likewise. * login/getutid_r.c: Likewise. * login/getutline_r.c: Likewise. * login/lastlog.h: Likewise. * login/pty.h: Likewise. * login/utmp.h: Likewise. * login/utmpname.c: Likewise. * malloc/mtrace.c: Likewise. * malloc/thread-m.h: Likewise. * math/complex.h: Likewise. * math/fenv.h: Likewise. * math/libm-test.c: Likewise. * math/math.h: Likewise. * misc/sgtty.h: Likewise. * misc/stab.h: Likewise. * misc/sys/ioctl.h: Likewise. * misc/sys/select.h: Likewise. * misc/sys/uio.h: Likewise. * misc/sys/ustat.h: Likewise. * misc/syslog.c: Likewise. * nis/nss_compat/compat-grp.c: Likewise. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nis/nss_nis/nis-alias.c: Likewise. * nis/nss_nis/nis-ethers.c: Likewise. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-netgrp.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-publickey.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-service.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise. * nss_nisplus/nisplus-alias.c: Likewise. * nis/nss_nisplus/nisplus-ethers.c: Likewise. * nis/nss_nisplus/nisplus-grp.c: Likewise. * nis/nss_nisplus/nisplus-hosts.c: Likewise. * nis/nss_nisplus/nisplus-netgrp.c: Likewise. * nis/nss_nisplus/nisplus-netgrp.c: Likewise. * nis/nss_nisplus/nisplus-proto.c: Likewise. * nis/nss_nisplus/nisplus-pwd.c: Likewise. * nis/nss_nisplus/nisplus-rpc.c: Likewise. * nis/nss_nisplus/nisplus-service.c: Likewise. * nis/nss_nisplus/nisplus-spwd.c: Likewise. * nis/ypclnt.c: Likewise. * nss/getXXbyYY.c: Likewise. * nss/getXXent.c: Likewise. * nss/getXXent_r.c: Likewise. * nss/nss_db/db-XXX.c: Likewise. * nss/nss_db/db-alias.c: Likewise. * nss/nss_db/db-netgrp.c: Likewise. * nss/nss_files/files-XXX.c: Likewise. * nss/nss_files/files-alias.c: Likewise. * nss/nsswitch.c: Likewise. * posix/sched.h: Likewise. * posix/sys/types.h: Likewise. * posix/sys/utsname.h: Likewise. * posix/sys/wait.h: Likewise. * posix/unistd.h: Likewise. * pwd/fgetpwent.c: Likewise. * pwd/pwd.h: Likewise. * resource/sys/resource.h: Likewise. * setjmp/setjmp.h: Likewise. * shadow/fgetspent.c: Likewise. * shadow/lckpwdf.c: Likewise. * shadow/sgetspent.c: Likewise. * signal/signal.h: Likewise. * signal/sigsetops.c: Likewise. * socket/sys/socket.h: Likewise. * socket/sys/un.h: Likewise. * stdio/stdio.h: Likewise. * stdio-common/vfprintf.c: Likewise. * stdio-common/vfscanf.c: Likewise. * stdlib/atexit.c: Likewise. * stdlib/fmtmsg.c: Likewise. * stdlib/random.c: Likewise. * string/endian.h: Likewise. * sysdeps/alpha/w_sqrt.S: Likewise. * sysdeps/arm/__longjmp.S: Likewise. * sysdeps/arm/setjmp.S: Likewise. * sysdeps/generic/abort.c: Likewise. * sysdeps/generic/netinet/ip.h: Likewise. * sysdeps/generic/setenv.c: Likewise. * generic/sys/mman.h: Likewise. * sysdeps/i386/__longjmp.S: Likewise. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/mach/hurd/dirstream.h: Likewise. * sysdeps/mach/hurd/jmp-unwind.c: Likewise. * sysdeps/posix/mk-stdiolim.c: Likewise. * sysdeps/powerpc/__longjmp.S: Likewise. * sysdeps/powerpc/setjmp.S: Likewise. * sysdeps/sparc/__longjmp.S: Likewise. * sysdeps/sparc/setjmp.S: Likewise. * sysdeps/standalone/close.c: Likewise. * sysdeps/standalone/filedesc.h: Likewise. * sysdeps/standalone/open.c: Likewise. * sysdeps/unix/bsd/bsd4.4/tcsetattr.c: Likewise. * sysdeps/unix/bsd/m68k/sysdep.S: Likewise. * sysdeps/unix/bsd/osf/sys/mman.h: Likewise. * sysdeps/unix/bsd/sun/m68k/sethostid.S: Likewise. * sysdeps/unix/bsd/sun/sparc/sethostid.S: Likewise. * sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise. * sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise. * sysdeps/unix/bsd/vax/sysdep.S: Likewise. * sysdeps/unix/dirstream.h: Likewise. * sysdeps/unix/i386/sysdep.S: Likewise. * sysdeps/unix/mips/sysdep.S: Likewise. * sysdeps/unix/mk-local_lim.c: Likewise. * sysdeps/unix/sparc/sysdep.S: Likewise. * sysdeps/unix/sysv/irix4/sys/mman.h: Likewise. * sysdeps/unix/sysv/linux/alpha/brk.S: Likewise. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/unix/sysv/linux/arm/clone.S: Likewise. * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. * sysdeps/unix/sysv/linux/m68k/clone.S: Likewise. * sysdeps/unix/sysv/linux/netinet/ip.h: Likewise. * sysdeps/unix/sysv/linux/netinet/tcp.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/clone.S: Likewise. * sysdeps/unix/sysv/linux/sys/mman.h: Likewise. * sysdeps/unix/sysv/linux/sys/syscall.h: Likewise. * sysdeps/unix/sysv/linux/tcgetattr.c: Likewise. * sysdeps/unix/sysv/sco3.2.4/sysconf.S: Likewise. * sysdeps/unix/sysv/sysv4/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S: Likewise. * sysvipc/sys/ipc.h: Likewise. * sysvipc/sys/msg.h: Likewise. * sysvipc/sys/sem.h: Likewise. * sysvipc/sys/shm.h: Likewise. * termios/termios.h: Likewise. * time/localtime.c: Likewise. * time/sys/time.h: Likewise. * time/time.h: Likewise. * time/tzset.c: Likewise. * sysdeps/unix/sysv/linux/arm/socket.S: socketcall.h change. * sysdeps/unix/sysv/linux/i386/socket.S: Likewise. * sysdeps/unix/sysv/linux/m68k/socket.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/socket.S: Likewise. * sysdeps/unix/sysv/linux/sparc/socket.S: Likewise. * Makefile (headers): foo.h -> bits/foo.h. * dirent/Makefile: Likewise. * elf/Makefile: Likewise. * io/Makefile: Likewise. * linuxthreads/Makefile: Likewise. * linuxthreads/sysdeps/pthread/Makefile: Likewise. * login/Makefile: Likewise. * math/Makefile: Likewise. * misc/Makefile: Likewise. * posix/Makefile: Likewise. * resource/Makefile: Likewise. * setjmp/Makefile: Likewise. * signal/Makefile: Likewise. * socket/Makefile: Likewise. * stdio-common/Makefile: Likewise. * sysdeps/unix/sysv/linux/Makefile: Likewise. * sysvipc/Makefile: Likewise. * termios/Makefile: Likewise. * time/Makefile: Likewise. * sysdeps/generic/Makefile (make_siglist-CFLAGS): Likewise. * sysdeps/posix/Makefile: stdio_lim.h -> bits/stdio_lim.h * sysdeps/unix/Makefile: Likewise with local_lim.h, errnos.h, ioctls.h, termbits.h. * sysdeps/unix/sysv/linux/Dist: sys/kernel_termios.h -> kernel_termios.h, sys/socketcall.h -> socketcall.h * elf/elf.h: Use <inttypes.h> definitions instead of __attribute__ for getting the proper length on the ELF types to be friendly to non-gcc compilers. * posix/sys/types.h: Notice when int8_t and friends are defined and don't redefine them. * sysdeps/wordsize-32/inttypes.h: Likewise. * sysdeps/wordsize-64/inttypes.h: Likewise. * sysdeps/unix/sysv/linux/arm/profil-counter.h: Get sigcontext via <signal.h> instead. * sysdeps/unix/sysv/linux/i386/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/sparc/profil-counter.h: Likewise. 1997-06-20 17:59 Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp> * hurd/intr-msg.c: More 64bit changes. * mach/msg-destroy.c: Likewise. * sysdeps/mach/hurd/ioctl.c: Likewise. * sysdeps/mach/hurd/ioctls.h: Likewise. * sysdeps/mach/hurd/select.c: Likewise. * sysdeps/mach/hurd/statbuf.h: Likewise. * sysdeps/mach/hurd/mips/dl-machine.c: Hurd/MIPS64 patches. * sysdeps/mach/hurd/mips/exc2signal.c: Likewise. * sysdeps/mach/hurd/mips/init-fault.c: Likewise. * sysdeps/mach/hurd/mips/init-first.c: Likewise. * sysdeps/mach/hurd/mips/intr-msg.h: Likewise. * sysdeps/mach/hurd/mips/longjmp-ctx.c: Likewise. * sysdeps/mach/hurd/mips/longjmp-ts.c: Likewise. * sysdeps/mach/hurd/mips/sigcontext.h: Likewise. * sysdeps/mach/hurd/mips/sigreturn.c: Likewise. * sysdeps/mach/hurd/mips/trampoline.c: Likewise. * sysdeps/mach/mips/cacheflush.c: Likewise. * sysdeps/mach/mips/machine-lock.h: Likewise. * sysdeps/mach/mips/machine-sp.h: Likewise. * sysdeps/mach/mips/syscall.S: Likewise. * sysdeps/mach/mips/sysdep.h: Likewise. * sysdeps/mach/mips/thread_state.h: Likewise. * sysdeps/mach/start.c: Likewise. * sysdeps/mips/dl-machine.h: MIPS changes. * sysdeps/mips/elf/start.S: Likewise. * sysdeps/mips/init-first.c: Likewise. * sysdeps/mips/fpu_control.h: Likewise. * sysdeps/mips/machine-gmon.h: Likewise. * sysdeps/mips/jmp_buf.h: Likewise. * sysdeps/mips/__longjmp.c: Likewise. * sysdeps/mips/bsd-_setjmp.S: Likewise. * sysdeps/mips/bsd-setjmp.S: Likewise. * sysdeps/mips/setjmp.S: Likewise. * sysdeps/mips/setjmp_aux.c: Likewise. * sysdeps/mips/mips64/gmp-mparam.h: Likewise. * sysdeps/mips/add_n.S: New file. * sysdeps/mips/addmul_1.S: Likewise. * sysdeps/mips/lshift.S: Likewise. * sysdeps/mips/mul_1.S: Likewise. * sysdeps/mips/rshift.S: Likewise. * sysdeps/mips/sub_n.S: Likewise. * sysdeps/mips/submul_1.S: Likewise. * sysdeps/mips/mips64/Implies: Likewise. * sysdeps/mips/mips64/add_n.S: Likewise. * sysdeps/mips/mips64/addmul_1.S: Likewise. * sysdeps/mips/mips64/lshift.S: Likewise. * sysdeps/mips/mips64/mul_1.S: Likewise. * sysdeps/mips/mips64/rshift.S: Likewise. * sysdeps/mips/mips64/sub_n.S: Likewise. * sysdeps/mips/mips64/submul_1.S: Likewise. * sysdeps/mips/add_n.S: Removed. * sysdeps/mips/addmul_1.S: Likewise. * sysdeps/mips/lshift.S: Likewise. * sysdeps/mips/mul_1.S: Likewise. * sysdeps/mips/rshift.S: Likewise. * sysdeps/mips/sub_n.S: Likewise. * sysdeps/mips/submul_1.S: Likewise. * nss/Makefile: Prepare for static NSS. * resolv/Makefile: Likewise. * nss/nsswitch.c: Add code for static NSS. * nss/function.def: Define functions for static NSS. 1997-06-19 11:10 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libc.map: Add yet more symbols. 1997-06-19 20:33 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/dl-lookup.c (_dl_lookup_versioned_symbol): Don't pass NULL as object name to _dl_signal_error. (do_lookup): Skip objects that could not be opened. * sysdeps/m68k/dl-machine.h (elf_machine_rela): Check that the symbol was found. * sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_rela): Likewise. 1997-06-20 03:13 Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp> * ctype/ctype-info.c: Use int32_t where `int' with 4 bytes is assumed. * ctype/ctype.h: Likewise. * math/math_private.h: Likewise. * inet/netinet/in.h: Likewise. * wctype/wctype.h: Likewise. * nss/Makefile: Only inhibit nss_files and nss_db modules if static NSS modules are not enabled. * resolv/Makefile: Likewise for nss_dns. * nss/function.def: New file. List all available lookup functions for static NSS. * nss/nsswitch.c: Add code for static NSS. 1997-06-15 21:15 Andreas Jaeger <aj@arthur.rhein-neckar.de> * math/libm-test.c (gamma_test): Test for _SVID_ and for normal behaviour. 1997-06-15 20:32 Andreas Jaeger <aj@arthur.rhein-neckar.de> * math/libm.map: Add all necessary functions, correct existing entries. 1997-06-20 02:35 a sun <asun@zoology.washington.edu> * sysdeps/unix/sysv/linux/netipx/ipx.h: Don't use kernel header. 1997-06-19 18:43 Andreas Jaeger <aj@arthur.rhein-neckar.de> * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent): Compare pointer with NULL. * login/logout.c (logout): Compare pututline result with NULL. * inet/rcmd.c: Correct a few typos. Reported by Erik Troan.
1997-06-21 04:59:26 +02:00
headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
* math/Makefile (headers): Add bits/huge_valf.h, bits/huge_vall.h, and bits/inf.h. * math/math.h: Include them. * sysdeps/alpha/fpu/bits/mathdef.h, sysdeps/arm/fpu/bits/mathdef.h, sysdeps/generic/bits/mathdef.h, sysdeps/i386/fpu/bits/mathdef.h, sysdeps/ia64/fpu/bits/mathdef.h, sysdeps/m68k/fpu/bits/mathdef.h, sysdeps/mips/fpu/bits/mathdef.h, sysdeps/powerpc/fpu/bits/mathdef.h, sysdeps/sh/sh4/fpu/bits/mathdef.h, sysdeps/sparc/fpu/bits/mathdef.h, sysdeps/x86_64/fpu/bits/mathdef.h: Remove INFINITY. * sysdeps/arm/bits/huge_val.h (HUGE_VAL): Use __builtin_huge_val. (HUGE_VALF, HUGE_VALL): Remove. * sysdeps/ieee754/bits/huge_val.h: Likewise. * sysdeps/sh/bits/huge_val.h: Likewise. * sysdeps/generic/bits/huge_val.h (HUGE_VAL): Use __builtin_huge_val. * sysdeps/generic/bits/huge_valf.h: New file. * sysdeps/generic/bits/huge_vall.h: New file. * sysdeps/generic/bits/inf.h: New file. * sysdeps/ieee754/bits/huge_valf.h: New file. * sysdeps/ieee754/bits/inf.h: New file. * sysdeps/i386/bits/huge_val.h: Remove file. * sysdeps/i386/bits/huge_vall.h: New file. * sysdeps/ia64/bits/huge_val.h: Remove file. * sysdeps/ia64/bits/huge_vall.h: New file. * sysdeps/ieee754/ldbl-128/bits/huge_vall.h: New file. * sysdeps/m68k/bits/huge_val.h: Remove file. * sysdeps/m68k/bits/huge_vall.h: New file. * sysdeps/s390/bits/huge_val.h: Remove file. * sysdeps/sh/sh4/fpu/bits/huge_val.h: Remove file. * sysdeps/sparc/bits/huge_vall.h: New file. * sysdeps/sparc/sparc32/fpu/bits/huge_val.h: Remove file. * sysdeps/sparc/sparc64/fpu/bits/huge_val.h: Remove file. * sysdeps/ieee754/bits/nan.h (NAN): Use __builtin_nanf. * sysdeps/mips/bits/nan.h (NAN): Likewise. 2004-03-15 Richard Henderson <rth@redhat.com> * math/Makefile (headers): Add bits/huge_valf.h, bits/huge_vall.h, and bits/inf.h. * math/math.h: Include them. * sysdeps/alpha/fpu/bits/mathdef.h, sysdeps/arm/fpu/bits/mathdef.h, sysdeps/generic/bits/mathdef.h, sysdeps/i386/fpu/bits/mathdef.h, sysdeps/ia64/fpu/bits/mathdef.h, sysdeps/m68k/fpu/bits/mathdef.h, sysdeps/mips/fpu/bits/mathdef.h, sysdeps/powerpc/fpu/bits/mathdef.h, sysdeps/sh/sh4/fpu/bits/mathdef.h, sysdeps/sparc/fpu/bits/mathdef.h, sysdeps/x86_64/fpu/bits/mathdef.h: Remove INFINITY. * sysdeps/arm/bits/huge_val.h (HUGE_VAL): Use __builtin_huge_val. (HUGE_VALF, HUGE_VALL): Remove. * sysdeps/ieee754/bits/huge_val.h: Likewise. * sysdeps/sh/bits/huge_val.h: Likewise. * sysdeps/generic/bits/huge_val.h (HUGE_VAL): Use __builtin_huge_val. * sysdeps/generic/bits/huge_valf.h: New file. * sysdeps/generic/bits/huge_vall.h: New file. * sysdeps/generic/bits/inf.h: New file. * sysdeps/ieee754/bits/huge_valf.h: New file. * sysdeps/ieee754/bits/inf.h: New file. * sysdeps/i386/bits/huge_val.h: Remove file. * sysdeps/i386/bits/huge_vall.h: New file. * sysdeps/ia64/bits/huge_val.h: Remove file. * sysdeps/ia64/bits/huge_vall.h: New file. * sysdeps/ieee754/ldbl-128/bits/huge_vall.h: New file. * sysdeps/m68k/bits/huge_val.h: Remove file. * sysdeps/m68k/bits/huge_vall.h: New file. * sysdeps/s390/bits/huge_val.h: Remove file. * sysdeps/sh/sh4/fpu/bits/huge_val.h: Remove file. * sysdeps/sparc/bits/huge_vall.h: New file. * sysdeps/sparc/sparc32/fpu/bits/huge_val.h: Remove file. * sysdeps/sparc/sparc64/fpu/bits/huge_val.h: Remove file. * sysdeps/ieee754/bits/nan.h (NAN): Use __builtin_nanf. * sysdeps/mips/bits/nan.h (NAN): Likewise.
2004-03-15 22:44:11 +01:00
bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \
fpu_control.h complex.h bits/cmathcalls.h fenv.h \
bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \
bits/math-finite.h bits/math-vector.h \
Refactor float_t, double_t information into bits/flt-eval-method.h. At present, definitions of float_t and double_t are split among many bits/mathdef.h headers. For all but three architectures, these types are float and double. Furthermore, if you assume __FLT_EVAL_METHOD__ to be defined, that provides a more generic way of determining the correct values of these typedefs. Defining these typedefs more generally based on __FLT_EVAL_METHOD__ was previously proposed by Paul Eggert in <https://sourceware.org/ml/libc-alpha/2012-02/msg00002.html>. This patch refactors things in the way I proposed in <https://sourceware.org/ml/libc-alpha/2016-11/msg00745.html>. A new header bits/flt-eval-method.h defines a single macro, __GLIBC_FLT_EVAL_METHOD, which is then used by math.h to define float_t and double_t. The default is based on __FLT_EVAL_METHOD__ (although actually a default to 0 would have the same effect for current ports, because ports where values other than 0 or 16 are possible all have their own headers). To avoid changing the existing semantics in any case, including for compilers not defining __FLT_EVAL_METHOD__, architecture-specific files are then added for m68k, s390, x86 which replicate the existing semantics. At least with __FLT_EVAL_METHOD__ values possible with GCC, there should be no change to the choices of float_t and double_t for any supported configuration. Architecture maintainer notes: * m68k: sysdeps/m68k/m680x0/bits/flt-eval-method.h always defines __GLIBC_FLT_EVAL_METHOD to 2 to replicate the existing logic. But actually GCC defines __FLT_EVAL_METHOD__ to 0 if TARGET_68040. It might make sense to make the header prefer to base things on __FLT_EVAL_METHOD__ if defined, like the x86 version, and so make the choices of these types more accurate (with a NEWS entry as for the other changes to these types on particular architectures). * s390: sysdeps/s390/bits/flt-eval-method.h always defines __GLIBC_FLT_EVAL_METHOD to 1 to replicate the existing logic. As previously discussed, it might make sense in coordination with GCC to eliminate the historic mistake, avoid excess precision in the -fexcess-precision=standard case and make the typedefs match (with a NEWS entry, again). Tested for x86-64 and x86. Also did compilation-only testing with build-many-glibcs.py. * bits/flt-eval-method.h: New file. * sysdeps/m68k/m680x0/bits/flt-eval-method.h: Likewise. * sysdeps/s390/bits/flt-eval-method.h: Likewise. * sysdeps/x86/bits/flt-eval-method.h: Likewise. * math/Makefile (headers): Add bits/flt-eval-method.h. * math/math.h: Include <bits/flt-eval-method.h>. [__USE_ISOC99] (float_t): Define based on __GLIBC_FLT_EVAL_METHOD. [__USE_ISOC99] (double_t): Likewise. * bits/mathdef.h (float_t): Remove. (double_t): Likewise. * sysdeps/aarch64/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/alpha/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/arm/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/hppa/fpu/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/ia64/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/m68k/m680x0/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/mips/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/powerpc/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/s390/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/sh/sh4/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/sparc/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/tile/bits/mathdef.h (float_t): Likewise. (double_t): Likewise. * sysdeps/x86/bits/mathdef.h (float_t): Likewise. (double_t): Likewise.
2016-11-24 19:44:50 +01:00
bits/libm-simd-decl-stubs.h bits/iscanonical.h \
Refactor long double information into bits/long-double.h. Information about whether the ABI of long double is the same as that of double is split between bits/mathdef.h and bits/wordsize.h. When the ABIs are the same, bits/mathdef.h defines __NO_LONG_DOUBLE_MATH. In addition, in the case where the same glibc binary supports both -mlong-double-64 and -mlong-double-128, bits/wordsize.h defines __LONG_DOUBLE_MATH_OPTIONAL, along with __NO_LONG_DOUBLE_MATH if this particular compilation is with -mlong-double-64. As part of the refactoring I proposed in <https://sourceware.org/ml/libc-alpha/2016-11/msg00745.html>, this patch puts all that information in a single header, bits/long-double.h. It is included from sys/cdefs.h alongside the include of bits/wordsize.h, so other headers generally do not need to include bits/long-double.h directly. Previously, various bits/mathdef.h headers and bits/wordsize.h headers had this long double information (including implicitly in some bits/mathdef.h headers through not having the defines present in the default version). After the patch, it's all in six bits/long-double.h headers. Furthermore, most of those new headers are not architecture-specific. Architectures with optional long double all use the ldbl-opt sysdeps directory, either in the order (ldbl-64-128, ldbl-opt, ldbl-128) or (ldbl-128ibm, ldbl-opt). Thus a generic header for the case where long double = double, and headers in ldbl-128, ldbl-96 and ldbl-opt, suffices to cover every architecture except for cases where long double properties vary between different ABIs sharing a set of installed headers; fortunately all the ldbl-opt cases share a single compiler-predefined macro __LONG_DOUBLE_128__ that can be used to tell whether this compilation is -mlong-double-64 or -mlong-double-128. The two cases where a set of headers is shared between ABIs with different long double properties, MIPS (o32 has long double = double, other ABIs use ldbl-128) and SPARC (32-bit has optional long double, 64-bit has required long double), need their own bits/long-double.h headers. As with bits/wordsize.h, multiple-include protection for this header is generally implicit through the include guards on sys/cdefs.h, and multiple inclusion is harmless in any case. There is one subtlety: the header must not define __LONG_DOUBLE_MATH_OPTIONAL if __NO_LONG_DOUBLE_MATH was defined before its inclusion, because doing so breaks how sysdeps/ieee754/ldbl-opt/nldbl-compat.h defines __NO_LONG_DOUBLE_MATH itself before including system headers. Subject to keeping that working, it would be reasonable to move these macros from defined/undefined #ifdef to always-defined 1/0 #if semantics, but this patch does not attempt to do so, just rearranges where the macros are defined. After this patch, the only use of bits/mathdef.h is the alpha one for modifying complex function ABIs for old GCC. Thus, all versions of the header other than the default and alpha versions are removed, as is the include from math.h. Tested for x86_64 and x86. Also did compilation-only testing with build-many-glibcs.py. * bits/long-double.h: New file. * sysdeps/ieee754/ldbl-128/bits/long-double.h: Likewise. * sysdeps/ieee754/ldbl-96/bits/long-double.h: Likewise. * sysdeps/ieee754/ldbl-opt/bits/long-double.h: Likewise. * sysdeps/mips/bits/long-double.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/long-double.h: Likewise. * math/Makefile (headers): Add bits/long-double.h. * misc/sys/cdefs.h: Include <bits/long-double.h>. * stdlib/strtold.c: Include <bits/long-double.h> instead of <bits/wordsize.h>. * bits/mathdef.h [!_COMPLEX_H]: Do not allow inclusion. [!__NO_LONG_DOUBLE_MATH]: Remove conditional code. * math/math.h: Do not include <bits/mathdef.h>. * sysdeps/aarch64/bits/mathdef.h: Remove file. * sysdeps/alpha/bits/mathdef.h [!_COMPLEX_H]: Do not allow inclusion. * sysdeps/ia64/bits/mathdef.h: Remove file. * sysdeps/m68k/m680x0/bits/mathdef.h: Likewise. * sysdeps/mips/bits/mathdef.h: Likewise. * sysdeps/powerpc/bits/mathdef.h: Likewise. * sysdeps/s390/bits/mathdef.h: Likewise. * sysdeps/sparc/bits/mathdef.h: Likewise. * sysdeps/x86/bits/mathdef.h: Likewise. * sysdeps/s390/s390-32/bits/wordsize.h [!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]: Remove conditional code. * sysdeps/s390/s390-64/bits/wordsize.h [!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/wordsize.h [!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h [!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/wordsize.h [!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]: Likewise.
2016-12-14 19:27:56 +01:00
bits/flt-eval-method.h bits/fp-fast.h bits/fp-logb.h \
bits/long-double.h
# FPU support code.
Update. 1998-09-22 19:58 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu> * posix/execvp.c: Don't give up searching the PATH if execve returns ENOTDIR. 1998-09-22 12:53 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/init-first.c (init): Don't call setfpucw only if _dl_fpu_control_set is set. * sysdeps/generic/dl-sysdep.c: Don't set _dl_fpu_control_set. * elf/rtld.c: Don't define _dl_fpu_control_set. * elf/Versions: Remove _dl_fpu_control_set. 1998-09-22 11:51 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h (SA_ONSTACK): Define. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. Correct values of other SA_* macros according to kernel headers. 1998-09-22 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/dl-load.c (_dl_init_paths): Avoid warning about unused variable l. * elf/dl-error.c (_dl_catch_error): Avoid warning about clobbering old. 1998-09-21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/ldsodefs.h: Fix typo in comment. 1998-09-21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libio/genops.c (_IO_default_pbackfail): Add cast to unsigned char when comparing buffer contents with putback character. 1998-09-21 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/Makefile (dl-routines, elide-routines.os, rtld-routines): Undo last change. * elf/Versions: Undo last change. Export _dl_fpu_control and _dl_fpu_control_set. * elf/rtld.c (_dl_fpu_control, _dl_fpu_control_set): New variables. Include <fpu_control.h>. * sysdeps/generic/dl-sysdep.c: Store AT_FPUCW value in _dl_fpu_control instead of __fpu_control, set _dl_fpu_control_set to indicate that is was seen. * sysdeps/unix/sysv/linux/init-first.c: Omit call to __setfpucw only if _dl_fpu_control was set and is equal to desired value. * math/Makefile (aux): Undo last change. * math/Versions: Export __fpu_control with version GLIBC_2.0.
1998-09-22 21:08:42 +02:00
aux := setfpucw fpu_control
1995-02-18 02:27:10 +01:00
# Build the -lm library.
1995-02-18 02:27:10 +01:00
extra-libs := libm
update from main archive 960919 Thu Sep 19 21:50:55 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/posix/gettimeofday.c (__gettimeofday): Use localtime_r instead of localtime. Reported by Matthias Urlichs. * shlib-versions: Remove version number for libcrypt. * features.h: Define __USE_REENTRANT if _REENTRANT or _THREAD_SAFE. * libc-symbols.h: Define _REENTRANT while compiling libc. * sysdeps/unix/sysv/linux/i386/sysdep.S (__errno_location): Define even if !_LIBC_REENTRANT. * sysdeps/unix/sysv/linux/i386/sysdep.S (__errno_location): Likewise. * sysdeps/posix/cuserid.h: Remove prototype for geteuid(). De-ANSI-fy. * MakeTAGS ($P/libc.pot): Generate correctly formed header. * po/header.pot: Correct title line. * po/nl.po: Update. Thu Sep 19 18:59:55 1996 Ulrich Drepper <drepper@cygnus.com> * Makeconfig (soversions.mk): Prefer shared lib version numbers is add ons over version in libc itself. * sysdeps/unix/sysv/linux/i386/sysdep.S: Include <sysdep.h>. * sysdeps/unix/sysv/linux/i386/sysdep.h: Prevent multiple inclusion. * libio/iofgets.c: Use __flockfile and __funlockfile instead of _IO_flockfile and _IO_funlockfile resp. * locale/categories.def: Partly support for correct `era' handling in LC_TIME category. * locale/langinfo.h: Likewise. * locale/programs/ld-time.c: Likewise. * locale/localeinfo.h: Change comment a bit. * malloc/memalign.c: Don't use goto, not necessary anymore. 1996-09-18 Paul Eggert <eggert@twinsun.com> * time/mktime.c (ydhms_tm_diff): Work correctly even if year is negative, or if time_t is unsigned. * time/strftime.c (tm_diff): Work correctly even if tm_year is near INT_MIN. Tue Sep 17 16:14:34 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/__math.h (__inline_mathop): Changed to generate all three versions of the math function. (__inline_mathopf, __inline_mathopl): Removed. (__inline_functions): New temporary definition containing all non-trivial inline functions. Wed Sep 18 00:25:41 1996 Ulrich Drepper <drepper@cygnus.com> * time/strftime.c (strftime): The T_FMT_AMPM string may be empty. Tue Sep 17 20:27:18 1996 Ulrich Drepper <drepper@cygnus.com> * math/Makefile (extra-libs-others): Use $(extra-libs) instead of $(extra-libc). Tue Sep 17 17:09:44 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/stub/fpu_control.h: Correct end of file comment. Tue Sep 17 05:39:18 1996 Ulrich Drepper <drepper@cygnus.com> * stdio-common/bug3.c, stdio-common/bug4.c, stdio-common/bug5.c, stdio-common/test-popen.c: Remove temporary files after test. * stdio-common/bug5.c: Use `system' instead of `execlp'. Patches by Andreas Jaeger. * stdio-common/bug5.c: Create string for `system' argument to make sure the input and output file names are really correct. Sun Sep 15 12:46:44 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * configure.in: If $os contains a hyphen add the part before the hyphen to $ostry. Sun Sep 15 18:14:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/__math.h (__ieee754_pow, __ieee754_powf, __ieee754_powl): Rename local variable i to __i. (__ieee754_atan2, __ieee754_atan2f, __ieee754_atan2l): New inline functions. * sysdeps/m68k/fpu/e_atan2.c, sysdeps/m68k/fpu/e_atan2f.c, sysdeps/m68k/fpu/e_atan2l.c: New files. 1996-09-15 Paul Eggert <eggert@twinsun.com> * manual/time.texi: Change `range X to Y' to `range X through Y', to avoid ambiguity in English. (strftime): Numbers that do not have a range indicated are not padded. Describe E and O modifiers. %g, %G, %u: New formats. %C, %y, %Y: Describe behavior on negative years. %e: Fix typo (was labeled %d). %l, %V: Fix typo in range. %M, %S, %U, %w, %W: Give ranges. %p: Clarify how noon and midnight are handled for AM and PM. %s: Clarify leap second handling. %r: Now locale-defined. %C, %D, %e, %h, %n, %r, %t, %T: Say that they are POSIX.2 extensions. %z: Say that it is a GNU extension. %Z: Wording fix. * time/strftime.c: (strftime): %V: Fix mishandling of week numbers near year boundaries. %g, %G: New formats (suggested by Arthur David Olson). %U, %W: Use inline expression instead of `week' function. %C, %y: Handle negative years portably. %C, %Y: Use width 1, since values can be arbitrarily wide. %r: Use T_FMT_AMPM format if _NL_CURRENT is defined. %u: New Posix.2 format. %w: Width is 1, not 2. (iso_week_days): New function, for %V, %G, %g. (week): Remove; it didn't handle %V correctly. (__isleap): New macro. (mbsinit): Use arg, to pacify GCC -Wall. 1996-09-13 Paul Eggert <eggert@twinsun.com> * time/strftime.c (strftime): If using the GNU C library, do not bother to check for multibyte encodings, since they're safe in formats. Otherwise: - Check for multibyte encodings when encountering any character that is not in the basic execution character set of the C Standard. - Use mbrlen (if available) instead of mblen, to avoid modifying mblen's internal state. - Do not assume that '%' cannot appear as the first character of a multibyte character sequence, since this is possible when not in the initial shift state. (HAVE_MBRLEN, MULTIBYTE_IS_FORMAT_SAFE): Define if _LIBC is defined. (DO_MULTIBYTE): New macro. (<ctype.h>): Do not include. (<wchar.h>): Include if HAVE_MBRLEN. (mbstate_t, mbrlen, mbsinit): Define if ! HAVE_MBRLEN. (mbstate_zero): New constant. 1996-09-12 Paul Eggert <eggert@twinsun.com> * time/strftime.c (strftime): Use an empty zone if it can't be determined; POSIX.2 requires this. Use plain `int' for pad and modifier (which now contain char value). Use plain `int' for number_value, to print negative values correctly. Use plain `int' for digits; there was no need to make it unsigned. Initialize subfmt consistently. Remove incorrect code for %EC and %Ey; they aren't implemented yet. For %O, if there is no alternate digit, output Ascii instead of "". Output the `%' of an unknown format; this is most likely the right thing to do if a multibyte string has been misparsed. Thu Sep 12 23:23:13 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdio-common/scanf7.c (main): Remove extra conversion from printf format string. Thu Sep 12 23:01:16 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdlib/test-canon.c (tests): Rename structure member from errno to error, all uses changed. Thu Sep 12 20:08:06 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/__math.h (__ldexp, __ldexpf, __ldexpl): Removed. * sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c, sysdeps/m68k/fpu/s_ldexpl.c: Removed, use generic implementation instead. * sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c, sysdeps/m68k/fpu/s_scalbnl.c: Replaced with old contents of s_ldexp.c, s_ldexpf.c and s_ldexpl.c, resp., suitably adpted. * sysdeps/m68k/fpu/__math.h (__frexp, __frexpf, __frexpl): Return value must be in [0.5, 1), not [1, 2). Reported by Chris Lawrence. (__ilogb, __ilogbf, __ilogbl): Check for argument being zero. (__scalbn, __scalbnf, __scalbnl): Use second argument directly. Thu Sep 12 19:59:24 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/e_acoshl.c: Fix typos. * sysdeps/libm-ieee754/s_cbrtl.c: Remove unused variable. Thu Sep 12 19:59:24 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/e_acoshl.c: Fix typos. * sysdeps/libm-ieee754/s_cbrtl.c: Remove unused variable. Thu Sep 12 19:56:07 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * inet/herrno.c (__h_errno_location): Fix return type. Tue Sep 17 10:51:58 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * malloc/memalign.c (memalign): Only acquire __libc_malloc_lock for actual modifications to global state. Fri Sep 13 01:21:36 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * sysdeps/mach/Makefile (includes): Add -I$(common-objpfx)mach/. * sysdeps/mach/hurd/Makefile (includes): Add -I$(common-objpfx)hurd/. Reported by Marcus Daniels. * sysdeps/generic/schedbits.h (struct sched_param): Renamed from struct sched_params. * sysdeps/stub/sched_setp.c (__sched_setparam): struct sched_params -> struct sched_param. * sysdeps/stub/sched_getp.c (__sched_getparam): Likewise. * sysdeps/stub/sched_sets.c (__sched_setscheduler): Likewise. Thu Sep 12 23:58:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * sysdeps/mach/libc-lock.h (__libc_cleanup_region_start): Fix syntax error. * stdio-common/Makefile: Put lockfile in routines unconditionally. Define _MT_SAFE_IO if using for libio and compiling reentrant libc. * stdio-common/vfprintf.c (__flockfile, __funlockfile): Declare this always, not just if _LIBC_REENTRANT. (__funlockfile): Don't use weak_extern for this one; __libc_cleanup_region_end might be defined and the use of __funlockfile can't be protected the way the use of __flockfile can be. * sched.h: New file. Helper to access posix/sched.h. Thu Sep 12 12:33:52 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * sysdeps/mach/hurd/dl-cache.c: Delete second copy of file accidentally added on. * sysdeps/stub/intr-msg.h: New file. * stdio-common/vfprintf.c: Include <libc-lock.h>. * stdio-common/vfscanf.c: Include <libc-lock.h>. * sysdeps/mach/libc-lock.h (__libc_cleanup_region_start): New macro. (__libc_cleanup_region_end): New macro.
1996-09-20 03:58:09 +02:00
extra-libs-others = $(extra-libs)
libm-support = s_lib_version s_matherr s_signgam \
Update. 1997-04-13 01:06 Ulrich Drepper <drepper@cygnus.com> * isomac.c: Improve messages. * math/Makefile (libm-calls): Add s_nearbyint, s_catan, s_casin, s_ccos, s_csin, s_ctan, s_ctanh, s_cacos, s_casinh, s_cacosh, s_catanh, s_csqrt, and s_cpow. * math/libm-test.c: New functions ccos_test, cacos_test, cacosh_test, casin_test, casinh_test, catan_test, catanh_test, ctanh_test, csqrt_test, cpow_test, rint_test. * math/math.h: Include new header mathbits.h which defines some more (system dependent) types and some macros. (isfinite): Use __finite instead of fpclassify. * sysdeps/generic/mathbits.h: New file. * sysdeps/i386/fpu/mathbits.h: New file. * sysdeps/i386/huge_val.h: Don't define INFINITY. * sysdeps/ieee754/huge_val.h: Likewise. * sysdeps/m68k/huge_val.h: Likewise. * sysdeps/i386/fpu/fenvbits.h: Define FE_NOMASK_ENV. * sysdeps/i386/fpu/fesetenv.c: Handle FE_NOMASK_ENV. * math/complex.h (_Imaginary_I): Define correctly. I misread the standard first. * sysdeps/libm-i387/s_finite.S: Optimized rewrite. * sysdeps/libm-i387/s_finitef.S: Likewise. * sysdeps/libm-i387/s_finitel.S: Likewise. Provided by Joe Keane <jgk@jgk.org>. * sysdeps/libm-i387/s_nearbyint.S: New file. * sysdeps/libm-i387/s_nearbyintf.S: New file. * sysdeps/libm-i387/s_nearbyintl.S: New file. * sysdeps/libm-ieee754/s_nearbyint.S: New file. * sysdeps/libm-ieee754/s_nearbyintf.S: New file. * sysdeps/libm-ieee754/s_nearbyintl.S: New file. * sysdeps/libm-ieee754/s_cacos.c: New file. * sysdeps/libm-ieee754/s_cacosf.c: New file. * sysdeps/libm-ieee754/s_cacosl.c: New file. * sysdeps/libm-ieee754/s_cacosh.c: New file. * sysdeps/libm-ieee754/s_cacoshf.c: New file. * sysdeps/libm-ieee754/s_cacoshl.c: New file. * sysdeps/libm-ieee754/s_casin.c: New file. * sysdeps/libm-ieee754/s_casinf.c: New file. * sysdeps/libm-ieee754/s_casinl.c: New file. * sysdeps/libm-ieee754/s_casinh.c: New file. * sysdeps/libm-ieee754/s_casinhf.c: New file. * sysdeps/libm-ieee754/s_casinhl.c: New file. * sysdeps/libm-ieee754/s_catan.c: New file. * sysdeps/libm-ieee754/s_catanf.c: New file. * sysdeps/libm-ieee754/s_catanl.c: New file. * sysdeps/libm-ieee754/s_catanh.c: New file. * sysdeps/libm-ieee754/s_catanhf.c: New file. * sysdeps/libm-ieee754/s_catanhl.c: New file. * sysdeps/libm-ieee754/s_ccos.c: New file. * sysdeps/libm-ieee754/s_ccosf.c: New file. * sysdeps/libm-ieee754/s_ccosl.c: New file. * sysdeps/libm-ieee754/s_cpow.c: New file. * sysdeps/libm-ieee754/s_cpowf.c: New file. * sysdeps/libm-ieee754/s_cpowl.c: New file. * sysdeps/libm-ieee754/s_csin.c: New file. * sysdeps/libm-ieee754/s_csinf.c: New file. * sysdeps/libm-ieee754/s_csinl.c: New file. * sysdeps/libm-ieee754/s_csqrt.c: New file. * sysdeps/libm-ieee754/s_csqrtf.c: New file. * sysdeps/libm-ieee754/s_csqrtl.c: New file. * sysdeps/libm-ieee754/s_ctan.c: New file. * sysdeps/libm-ieee754/s_ctanf.c: New file. * sysdeps/libm-ieee754/s_ctanl.c: New file. * sysdeps/libm-ieee754/s_ctanh.c: New file. * sysdeps/libm-ieee754/s_ctanhf.c: New file. * sysdeps/libm-ieee754/s_ctanhl.c: New file. * time/strftime.c (memset_space): Increment pointer. * time/strptime.c: Interpret year number 00-59 as 2000--2059. Patches by Karl Heuer <kwzh@gnu.ai.mit.edu>. 1997-04-11 11:57 Miguel de Icaza <miguel@nuclecu.unam.mx> * sysdeps/unix/sysv/linux/sparc/syscalls.list: Remove fork, pipe, syscall. 1997-04-05 00:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/s_remquo.c: Change algorithm, although probably still wrong. * sysdeps/libm-ieee754/s_remquof.c: Likewise. * sysdeps/libm-ieee754/s_remquol.c: Likewise. * math/libm-test.c (remquo_test): Corrected. 1997-04-11 00:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/__math.h (__rinttol, rinttol): New inline. * sysdeps/m68k/fpu/s_rinttol.c: New file. * sysdeps/m68k/fpu/s_rinttoll.c: New file. * math/libm-test.c (remquo_test): Use check_long to test the quotient. (cbrt_test): Add epsilons for long double. 1997-04-10 18:48 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * locale/localeinfo.h: Update declaration of _nl_current. 1997-04-11 11:27 Ulrich Drepper <drepper@cygnus.com> * rellnsh-sh: Use explicitely /bin/pwd to find the external program. * math/Makefile (headers): Add fenv.h and fenvbits.h. (libm-support): Add s_rountol, s_roundtoll, fclrexcpt, fgetexcptflg, fraiseexcpt, fsetexcptflg, ftestexcept, fegetround, fesetround, fegetenv, feholdexcpt, fesetenv, feupdateenv. (libm-calls): Add s_round. * math/fenv.h: New file. * math/libm-test.c: Correct tests for s_rinttol and s_rinttoll. Add roundtol_check and roundtoll_check. * math/math.h: Pretty printing. * sysdeps/i386/fpu/fclrexcpt.c: New file. * sysdeps/i386/fpu/fegetenv.c: New file. * sysdeps/i386/fpu/fegetround.c: New file. * sysdeps/i386/fpu/feholdexcpt.c: New file. * sysdeps/i386/fpu/fenvbits.h: New file. * sysdeps/i386/fpu/fesetenv.c: New file. * sysdeps/i386/fpu/fesetround.c: New file. * sysdeps/i386/fpu/fgetexcptflg.c: New file. * sysdeps/i386/fpu/fraiseexcpt.c: New file. * sysdeps/i386/fpu/fsetexcptflg.c: New file. * sysdeps/i386/fpu/ftestexcept.c: New file. * sysdeps/stub/fclrexcpt.c: New file. * sysdeps/stub/fegetenv.c: New file. * sysdeps/stub/fegetround.c: New file. * sysdeps/stub/feholdexcpt.c: New file. * sysdeps/stub/fenvbits.h: New file. * sysdeps/stub/fesetenv.c: New file. * sysdeps/stub/fesetround.c: New file. * sysdeps/stub/fgetexcptflg.c: New file. * sysdeps/stub/fraiseexcpt.c: New file. * sysdeps/stub/fsetexcptflg.c: New file. * sysdeps/stub/ftestexcept.c: New file. * sysdeps/libm-i387/s_trunc.S: New file. * sysdeps/libm-i387/s_truncf.S: New file. * sysdeps/libm-i387/s_truncl.S: New file. * sysdeps/libm-ieee754/s_round.c: New file. * sysdeps/libm-ieee754/s_roundf.c: New file. * sysdeps/libm-ieee754/s_roundl.c: New file. * sysdeps/libm-ieee754/s_ccosh.c: Rewritten to use fpclassify. * sysdeps/libm-ieee754/s_ccoshf.c: Likewise. * sysdeps/libm-ieee754/s_ccoshl.c: Likewise. * sysdeps/libm-ieee754/s_cexp.c: Likewise. * sysdeps/libm-ieee754/s_cexpf.c: Likewise. * sysdeps/libm-ieee754/s_cexpl.c: Likewise. * sysdeps/libm-ieee754/s_clog.c: Likewise. * sysdeps/libm-ieee754/s_clogf.c: Likewise. * sysdeps/libm-ieee754/s_clogl.c: Likewise. * sysdeps/libm-ieee754/s_csinh.c. Likewise. * sysdeps/libm-ieee754/s_csinhf.c. Likewise. * sysdeps/libm-ieee754/s_csinhl.c. Likewise. * sysdeps/libm-ieee754/s_ceill.c: Corrected. The mantissa has only 63 bits. * sysdeps/libm-ieee754/s_floorl.c: Likewise. * po/pl.po: Updated. * string/swab.c: Correctly handle array of odd length. * sysdeps/generic/memmem.c: Update copyright. 1997-04-10 20:22 Ulrich Drepper <drepper@cygnus.com> * hurd/Makefile (sunrpc-headers): Add clnt.h. Proposed by Thomas Bushnell <thomas@gnu.ai.mit.edu>. 1997-04-09 14:21 Miguel de Icaza <miguel@nuclecu.unam.mx> * sysdeps/sparc/dl-machine.h: Bug fix: I was not loading the proper value from the GOT. Pass argument block to init function. * sysdeps/sparc/elf/start.c: Call atexit (_fini) after calling _init (). * sysdeps/sparc/fpu_control.h: Fix the FPU constants. I got them wrong the first time. * sysdeps/sparc/setjmp.S: PIC code was clobbering a callee saved register. * sysdeps/sparc/udiv_qrnnd.S: Add type @function. * sysdeps/unix/sysv/linux/sparc/init-first.h: Linux/SPARC specific SYSDEP_CALL_INIT. * sysdeps/unix/sysv/linux/sparc/signum.h: Remove definition for NSIG and duplicated SIGIOT. 1997-04-05 00:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/s_remquo.c: Change algorithm, although probably still wrong. * sysdeps/libm-ieee754/s_remquof.c: Likewise. * sysdeps/libm-ieee754/s_remquol.c: Likewise. * math/libm-test.c (remquo_test): Corrected. 1997-04-03 18:35 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile (parent-tests): New target to run the tests to that they are executed even if some subdir tests have failed. (tests): Depend on parent-tests instead of running the tests directly. 1997-04-03 12:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> Clean up name space pollution in libnss_*.so: * nis/nss_compat/compat-pwd.c, resolv/mapv4v6addr.h, resolv/nss_dns/dns-host.c: Replace bzero by memset, bcopy by memcpy and bcmp by memcmp to clean up namespace. * nss/nss_db/db-XXX.c (internal_setent): Use __dbopen instead of dbopen. * nss/nss_db/db-alias.c (internal_setent): Likewise. * nss/nss_db/db-netgrp.c (_nss_db_setnetgrent): Likewise. * db/db/db.c [_LIBC]: Define __dbopen instead of dbopen and make the latter a weak alias. * db/db.h: Declare __dbopen. * db/btree/btree.h [_LIBC]: Prepend __ to all mpool functions. * db/mpool/mpool.c [_LIBC]: Define all external functions with __ prefix and make the old names weak aliases. * db/mpool.h: Declare the new internal names. 1997-04-04 23:57 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdio-common/vfscanf.c: Fix scanning of hexadecimal fp number. * stdio-common/tstscanf.c: Add test case for this. 1997-04-04 17:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/libm-test.c: Fix more typos. 1997-04-03 17:15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/libm-test.c (csinh_test): Fix test names. (ccosh_test): Likewise. * sysdeps/libm-ieee754/s_csinh.c: Use sinh function instead of computing it directly. * sysdeps/libm-ieee754/s_csinhf.c: Likewise. * sysdeps/libm-ieee754/s_csinhl.c: Likewise. * sysdeps/libm-ieee754/s_ccosh.c: Use cosh function instead of computing it directly. * sysdeps/libm-ieee754/s_ccoshf.c: Likewise. * sysdeps/libm-ieee754/s_ccoshl.c: Likewise. * sysdeps/libm-ieee754/s_cexp.c: Use internal exp function instead of wrapper. * sysdeps/libm-ieee754/s_cexpf.c: Likewise. * sysdeps/libm-ieee754/s_cexpl.c: Likewise. * sysdeps/m68k/fpu/s_cexp.c: Likewise. Correct handling of special values. Avoid use of fsincos if all that is needed is the quadrant. * sysdeps/m68k/fpu/s_ccosh.c: New file. * sysdeps/m68k/fpu/s_ccoshf.c: New file. * sysdeps/m68k/fpu/s_ccoshl.c: New file. * sysdeps/m68k/fpu/s_csinh.c: New file. * sysdeps/m68k/fpu/s_csinhl.c: New file. * sysdeps/m68k/fpu/s_csinhf.c: New file. 1997-04-03 10:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/Makefile (dir-add.texi): Simplify. * libio/genops.c (_IO_flush_all_linebuffered): Don't flush on
1997-04-13 01:41:36 +02:00
fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg \
ftestexcept fegetround fesetround fegetenv feholdexcpt \
fesetenv feupdateenv t_exp fedisblxcpt feenablxcpt \
Add femode_t functions. TS 18661-1 defines a type femode_t to represent the set of dynamic floating-point control modes (such as the rounding mode and trap enablement modes), and functions fegetmode and fesetmode to manipulate those modes (without affecting other state such as the raised exception flags) and a corresponding macro FE_DFL_MODE. This patch series implements those interfaces for glibc. This first patch adds the architecture-independent pieces, the x86 and x86_64 implementations, and the <bits/fenv.h> and ABI baseline updates for all architectures so glibc keeps building and passing the ABI tests on all architectures. Subsequent patches add the fegetmode and fesetmode implementations for other architectures. femode_t is generally an integer type - the same type as fenv_t, or as the single element of fenv_t where fenv_t is a structure containing a single integer (or the single relevant element, where it has elements for both status and control registers) - except where architecture properties or consistency with the fenv_t implementation indicate otherwise. FE_DFL_MODE follows FE_DFL_ENV in whether it's a magic pointer value (-1 cast to const femode_t *), a value that can be distinguished from valid pointers by its high bits but otherwise contains a representation of the desired register contents, or a pointer to a constant variable (the powerpc case; __fe_dfl_mode is added as an exported constant object, an alias to __fe_dfl_env). Note that where architectures (that share a register between control and status bits) gain definitions of new floating-point control or status bits in future, the implementations of fesetmode for those architectures may need updating (depending on whether the new bits are control or status bits and what the implementation does with previously unknown bits), just like existing implementations of <fenv.h> functions that take care not to touch reserved bits may need updating when the set of reserved bits changes. (As any new bits are outside the scope of ISO C, that's just a quality-of-implementation issue for supporting them, not a conformance issue.) As with fenv_t, femode_t should properly include any software DFP rounding mode (and for both fenv_t and femode_t I'd consider that fragment of DFP support appropriate for inclusion in glibc even in the absence of the rest of libdfp; hardware DFP rounding modes should already be included if the definitions of which bits are status / control bits are correct). Tested for x86_64, x86, mips64 (hard float, and soft float to test the fallback version), arm (hard float) and powerpc (hard float, soft float and e500). Other architecture versions are untested. * math/fegetmode.c: New file. * math/fesetmode.c: Likewise. * sysdeps/i386/fpu/fegetmode.c: Likewise. * sysdeps/i386/fpu/fesetmode.c: Likewise. * sysdeps/x86_64/fpu/fegetmode.c: Likewise. * sysdeps/x86_64/fpu/fesetmode.c: Likewise. * math/fenv.h: Update comment on inclusion of <bits/fenv.h>. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fegetmode): New function declaration. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fesetmode): Likewise. * bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/aarch64/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/alpha/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/arm/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/hppa/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/ia64/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/m68k/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/microblaze/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/mips/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/nios2/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/powerpc/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (__fe_dfl_mode): New variable declaration. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/s390/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/sh/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/sparc/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/tile/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/x86/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * manual/arith.texi (FE_DFL_MODE): Document macro. (fegetmode): Document function. (fesetmode): Likewise. * math/Versions (fegetmode): New libm symbol at version GLIBC_2.25. (fesetmode): Likewise. * math/Makefile (libm-support): Add fegetmode and fesetmode. (tests): Add test-femode and test-femode-traps. * math/test-femode-traps.c: New file. * math/test-femode.c: Likewise. * sysdeps/powerpc/fpu/fenv_const.c (__fe_dfl_mode): Declare as alias for __fe_dfl_env. * sysdeps/powerpc/nofpu/fenv_const.c (__fe_dfl_mode): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fenv_const.c (__fe_dfl_mode): Likewise. * sysdeps/powerpc/Versions (__fe_dfl_mode): New libm symbol at version GLIBC_2.25. * 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-09-07 18:40:09 +02:00
fegetexcept fesetexcept fetestexceptflag fegetmode \
fesetmode
# Wrappers for these functions generated per type using a file named
# <func>_template.c and the appropriate math-type-macros-<TYPE>.h.
gen-libm-calls = cargF conjF cimagF crealF cabsF s_cacosF \
s_cacoshF s_ccosF s_ccoshF s_casinF s_csinF s_casinhF \
k_casinhF s_csinhF k_casinhF s_csinhF s_catanhF s_catanF \
s_ctanF s_ctanhF s_cexpF s_clogF s_cprojF s_csqrtF \
s_cpowF s_clog10F s_fdimF s_nextdownF s_fmaxF s_fminF \
s_nanF s_iseqsigF s_canonicalizeF w_ilogbF w_llogbF \
Add new templates for IEEE wrappers Several wrappers for IEEE functions use _LIB_VERSION / matherr / __kernel_standard functionality, which we want to obsolete. New wrappers, such as for float128, must not use this functionality. This patch adds new wrappers that only __set_errno and can be used by the new float128 wrappers. Tested for powerpc64le. * math/Makefile: Add wrappers to gen-libm-calls. * math/w_acos_template.c: New file. * math/w_acosh_template.c: Likewise. * math/w_asin_template.c: Likewise. * math/w_atan2_template.c: Likewise. * math/w_atanh_template.c: Likewise. * math/w_cosh_template.c: Likewise. * math/w_exp10_template.c: Likewise. * math/w_exp2_template.c: Likewise. * math/w_exp_template.c: Likewise. * math/w_fmod_template.c: Likewise. * math/w_hypot_template.c: Likewise. * math/w_j0_template.c: Likewise. * math/w_j1_template.c: Likewise. * math/w_jn_template.c: Likewise. * math/w_lgamma_r_template.c: Likewise. * math/w_lgamma_template.c: Likewise. * math/w_log10_template.c: Likewise. * math/w_log2_template.c: Likewise. * math/w_log_template.c: Likewise. * math/w_pow_template.c: Likewise. * math/w_remainder_template.c: Likewise. * math/w_sinh_template.c: Likewise. * math/w_sqrt_template.c: Likewise. * math/w_tgamma_template.c: Likewise.: Likewise. * sysdeps/generic/math-type-macros-double.h (__USE_WRAPPER_TEMPLATE): New macro to control inclusion of the new wrappers. * sysdeps/generic/math-type-macros-float.h: Likewise. * sysdeps/generic/math-type-macros-ldouble.h: Likewise.
2016-12-15 19:41:58 +01:00
w_log1pF w_scalblnF s_fmaxmagF s_fminmagF w_acosF \
w_acoshF w_asinF w_atan2F w_atanhF w_coshF w_exp10F \
w_exp2F w_fmodF w_hypotF w_j0F w_j1F w_jnF w_logF \
w_log10F w_log2F w_powF w_remainderF w_sinhF w_sqrtF \
w_tgammaF w_lgammaF w_lgammaF_r w_expF
libm-calls = \
e_acosF e_acoshF e_asinF e_atan2F e_atanhF e_coshF e_expF e_fmodF \
e_hypotF e_j0F e_j1F e_jnF e_lgammaF_r e_logF e_log10F e_powF \
e_rem_pio2F e_remainderF e_scalbF e_sinhF e_sqrtF e_gammaF_r \
e_ilogbF \
k_cosF k_sinF k_tanF s_asinhF s_atanF s_cbrtF \
s_ceilF s_cosF s_erfF s_expm1F s_fabsF \
s_floorF s_log1pF s_logbF \
s_nextafterF s_nexttowardF s_rintF s_scalblnF \
s_significandF s_sinF s_tanF s_tanhF \
s_fpclassifyF s_truncF \
s_remquoF e_log2F e_exp2F s_roundF s_nearbyintF s_sincosF \
s_fmaF s_lrintF s_llrintF s_lroundF s_llroundF e_exp10F \
s_issignalingF $(calls:s_%=m_%) x2y2m1F \
gamma_productF lgamma_negF lgamma_productF \
Add getpayload, getpayloadf, getpayloadl. TS 18661-1 defines functions for manipulating the payloads of NaNs. This patch implements the getpayload functions for glibc; these extract the NaN payload (from an argument passed as a pointer, for which corresponding libm-test support is added) and return it in the same floating-point type. The return value of these functions is unspecified for non-NaN arguments; the patch does the simplest thing to implement, which is that the functions do not check whether the argument is a NaN and just treat the relevant bits of the representation as a payload regardless. A conversion from integer to floating-point is used to produce the required return value, except in the ldbl-128 case; as 128-bit integers are not supported for all configurations using ldbl-128, the code constructs the required floating-point representation of the return value directly instead. Tested for x86_64, x86, mips64 and powerpc. * math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (getpayload): New declaration. * math/Versions (getpayload): New libm symbol at version GLIBC_2.25. (getpayloadf): Likewise. (getpayloadl): Likewise. * math/Makefile (libm-calls): Add s_getpayloadF. * math/libm-test.inc: Include <nan-high-order-bit.h>. (struct test_f_f_data): Add comment. (RUN_TEST_fp_f): New macro. (RUN_TEST_LOOP_fp_f): Likewise. (getpayload_test_data): New array. (getpayload_test): New function. (main): Call getpayload_test. * math/gen-libm-test.pl (parse_args): Handle 'p' in argument descriptor. * manual/arith.texi (FP Bit Twiddling): Document getpayload, getpayloadf and getpayloadl. * manual/libm-err-tab.pl: Update comment on interfaces without ulps tabulated. * sysdeps/ieee754/dbl-64/s_getpayload.c: New file. * sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c: Likewise. * sysdeps/ieee754/flt-32/s_getpayloadf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_getpayloadl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_getpayloadl.c: Likewise. * 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-10-19 03:49:09 +02:00
s_nextupF s_totalorderF s_totalordermagF s_getpayloadF \
Add fromfp functions. TS 18661-1 defines fromfp functions (fromfp, fromfpx, ufromfp, ufromfpx, and float and long double variants) to convert from floating-point to an integer type with any signedness and any given width up to that of intmax_t, in any of the five IEEE rounding modes (the usual four for binary floating point, plus rounding to nearest with ties rounding away from zero), with control of whether in-range non-integer values should result in the "inexact" exception being raised. This patch implements these functions for glibc. These implementations are (apart from raising exceptions) pure integer implementations; it's entirely possible optimized versions could be devised for some architectures. A common math/fromfp.h header provides various common helper code that can readily be shared between the implementations for different types. For each type, the bulk of the implementation is also shared between the four functions, with wrappers that define UNSIGNED and INEXACT macros appropriately before including the main implementation. As the functions return intmax_t and uintmax_t without math.h being allowed to expose those typedef names, they are declared using __intmax_t and __uintmax_t as obtained from <bits/types.h>. The FP_INT_* rounding direction macros are defined as ascending integers in the order the names are listed in the TS; I see no significant value in allowing architectures to vary the values of them. The libm-test machinery is duly adapted to handle unsigned int arguments, and intmax_t and uintmax_t results. Because each test input is generally tested for four functions, five rounding modes and several different widths, the libm-test.inc additions are very large. Thus, the diffs in the body of this message exclude the libm-test.inc changes, with the full patch being attached gzipped. The bulk of the new tests were generated (expanded from a test input plus rounding results and information about where it lies in the relevant interval between integers, to libm-test tests for all relevant combinations of function, rounding direction and width) by a script that's included in the patch as math/gen-fromfp-tests.py (input data math/gen-fromfp-tests-inputs); as an ad hoc script that's not really expected to be rerun, it's not very polished, but it's at least plausibly useful for adding any further tests for these functions in future. I may split the libm-test tests up by function in future (so both libm-test.inc and auto-libm-test-out are split into separate files, and the tests for each function are also built and run separately), but not for 2.25. For no obvious reason, adding tgmath tests for the new functions resulted in -Wuninitialized errors from test-tgmath.c about the variable i being used uninitialized. Those errors were correct - the variable is read by the frexp version in test-tgmath.c (where real frexp would write through that pointer instead of reading it) - but I don't know why this patch would result in the pre-existing issue being newly detected. The patch initializes the variable to avoid those errors. With these changes, glibc 2.25 should have all the library features from TS 18661-1 other than the functions that round result to narrower type (and constant rounding directions, but I'm considering those mainly a compiler feature not a library one). Tested for x86_64, x86, mips64 and powerpc. * math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (fromfp): New declaration. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fromfpx): Likewise. [__GLIBC_USE (IEC_60559_BFP_EXT)] (ufromfp): Likewise. [__GLIBC_USE (IEC_60559_BFP_EXT)] (ufromfpx): Likewise. * math/tgmath.h (__TGMATH_TERNARY_FIRST_REAL_RET_ONLY): New macro. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fromfp): Likewise. [__GLIBC_USE (IEC_60559_BFP_EXT)] (ufromfp): Likewise. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fromfpx): Likewise. [__GLIBC_USE (IEC_60559_BFP_EXT)] (ufromfpx): Likewise. * math/math.h: Include <bits/types.h>. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FP_INT_UPWARD): New enum constant and macro. (FP_INT_DOWNWARD): Likewise. (FP_INT_TOWARDZERO): Likewise. (FP_INT_TONEARESTFROMZERO): Likewise. (FP_INT_TONEAREST): Likewise. * math/Versions (fromfp): New libm symbol at version GLIBC_2.25. (fromfpf): Likewise. (fromfpl): Likewise. (ufromfp): Likewise. (ufromfpf): Likewise. (ufromfpl): Likewise. (fromfpx): Likewise. (fromfpxf): Likewise. (fromfpxl): Likewise. (ufromfpx): Likewise. (ufromfpxf): Likewise. (ufromfpxl): Likewise. * math/Makefile (libm-calls): Add s_fromfpF, s_ufromfpF, s_fromfpxF and s_ufromfpxF. * math/gen-fromfp-tests.py: New file. * math/gen-fromfp-tests-inputs: Likewise. * math/libm-test.inc: Include <stdint.h> (check_intmax_t): New function. (check_uintmax_t): Likewise. (struct test_fiu_M_data): New type. (struct test_fiu_U_data): Likewise. (RUN_TEST_fiu_M): New macro. (RUN_TEST_LOOP_fiu_M): Likewise. (RUN_TEST_fiu_U): Likewise. (RUN_TEST_LOOP_fiu_U): Likewise. (fromfp_test_data): New array. (fromfp_test): New function. (fromfpx_test_data): New array. (fromfpx_test): New function. (ufromfp_test_data): New array. (ufromfp_test): New function. (ufromfpx_test_data): New array. (ufromfpx_test): New function. (main): Call fromfp_test, fromfpx_test, ufromfp_test and ufromfpx_test. * math/gen-libm-test.pl (parse_args): Handle u, M and U descriptor characters. * math/test-tgmath-ret.c: Include <stdint.h>. (rm): New variable. (width): Likewise. (CHECK_RET_CONST_TYPE): Take extra arguments and pass them to called function. (CHECK_RET_CONST_FLOAT): Take extra arguments and pass them to CHECK_RET_CONST_TYPE. (CHECK_RET_CONST_DOUBLE): Likewise. (CHECK_RET_CONST_LDOUBLE): Likewise. (CHECK_RET_CONST): Take extra arguments and pass them to calls macros. (fromfp): New CHECK_RET_CONST call. (ufromfp): Likewise. (fromfpx): Likewise. (ufromfpx): Likewise. (do_test): Call check_return_fromfp, check_return_ufromfp, check_return_fromfpx and check_return_ufromfpx. * math/test-tgmath.c: Include <stdint.h> (NCALLS): Increase to 138. (F(compile_test)): Initialize i. Call fromfp functions. (F(fromfp)): New function. (F(fromfpx)): Likewise. (F(ufromfp)): Likewise. (F(ufromfpx)): Likewise. * manual/arith.texi (Rounding Functions): Document FP_INT_UPWARD, FP_INT_DOWNWARD, FP_INT_TOWARDZERO, FP_INT_TONEARESTFROMZERO, FP_INT_TONEAREST, fromfp, fromfpf, fromfpl, ufromfp, ufromfpf, ufromfpl, fromfpx, fromfpxf, fromfpxl, ufromfpx, ufromfpxf and ufromfpxl. * manual/libm-err-tab.pl (@all_functions): Add fromfp, fromfpx, ufromfp and ufromfpx. * math/fromfp.h: New file. * sysdeps/ieee754/dbl-64/s_fromfp.c: Likewise. * sysdeps/ieee754/dbl-64/s_fromfp_main.c: Likewise. * sysdeps/ieee754/dbl-64/s_fromfpx.c: Likewise. * sysdeps/ieee754/dbl-64/s_ufromfp.c: Likewise. * sysdeps/ieee754/dbl-64/s_ufromfpx.c: Likewise. * sysdeps/ieee754/flt-32/s_fromfpf.c: Likewise. * sysdeps/ieee754/flt-32/s_fromfpf_main.c: Likewise. * sysdeps/ieee754/flt-32/s_fromfpxf.c: Likewise. * sysdeps/ieee754/flt-32/s_ufromfpf.c: Likewise. * sysdeps/ieee754/flt-32/s_ufromfpxf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_fromfpl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_fromfpl_main.c: Likewise. * sysdeps/ieee754/ldbl-128/s_fromfpxl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_ufromfpl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_ufromfpxl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_fromfpl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_fromfpl_main.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_fromfpxl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_ufromfpl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_ufromfpxl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fromfpl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fromfpl_main.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fromfpxl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_ufromfpl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_ufromfpxl.c: Likewise. * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fromfp, ufromfp, fromfpx and ufromfpx. (CFLAGS-nldbl-fromfp.c): New variable. (CFLAGS-nldbl-fromfpx.c): Likewise. (CFLAGS-nldbl-ufromfp.c): Likewise. (CFLAGS-nldbl-ufromfpx.c): Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-compat.h: Include <stdint.h>. * sysdeps/ieee754/ldbl-opt/nldbl-fromfp.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-fromfpx.c: Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-ufromfp.c: Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-ufromfpx.c: Likewise. * 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-31 01:40:59 +01:00
s_setpayloadF s_setpayloadsigF s_roundevenF s_fromfpF s_ufromfpF \
s_fromfpxF s_ufromfpxF $(gen-libm-calls)
libm-compat-calls = \
w_acosF_compat w_acoshF_compat w_asinF_compat w_atan2F_compat \
w_atanhF_compat w_coshF_compat w_exp2F_compat w_exp10F_compat \
w_fmodF_compat w_hypotF_compat w_j0F_compat w_j1F_compat \
w_jnF_compat w_log2F_compat w_log10F_compat w_logF_compat \
w_powF_compat w_remainderF_compat w_scalbF_compat \
w_sinhF_compat w_sqrtF_compat w_tgammaF_compat \
w_lgammaF_r_compat w_lgammaF_compat2 w_expF_compat \
w_lgamma_compatF k_standardF
# Type specific routine support.
#
# The following three variables control what is included for each type:
#
# type-floatN-suffix = The suffix of the type
# type-floatN-routines = Type specific support objects
# type-floatN-yes = If the type is supported, evaluates to floatN
#
# Finally, note that types is an intentionally recursive variable.
# We only know the full set of supported types for the target machine
# after the Rules makefile has been parsed.
types = $(type-ldouble-$(long-double-fcts)) double float
# long double support
type-ldouble-suffix := l
Add iscanonical. TS 18661-1 adds an iscanonical classification macro to <math.h>. The motivation for this is decimal floating-point, where some values have both canonical and noncanonical encodings. For IEEE binary interchange formats, all encodings are canonical. For x86/m68k ldbl-96, and for ldbl-128ibm, there are encodings that do not represent any valid value of the type; although formally iscanonical does not need to handle trap representations (and so could just always return 1), it seems useful, and in line with the description in the TS of "representations that are extraneous to the floating-point model" as being non-canonical (as well as "redundant representations of some or all of its values"), for it to detect those representations and return 0 for them. This patch adds iscanonical to glibc. It goes in a header <bits/iscanonical.h>, included under appropriate conditions in <math.h>. The default header version just evaluates the argument (converted to its semantic type, though current GCC will probably discard that conversion and any exceptions resulting from it) and returns 1. ldbl-96 and ldbl-128ibm then have versions of the header that call a function __iscanonicall for long double (the sizeof-based tests will of course need updating for float128 support, like other such type-generic macro implementations). The ldbl-96 version of __iscanonicall has appropriate conditionals to reflect the differences in the m68k version of that format (where the high mantissa bit may be either 0 or 1 when the exponent is 0 or 0x7fff). Corresponding tests for those formats are added as well. Other architectures do not have any new functions added because just returning 1 is correct for all their floating-point formats. Tested for x86_64, x86, mips64 (to test the default macro version) and powerpc. * math/math.h [__GLIBC_USE (IEC_60559_BFP_EXT)]: Include <bits/iscanonical.h>. * bits/iscanonical.h: New file. * math/s_iscanonicall.c: Likewise. * math/Versions (__iscanonicall): New libm symbol at version GLIBC_2.25. * math/libm-test.inc (iscanonical_test_data): New array. (iscanonical_test): New function. (main): Call iscanonical_test. * math/Makefile (headers): Add bits/iscanonical.h. (type-ldouble-routines): Add s_iscanonicall. * manual/arith.texi (Floating Point Classes): Document iscanonical. * manual/libm-err-tab.pl: Update comment on interfaces without ulps tabulated. * sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h: New file. * sysdeps/ieee754/ldbl-128ibm/s_iscanonicall.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/test-iscanonical-ldbl-128ibm.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/Makefile (tests): Add test-iscanonical-ldbl-128ibm. * sysdeps/ieee754/ldbl-96/bits/iscanonical.h: New file. * sysdeps/ieee754/ldbl-96/s_iscanonicall.c: Likewise. * sysdeps/ieee754/ldbl-96/test-iscanonical-ldbl-96.c: Likewise. * sysdeps/ieee754/ldbl-96/Makefile: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/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/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2016-09-30 02:24:19 +02:00
type-ldouble-routines := t_sincosl k_sincosl s_iscanonicall
type-ldouble-yes := ldouble
# double support
type-double-suffix :=
type-double-routines := branred doasin dosincos halfulp mpa mpatan2 \
mpatan mpexp mplog mpsqrt mptan sincos32 slowexp \
slowpow sincostab k_rem_pio2
# float support
type-float-suffix := f
type-float-routines := k_rem_pio2f
# Apply suffix to each type in arg 1
type-foreach = $(foreach t,$(types),$(subst F,$(type-$(t)-suffix),$(1)))
libm-routines = $(strip $(libm-support) \
$(call type-foreach, $(libm-compat-calls)) \
$(call type-foreach, $(libm-calls)) \
$(foreach t, $(types), $(type-$(t)-routines))) \
# These functions are in libc instead of libm because __printf_fp
# calls them, so any program using printf will need them linked in,
# and we don't want to have to link every program with -lm.
# In libm-calls (above), list m_foo in place of s_foo for any
# routine that should be compiled separately for its libc and libm versions.
calls = s_isinfF s_isnanF s_finiteF s_copysignF s_modfF s_scalbnF s_frexpF \
s_signbitF $(gen-calls)
gen-calls = s_ldexpF
generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
# We need to install libm.so and libm.a as linker scripts
# for transparent use of vector math library.
install-lib-ldscripts := libm.so libm.a
install-others = $(inst_libdir)/libm.so $(inst_libdir)/libm.a
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
$(libm) \
$(libmvec) \
$(+force)
(echo '/* GNU ld script'; echo '*/';\
cat $<; \
echo 'GROUP ( $(slibdir)/libm.so$(libm.so-version) ' \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
$(inst_libdir)/libm-$(version).a: $(objpfx)libm.a \
$(+force)
$(do-install)
$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
$(inst_libdir)/libm-$(version).a \
$(objpfx)../mathvec/libmvec.a \
$(+force)
(echo '/* GNU ld script'; echo '*/';\
cat $<; \
echo 'GROUP ( $(libdir)/libm-$(version).a $(libdir)/libmvec.a )' \
) > $@.new
mv -f $@.new $@
endif
Update. 1997-03-20 01:49 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/s_tanhl.c (__tanhl): Correct handling of -inf. * Makeconfig: (rpath-link): Add math/ directory. (math-objdir): New variable. (link-extra-lib): Define to special version when $(common-objpfx)!=$(objpfx) to allow libraries outside $(common-objpfx) be linked to the application. * math/Makefile: Add rules to build and run test programs. * math/libm-test.c (_GNU_SOURCE): Define only if still undefined. (check_equal): Correct check for error. (ceil_test): Fix typo. (log_test): Fix typo. (floor_test): Fix typo. (pow_test): Fix typos. (log10_test): Allow slight incorrectness for `log10(e)'. (modf_test): New functions to test `modf' et.al. (hypot_test): Rewrite test completely. Patch partly by Andreas Jaeger. * math/test-double.h (__NO_MATH_INLINES): Define only if not already defined. * math/test-float.h: Likewise. * math/test-logdouble.h: Likewise. * setjmp/setjmp.h: Change references of ANSI C to ISO C. * setjmp/tst-setjmp.c: Correct and extend test suite. * sysdeps/i386/__longjmp.S: Update copyright. * sysdeps/i386/bsd-_setjmp.S: Correct fatal bug in jump to `__sigsetjmp' in PIC code. * sysdeps/i386/bsd-setjmp.S: Likewise. * sysdeps/libm-i387/e_pow.S: Correct recognition of mantissa overflow. * sysdeps/libm-i387/e_powf.S: Likewise. * sysdeps/libm-i387/s_expm1.S: Handle x == +-0 as a special case since expm1(-0) == -0. * sysdeps/libm-i387/s_expm1f.S: Likewise. * sysdeps/libm-i387/s_expm1l.S: Likewise. * sysdeps/libm-ieee754/s_modf.c: Optimize code by avoiding unneeded access to FP number. * sysdeps/libm-ieee754/s_modff.c: Likewise. * sysdeps/libm-ieee754/s_modfl.c: Correct former completely bogus code. It never worked correctly. * sysdeps/libm-ieee754/s_tanh.c: Handle x == +-0 as a special case since tanh(-0) == -0. * sysdeps/libm-ieee754/s_tanhf.c: Likewise. 1997-03-19 21:13 Ulrich Drepper <drepper@cygnus.com> * stdlib/strtod.c (STRTOL): Use wchar_t as type for `decimal' and `thousands' to support systems with sizeof(wchar_t) != sizeof(wint_t). Blargh. * sysdeps/unix/sysv/linux/socketbits.h: Remove definition of SOL_IP, SOL_TCP, SOL_UDP, and SOL_IPX as they are defined in appropriate headers. * sysdeps/unix/sysv/linux/writev.c: Don't use MAX_IOVEC. Test for UIO_FASTIOV and set to 8 if not available. * sysdeps/unix/sysv/linux/readv.c: Likewise. Patch by HJ Lu. * sysdeps/unix/sysv/linux/xstat.c: Include <kernel_stat.h>, not "kernel_stat.h". * sysdeps/unix/sysv/linux/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/fxstat.c: Likewise. Reported by fabsoft@fabsoft2.zarm.uni-bremen.de.
1997-03-20 03:20:57 +01:00
# Rules for the test suite.
tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test \
test-misc test-fpucw test-fpucw-ieee tst-definitions test-tgmath \
test-tgmath-ret bug-nextafter bug-nexttoward bug-tgmath1 \
test-tgmath-int test-tgmath2 test-powl tst-CMPLX tst-CMPLX2 test-snan \
test-fenv-tls test-fenv-preserve test-fenv-return test-fenvinline \
Fix finite-math-only lgamma functions signgam setting (bug 19211). The lgamma inline functions in bits/math-finite.h do not set signgam if __USE_ISOC99, even when other feature test macros mean a standard such as XSI POSIX is selected for which it should be set. (This is essentially the opposite issue to bug 15421, the out-of-line versions setting signgam even when they shouldn't.) This patch fixes those functions to use __USE_MISC || __USE_XOPEN as the condition for when to set signgam, since it's the condition for when math.h declares signgam. The legacy gamma* names are only declared at all if __USE_MISC || __USE_XOPEN, so they just set signgam unconditionally. Tests for certain standards or not using _GNU_SOURCE cannot use test-skeleton.c (this is a known issue noted on the wiki todo list). Thus, the new tests that signgam remains not set in ISO C modes do not use test-skeleton.c. They also define _ISOMAC to avoid running into declarations in the internal include/ headers that only work in _GNU_SOURCE mode. Tested for x86_64 and x86. [BZ #19211] * math/bits/math-finite.h (lgamma): Set signgam if [__USE_MISC || __USE_XOPEN], not if [!__USE_ISOC99]. (lgammaf): Likewise. (lgammal): Likewise. (gamma): Set signgam unconditionally, not if [!__USE_ISOC99]. (gammaf): Likewise. (gammal): Likewise. * math/test-signgam-finite-c11.c: New file. * math/test-signgam-finite-c99.c: Likewise. * math/test-signgam-finite.c: Likewise. * math/Makefile (tests): Add test-signgam-finite, test-signgam-finite-c99 and test-signgam-finite-c11. (CFLAGS-test-signgam-finite.c): New variable. (CFLAGS-test-signgam-finite-c99.c): Likewise. (CFLAGS-test-signgam-finite-c11.c): Likewise.
2015-11-05 22:23:07 +01:00
test-nearbyint-except test-fenv-clear test-signgam-finite \
Fix powerpc nearbyint wrongly clearing "inexact" and leaving traps disabled (bug 19228). Similar to bug 15491 recently fixed for x86_64 / x86, the powerpc (both powerpc32 and powerpc64) hard-float implementations of nearbyintf and nearbyint wrongly clear an "inexact" exception that was raised before the function was called; this shows up as failure of the test math/test-nearbyint-except added when that bug was fixed. They also wrongly leave traps on "inexact" disabled if they were enabled before the function was called. This patch fixes the bugs similar to how the x86 bug was fixed: saving and restoring the whole floating-point state, both to restore the original "inexact" flag state and to restore the original state of whether traps on "inexact" were enabled. Because there's a convenient point in the powerpc implementations to save state after any sNaN arguments will have raised "invalid" but before "inexact" traps need to be disabled, no special handling for "invalid" is needed as in the x86 version. Tested for powerpc64 and powerpc32, where it fixes the math/test-nearbyint-except failure as well as fixing the new test math/test-nearbyint-except-2 added by this patch. Also tested for x86_64 and x86 that the new test passes. If powerpc experts see a more efficient way of doing this (e.g. instruction positioning that's better for pipelines on typical processors) then of course followups optimizing the fix are welcome. [BZ #19228] * sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S (__nearbyint): Save and restore full floating-point state. * sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S (__nearbyintf): Likewise. * sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S (__nearbyint): Likewise. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S (__nearbyintf): Likewise. * math/test-nearbyint-except-2.c: New file. * math/Makefile (tests): Add test-nearbyint-except-2.
2015-11-11 01:06:09 +01:00
test-signgam-finite-c99 test-signgam-finite-c11 \
Fix lgamma setting signgam for ISO C (bug 15421). The lgamma (and likewise lgammaf, lgammal) function wrongly sets the signgam variable even when building for strict ISO C conformance (-std=c99 / -std=c11), although the user may define such a variable and it's only in the implementation namespace for POSIX with XSI extensions enabled. Following discussions starting at <https://sourceware.org/ml/libc-alpha/2013-04/msg00767.html> and <https://sourceware.org/ml/libc-alpha/2015-10/msg00844.html>, it seems that the safest approach for fixing this particular issue is for signgam to become a weak alias for a newly exported symbol __signgam, with the library functions only setting __signgam, at which point static linker magic will preserve the alias for newly linked binaries that refer to the library's signgam rather than defining their own, while breaking the alias for programs that define their own signgam, with new symbol versions for lgamma functions and with compat symbols for existing binaries that set both signgam and __signgam. This patch implements that approach for the fix. signgam is made into a weak alias. The four symbols __signgam, lgamma, lgammaf, lgammal get new symbol versions at version GLIBC_2.23, with the existing versions of lgamma, lgammaf and lgammal becoming compat symbols. When the compat versions are built, gamma, gammaf and gammal are aliases for the compat versions (i.e. always set signgam); this is OK as they are not ISO C functions, and avoids adding new symbol versions for them unnecessarily. When the compat versions are not built (i.e. for static linking and for future glibc ports), gamma, gammaf and gammal are aliases for the new versions that set __signgam. The ldbl-opt versions are updated accordingly. The lgamma wrappers are adjusted so that the same source files, included from different files with different definitions of USE_AS_COMPAT, can build either the new versions or the compat versions. Similar changes are made to the ia64 versions (untested). Tests are added that the lgamma functions do not interfere with a user variable called signgam for ISO C, with various choices for the size of that variable, whether it is initialized, and for static and dynamic linking. The conformtest whitelist entry is removed as well. Tested for x86_64, x86, mips64 and powerpc, including looking at objdump --dynamic-syms output to make sure the expected sets of symbols were aliases. Also spot-tested that a binary built with old glibc works properly (i.e. gets signgam set) when run with new glibc. [BZ #15421] * sysdeps/ieee754/s_signgam.c (signgam): Rename to __signgam, initialize with 0 and define as weak alias of __signgam. * include/math.h [!_ISOMAC] (__signgam): Declare. * math/Makefile (libm-calls): Add w_lgamma_compat. (tests): Add test-signgam-uchar, test-signgam-uchar-init, test-signgam-uint, test-signgam-uint-init, test-signgam-ullong and test-signgam-ullong-init. (tests-static): Add test-signgam-uchar-static, test-signgam-uchar-init-static, test-signgam-uint-static, test-signgam-uint-init-static, test-signgam-ullong-static and test-signgam-ullong-init-static. (CFLAGS-test-signgam-uchar.c): New variable. (CFLAGS-test-signgam-uchar-init.c): Likewise. (CFLAGS-test-signgam-uchar-static.c): Likewise. (CFLAGS-test-signgam-uchar-init-static.c): Likewise. (CFLAGS-test-signgam-uint.c): Likewise. (CFLAGS-test-signgam-uint-init.c): Likewise. (CFLAGS-test-signgam-uint-static.c): Likewise. (CFLAGS-test-signgam-uint-init-static.c): Likewise. (CFLAGS-test-signgam-ullong.c): Likewise. (CFLAGS-test-signgam-ullong-init.c): Likewise. (CFLAGS-test-signgam-ullong-static.c): Likewise. (CFLAGS-test-signgam-ullong-init-static.c): Likewise. * math/Versions (libm): Add GLIBC_2.23. * math/lgamma-compat.h: New file. * math/test-signgam-main.c: Likewise. * math/test-signgam-uchar-init-static.c: Likewise. * math/test-signgam-uchar-init.c: Likewise. * math/test-signgam-uchar-static.c: Likewise. * math/test-signgam-uchar.c: Likewise. * math/test-signgam-uint-init-static.c: Likewise. * math/test-signgam-uint-init.c: Likewise. * math/test-signgam-uint-static.c: Likewise. * math/test-signgam-uint.c: Likewise. * math/test-signgam-ullong-init-static.c: Likewise. * math/test-signgam-ullong-init.c: Likewise. * math/test-signgam-ullong-static.c: Likewise. * math/test-signgam-ullong.c: Likewise. * math/w_lgamma.c: Rename to w_lgamma_main.c and replace by wrapper of w_lgamma_main.c. * math/w_lgamma_compat.c: New file. * math/w_lgamma_compatf.c: Likewise. * math/w_lgamma_compatl.c: Likewise. * math/w_lgamma_main.c: New file. Based on w_lgamma.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgamma): Change to LGFUNC (__lgamma). Use CALL_LGAMMA. * math/w_lgammaf.c: Rename to w_lgammaf_main.c and replace by wrapper of w_lgammaf_main.c. * math/w_lgammaf_main.c: New file. Based on w_lgammaf.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgammaf): Change to LGFUNC (__lgammaf). Use CALL_LGAMMA. * math/w_lgammal.c: Rename to w_lgammal_main.c and replace by wrapper of w_lgammal_main.c. * math/w_lgammal_main.c: New file. Based on w_lgammal.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgammal): Change to LGFUNC (__lgammal). Use CALL_LGAMMA. * sysdeps/ia64/fpu/lgamma-compat.h: New file. * sysdeps/ia64/fpu/w_lgamma.c: Move to .... * sysdeps/ia64/fpu/w_lgamma_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgamma): Change to LGFUNC (lgamma). Use CALL_LGAMMA. (__ieee754_gamma): Define as alias. * sysdeps/ia64/fpu/w_lgammaf.c: Move to .... * sysdeps/ia64/fpu/w_lgammaf_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgammaf): Change to LGFUNC (lgammaf). Use CALL_LGAMMA. (__ieee754_gammaf): Define as alias. * sysdeps/ia64/fpu/w_lgammal.c: Move to .... * sysdeps/ia64/fpu/w_lgammal_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgammal): Change to LGFUNC (lgammal). Use CALL_LGAMMA. (__ieee754_gammal): Define as alias. * sysdeps/ieee754/ldbl-opt/w_lgamma.c: Move to .... * sysdeps/ieee754/ldbl-opt/w_lgamma_compat.c: ...here. Include <math/w_lgamma_compat.c>. [LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)] (__lgammal_dbl_compat): Define as alias of __lgamma_compat and use in defining lgammal. * sysdeps/ieee754/ldbl-opt/w_lgammal.c: Move to .... * sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c: ...here. Include <math/lgamma-compat.h> and <math/w_lgamma_compatl.c>. (USE_AS_COMPAT): New macro. (LGAMMA_OLD_VER): Undefine and redefine. (lgammal): Do not define here. (gammal): Only define here if [GAMMA_ALIAS]. * conform/linknamespace.pl (@whitelist): Remove signgam. * 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.
2015-11-20 23:49:59 +01:00
test-nearbyint-except-2 test-signgam-uchar test-signgam-uchar-init \
test-signgam-uint test-signgam-uint-init test-signgam-ullong \
test-signgam-ullong-init test-nan-overflow test-nan-payload \
Add fesetexcept. TS 18661-1 defines an fesetexcept function for setting floating-point exception flags without the side-effect of causing enabled traps to be taken. This patch series implements this function for glibc. The present patch adds the fallback stub implementation, x86 and x86_64 implementations, documentation, tests and ABI baseline updates. The remaining patches, some of them untested, add implementations for other architectures. The implementations generally follow those of the fesetexceptflag function. As for fesetexceptflag, the approach taken for architectures where setting flags causes enabled traps to be taken is to set the flags (and potentially cause traps) rather than refusing to set the flags and returning an error. Since ISO C and TS 18661 provide no way to enable traps, this is formally in accordance with the standards. The NEWS entry should be considered a placeholder, since this patch series is intended to be followed by further such series adding other TS 18661-1 features, so that the NEWS entry would end up looking more like * New <fenv.h> features from TS 18661-1:2014 are added to libm: the fesetexcept, fetestexceptflag, fegetmode and fesetmode functions, the femode_t type and the FE_DFL_MODE macro. with hopefully more such entries for other features, rather than having an entry for a single function in the end. I believe we have consensus for adding TS 18661-1 interfaces as per <https://sourceware.org/ml/libc-alpha/2016-06/msg00421.html>. Tested for x86_64, x86, mips64 (hard float, and soft float to test the fallback version), arm (hard float) and powerpc (hard float, soft float and e500). * math/fesetexcept.c: New file. * sysdeps/i386/fpu/fesetexcept.c: Likewise. * sysdeps/x86_64/fpu/fesetexcept.c: Likewise. * math/fenv.h: Define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION and include <bits/libc-header-start.h> instead of including <features.h>. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fesetexcept): New function declaration. * manual/arith.texi (fesetexcept): Document function. * math/Versions (fesetexcept): New libm symbol at version GLIBC_2.25. * math/Makefile (libm-support): Add fesetexcept. (tests): Add test-fesetexcept and test-fesetexcept-traps. * math/test-fesetexcept.c: New file. * math/test-fesetexcept-traps.c: Likewise. * 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-08-16 18:16:10 +02:00
test-fexcept test-fexcept-traps test-fesetexcept \
Add femode_t functions. TS 18661-1 defines a type femode_t to represent the set of dynamic floating-point control modes (such as the rounding mode and trap enablement modes), and functions fegetmode and fesetmode to manipulate those modes (without affecting other state such as the raised exception flags) and a corresponding macro FE_DFL_MODE. This patch series implements those interfaces for glibc. This first patch adds the architecture-independent pieces, the x86 and x86_64 implementations, and the <bits/fenv.h> and ABI baseline updates for all architectures so glibc keeps building and passing the ABI tests on all architectures. Subsequent patches add the fegetmode and fesetmode implementations for other architectures. femode_t is generally an integer type - the same type as fenv_t, or as the single element of fenv_t where fenv_t is a structure containing a single integer (or the single relevant element, where it has elements for both status and control registers) - except where architecture properties or consistency with the fenv_t implementation indicate otherwise. FE_DFL_MODE follows FE_DFL_ENV in whether it's a magic pointer value (-1 cast to const femode_t *), a value that can be distinguished from valid pointers by its high bits but otherwise contains a representation of the desired register contents, or a pointer to a constant variable (the powerpc case; __fe_dfl_mode is added as an exported constant object, an alias to __fe_dfl_env). Note that where architectures (that share a register between control and status bits) gain definitions of new floating-point control or status bits in future, the implementations of fesetmode for those architectures may need updating (depending on whether the new bits are control or status bits and what the implementation does with previously unknown bits), just like existing implementations of <fenv.h> functions that take care not to touch reserved bits may need updating when the set of reserved bits changes. (As any new bits are outside the scope of ISO C, that's just a quality-of-implementation issue for supporting them, not a conformance issue.) As with fenv_t, femode_t should properly include any software DFP rounding mode (and for both fenv_t and femode_t I'd consider that fragment of DFP support appropriate for inclusion in glibc even in the absence of the rest of libdfp; hardware DFP rounding modes should already be included if the definitions of which bits are status / control bits are correct). Tested for x86_64, x86, mips64 (hard float, and soft float to test the fallback version), arm (hard float) and powerpc (hard float, soft float and e500). Other architecture versions are untested. * math/fegetmode.c: New file. * math/fesetmode.c: Likewise. * sysdeps/i386/fpu/fegetmode.c: Likewise. * sysdeps/i386/fpu/fesetmode.c: Likewise. * sysdeps/x86_64/fpu/fegetmode.c: Likewise. * sysdeps/x86_64/fpu/fesetmode.c: Likewise. * math/fenv.h: Update comment on inclusion of <bits/fenv.h>. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fegetmode): New function declaration. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fesetmode): Likewise. * bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/aarch64/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/alpha/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/arm/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/hppa/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/ia64/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/m68k/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/microblaze/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/mips/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/nios2/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/powerpc/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (__fe_dfl_mode): New variable declaration. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/s390/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/sh/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/sparc/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/tile/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * sysdeps/x86/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (femode_t): New typedef. [__GLIBC_USE (IEC_60559_BFP_EXT)] (FE_DFL_MODE): New macro. * manual/arith.texi (FE_DFL_MODE): Document macro. (fegetmode): Document function. (fesetmode): Likewise. * math/Versions (fegetmode): New libm symbol at version GLIBC_2.25. (fesetmode): Likewise. * math/Makefile (libm-support): Add fegetmode and fesetmode. (tests): Add test-femode and test-femode-traps. * math/test-femode-traps.c: New file. * math/test-femode.c: Likewise. * sysdeps/powerpc/fpu/fenv_const.c (__fe_dfl_mode): Declare as alias for __fe_dfl_env. * sysdeps/powerpc/nofpu/fenv_const.c (__fe_dfl_mode): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fenv_const.c (__fe_dfl_mode): Likewise. * sysdeps/powerpc/Versions (__fe_dfl_mode): New libm symbol at version GLIBC_2.25. * 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-09-07 18:40:09 +02:00
test-fesetexcept-traps test-fetestexceptflag test-femode \
test-femode-traps test-iszero-excess-precision \
test-iseqsig-excess-precision test-flt-eval-method \
Define FE_SNANS_ALWAYS_SIGNAL. TS 18661-1 defines a macro FE_SNANS_ALWAYS_SIGNAL in <fenv.h>, to indicate that the recommended practice regarding sNaNs (that operations always produce a qNaN output with "invalid" exception, even in the fmax / fmin / hypot / pow cases where a qNaN input would not result in qNaN output) is followed. Now that those functions with C99 special cases for NaNs have been fixed not to apply those special cases to sNaN, only to qNaN, glibc follows that recommended practice. This patch makes it define the corresponding macro. Since compiler optimizations may affect whether sNaNs behave as expected and the macro relates to both language and library features, it is only defined if __SUPPORT_SNAN__ is defined (which GCC defines for -fsignaling-nans). It is also not defined if FE_INVALID is undefined, since the recommended practice specifically refers to raising the "invalid" exception, so it seems inappropriate to define the macro for soft-float cases without support for exceptions. (Further refinement would be possible in cases where bits/fenv.h is shared by configurations both with and without exceptions support.) Tested for x86_64 and x86, and also did compile-only testing for nios2 to cover the no-exceptions case. * math/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT) && FE_INVALID && __SUPPORT_SNAN__] (FE_SNANS_ALWAYS_SIGNAL): New macro. * math/test-fe-snans-always-signal.c: New file. * math/Makefile (tests): Add test-fe-snans-always-signal. (CFLAGS-test-fe-snans-always-signal.c): New variable. * manual/arith.texi (Infinity and NaN): Document FE_SNANS_ALWAYS_SIGNAL.
2016-12-16 19:03:25 +01:00
test-fp-ilogb-constants test-fp-llogb-constants \
test-fe-snans-always-signal $(tests-static)
Fix lgamma setting signgam for ISO C (bug 15421). The lgamma (and likewise lgammaf, lgammal) function wrongly sets the signgam variable even when building for strict ISO C conformance (-std=c99 / -std=c11), although the user may define such a variable and it's only in the implementation namespace for POSIX with XSI extensions enabled. Following discussions starting at <https://sourceware.org/ml/libc-alpha/2013-04/msg00767.html> and <https://sourceware.org/ml/libc-alpha/2015-10/msg00844.html>, it seems that the safest approach for fixing this particular issue is for signgam to become a weak alias for a newly exported symbol __signgam, with the library functions only setting __signgam, at which point static linker magic will preserve the alias for newly linked binaries that refer to the library's signgam rather than defining their own, while breaking the alias for programs that define their own signgam, with new symbol versions for lgamma functions and with compat symbols for existing binaries that set both signgam and __signgam. This patch implements that approach for the fix. signgam is made into a weak alias. The four symbols __signgam, lgamma, lgammaf, lgammal get new symbol versions at version GLIBC_2.23, with the existing versions of lgamma, lgammaf and lgammal becoming compat symbols. When the compat versions are built, gamma, gammaf and gammal are aliases for the compat versions (i.e. always set signgam); this is OK as they are not ISO C functions, and avoids adding new symbol versions for them unnecessarily. When the compat versions are not built (i.e. for static linking and for future glibc ports), gamma, gammaf and gammal are aliases for the new versions that set __signgam. The ldbl-opt versions are updated accordingly. The lgamma wrappers are adjusted so that the same source files, included from different files with different definitions of USE_AS_COMPAT, can build either the new versions or the compat versions. Similar changes are made to the ia64 versions (untested). Tests are added that the lgamma functions do not interfere with a user variable called signgam for ISO C, with various choices for the size of that variable, whether it is initialized, and for static and dynamic linking. The conformtest whitelist entry is removed as well. Tested for x86_64, x86, mips64 and powerpc, including looking at objdump --dynamic-syms output to make sure the expected sets of symbols were aliases. Also spot-tested that a binary built with old glibc works properly (i.e. gets signgam set) when run with new glibc. [BZ #15421] * sysdeps/ieee754/s_signgam.c (signgam): Rename to __signgam, initialize with 0 and define as weak alias of __signgam. * include/math.h [!_ISOMAC] (__signgam): Declare. * math/Makefile (libm-calls): Add w_lgamma_compat. (tests): Add test-signgam-uchar, test-signgam-uchar-init, test-signgam-uint, test-signgam-uint-init, test-signgam-ullong and test-signgam-ullong-init. (tests-static): Add test-signgam-uchar-static, test-signgam-uchar-init-static, test-signgam-uint-static, test-signgam-uint-init-static, test-signgam-ullong-static and test-signgam-ullong-init-static. (CFLAGS-test-signgam-uchar.c): New variable. (CFLAGS-test-signgam-uchar-init.c): Likewise. (CFLAGS-test-signgam-uchar-static.c): Likewise. (CFLAGS-test-signgam-uchar-init-static.c): Likewise. (CFLAGS-test-signgam-uint.c): Likewise. (CFLAGS-test-signgam-uint-init.c): Likewise. (CFLAGS-test-signgam-uint-static.c): Likewise. (CFLAGS-test-signgam-uint-init-static.c): Likewise. (CFLAGS-test-signgam-ullong.c): Likewise. (CFLAGS-test-signgam-ullong-init.c): Likewise. (CFLAGS-test-signgam-ullong-static.c): Likewise. (CFLAGS-test-signgam-ullong-init-static.c): Likewise. * math/Versions (libm): Add GLIBC_2.23. * math/lgamma-compat.h: New file. * math/test-signgam-main.c: Likewise. * math/test-signgam-uchar-init-static.c: Likewise. * math/test-signgam-uchar-init.c: Likewise. * math/test-signgam-uchar-static.c: Likewise. * math/test-signgam-uchar.c: Likewise. * math/test-signgam-uint-init-static.c: Likewise. * math/test-signgam-uint-init.c: Likewise. * math/test-signgam-uint-static.c: Likewise. * math/test-signgam-uint.c: Likewise. * math/test-signgam-ullong-init-static.c: Likewise. * math/test-signgam-ullong-init.c: Likewise. * math/test-signgam-ullong-static.c: Likewise. * math/test-signgam-ullong.c: Likewise. * math/w_lgamma.c: Rename to w_lgamma_main.c and replace by wrapper of w_lgamma_main.c. * math/w_lgamma_compat.c: New file. * math/w_lgamma_compatf.c: Likewise. * math/w_lgamma_compatl.c: Likewise. * math/w_lgamma_main.c: New file. Based on w_lgamma.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgamma): Change to LGFUNC (__lgamma). Use CALL_LGAMMA. * math/w_lgammaf.c: Rename to w_lgammaf_main.c and replace by wrapper of w_lgammaf_main.c. * math/w_lgammaf_main.c: New file. Based on w_lgammaf.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgammaf): Change to LGFUNC (__lgammaf). Use CALL_LGAMMA. * math/w_lgammal.c: Rename to w_lgammal_main.c and replace by wrapper of w_lgammal_main.c. * math/w_lgammal_main.c: New file. Based on w_lgammal.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgammal): Change to LGFUNC (__lgammal). Use CALL_LGAMMA. * sysdeps/ia64/fpu/lgamma-compat.h: New file. * sysdeps/ia64/fpu/w_lgamma.c: Move to .... * sysdeps/ia64/fpu/w_lgamma_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgamma): Change to LGFUNC (lgamma). Use CALL_LGAMMA. (__ieee754_gamma): Define as alias. * sysdeps/ia64/fpu/w_lgammaf.c: Move to .... * sysdeps/ia64/fpu/w_lgammaf_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgammaf): Change to LGFUNC (lgammaf). Use CALL_LGAMMA. (__ieee754_gammaf): Define as alias. * sysdeps/ia64/fpu/w_lgammal.c: Move to .... * sysdeps/ia64/fpu/w_lgammal_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgammal): Change to LGFUNC (lgammal). Use CALL_LGAMMA. (__ieee754_gammal): Define as alias. * sysdeps/ieee754/ldbl-opt/w_lgamma.c: Move to .... * sysdeps/ieee754/ldbl-opt/w_lgamma_compat.c: ...here. Include <math/w_lgamma_compat.c>. [LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)] (__lgammal_dbl_compat): Define as alias of __lgamma_compat and use in defining lgammal. * sysdeps/ieee754/ldbl-opt/w_lgammal.c: Move to .... * sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c: ...here. Include <math/lgamma-compat.h> and <math/w_lgamma_compatl.c>. (USE_AS_COMPAT): New macro. (LGAMMA_OLD_VER): Undefine and redefine. (lgammal): Do not define here. (gammal): Only define here if [GAMMA_ALIAS]. * conform/linknamespace.pl (@whitelist): Remove signgam. * 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.
2015-11-20 23:49:59 +01:00
tests-static = test-fpucw-static test-fpucw-ieee-static \
test-signgam-uchar-static test-signgam-uchar-init-static \
test-signgam-uint-static test-signgam-uint-init-static \
test-signgam-ullong-static test-signgam-ullong-init-static
Update. 1997-03-20 01:49 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/s_tanhl.c (__tanhl): Correct handling of -inf. * Makeconfig: (rpath-link): Add math/ directory. (math-objdir): New variable. (link-extra-lib): Define to special version when $(common-objpfx)!=$(objpfx) to allow libraries outside $(common-objpfx) be linked to the application. * math/Makefile: Add rules to build and run test programs. * math/libm-test.c (_GNU_SOURCE): Define only if still undefined. (check_equal): Correct check for error. (ceil_test): Fix typo. (log_test): Fix typo. (floor_test): Fix typo. (pow_test): Fix typos. (log10_test): Allow slight incorrectness for `log10(e)'. (modf_test): New functions to test `modf' et.al. (hypot_test): Rewrite test completely. Patch partly by Andreas Jaeger. * math/test-double.h (__NO_MATH_INLINES): Define only if not already defined. * math/test-float.h: Likewise. * math/test-logdouble.h: Likewise. * setjmp/setjmp.h: Change references of ANSI C to ISO C. * setjmp/tst-setjmp.c: Correct and extend test suite. * sysdeps/i386/__longjmp.S: Update copyright. * sysdeps/i386/bsd-_setjmp.S: Correct fatal bug in jump to `__sigsetjmp' in PIC code. * sysdeps/i386/bsd-setjmp.S: Likewise. * sysdeps/libm-i387/e_pow.S: Correct recognition of mantissa overflow. * sysdeps/libm-i387/e_powf.S: Likewise. * sysdeps/libm-i387/s_expm1.S: Handle x == +-0 as a special case since expm1(-0) == -0. * sysdeps/libm-i387/s_expm1f.S: Likewise. * sysdeps/libm-i387/s_expm1l.S: Likewise. * sysdeps/libm-ieee754/s_modf.c: Optimize code by avoiding unneeded access to FP number. * sysdeps/libm-ieee754/s_modff.c: Likewise. * sysdeps/libm-ieee754/s_modfl.c: Correct former completely bogus code. It never worked correctly. * sysdeps/libm-ieee754/s_tanh.c: Handle x == +-0 as a special case since tanh(-0) == -0. * sysdeps/libm-ieee754/s_tanhf.c: Likewise. 1997-03-19 21:13 Ulrich Drepper <drepper@cygnus.com> * stdlib/strtod.c (STRTOL): Use wchar_t as type for `decimal' and `thousands' to support systems with sizeof(wchar_t) != sizeof(wint_t). Blargh. * sysdeps/unix/sysv/linux/socketbits.h: Remove definition of SOL_IP, SOL_TCP, SOL_UDP, and SOL_IPX as they are defined in appropriate headers. * sysdeps/unix/sysv/linux/writev.c: Don't use MAX_IOVEC. Test for UIO_FASTIOV and set to 8 if not available. * sysdeps/unix/sysv/linux/readv.c: Likewise. Patch by HJ Lu. * sysdeps/unix/sysv/linux/xstat.c: Include <kernel_stat.h>, not "kernel_stat.h". * sysdeps/unix/sysv/linux/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/fxstat.c: Likewise. Reported by fabsoft@fabsoft2.zarm.uni-bremen.de.
1997-03-20 03:20:57 +01:00
ifneq (,$(CXX))
tests += test-math-isinff test-math-iszero
endif
ifneq (no,$(PERL))
Addition of testing infrastructure for vector math functions. We test vector math functions using scalar tests infrastructure with help of special wrappers from scalar versions to vector ones. Wrapper implemented using platform specific vector types and placed in separate file for compilation with architecture specific options, main part of test has no such options. With help of system of definitions unfolding of which is drived from test code we have wrapper called in individual testing function instead of scalar function. Also system of definitions includes generated during make check header math/libm-have-vector-test.h with series of conditional definitions which help to avoid build fails for functions having no vector versions; runtime architecture check to prevent runtime fails of test run on inappropriate hardware. * math/Makefile: Added rules for vector tests. * math/gen-libm-have-vector-test.sh: Added generation of wrapper declaration under condition. * math/test-double-vlen2.h: New file. * math/test-double-vlen4.h: New file. * math/test-double-vlen8.h: New file. * math/test-vec-loop.h: Added initialization macro. * sysdeps/x86_64/fpu/Makefile: Added variables for vector tests. * sysdeps/x86_64/fpu/libm-test-ulps: Regenarated. * sysdeps/x86_64/fpu/math-tests-arch.h: New file. * sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c: New file. * sysdeps/x86_64/fpu/test-double-vlen2.c: New file. * sysdeps/x86_64/fpu/test-double-vlen4-avx2-wrappers.c: New file. * sysdeps/x86_64/fpu/test-double-vlen4-avx2.c: New file. * sysdeps/x86_64/fpu/test-double-vlen4-wrappers.c: New file. * sysdeps/x86_64/fpu/test-double-vlen4.c: New file. * sysdeps/x86_64/fpu/test-double-vlen8-wrappers.c: New file. * sysdeps/x86_64/fpu/test-double-vlen8.c: New file.
2015-06-09 13:51:52 +02:00
libm-vec-tests = $(addprefix test-,$(libmvec-tests))
libm-tests = $(foreach t,$(types),test-$(t) test-$(t)-finite test-i$(t)) \
$(libm-vec-tests)
libm-tests.o = $(addsuffix .o,$(libm-tests))
tests += $(libm-tests)
Build most libm-test support code once per type. libm-test-driver.c contains various functions used in the course of libm testing, which are built as part of each test using this machinery. Currently, these functions get built for three tests for each type (e.g. test-float, test-ifloat, test-float-finite), plus the vector function tests. All these tests are huge and thus slow to build; the output of gen-libm-test.pl totals around 40 MB across all functions. To make the individual tests built from the Makefile smaller, it makes sense to split these tests up so the tests for each function are built separately (thus, three tests for each (function, type) pair, plus vector tests built only for functions that actually have vector versions). This improves parallelism and means that if tests fail, the summary of failed tests makes it more obvious where the problem might be without needing to look in the .out files to see which functions' tests failed (though architecture maintainers still need to keep libm-test-ulps up to date to avoid spurious failures of little interest). Simply including libm-test-driver.c as-is in such individual-function tests does not work because of unused static check_* functions (those functions only being used for the types of the outputs of the function under test). It also means the common code gets built over 1000 times instead of nine (plus vector tests). To avoid that issue, this patch splits out the bulk of the libm-test-driver.c code into a separate file libm-test-support.c (with a few functions made non-static). That separate file is built only once for each floating-point type (so at present three times, or twice on architectures with long double = double). Definitions needed in both libm-test-support.c and libm-test-driver.c go in libm-test-support.h (it's possible some of those are in fact only needed in one of the two files). libm-test-driver.c keeps definitions of a limited number of variables used to configure how libm-test-support.c behaves, various macros and structures needed by individual-function tests, and the main function. This move is also consistent in spirit with the move away from test-skeleton.c having all the test support code, to a small support/test-driver.c included in individual tests with most of the code built separately. Tested for x86_64 and x86. * math/libm-test-support.c: New file. Content from math/libm-test-driver.c. * math/libm-test-support.h: Likewise. * math/libm-test-support-double.c: New file. * math/libm-test-support-float.c: Likewise. * math/libm-test-support-ldouble.c: Likewise. * math/libm-test-driver.c: Remove main comment and header includes. Include libm-test-support.h. [!_GNU_SOURCE] (_GNU_SOURCE): Do not define. (flag_test_errno): Remove static. (flag_test_exceptions): Likewise. (flag_test_finite): Likewise. (flag_test_inline): Likewise. (flag_test_mathvec): Likewise. (test_msg): Likewise. (NO_EXCEPTION): Remove. (INVALID_EXCEPTION): Likewise. (DIVIDE_BY_ZERO_EXCEPTION): Likewise. (OVERFLOW_EXCEPTION): Likewise. (UNDERFLOW_EXCEPTION): Likewise. (INEXACT_EXCEPTION): Likewise. (INVALID_EXCEPTION_OK): Likewise. (DIVIDE_BY_ZERO_EXCEPTION_OK): Likewise. (OVERFLOW_EXCEPTION_OK): Likewise. (UNDERFLOW_EXCEPTION_OK): Likewise. (NO_INEXACT_EXCEPTION): Likewise. (EXCEPTIONS_OK): Likewise. (IGNORE_ZERO_INF_SIGN): Likewise. (TEST_NAN_SIGN): Likewise. (TEST_NAN_PAYLOAD): Likewise. (NO_TEST_INLINE): Likewise. (XFAIL_TEST): Likewise. (ERRNO_UNCHANGED): Likewise. (ERRNO_EDOM): Likewise. (ERRNO_ERANGE): Likewise. (IGNORE_RESULT): Likewise. (NON_FINITE): Likewise. (TEST_SNAN): Likewise. (NO_TEST_MATHVEC): Likewise. (__CONCATX): Likewise. (TYPE_MIN): Likewise. (TYPE_TRUE_MIN): Likewise. (TYPE_MAX): Likewise. (MIN_EXP): Likewise. (MAX_EXP): Likewise. (MANT_DIG): Likewise. (FSTR_MAX): Likewise. (ulp_idx): Likewise. (qtype_str): Remove static. (TEST_COND_binary32): Remove. (TEST_COND_binary64): Likewise. (TEST_COND_binary128): Likewise. (TEST_COND_ibm128): Likewise. (TEST_COND_intel96): Likewise. (TEST_COND_m68k96): Likewise. (TEST_COND_ibm128_libgcc): Likewise. (XFAIL_IBM128_LIBGCC): Likewise. (PAYLOAD_DIG): Likewise. (UNDERFLOW_EXCEPTION_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_OK_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_OK_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_LDOUBLE_IBM): Likewise. (UNDERFLOW_EXCEPTION_BEFORE_ROUNDING): Likewise. (TEST_COND_long32): Likewise. (TEST_COND_long64): Likewise. (TEST_COND_before_rounding): Likewise. (TEST_COND_after_rounding): Likewise. (ulps_file_name): Likewise. (ulps_file): Likewise. (output_ulps): Likewise. (output_dir): Likewise. (noErrors): Likewise. (noTests): Likewise. (noExcTests): Likewise. (noErrnoTests): Likewise. (verbose): Likewise. (output_max_error): Likewise. (output_points): Likewise. (ignore_max_ulp): Likewise. (max_error): Likewise. (real_max_error): Likewise. (imag_max_error): Likewise. (prev_max_error): Likewise. (prev_real_max_error): Likewise. (prev_imag_max_error): Likewise. (max_valid_error): Likewise. (TYPE_DECIMAL_DIG): Likewise. (TYPE_HEX_DIG): Likewise. (fmt_ftostr): Likewise. (compare_ulp_data): Likewise. (find_ulps): Likewise. (init_max_error): Likewise. (set_max_error): Likewise. (print_float): Likewise. (print_screen): Likewise. (print_screen_max_error): Likewise. (update_stats): Likewise. (print_function_ulps): Likewise. (print_complex_function_ulps): Likewise. (fpstack_test): Likewise. (print_max_error): Likewise. (print_complex_max_error): Likewise. (test_single_exception): Likewise. (test_exceptions): Likewise. (test_single_errno): Likewise. (test_errno): Likewise. (ULPDIFF): Likewise. (ulp): Likewise. (check_float_internal): Likewise. (check_float): Likewise. (check_complex): Likewise. (check_int): Likewise. (check_long): Likewise. (check_bool): Likewise. (check_longlong): Likewise. (check_intmax_t): Likewise. (check_uintmax_t): Likewise. (enable_test): Likewise. (matherr): Likewise. (initialize): Likewise. (options): Likewise. (doc): Remove static. (argp): Likewise. (parse_opt): Remove. (check_ulp): Likewise. (libm_test_init): Likewise. (libm_test_finish): Likewise. * math/Makefile (libm-test-support): New variable. (test-extras): Add libm-test-support files. (extra-test-objs): Likewise. (CFLAGS-libm-test-support-float.c): New variable. (CFLAGS-libm-test-support-double.c): Likewise. (CFLAGS-libm-test-support-ldouble.c): Likewise. ($(addprefix $(objpfx),$(libm-tests)): Depend on appropriate libm-test-support objects.
2017-02-08 22:11:49 +01:00
libm-test-support = $(foreach t,$(types),libm-test-support-$(t))
test-extras += $(libm-test-support)
extra-test-objs += $(addsuffix .o, $(libm-test-support))
libm-vec-test-wrappers = $(addsuffix -wrappers, $(libm-vec-tests))
test-extras += $(libm-vec-test-wrappers)
extra-test-objs += $(addsuffix .o, $(libm-vec-test-wrappers))
* Makefile (subdir-target-args): New variable. ($(all-subdirs-targets)): Use it in place of -C option. * Rules: Use $(..) instead of ../ if it's already defined. * Makeconfig (subdir-srcdirs): New variable. * csu/Makefile (all-Banner-files): Use it. * configure.in (--enable-add-ons): Set to "yes" by default. Handle absolute add-on directory names when looking for configure fragments. Also look for sysdeps/*/preconfigure fragments in add-ons. Require add-on configure to set $libc_add_on_canonical, use that in $add_ons_sfx. Substitute add_on_subdirs with computed list of subdir names each add-on configure set in libc_add_on_subdirs. * configure: Regenerated. * Makefile (%/preconfigure: %/preconfigure.in): New pattern rule. * config.make.in (add-on-subdirs): New substituted variable. * Makeconfig (all-subdirs): Include $(add-on-subdirs). Remove $(add-ons), $(sysdep-subdirs). Don't filter out $(sysdep-inhibit-subdirs). ($(common-objpfx)sysd-dirs): Target removed. Don't include it. ($(common-objpfx)sysd-sorted): Rewritten to feed Depend and Subdirs files together to gen-sorted.awk, and $(subdirs) via -v. (subdirs): Remove magic reordering for mach and hurd. * scripts/gen-sorted.awk: Use subdirs from command line. Process Subdirs and Depend files directly. Let Subdirs files use "first dir" and "inhibit dir". Always move elf to the end of the list. * hurd/Depend: New file. * sysdeps/mach/Subdirs: Use "first mach". * Makefile (dist-separate): Remove linuxthreads. (dist-separate-linuxthreads): Variable removed. (glibc-%.tar rule): Use $(sysdeps-add-ons). * Makerules ($(common-objpfx)Versions.v.i): Use $(subdirs), not $(all-subdirs). (sysdep-makefiles): Use $(sysdirs). (sysdirs): Remove export. ($(+sysdir_pfx)sysd-rules): Handle absolute directory names in $(config-sysdirs). (+sysdir_pfx): Variable removed. (sysd-rules): Use $(common-objpfx) in place of it. (sysdirs): Variable moved to ... * Makeconfig (sysdirs): ... here. Handle absolute directory names in $(config-sysdirs). (full_config_sysdirs): Variable removed. * csu/Makefile: Use $(sysdirs) in vpath directive. * math/Makefile (ulps-file): Use $(sysdirs). * sysdeps/gnu/Makefile (errlist-c): Likewise. ($(objpfx)errlist-compat.c): Likewise. * Makeconfig (all-Subdirs-files): Likewise. ($(common-objpfx)config.status): Likewise. * configure.in (sysnames): Handle absolute add-on directory names. (sysdeps_add_ons): New variable, AC_SUBST it. Compute which add-ons contributed sysdeps directories. * configure: Regenerated. * config.make.in (sysdeps-add-ons): New substituted variable. * Makerules (+sysdep_dirs, +sysdep-includes): Variables moved ... * Makeconfig: ... to here. (+sysdep_dirs): Append $(sysdeps-add-ons) here. (+includes): Remove $(objpfx) include, already in $(+sysdep_dirs). Remove $(includes). (sysdep-makeconfigs): Use $(+sysdep_dirs). ($(common-objpfx)shlib-versions.v.i): Likewise. * Makeconfig: Remove hair to set Makeconfig-add-on. * sysdeps/unix/Makefile (sysdirs): Remove export. (asm_CPP): Variable removed. ($(common-objpfx)sysd-syscalls): Pass them directly for the script. * sysdeps/posix/Makefile: New file. * Makerules (L_tmpnam, TMP_MAX, L_ctermid, L_cuserid): Set non-posix values here with ?=. * stdlib/gen-mpn-copy: File removed. * stdlib/Makefile (distribute): Remove it. * configure.in: Don't grok --with-gmp. * configure: Regenerated. * configure.in (libc_cv_idn): Don't check it; libidn/configure does it. * configure: Regenerated. * bare: Directory removed, saved in ports repository.
2006-02-28 08:11:04 +01:00
ulps-file = $(firstword $(wildcard $(sysdirs:%=%/libm-test-ulps)))
$(objpfx)libm-test-ulps.h: $(ulps-file) gen-libm-test.pl
$(make-target-directory)
$(PERL) gen-libm-test.pl -u $< -H $@
libm-test-funcs-auto = acos acosh asin asinh atan atan2 atanh cabs cacos \
cacosh carg casin casinh catan catanh cbrt ccos ccosh \
cexp clog clog10 cos cosh cpow csin csinh csqrt ctan \
ctanh erf erfc exp exp10 exp2 expm1 fma hypot j0 j1 jn \
lgamma log log10 log1p log2 pow sin sincos sinh sqrt \
tan tanh tgamma y0 y1 yn
libm-test-funcs-noauto = canonicalize ceil cimag conj copysign cproj creal \
fabs fdim floor fmax fmaxmag fmin fminmag fmod \
fpclassify frexp fromfp fromfpx getpayload ilogb \
iscanonical iseqsig isfinite isgreater \
isgreaterequal isinf isless islessequal \
islessgreater isnan isnormal issignaling issubnormal \
isunordered iszero llogb llrint llround logb lrint \
lround modf nearbyint nextafter nextdown nexttoward \
nextup remainder remquo rint round roundeven scalb \
scalbln scalbn setpayload setpayloadsig signbit \
significand totalorder totalordermag trunc ufromfp \
ufromfpx
Split libm-test.inc by function. Continuing the process of splitting up libm tests into more reasonably sized units, this patch splits libm-test.inc into 121 separate libm-test-<function>.inc files, one per array of test data. (There are 126 libm *_test functions, but five of those are for functions that are aliases for test purposes and so share arrays of test data.) In the present patch, the 121 files get processed separately by gen-libm-test.pl, each using only the auto-libm-test-out-<function> file that is relevant (/dev/null for functions not using auto-libm-test-* at all). This effectively eliminates the serialization on running gen-libm-test.pl. However, the resulting .c files still all get #included together, so compiling the limited number of libm tests using libm-test.inc may still act as a serialization point (the compilations still all have 40 MB of code to process). libm-test.inc doesn't actually have anything in it any more that needs gen-libm-test.pl processing, but is left as a .inc file that gets processed to produce a .c file, rather than being renamed, since the intent of this patch is as an intermediate step before libm-test.inc gets removed and tests get compiled separately for each function being tested. Tested for x86_64. * math/libm-test.inc: Move all tests of individual functions to libm-test-*.inc and #include libm-test-*.c files. (acos_test_data): Remove. (acos_test): Likewise. (acosh_test_data): Likewise. (acosh_test): Likewise. (asin_test_data): Likewise. (asin_test): Likewise. (asinh_test_data): Likewise. (asinh_test): Likewise. (atan_test_data): Likewise. (atan_test): Likewise. (atanh_test_data): Likewise. (atanh_test): Likewise. (atan2_test_data): Likewise. (atan2_test): Likewise. (cabs_test_data): Likewise. (cabs_test): Likewise. (cacos_test_data): Likewise. (cacos_test): Likewise. (cacosh_test_data): Likewise. (cacosh_test): Likewise. (canonicalize_test_data): Likewise. (canonicalize_test): Likewise. (carg_test_data): Likewise. (carg_test): Likewise. (casin_test_data): Likewise. (casin_test): Likewise. (casinh_test_data): Likewise. (casinh_test): Likewise. (catan_test_data): Likewise. (catan_test): Likewise. (catanh_test_data): Likewise. (catanh_test): Likewise. (cbrt_test_data): Likewise. (cbrt_test): Likewise. (ccos_test_data): Likewise. (ccos_test): Likewise. (ccosh_test_data): Likewise. (ccosh_test): Likewise. (ceil_test_data): Likewise. (ceil_test): Likewise. (cexp_test_data): Likewise. (cexp_test): Likewise. (cimag_test_data): Likewise. (cimag_test): Likewise. (clog_test_data): Likewise. (clog_test): Likewise. (clog10_test_data): Likewise. (clog10_test): Likewise. (conj_test_data): Likewise. (conj_test): Likewise. (copysign_test_data): Likewise. (copysign_test): Likewise. (cos_test_data): Likewise. (cos_test): Likewise. (cosh_test_data): Likewise. (cosh_test): Likewise. (cpow_test_data): Likewise. (cpow_test): Likewise. (cproj_test_data): Likewise. (cproj_test): Likewise. (creal_test_data): Likewise. (creal_test): Likewise. (csin_test_data): Likewise. (csin_test): Likewise. (csinh_test_data): Likewise. (csinh_test): Likewise. (csqrt_test_data): Likewise. (csqrt_test): Likewise. (ctan_test_data): Likewise. (ctan_test): Likewise. (ctanh_test_data): Likewise. (ctanh_test): Likewise. (erf_test_data): Likewise. (erf_test): Likewise. (erfc_test_data): Likewise. (erfc_test): Likewise. (exp_test_data): Likewise. (exp_test): Likewise. (exp10_test_data): Likewise. (exp10_test): Likewise. (pow10_test): Likewise. (exp2_test_data): Likewise. (exp2_test): Likewise. (expm1_test_data): Likewise. (expm1_test): Likewise. (fabs_test_data): Likewise. (fabs_test): Likewise. (fdim_test_data): Likewise. (fdim_test): Likewise. (floor_test_data): Likewise. (floor_test): Likewise. (fma_test_data): Likewise. (fma_test): Likewise. (fmax_test_data): Likewise. (fmax_test): Likewise. (fmaxmag_test_data): Likewise. (fmaxmag_test): Likewise. (fmin_test_data): Likewise. (fmin_test): Likewise. (fminmag_test_data): Likewise. (fminmag_test): Likewise. (fmod_test_data): Likewise. (fmod_test): Likewise. (fpclassify_test_data): Likewise. (fpclassify_test): Likewise. (frexp_test_data): Likewise. (frexp_test): Likewise. (fromfp_test_data): Likewise. (fromfp_test): Likewise. (fromfpx_test_data): Likewise. (fromfpx_test): Likewise. (getpayload_test_data): Likewise. (getpayload_test): Likewise. (hypot_test_data): Likewise. (hypot_test): Likewise. (ilogb_test_data): Likewise. (ilogb_test): Likewise. (iscanonical_test_data): Likewise. (iscanonical_test): Likewise. (iseqsig_test_data): Likewise. (iseqsig_test): Likewise. (isfinite_test_data): Likewise. (isfinite_test): Likewise. (finite_test): Likewise. (isgreater_test_data): Likewise. (isgreater_test): Likewise. (isgreaterequal_test_data): Likewise. (isgreaterequal_test): Likewise. (isinf_test_data): Likewise. (isinf_test): Likewise. (isless_test_data): Likewise. (isless_test): Likewise. (islessequal_test_data): Likewise. (islessequal_test): Likewise. (islessgreater_test_data): Likewise. (islessgreater_test): Likewise. (isnan_test_data): Likewise. (isnan_test): Likewise. (isnormal_test_data): Likewise. (isnormal_test): Likewise. (issignaling_test_data): Likewise. (issignaling_test): Likewise. (issubnormal_test_data): Likewise. (issubnormal_test): Likewise. (isunordered_test_data): Likewise. (isunordered_test): Likewise. (iszero_test_data): Likewise. (iszero_test): Likewise. (j0_test_data): Likewise. (j0_test): Likewise. (j1_test_data): Likewise. (j1_test): Likewise. (jn_test_data): Likewise. (jn_test): Likewise. (lgamma_test_data): Likewise. (lgamma_test): Likewise. (gamma_test): Likewise. (llogb_test_data): Likewise. (llogb_test): Likewise. (lrint_test_data): Likewise. (lrint_test): Likewise. (llrint_test_data): Likewise. (llrint_test): Likewise. (log_test_data): Likewise. (log_test): Likewise. (log10_test_data): Likewise. (log10_test): Likewise. (log1p_test_data): Likewise. (log1p_test): Likewise. (log2_test_data): Likewise. (log2_test): Likewise. (logb_test_data): Likewise. (logb_test): Likewise. (lround_test_data): Likewise. (lround_test): Likewise. (llround_test_data): Likewise. (llround_test): Likewise. (modf_test_data): Likewise. (modf_test): Likewise. (nearbyint_test_data): Likewise. (nearbyint_test): Likewise. (nextafter_test_data): Likewise. (nextafter_test): Likewise. (nextup_test_data): Likewise. (nextup_test): Likewise. (nextdown_test_data): Likewise. (nextdown_test): Likewise. (nexttoward_test_data): Likewise. (nexttoward_test): Likewise. (pow_test_data): Likewise. (pow_test): Likewise. (remainder_test_data): Likewise. (remainder_test): Likewise. (drem_test): Likewise. (remquo_test_data): Likewise. (remquo_test): Likewise. (rint_test_data): Likewise. (rint_test): Likewise. (round_test_data): Likewise. (round_test): Likewise. (roundeven_test_data): Likewise. (roundeven_test): Likewise. (scalb_test_data): Likewise. (scalb_test): Likewise. (scalbn_test_data): Likewise. (scalbn_test): Likewise. (ldexp_test): Likewise. (scalbln_test_data): Likewise. (scalbln_test): Likewise. (setpayload_test_data): Likewise. (setpayload_test): Likewise. (setpayloadsig_test_data): Likewise. (setpayloadsig_test): Likewise. (signbit_test_data): Likewise. (signbit_test): Likewise. (sin_test_data): Likewise. (sin_test): Likewise. (sincos_test_data): Likewise. (sincos_test): Likewise. (sinh_test_data): Likewise. (sinh_test): Likewise. (sqrt_test_data): Likewise. (sqrt_test): Likewise. (tan_test_data): Likewise. (tan_test): Likewise. (tanh_test_data): Likewise. (tanh_test): Likewise. (tgamma_test_data): Likewise. (tgamma_test): Likewise. (totalorder_test_data): Likewise. (totalorder_test): Likewise. (totalordermag_test_data): Likewise. (totalordermag_test): Likewise. (trunc_test_data): Likewise. (trunc_test): Likewise. (ufromfp_test_data): Likewise. (ufromfp_test): Likewise. (ufromfpx_test_data): Likewise. (ufromfpx_test): Likewise. (y0_test_data): Likewise. (y0_test): Likewise. (y1_test_data): Likewise. (y1_test): Likewise. (yn_test_data): Likewise. (yn_test): Likewise. (significand_test_data): Likewise. (significand_test): Likewise. * math/Makefile (auto-libm-test-out-files): Remove variable. (libm-test-funcs-noauto): New variable. (libm-test-funcs-all): Likewise. (libm-test-c-auto): Likewise. (libm-test-c-noauto): Likewise. (libm-tests-generated): Add $(libm-test-c-auto) and $(libm-test-c-noauto). (generated): Do not add auto-libm-test-out. (libm-test-c-auto-obj): New variable. (libm-test-c-noauto-obj): Likewise. ($(objpfx)libm-test.c): Do not generate or use auto-libm-test-out. ($(libm-test-c-noauto-obj)): New static pattern rule. ($(libm-test-c-auto-obj)): Likewise. (libm-test-incs): New variable. ($(objpfx)libm-have-vector-test.h): Depend on $(libm-test-incs) and pass it to gen-libm-have-vector-test.sh. * math/gen-libm-have-vector-test.sh: Expect list of .inc files to be passed on command line. * math/libm-test-acos.inc: New file. Content from math/libm-test.inc. * math/libm-test-acosh.inc: Likewise. * math/libm-test-asin.inc: Likewise. * math/libm-test-asinh.inc: Likewise. * math/libm-test-atan.inc: Likewise. * math/libm-test-atan2.inc: Likewise. * math/libm-test-atanh.inc: Likewise. * math/libm-test-cabs.inc: Likewise. * math/libm-test-cacos.inc: Likewise. * math/libm-test-cacosh.inc: Likewise. * math/libm-test-canonicalize.inc: Likewise. * math/libm-test-carg.inc: Likewise. * math/libm-test-casin.inc: Likewise. * math/libm-test-casinh.inc: Likewise. * math/libm-test-catan.inc: Likewise. * math/libm-test-catanh.inc: Likewise. * math/libm-test-cbrt.inc: Likewise. * math/libm-test-ccos.inc: Likewise. * math/libm-test-ccosh.inc: Likewise. * math/libm-test-ceil.inc: Likewise. * math/libm-test-cexp.inc: Likewise. * math/libm-test-cimag.inc: Likewise. * math/libm-test-clog.inc: Likewise. * math/libm-test-clog10.inc: Likewise. * math/libm-test-conj.inc: Likewise. * math/libm-test-copysign.inc: Likewise. * math/libm-test-cos.inc: Likewise. * math/libm-test-cosh.inc: Likewise. * math/libm-test-cpow.inc: Likewise. * math/libm-test-cproj.inc: Likewise. * math/libm-test-creal.inc: Likewise. * math/libm-test-csin.inc: Likewise. * math/libm-test-csinh.inc: Likewise. * math/libm-test-csqrt.inc: Likewise. * math/libm-test-ctan.inc: Likewise. * math/libm-test-ctanh.inc: Likewise. * math/libm-test-erf.inc: Likewise. * math/libm-test-erfc.inc: Likewise. * math/libm-test-exp.inc: Likewise. * math/libm-test-exp10.inc: Likewise. * math/libm-test-exp2.inc: Likewise. * math/libm-test-expm1.inc: Likewise. * math/libm-test-fabs.inc: Likewise. * math/libm-test-fdim.inc: Likewise. * math/libm-test-floor.inc: Likewise. * math/libm-test-fma.inc: Likewise. * math/libm-test-fmax.inc: Likewise. * math/libm-test-fmaxmag.inc: Likewise. * math/libm-test-fmin.inc: Likewise. * math/libm-test-fminmag.inc: Likewise. * math/libm-test-fmod.inc: Likewise. * math/libm-test-fpclassify.inc: Likewise. * math/libm-test-frexp.inc: Likewise. * math/libm-test-fromfp.inc: Likewise. * math/libm-test-fromfpx.inc: Likewise. * math/libm-test-getpayload.inc: Likewise. * math/libm-test-hypot.inc: Likewise. * math/libm-test-ilogb.inc: Likewise. * math/libm-test-iscanonical.inc: Likewise. * math/libm-test-iseqsig.inc: Likewise. * math/libm-test-isfinite.inc: Likewise. * math/libm-test-isgreater.inc: Likewise. * math/libm-test-isgreaterequal.inc: Likewise. * math/libm-test-isinf.inc: Likewise. * math/libm-test-isless.inc: Likewise. * math/libm-test-islessequal.inc: Likewise. * math/libm-test-islessgreater.inc: Likewise. * math/libm-test-isnan.inc: Likewise. * math/libm-test-isnormal.inc: Likewise. * math/libm-test-issignaling.inc: Likewise. * math/libm-test-issubnormal.inc: Likewise. * math/libm-test-isunordered.inc: Likewise. * math/libm-test-iszero.inc: Likewise. * math/libm-test-j0.inc: Likewise. * math/libm-test-j1.inc: Likewise. * math/libm-test-jn.inc: Likewise. * math/libm-test-lgamma.inc: Likewise. * math/libm-test-llogb.inc: Likewise. * math/libm-test-llrint.inc: Likewise. * math/libm-test-llround.inc: Likewise. * math/libm-test-log.inc: Likewise. * math/libm-test-log10.inc: Likewise. * math/libm-test-log1p.inc: Likewise. * math/libm-test-log2.inc: Likewise. * math/libm-test-logb.inc: Likewise. * math/libm-test-lrint.inc: Likewise. * math/libm-test-lround.inc: Likewise. * math/libm-test-modf.inc: Likewise. * math/libm-test-nearbyint.inc: Likewise. * math/libm-test-nextafter.inc: Likewise. * math/libm-test-nextdown.inc: Likewise. * math/libm-test-nexttoward.inc: Likewise. * math/libm-test-nextup.inc: Likewise. * math/libm-test-pow.inc: Likewise. * math/libm-test-remainder.inc: Likewise. * math/libm-test-remquo.inc: Likewise. * math/libm-test-rint.inc: Likewise. * math/libm-test-round.inc: Likewise. * math/libm-test-roundeven.inc: Likewise. * math/libm-test-scalb.inc: Likewise. * math/libm-test-scalbln.inc: Likewise. * math/libm-test-scalbn.inc: Likewise. * math/libm-test-setpayload.inc: Likewise. * math/libm-test-setpayloadsig.inc: Likewise. * math/libm-test-signbit.inc: Likewise. * math/libm-test-significand.inc: Likewise. * math/libm-test-sin.inc: Likewise. * math/libm-test-sincos.inc: Likewise. * math/libm-test-sinh.inc: Likewise. * math/libm-test-sqrt.inc: Likewise. * math/libm-test-tan.inc: Likewise. * math/libm-test-tanh.inc: Likewise. * math/libm-test-tgamma.inc: Likewise. * math/libm-test-totalorder.inc: Likewise. * math/libm-test-totalordermag.inc: Likewise. * math/libm-test-trunc.inc: Likewise. * math/libm-test-ufromfp.inc: Likewise. * math/libm-test-ufromfpx.inc: Likewise. * math/libm-test-y0.inc: Likewise. * math/libm-test-y1.inc: Likewise. * math/libm-test-yn.inc: Likewise. * math/README.libm-test: Update.
2017-02-06 19:57:25 +01:00
libm-test-funcs-all = $(libm-test-funcs-auto) $(libm-test-funcs-noauto)
libm-test-c-auto = $(foreach f,$(libm-test-funcs-auto),libm-test-$(f).c)
libm-test-c-noauto = $(foreach f,$(libm-test-funcs-noauto),libm-test-$(f).c)
libm-tests-generated = libm-test-ulps.h libm-have-vector-test.h libm-test.c \
$(libm-test-c-auto) $(libm-test-c-noauto)
generated += $(libm-tests-generated)
libm-test-c-auto-obj = $(addprefix $(objpfx),$(libm-test-c-auto))
libm-test-c-noauto-obj = $(addprefix $(objpfx),$(libm-test-c-noauto))
$(objpfx)libm-test.c $(libm-test-c-noauto-obj): $(objpfx)libm-test%.c: \
libm-test%.inc gen-libm-test.pl
$(make-target-directory)
$(PERL) gen-libm-test.pl -c $< -a /dev/null -C $@
Split auto-libm-test-out by function. math/auto-libm-test-out is, at over 30 MB, by far the largest file in the glibc source tree. This patch splits it by function, so reducing it to auto-libm-test-out-<func> files that are all under 5 MB in size. This is preliminary to splitting up libm-test.inc as well so that each function's tests can also be processed separately by gen-libm-test.pl. As a preliminary patch it doesn't actually implement that step; rather, all the separate files get concatenated by the Makefile to produce the monolithic auto-libm-test-out file again as an input to gen-libm-test.pl. (The concatentation is identical to the file in the source tree before this patch.) Even this preliminary step, however, is of use independent of splitting up libm-test.inc: some tests for csin and csinh have not been moved to auto-libm-test-in because they result in auto-libm-test-out generation taking several minutes rather than a few seconds (all released MPC versions are very slow for certain sin / sinh inputs; there are some old improvements in MPC mainline which should eventually become MPC 1.1, but the complex inverse trig and hyperbolic functions are slow even in MPC mainline and have yet to be moved to auto-libm-test-in at all), and it seems much more reasonable to add such inputs to auto-libm-test-in when it will only slow down regeneration for particular functions than when it will slow down regeneration globally. gen-auto-libm-tests still parses the whole input file, but only generates output for the requested function. This ensures bad syntax in the file is always detected, and parsing the whole file is quick; it's output generation that is comparatively slow for some functions. Tested for x86_64. * math/gen-auto-libm-tests.c: Update comment about use of program. (generate_output): Add argument FUNCTION. (main): Require extra argument. Pass function name to generate_output. * math/Makefile (generated): Add auto-libm-test-out. (libm-test-funcs-auto): New variable. (auto-libm-test-out-files): New variable. ($(objpfx)libm-test.c): Depend on $(auto-libm-test-out-files). Concatenate those files to form $(objpfx)auto-libm-test-out and use it as input to gen-libm-test.pl. * math/README.libm-test: Update. * math/auto-libm-test-out: Remove. * math/auto-libm-test-out-acos: New generated file. * math/auto-libm-test-out-acosh: Likewise. * math/auto-libm-test-out-asin: Likewise. * math/auto-libm-test-out-asinh: Likewise. * math/auto-libm-test-out-atan: Likewise. * math/auto-libm-test-out-atan2: Likewise. * math/auto-libm-test-out-atanh: Likewise. * math/auto-libm-test-out-cabs: Likewise. * math/auto-libm-test-out-carg: Likewise. * math/auto-libm-test-out-cbrt: Likewise. * math/auto-libm-test-out-ccos: Likewise. * math/auto-libm-test-out-ccosh: Likewise. * math/auto-libm-test-out-cexp: Likewise. * math/auto-libm-test-out-clog: Likewise. * math/auto-libm-test-out-clog10: Likewise. * math/auto-libm-test-out-cos: Likewise. * math/auto-libm-test-out-cosh: Likewise. * math/auto-libm-test-out-cpow: Likewise. * math/auto-libm-test-out-csin: Likewise. * math/auto-libm-test-out-csinh: Likewise. * math/auto-libm-test-out-csqrt: Likewise. * math/auto-libm-test-out-ctan: Likewise. * math/auto-libm-test-out-ctanh: Likewise. * math/auto-libm-test-out-erf: Likewise. * math/auto-libm-test-out-erfc: Likewise. * math/auto-libm-test-out-exp: Likewise. * math/auto-libm-test-out-exp10: Likewise. * math/auto-libm-test-out-exp2: Likewise. * math/auto-libm-test-out-expm1: Likewise. * math/auto-libm-test-out-fma: Likewise. * math/auto-libm-test-out-hypot: Likewise. * math/auto-libm-test-out-j0: Likewise. * math/auto-libm-test-out-j1: Likewise. * math/auto-libm-test-out-jn: Likewise. * math/auto-libm-test-out-lgamma: Likewise. * math/auto-libm-test-out-log: Likewise. * math/auto-libm-test-out-log10: Likewise. * math/auto-libm-test-out-log1p: Likewise. * math/auto-libm-test-out-log2: Likewise. * math/auto-libm-test-out-pow: Likewise. * math/auto-libm-test-out-sin: Likewise. * math/auto-libm-test-out-sincos: Likewise. * math/auto-libm-test-out-sinh: Likewise. * math/auto-libm-test-out-sqrt: Likewise. * math/auto-libm-test-out-tan: Likewise. * math/auto-libm-test-out-tanh: Likewise. * math/auto-libm-test-out-tgamma: Likewise. * math/auto-libm-test-out-y0: Likewise. * math/auto-libm-test-out-y1: Likewise. * math/auto-libm-test-out-yn: Likewise.
2017-02-06 19:41:20 +01:00
Split libm-test.inc by function. Continuing the process of splitting up libm tests into more reasonably sized units, this patch splits libm-test.inc into 121 separate libm-test-<function>.inc files, one per array of test data. (There are 126 libm *_test functions, but five of those are for functions that are aliases for test purposes and so share arrays of test data.) In the present patch, the 121 files get processed separately by gen-libm-test.pl, each using only the auto-libm-test-out-<function> file that is relevant (/dev/null for functions not using auto-libm-test-* at all). This effectively eliminates the serialization on running gen-libm-test.pl. However, the resulting .c files still all get #included together, so compiling the limited number of libm tests using libm-test.inc may still act as a serialization point (the compilations still all have 40 MB of code to process). libm-test.inc doesn't actually have anything in it any more that needs gen-libm-test.pl processing, but is left as a .inc file that gets processed to produce a .c file, rather than being renamed, since the intent of this patch is as an intermediate step before libm-test.inc gets removed and tests get compiled separately for each function being tested. Tested for x86_64. * math/libm-test.inc: Move all tests of individual functions to libm-test-*.inc and #include libm-test-*.c files. (acos_test_data): Remove. (acos_test): Likewise. (acosh_test_data): Likewise. (acosh_test): Likewise. (asin_test_data): Likewise. (asin_test): Likewise. (asinh_test_data): Likewise. (asinh_test): Likewise. (atan_test_data): Likewise. (atan_test): Likewise. (atanh_test_data): Likewise. (atanh_test): Likewise. (atan2_test_data): Likewise. (atan2_test): Likewise. (cabs_test_data): Likewise. (cabs_test): Likewise. (cacos_test_data): Likewise. (cacos_test): Likewise. (cacosh_test_data): Likewise. (cacosh_test): Likewise. (canonicalize_test_data): Likewise. (canonicalize_test): Likewise. (carg_test_data): Likewise. (carg_test): Likewise. (casin_test_data): Likewise. (casin_test): Likewise. (casinh_test_data): Likewise. (casinh_test): Likewise. (catan_test_data): Likewise. (catan_test): Likewise. (catanh_test_data): Likewise. (catanh_test): Likewise. (cbrt_test_data): Likewise. (cbrt_test): Likewise. (ccos_test_data): Likewise. (ccos_test): Likewise. (ccosh_test_data): Likewise. (ccosh_test): Likewise. (ceil_test_data): Likewise. (ceil_test): Likewise. (cexp_test_data): Likewise. (cexp_test): Likewise. (cimag_test_data): Likewise. (cimag_test): Likewise. (clog_test_data): Likewise. (clog_test): Likewise. (clog10_test_data): Likewise. (clog10_test): Likewise. (conj_test_data): Likewise. (conj_test): Likewise. (copysign_test_data): Likewise. (copysign_test): Likewise. (cos_test_data): Likewise. (cos_test): Likewise. (cosh_test_data): Likewise. (cosh_test): Likewise. (cpow_test_data): Likewise. (cpow_test): Likewise. (cproj_test_data): Likewise. (cproj_test): Likewise. (creal_test_data): Likewise. (creal_test): Likewise. (csin_test_data): Likewise. (csin_test): Likewise. (csinh_test_data): Likewise. (csinh_test): Likewise. (csqrt_test_data): Likewise. (csqrt_test): Likewise. (ctan_test_data): Likewise. (ctan_test): Likewise. (ctanh_test_data): Likewise. (ctanh_test): Likewise. (erf_test_data): Likewise. (erf_test): Likewise. (erfc_test_data): Likewise. (erfc_test): Likewise. (exp_test_data): Likewise. (exp_test): Likewise. (exp10_test_data): Likewise. (exp10_test): Likewise. (pow10_test): Likewise. (exp2_test_data): Likewise. (exp2_test): Likewise. (expm1_test_data): Likewise. (expm1_test): Likewise. (fabs_test_data): Likewise. (fabs_test): Likewise. (fdim_test_data): Likewise. (fdim_test): Likewise. (floor_test_data): Likewise. (floor_test): Likewise. (fma_test_data): Likewise. (fma_test): Likewise. (fmax_test_data): Likewise. (fmax_test): Likewise. (fmaxmag_test_data): Likewise. (fmaxmag_test): Likewise. (fmin_test_data): Likewise. (fmin_test): Likewise. (fminmag_test_data): Likewise. (fminmag_test): Likewise. (fmod_test_data): Likewise. (fmod_test): Likewise. (fpclassify_test_data): Likewise. (fpclassify_test): Likewise. (frexp_test_data): Likewise. (frexp_test): Likewise. (fromfp_test_data): Likewise. (fromfp_test): Likewise. (fromfpx_test_data): Likewise. (fromfpx_test): Likewise. (getpayload_test_data): Likewise. (getpayload_test): Likewise. (hypot_test_data): Likewise. (hypot_test): Likewise. (ilogb_test_data): Likewise. (ilogb_test): Likewise. (iscanonical_test_data): Likewise. (iscanonical_test): Likewise. (iseqsig_test_data): Likewise. (iseqsig_test): Likewise. (isfinite_test_data): Likewise. (isfinite_test): Likewise. (finite_test): Likewise. (isgreater_test_data): Likewise. (isgreater_test): Likewise. (isgreaterequal_test_data): Likewise. (isgreaterequal_test): Likewise. (isinf_test_data): Likewise. (isinf_test): Likewise. (isless_test_data): Likewise. (isless_test): Likewise. (islessequal_test_data): Likewise. (islessequal_test): Likewise. (islessgreater_test_data): Likewise. (islessgreater_test): Likewise. (isnan_test_data): Likewise. (isnan_test): Likewise. (isnormal_test_data): Likewise. (isnormal_test): Likewise. (issignaling_test_data): Likewise. (issignaling_test): Likewise. (issubnormal_test_data): Likewise. (issubnormal_test): Likewise. (isunordered_test_data): Likewise. (isunordered_test): Likewise. (iszero_test_data): Likewise. (iszero_test): Likewise. (j0_test_data): Likewise. (j0_test): Likewise. (j1_test_data): Likewise. (j1_test): Likewise. (jn_test_data): Likewise. (jn_test): Likewise. (lgamma_test_data): Likewise. (lgamma_test): Likewise. (gamma_test): Likewise. (llogb_test_data): Likewise. (llogb_test): Likewise. (lrint_test_data): Likewise. (lrint_test): Likewise. (llrint_test_data): Likewise. (llrint_test): Likewise. (log_test_data): Likewise. (log_test): Likewise. (log10_test_data): Likewise. (log10_test): Likewise. (log1p_test_data): Likewise. (log1p_test): Likewise. (log2_test_data): Likewise. (log2_test): Likewise. (logb_test_data): Likewise. (logb_test): Likewise. (lround_test_data): Likewise. (lround_test): Likewise. (llround_test_data): Likewise. (llround_test): Likewise. (modf_test_data): Likewise. (modf_test): Likewise. (nearbyint_test_data): Likewise. (nearbyint_test): Likewise. (nextafter_test_data): Likewise. (nextafter_test): Likewise. (nextup_test_data): Likewise. (nextup_test): Likewise. (nextdown_test_data): Likewise. (nextdown_test): Likewise. (nexttoward_test_data): Likewise. (nexttoward_test): Likewise. (pow_test_data): Likewise. (pow_test): Likewise. (remainder_test_data): Likewise. (remainder_test): Likewise. (drem_test): Likewise. (remquo_test_data): Likewise. (remquo_test): Likewise. (rint_test_data): Likewise. (rint_test): Likewise. (round_test_data): Likewise. (round_test): Likewise. (roundeven_test_data): Likewise. (roundeven_test): Likewise. (scalb_test_data): Likewise. (scalb_test): Likewise. (scalbn_test_data): Likewise. (scalbn_test): Likewise. (ldexp_test): Likewise. (scalbln_test_data): Likewise. (scalbln_test): Likewise. (setpayload_test_data): Likewise. (setpayload_test): Likewise. (setpayloadsig_test_data): Likewise. (setpayloadsig_test): Likewise. (signbit_test_data): Likewise. (signbit_test): Likewise. (sin_test_data): Likewise. (sin_test): Likewise. (sincos_test_data): Likewise. (sincos_test): Likewise. (sinh_test_data): Likewise. (sinh_test): Likewise. (sqrt_test_data): Likewise. (sqrt_test): Likewise. (tan_test_data): Likewise. (tan_test): Likewise. (tanh_test_data): Likewise. (tanh_test): Likewise. (tgamma_test_data): Likewise. (tgamma_test): Likewise. (totalorder_test_data): Likewise. (totalorder_test): Likewise. (totalordermag_test_data): Likewise. (totalordermag_test): Likewise. (trunc_test_data): Likewise. (trunc_test): Likewise. (ufromfp_test_data): Likewise. (ufromfp_test): Likewise. (ufromfpx_test_data): Likewise. (ufromfpx_test): Likewise. (y0_test_data): Likewise. (y0_test): Likewise. (y1_test_data): Likewise. (y1_test): Likewise. (yn_test_data): Likewise. (yn_test): Likewise. (significand_test_data): Likewise. (significand_test): Likewise. * math/Makefile (auto-libm-test-out-files): Remove variable. (libm-test-funcs-noauto): New variable. (libm-test-funcs-all): Likewise. (libm-test-c-auto): Likewise. (libm-test-c-noauto): Likewise. (libm-tests-generated): Add $(libm-test-c-auto) and $(libm-test-c-noauto). (generated): Do not add auto-libm-test-out. (libm-test-c-auto-obj): New variable. (libm-test-c-noauto-obj): Likewise. ($(objpfx)libm-test.c): Do not generate or use auto-libm-test-out. ($(libm-test-c-noauto-obj)): New static pattern rule. ($(libm-test-c-auto-obj)): Likewise. (libm-test-incs): New variable. ($(objpfx)libm-have-vector-test.h): Depend on $(libm-test-incs) and pass it to gen-libm-have-vector-test.sh. * math/gen-libm-have-vector-test.sh: Expect list of .inc files to be passed on command line. * math/libm-test-acos.inc: New file. Content from math/libm-test.inc. * math/libm-test-acosh.inc: Likewise. * math/libm-test-asin.inc: Likewise. * math/libm-test-asinh.inc: Likewise. * math/libm-test-atan.inc: Likewise. * math/libm-test-atan2.inc: Likewise. * math/libm-test-atanh.inc: Likewise. * math/libm-test-cabs.inc: Likewise. * math/libm-test-cacos.inc: Likewise. * math/libm-test-cacosh.inc: Likewise. * math/libm-test-canonicalize.inc: Likewise. * math/libm-test-carg.inc: Likewise. * math/libm-test-casin.inc: Likewise. * math/libm-test-casinh.inc: Likewise. * math/libm-test-catan.inc: Likewise. * math/libm-test-catanh.inc: Likewise. * math/libm-test-cbrt.inc: Likewise. * math/libm-test-ccos.inc: Likewise. * math/libm-test-ccosh.inc: Likewise. * math/libm-test-ceil.inc: Likewise. * math/libm-test-cexp.inc: Likewise. * math/libm-test-cimag.inc: Likewise. * math/libm-test-clog.inc: Likewise. * math/libm-test-clog10.inc: Likewise. * math/libm-test-conj.inc: Likewise. * math/libm-test-copysign.inc: Likewise. * math/libm-test-cos.inc: Likewise. * math/libm-test-cosh.inc: Likewise. * math/libm-test-cpow.inc: Likewise. * math/libm-test-cproj.inc: Likewise. * math/libm-test-creal.inc: Likewise. * math/libm-test-csin.inc: Likewise. * math/libm-test-csinh.inc: Likewise. * math/libm-test-csqrt.inc: Likewise. * math/libm-test-ctan.inc: Likewise. * math/libm-test-ctanh.inc: Likewise. * math/libm-test-erf.inc: Likewise. * math/libm-test-erfc.inc: Likewise. * math/libm-test-exp.inc: Likewise. * math/libm-test-exp10.inc: Likewise. * math/libm-test-exp2.inc: Likewise. * math/libm-test-expm1.inc: Likewise. * math/libm-test-fabs.inc: Likewise. * math/libm-test-fdim.inc: Likewise. * math/libm-test-floor.inc: Likewise. * math/libm-test-fma.inc: Likewise. * math/libm-test-fmax.inc: Likewise. * math/libm-test-fmaxmag.inc: Likewise. * math/libm-test-fmin.inc: Likewise. * math/libm-test-fminmag.inc: Likewise. * math/libm-test-fmod.inc: Likewise. * math/libm-test-fpclassify.inc: Likewise. * math/libm-test-frexp.inc: Likewise. * math/libm-test-fromfp.inc: Likewise. * math/libm-test-fromfpx.inc: Likewise. * math/libm-test-getpayload.inc: Likewise. * math/libm-test-hypot.inc: Likewise. * math/libm-test-ilogb.inc: Likewise. * math/libm-test-iscanonical.inc: Likewise. * math/libm-test-iseqsig.inc: Likewise. * math/libm-test-isfinite.inc: Likewise. * math/libm-test-isgreater.inc: Likewise. * math/libm-test-isgreaterequal.inc: Likewise. * math/libm-test-isinf.inc: Likewise. * math/libm-test-isless.inc: Likewise. * math/libm-test-islessequal.inc: Likewise. * math/libm-test-islessgreater.inc: Likewise. * math/libm-test-isnan.inc: Likewise. * math/libm-test-isnormal.inc: Likewise. * math/libm-test-issignaling.inc: Likewise. * math/libm-test-issubnormal.inc: Likewise. * math/libm-test-isunordered.inc: Likewise. * math/libm-test-iszero.inc: Likewise. * math/libm-test-j0.inc: Likewise. * math/libm-test-j1.inc: Likewise. * math/libm-test-jn.inc: Likewise. * math/libm-test-lgamma.inc: Likewise. * math/libm-test-llogb.inc: Likewise. * math/libm-test-llrint.inc: Likewise. * math/libm-test-llround.inc: Likewise. * math/libm-test-log.inc: Likewise. * math/libm-test-log10.inc: Likewise. * math/libm-test-log1p.inc: Likewise. * math/libm-test-log2.inc: Likewise. * math/libm-test-logb.inc: Likewise. * math/libm-test-lrint.inc: Likewise. * math/libm-test-lround.inc: Likewise. * math/libm-test-modf.inc: Likewise. * math/libm-test-nearbyint.inc: Likewise. * math/libm-test-nextafter.inc: Likewise. * math/libm-test-nextdown.inc: Likewise. * math/libm-test-nexttoward.inc: Likewise. * math/libm-test-nextup.inc: Likewise. * math/libm-test-pow.inc: Likewise. * math/libm-test-remainder.inc: Likewise. * math/libm-test-remquo.inc: Likewise. * math/libm-test-rint.inc: Likewise. * math/libm-test-round.inc: Likewise. * math/libm-test-roundeven.inc: Likewise. * math/libm-test-scalb.inc: Likewise. * math/libm-test-scalbln.inc: Likewise. * math/libm-test-scalbn.inc: Likewise. * math/libm-test-setpayload.inc: Likewise. * math/libm-test-setpayloadsig.inc: Likewise. * math/libm-test-signbit.inc: Likewise. * math/libm-test-significand.inc: Likewise. * math/libm-test-sin.inc: Likewise. * math/libm-test-sincos.inc: Likewise. * math/libm-test-sinh.inc: Likewise. * math/libm-test-sqrt.inc: Likewise. * math/libm-test-tan.inc: Likewise. * math/libm-test-tanh.inc: Likewise. * math/libm-test-tgamma.inc: Likewise. * math/libm-test-totalorder.inc: Likewise. * math/libm-test-totalordermag.inc: Likewise. * math/libm-test-trunc.inc: Likewise. * math/libm-test-ufromfp.inc: Likewise. * math/libm-test-ufromfpx.inc: Likewise. * math/libm-test-y0.inc: Likewise. * math/libm-test-y1.inc: Likewise. * math/libm-test-yn.inc: Likewise. * math/README.libm-test: Update.
2017-02-06 19:57:25 +01:00
$(libm-test-c-auto-obj): $(objpfx)libm-test%.c: libm-test%.inc \
gen-libm-test.pl \
auto-libm-test-out%
$(make-target-directory)
Split libm-test.inc by function. Continuing the process of splitting up libm tests into more reasonably sized units, this patch splits libm-test.inc into 121 separate libm-test-<function>.inc files, one per array of test data. (There are 126 libm *_test functions, but five of those are for functions that are aliases for test purposes and so share arrays of test data.) In the present patch, the 121 files get processed separately by gen-libm-test.pl, each using only the auto-libm-test-out-<function> file that is relevant (/dev/null for functions not using auto-libm-test-* at all). This effectively eliminates the serialization on running gen-libm-test.pl. However, the resulting .c files still all get #included together, so compiling the limited number of libm tests using libm-test.inc may still act as a serialization point (the compilations still all have 40 MB of code to process). libm-test.inc doesn't actually have anything in it any more that needs gen-libm-test.pl processing, but is left as a .inc file that gets processed to produce a .c file, rather than being renamed, since the intent of this patch is as an intermediate step before libm-test.inc gets removed and tests get compiled separately for each function being tested. Tested for x86_64. * math/libm-test.inc: Move all tests of individual functions to libm-test-*.inc and #include libm-test-*.c files. (acos_test_data): Remove. (acos_test): Likewise. (acosh_test_data): Likewise. (acosh_test): Likewise. (asin_test_data): Likewise. (asin_test): Likewise. (asinh_test_data): Likewise. (asinh_test): Likewise. (atan_test_data): Likewise. (atan_test): Likewise. (atanh_test_data): Likewise. (atanh_test): Likewise. (atan2_test_data): Likewise. (atan2_test): Likewise. (cabs_test_data): Likewise. (cabs_test): Likewise. (cacos_test_data): Likewise. (cacos_test): Likewise. (cacosh_test_data): Likewise. (cacosh_test): Likewise. (canonicalize_test_data): Likewise. (canonicalize_test): Likewise. (carg_test_data): Likewise. (carg_test): Likewise. (casin_test_data): Likewise. (casin_test): Likewise. (casinh_test_data): Likewise. (casinh_test): Likewise. (catan_test_data): Likewise. (catan_test): Likewise. (catanh_test_data): Likewise. (catanh_test): Likewise. (cbrt_test_data): Likewise. (cbrt_test): Likewise. (ccos_test_data): Likewise. (ccos_test): Likewise. (ccosh_test_data): Likewise. (ccosh_test): Likewise. (ceil_test_data): Likewise. (ceil_test): Likewise. (cexp_test_data): Likewise. (cexp_test): Likewise. (cimag_test_data): Likewise. (cimag_test): Likewise. (clog_test_data): Likewise. (clog_test): Likewise. (clog10_test_data): Likewise. (clog10_test): Likewise. (conj_test_data): Likewise. (conj_test): Likewise. (copysign_test_data): Likewise. (copysign_test): Likewise. (cos_test_data): Likewise. (cos_test): Likewise. (cosh_test_data): Likewise. (cosh_test): Likewise. (cpow_test_data): Likewise. (cpow_test): Likewise. (cproj_test_data): Likewise. (cproj_test): Likewise. (creal_test_data): Likewise. (creal_test): Likewise. (csin_test_data): Likewise. (csin_test): Likewise. (csinh_test_data): Likewise. (csinh_test): Likewise. (csqrt_test_data): Likewise. (csqrt_test): Likewise. (ctan_test_data): Likewise. (ctan_test): Likewise. (ctanh_test_data): Likewise. (ctanh_test): Likewise. (erf_test_data): Likewise. (erf_test): Likewise. (erfc_test_data): Likewise. (erfc_test): Likewise. (exp_test_data): Likewise. (exp_test): Likewise. (exp10_test_data): Likewise. (exp10_test): Likewise. (pow10_test): Likewise. (exp2_test_data): Likewise. (exp2_test): Likewise. (expm1_test_data): Likewise. (expm1_test): Likewise. (fabs_test_data): Likewise. (fabs_test): Likewise. (fdim_test_data): Likewise. (fdim_test): Likewise. (floor_test_data): Likewise. (floor_test): Likewise. (fma_test_data): Likewise. (fma_test): Likewise. (fmax_test_data): Likewise. (fmax_test): Likewise. (fmaxmag_test_data): Likewise. (fmaxmag_test): Likewise. (fmin_test_data): Likewise. (fmin_test): Likewise. (fminmag_test_data): Likewise. (fminmag_test): Likewise. (fmod_test_data): Likewise. (fmod_test): Likewise. (fpclassify_test_data): Likewise. (fpclassify_test): Likewise. (frexp_test_data): Likewise. (frexp_test): Likewise. (fromfp_test_data): Likewise. (fromfp_test): Likewise. (fromfpx_test_data): Likewise. (fromfpx_test): Likewise. (getpayload_test_data): Likewise. (getpayload_test): Likewise. (hypot_test_data): Likewise. (hypot_test): Likewise. (ilogb_test_data): Likewise. (ilogb_test): Likewise. (iscanonical_test_data): Likewise. (iscanonical_test): Likewise. (iseqsig_test_data): Likewise. (iseqsig_test): Likewise. (isfinite_test_data): Likewise. (isfinite_test): Likewise. (finite_test): Likewise. (isgreater_test_data): Likewise. (isgreater_test): Likewise. (isgreaterequal_test_data): Likewise. (isgreaterequal_test): Likewise. (isinf_test_data): Likewise. (isinf_test): Likewise. (isless_test_data): Likewise. (isless_test): Likewise. (islessequal_test_data): Likewise. (islessequal_test): Likewise. (islessgreater_test_data): Likewise. (islessgreater_test): Likewise. (isnan_test_data): Likewise. (isnan_test): Likewise. (isnormal_test_data): Likewise. (isnormal_test): Likewise. (issignaling_test_data): Likewise. (issignaling_test): Likewise. (issubnormal_test_data): Likewise. (issubnormal_test): Likewise. (isunordered_test_data): Likewise. (isunordered_test): Likewise. (iszero_test_data): Likewise. (iszero_test): Likewise. (j0_test_data): Likewise. (j0_test): Likewise. (j1_test_data): Likewise. (j1_test): Likewise. (jn_test_data): Likewise. (jn_test): Likewise. (lgamma_test_data): Likewise. (lgamma_test): Likewise. (gamma_test): Likewise. (llogb_test_data): Likewise. (llogb_test): Likewise. (lrint_test_data): Likewise. (lrint_test): Likewise. (llrint_test_data): Likewise. (llrint_test): Likewise. (log_test_data): Likewise. (log_test): Likewise. (log10_test_data): Likewise. (log10_test): Likewise. (log1p_test_data): Likewise. (log1p_test): Likewise. (log2_test_data): Likewise. (log2_test): Likewise. (logb_test_data): Likewise. (logb_test): Likewise. (lround_test_data): Likewise. (lround_test): Likewise. (llround_test_data): Likewise. (llround_test): Likewise. (modf_test_data): Likewise. (modf_test): Likewise. (nearbyint_test_data): Likewise. (nearbyint_test): Likewise. (nextafter_test_data): Likewise. (nextafter_test): Likewise. (nextup_test_data): Likewise. (nextup_test): Likewise. (nextdown_test_data): Likewise. (nextdown_test): Likewise. (nexttoward_test_data): Likewise. (nexttoward_test): Likewise. (pow_test_data): Likewise. (pow_test): Likewise. (remainder_test_data): Likewise. (remainder_test): Likewise. (drem_test): Likewise. (remquo_test_data): Likewise. (remquo_test): Likewise. (rint_test_data): Likewise. (rint_test): Likewise. (round_test_data): Likewise. (round_test): Likewise. (roundeven_test_data): Likewise. (roundeven_test): Likewise. (scalb_test_data): Likewise. (scalb_test): Likewise. (scalbn_test_data): Likewise. (scalbn_test): Likewise. (ldexp_test): Likewise. (scalbln_test_data): Likewise. (scalbln_test): Likewise. (setpayload_test_data): Likewise. (setpayload_test): Likewise. (setpayloadsig_test_data): Likewise. (setpayloadsig_test): Likewise. (signbit_test_data): Likewise. (signbit_test): Likewise. (sin_test_data): Likewise. (sin_test): Likewise. (sincos_test_data): Likewise. (sincos_test): Likewise. (sinh_test_data): Likewise. (sinh_test): Likewise. (sqrt_test_data): Likewise. (sqrt_test): Likewise. (tan_test_data): Likewise. (tan_test): Likewise. (tanh_test_data): Likewise. (tanh_test): Likewise. (tgamma_test_data): Likewise. (tgamma_test): Likewise. (totalorder_test_data): Likewise. (totalorder_test): Likewise. (totalordermag_test_data): Likewise. (totalordermag_test): Likewise. (trunc_test_data): Likewise. (trunc_test): Likewise. (ufromfp_test_data): Likewise. (ufromfp_test): Likewise. (ufromfpx_test_data): Likewise. (ufromfpx_test): Likewise. (y0_test_data): Likewise. (y0_test): Likewise. (y1_test_data): Likewise. (y1_test): Likewise. (yn_test_data): Likewise. (yn_test): Likewise. (significand_test_data): Likewise. (significand_test): Likewise. * math/Makefile (auto-libm-test-out-files): Remove variable. (libm-test-funcs-noauto): New variable. (libm-test-funcs-all): Likewise. (libm-test-c-auto): Likewise. (libm-test-c-noauto): Likewise. (libm-tests-generated): Add $(libm-test-c-auto) and $(libm-test-c-noauto). (generated): Do not add auto-libm-test-out. (libm-test-c-auto-obj): New variable. (libm-test-c-noauto-obj): Likewise. ($(objpfx)libm-test.c): Do not generate or use auto-libm-test-out. ($(libm-test-c-noauto-obj)): New static pattern rule. ($(libm-test-c-auto-obj)): Likewise. (libm-test-incs): New variable. ($(objpfx)libm-have-vector-test.h): Depend on $(libm-test-incs) and pass it to gen-libm-have-vector-test.sh. * math/gen-libm-have-vector-test.sh: Expect list of .inc files to be passed on command line. * math/libm-test-acos.inc: New file. Content from math/libm-test.inc. * math/libm-test-acosh.inc: Likewise. * math/libm-test-asin.inc: Likewise. * math/libm-test-asinh.inc: Likewise. * math/libm-test-atan.inc: Likewise. * math/libm-test-atan2.inc: Likewise. * math/libm-test-atanh.inc: Likewise. * math/libm-test-cabs.inc: Likewise. * math/libm-test-cacos.inc: Likewise. * math/libm-test-cacosh.inc: Likewise. * math/libm-test-canonicalize.inc: Likewise. * math/libm-test-carg.inc: Likewise. * math/libm-test-casin.inc: Likewise. * math/libm-test-casinh.inc: Likewise. * math/libm-test-catan.inc: Likewise. * math/libm-test-catanh.inc: Likewise. * math/libm-test-cbrt.inc: Likewise. * math/libm-test-ccos.inc: Likewise. * math/libm-test-ccosh.inc: Likewise. * math/libm-test-ceil.inc: Likewise. * math/libm-test-cexp.inc: Likewise. * math/libm-test-cimag.inc: Likewise. * math/libm-test-clog.inc: Likewise. * math/libm-test-clog10.inc: Likewise. * math/libm-test-conj.inc: Likewise. * math/libm-test-copysign.inc: Likewise. * math/libm-test-cos.inc: Likewise. * math/libm-test-cosh.inc: Likewise. * math/libm-test-cpow.inc: Likewise. * math/libm-test-cproj.inc: Likewise. * math/libm-test-creal.inc: Likewise. * math/libm-test-csin.inc: Likewise. * math/libm-test-csinh.inc: Likewise. * math/libm-test-csqrt.inc: Likewise. * math/libm-test-ctan.inc: Likewise. * math/libm-test-ctanh.inc: Likewise. * math/libm-test-erf.inc: Likewise. * math/libm-test-erfc.inc: Likewise. * math/libm-test-exp.inc: Likewise. * math/libm-test-exp10.inc: Likewise. * math/libm-test-exp2.inc: Likewise. * math/libm-test-expm1.inc: Likewise. * math/libm-test-fabs.inc: Likewise. * math/libm-test-fdim.inc: Likewise. * math/libm-test-floor.inc: Likewise. * math/libm-test-fma.inc: Likewise. * math/libm-test-fmax.inc: Likewise. * math/libm-test-fmaxmag.inc: Likewise. * math/libm-test-fmin.inc: Likewise. * math/libm-test-fminmag.inc: Likewise. * math/libm-test-fmod.inc: Likewise. * math/libm-test-fpclassify.inc: Likewise. * math/libm-test-frexp.inc: Likewise. * math/libm-test-fromfp.inc: Likewise. * math/libm-test-fromfpx.inc: Likewise. * math/libm-test-getpayload.inc: Likewise. * math/libm-test-hypot.inc: Likewise. * math/libm-test-ilogb.inc: Likewise. * math/libm-test-iscanonical.inc: Likewise. * math/libm-test-iseqsig.inc: Likewise. * math/libm-test-isfinite.inc: Likewise. * math/libm-test-isgreater.inc: Likewise. * math/libm-test-isgreaterequal.inc: Likewise. * math/libm-test-isinf.inc: Likewise. * math/libm-test-isless.inc: Likewise. * math/libm-test-islessequal.inc: Likewise. * math/libm-test-islessgreater.inc: Likewise. * math/libm-test-isnan.inc: Likewise. * math/libm-test-isnormal.inc: Likewise. * math/libm-test-issignaling.inc: Likewise. * math/libm-test-issubnormal.inc: Likewise. * math/libm-test-isunordered.inc: Likewise. * math/libm-test-iszero.inc: Likewise. * math/libm-test-j0.inc: Likewise. * math/libm-test-j1.inc: Likewise. * math/libm-test-jn.inc: Likewise. * math/libm-test-lgamma.inc: Likewise. * math/libm-test-llogb.inc: Likewise. * math/libm-test-llrint.inc: Likewise. * math/libm-test-llround.inc: Likewise. * math/libm-test-log.inc: Likewise. * math/libm-test-log10.inc: Likewise. * math/libm-test-log1p.inc: Likewise. * math/libm-test-log2.inc: Likewise. * math/libm-test-logb.inc: Likewise. * math/libm-test-lrint.inc: Likewise. * math/libm-test-lround.inc: Likewise. * math/libm-test-modf.inc: Likewise. * math/libm-test-nearbyint.inc: Likewise. * math/libm-test-nextafter.inc: Likewise. * math/libm-test-nextdown.inc: Likewise. * math/libm-test-nexttoward.inc: Likewise. * math/libm-test-nextup.inc: Likewise. * math/libm-test-pow.inc: Likewise. * math/libm-test-remainder.inc: Likewise. * math/libm-test-remquo.inc: Likewise. * math/libm-test-rint.inc: Likewise. * math/libm-test-round.inc: Likewise. * math/libm-test-roundeven.inc: Likewise. * math/libm-test-scalb.inc: Likewise. * math/libm-test-scalbln.inc: Likewise. * math/libm-test-scalbn.inc: Likewise. * math/libm-test-setpayload.inc: Likewise. * math/libm-test-setpayloadsig.inc: Likewise. * math/libm-test-signbit.inc: Likewise. * math/libm-test-significand.inc: Likewise. * math/libm-test-sin.inc: Likewise. * math/libm-test-sincos.inc: Likewise. * math/libm-test-sinh.inc: Likewise. * math/libm-test-sqrt.inc: Likewise. * math/libm-test-tan.inc: Likewise. * math/libm-test-tanh.inc: Likewise. * math/libm-test-tgamma.inc: Likewise. * math/libm-test-totalorder.inc: Likewise. * math/libm-test-totalordermag.inc: Likewise. * math/libm-test-trunc.inc: Likewise. * math/libm-test-ufromfp.inc: Likewise. * math/libm-test-ufromfpx.inc: Likewise. * math/libm-test-y0.inc: Likewise. * math/libm-test-y1.inc: Likewise. * math/libm-test-yn.inc: Likewise. * math/README.libm-test: Update.
2017-02-06 19:57:25 +01:00
$(PERL) gen-libm-test.pl -c $< -a auto-libm-test-out$* -C $@
libm-test-incs = $(foreach f,$(libm-test-funcs-all),libm-test-$(f).inc)
Split libm-test.inc by function. Continuing the process of splitting up libm tests into more reasonably sized units, this patch splits libm-test.inc into 121 separate libm-test-<function>.inc files, one per array of test data. (There are 126 libm *_test functions, but five of those are for functions that are aliases for test purposes and so share arrays of test data.) In the present patch, the 121 files get processed separately by gen-libm-test.pl, each using only the auto-libm-test-out-<function> file that is relevant (/dev/null for functions not using auto-libm-test-* at all). This effectively eliminates the serialization on running gen-libm-test.pl. However, the resulting .c files still all get #included together, so compiling the limited number of libm tests using libm-test.inc may still act as a serialization point (the compilations still all have 40 MB of code to process). libm-test.inc doesn't actually have anything in it any more that needs gen-libm-test.pl processing, but is left as a .inc file that gets processed to produce a .c file, rather than being renamed, since the intent of this patch is as an intermediate step before libm-test.inc gets removed and tests get compiled separately for each function being tested. Tested for x86_64. * math/libm-test.inc: Move all tests of individual functions to libm-test-*.inc and #include libm-test-*.c files. (acos_test_data): Remove. (acos_test): Likewise. (acosh_test_data): Likewise. (acosh_test): Likewise. (asin_test_data): Likewise. (asin_test): Likewise. (asinh_test_data): Likewise. (asinh_test): Likewise. (atan_test_data): Likewise. (atan_test): Likewise. (atanh_test_data): Likewise. (atanh_test): Likewise. (atan2_test_data): Likewise. (atan2_test): Likewise. (cabs_test_data): Likewise. (cabs_test): Likewise. (cacos_test_data): Likewise. (cacos_test): Likewise. (cacosh_test_data): Likewise. (cacosh_test): Likewise. (canonicalize_test_data): Likewise. (canonicalize_test): Likewise. (carg_test_data): Likewise. (carg_test): Likewise. (casin_test_data): Likewise. (casin_test): Likewise. (casinh_test_data): Likewise. (casinh_test): Likewise. (catan_test_data): Likewise. (catan_test): Likewise. (catanh_test_data): Likewise. (catanh_test): Likewise. (cbrt_test_data): Likewise. (cbrt_test): Likewise. (ccos_test_data): Likewise. (ccos_test): Likewise. (ccosh_test_data): Likewise. (ccosh_test): Likewise. (ceil_test_data): Likewise. (ceil_test): Likewise. (cexp_test_data): Likewise. (cexp_test): Likewise. (cimag_test_data): Likewise. (cimag_test): Likewise. (clog_test_data): Likewise. (clog_test): Likewise. (clog10_test_data): Likewise. (clog10_test): Likewise. (conj_test_data): Likewise. (conj_test): Likewise. (copysign_test_data): Likewise. (copysign_test): Likewise. (cos_test_data): Likewise. (cos_test): Likewise. (cosh_test_data): Likewise. (cosh_test): Likewise. (cpow_test_data): Likewise. (cpow_test): Likewise. (cproj_test_data): Likewise. (cproj_test): Likewise. (creal_test_data): Likewise. (creal_test): Likewise. (csin_test_data): Likewise. (csin_test): Likewise. (csinh_test_data): Likewise. (csinh_test): Likewise. (csqrt_test_data): Likewise. (csqrt_test): Likewise. (ctan_test_data): Likewise. (ctan_test): Likewise. (ctanh_test_data): Likewise. (ctanh_test): Likewise. (erf_test_data): Likewise. (erf_test): Likewise. (erfc_test_data): Likewise. (erfc_test): Likewise. (exp_test_data): Likewise. (exp_test): Likewise. (exp10_test_data): Likewise. (exp10_test): Likewise. (pow10_test): Likewise. (exp2_test_data): Likewise. (exp2_test): Likewise. (expm1_test_data): Likewise. (expm1_test): Likewise. (fabs_test_data): Likewise. (fabs_test): Likewise. (fdim_test_data): Likewise. (fdim_test): Likewise. (floor_test_data): Likewise. (floor_test): Likewise. (fma_test_data): Likewise. (fma_test): Likewise. (fmax_test_data): Likewise. (fmax_test): Likewise. (fmaxmag_test_data): Likewise. (fmaxmag_test): Likewise. (fmin_test_data): Likewise. (fmin_test): Likewise. (fminmag_test_data): Likewise. (fminmag_test): Likewise. (fmod_test_data): Likewise. (fmod_test): Likewise. (fpclassify_test_data): Likewise. (fpclassify_test): Likewise. (frexp_test_data): Likewise. (frexp_test): Likewise. (fromfp_test_data): Likewise. (fromfp_test): Likewise. (fromfpx_test_data): Likewise. (fromfpx_test): Likewise. (getpayload_test_data): Likewise. (getpayload_test): Likewise. (hypot_test_data): Likewise. (hypot_test): Likewise. (ilogb_test_data): Likewise. (ilogb_test): Likewise. (iscanonical_test_data): Likewise. (iscanonical_test): Likewise. (iseqsig_test_data): Likewise. (iseqsig_test): Likewise. (isfinite_test_data): Likewise. (isfinite_test): Likewise. (finite_test): Likewise. (isgreater_test_data): Likewise. (isgreater_test): Likewise. (isgreaterequal_test_data): Likewise. (isgreaterequal_test): Likewise. (isinf_test_data): Likewise. (isinf_test): Likewise. (isless_test_data): Likewise. (isless_test): Likewise. (islessequal_test_data): Likewise. (islessequal_test): Likewise. (islessgreater_test_data): Likewise. (islessgreater_test): Likewise. (isnan_test_data): Likewise. (isnan_test): Likewise. (isnormal_test_data): Likewise. (isnormal_test): Likewise. (issignaling_test_data): Likewise. (issignaling_test): Likewise. (issubnormal_test_data): Likewise. (issubnormal_test): Likewise. (isunordered_test_data): Likewise. (isunordered_test): Likewise. (iszero_test_data): Likewise. (iszero_test): Likewise. (j0_test_data): Likewise. (j0_test): Likewise. (j1_test_data): Likewise. (j1_test): Likewise. (jn_test_data): Likewise. (jn_test): Likewise. (lgamma_test_data): Likewise. (lgamma_test): Likewise. (gamma_test): Likewise. (llogb_test_data): Likewise. (llogb_test): Likewise. (lrint_test_data): Likewise. (lrint_test): Likewise. (llrint_test_data): Likewise. (llrint_test): Likewise. (log_test_data): Likewise. (log_test): Likewise. (log10_test_data): Likewise. (log10_test): Likewise. (log1p_test_data): Likewise. (log1p_test): Likewise. (log2_test_data): Likewise. (log2_test): Likewise. (logb_test_data): Likewise. (logb_test): Likewise. (lround_test_data): Likewise. (lround_test): Likewise. (llround_test_data): Likewise. (llround_test): Likewise. (modf_test_data): Likewise. (modf_test): Likewise. (nearbyint_test_data): Likewise. (nearbyint_test): Likewise. (nextafter_test_data): Likewise. (nextafter_test): Likewise. (nextup_test_data): Likewise. (nextup_test): Likewise. (nextdown_test_data): Likewise. (nextdown_test): Likewise. (nexttoward_test_data): Likewise. (nexttoward_test): Likewise. (pow_test_data): Likewise. (pow_test): Likewise. (remainder_test_data): Likewise. (remainder_test): Likewise. (drem_test): Likewise. (remquo_test_data): Likewise. (remquo_test): Likewise. (rint_test_data): Likewise. (rint_test): Likewise. (round_test_data): Likewise. (round_test): Likewise. (roundeven_test_data): Likewise. (roundeven_test): Likewise. (scalb_test_data): Likewise. (scalb_test): Likewise. (scalbn_test_data): Likewise. (scalbn_test): Likewise. (ldexp_test): Likewise. (scalbln_test_data): Likewise. (scalbln_test): Likewise. (setpayload_test_data): Likewise. (setpayload_test): Likewise. (setpayloadsig_test_data): Likewise. (setpayloadsig_test): Likewise. (signbit_test_data): Likewise. (signbit_test): Likewise. (sin_test_data): Likewise. (sin_test): Likewise. (sincos_test_data): Likewise. (sincos_test): Likewise. (sinh_test_data): Likewise. (sinh_test): Likewise. (sqrt_test_data): Likewise. (sqrt_test): Likewise. (tan_test_data): Likewise. (tan_test): Likewise. (tanh_test_data): Likewise. (tanh_test): Likewise. (tgamma_test_data): Likewise. (tgamma_test): Likewise. (totalorder_test_data): Likewise. (totalorder_test): Likewise. (totalordermag_test_data): Likewise. (totalordermag_test): Likewise. (trunc_test_data): Likewise. (trunc_test): Likewise. (ufromfp_test_data): Likewise. (ufromfp_test): Likewise. (ufromfpx_test_data): Likewise. (ufromfpx_test): Likewise. (y0_test_data): Likewise. (y0_test): Likewise. (y1_test_data): Likewise. (y1_test): Likewise. (yn_test_data): Likewise. (yn_test): Likewise. (significand_test_data): Likewise. (significand_test): Likewise. * math/Makefile (auto-libm-test-out-files): Remove variable. (libm-test-funcs-noauto): New variable. (libm-test-funcs-all): Likewise. (libm-test-c-auto): Likewise. (libm-test-c-noauto): Likewise. (libm-tests-generated): Add $(libm-test-c-auto) and $(libm-test-c-noauto). (generated): Do not add auto-libm-test-out. (libm-test-c-auto-obj): New variable. (libm-test-c-noauto-obj): Likewise. ($(objpfx)libm-test.c): Do not generate or use auto-libm-test-out. ($(libm-test-c-noauto-obj)): New static pattern rule. ($(libm-test-c-auto-obj)): Likewise. (libm-test-incs): New variable. ($(objpfx)libm-have-vector-test.h): Depend on $(libm-test-incs) and pass it to gen-libm-have-vector-test.sh. * math/gen-libm-have-vector-test.sh: Expect list of .inc files to be passed on command line. * math/libm-test-acos.inc: New file. Content from math/libm-test.inc. * math/libm-test-acosh.inc: Likewise. * math/libm-test-asin.inc: Likewise. * math/libm-test-asinh.inc: Likewise. * math/libm-test-atan.inc: Likewise. * math/libm-test-atan2.inc: Likewise. * math/libm-test-atanh.inc: Likewise. * math/libm-test-cabs.inc: Likewise. * math/libm-test-cacos.inc: Likewise. * math/libm-test-cacosh.inc: Likewise. * math/libm-test-canonicalize.inc: Likewise. * math/libm-test-carg.inc: Likewise. * math/libm-test-casin.inc: Likewise. * math/libm-test-casinh.inc: Likewise. * math/libm-test-catan.inc: Likewise. * math/libm-test-catanh.inc: Likewise. * math/libm-test-cbrt.inc: Likewise. * math/libm-test-ccos.inc: Likewise. * math/libm-test-ccosh.inc: Likewise. * math/libm-test-ceil.inc: Likewise. * math/libm-test-cexp.inc: Likewise. * math/libm-test-cimag.inc: Likewise. * math/libm-test-clog.inc: Likewise. * math/libm-test-clog10.inc: Likewise. * math/libm-test-conj.inc: Likewise. * math/libm-test-copysign.inc: Likewise. * math/libm-test-cos.inc: Likewise. * math/libm-test-cosh.inc: Likewise. * math/libm-test-cpow.inc: Likewise. * math/libm-test-cproj.inc: Likewise. * math/libm-test-creal.inc: Likewise. * math/libm-test-csin.inc: Likewise. * math/libm-test-csinh.inc: Likewise. * math/libm-test-csqrt.inc: Likewise. * math/libm-test-ctan.inc: Likewise. * math/libm-test-ctanh.inc: Likewise. * math/libm-test-erf.inc: Likewise. * math/libm-test-erfc.inc: Likewise. * math/libm-test-exp.inc: Likewise. * math/libm-test-exp10.inc: Likewise. * math/libm-test-exp2.inc: Likewise. * math/libm-test-expm1.inc: Likewise. * math/libm-test-fabs.inc: Likewise. * math/libm-test-fdim.inc: Likewise. * math/libm-test-floor.inc: Likewise. * math/libm-test-fma.inc: Likewise. * math/libm-test-fmax.inc: Likewise. * math/libm-test-fmaxmag.inc: Likewise. * math/libm-test-fmin.inc: Likewise. * math/libm-test-fminmag.inc: Likewise. * math/libm-test-fmod.inc: Likewise. * math/libm-test-fpclassify.inc: Likewise. * math/libm-test-frexp.inc: Likewise. * math/libm-test-fromfp.inc: Likewise. * math/libm-test-fromfpx.inc: Likewise. * math/libm-test-getpayload.inc: Likewise. * math/libm-test-hypot.inc: Likewise. * math/libm-test-ilogb.inc: Likewise. * math/libm-test-iscanonical.inc: Likewise. * math/libm-test-iseqsig.inc: Likewise. * math/libm-test-isfinite.inc: Likewise. * math/libm-test-isgreater.inc: Likewise. * math/libm-test-isgreaterequal.inc: Likewise. * math/libm-test-isinf.inc: Likewise. * math/libm-test-isless.inc: Likewise. * math/libm-test-islessequal.inc: Likewise. * math/libm-test-islessgreater.inc: Likewise. * math/libm-test-isnan.inc: Likewise. * math/libm-test-isnormal.inc: Likewise. * math/libm-test-issignaling.inc: Likewise. * math/libm-test-issubnormal.inc: Likewise. * math/libm-test-isunordered.inc: Likewise. * math/libm-test-iszero.inc: Likewise. * math/libm-test-j0.inc: Likewise. * math/libm-test-j1.inc: Likewise. * math/libm-test-jn.inc: Likewise. * math/libm-test-lgamma.inc: Likewise. * math/libm-test-llogb.inc: Likewise. * math/libm-test-llrint.inc: Likewise. * math/libm-test-llround.inc: Likewise. * math/libm-test-log.inc: Likewise. * math/libm-test-log10.inc: Likewise. * math/libm-test-log1p.inc: Likewise. * math/libm-test-log2.inc: Likewise. * math/libm-test-logb.inc: Likewise. * math/libm-test-lrint.inc: Likewise. * math/libm-test-lround.inc: Likewise. * math/libm-test-modf.inc: Likewise. * math/libm-test-nearbyint.inc: Likewise. * math/libm-test-nextafter.inc: Likewise. * math/libm-test-nextdown.inc: Likewise. * math/libm-test-nexttoward.inc: Likewise. * math/libm-test-nextup.inc: Likewise. * math/libm-test-pow.inc: Likewise. * math/libm-test-remainder.inc: Likewise. * math/libm-test-remquo.inc: Likewise. * math/libm-test-rint.inc: Likewise. * math/libm-test-round.inc: Likewise. * math/libm-test-roundeven.inc: Likewise. * math/libm-test-scalb.inc: Likewise. * math/libm-test-scalbln.inc: Likewise. * math/libm-test-scalbn.inc: Likewise. * math/libm-test-setpayload.inc: Likewise. * math/libm-test-setpayloadsig.inc: Likewise. * math/libm-test-signbit.inc: Likewise. * math/libm-test-significand.inc: Likewise. * math/libm-test-sin.inc: Likewise. * math/libm-test-sincos.inc: Likewise. * math/libm-test-sinh.inc: Likewise. * math/libm-test-sqrt.inc: Likewise. * math/libm-test-tan.inc: Likewise. * math/libm-test-tanh.inc: Likewise. * math/libm-test-tgamma.inc: Likewise. * math/libm-test-totalorder.inc: Likewise. * math/libm-test-totalordermag.inc: Likewise. * math/libm-test-trunc.inc: Likewise. * math/libm-test-ufromfp.inc: Likewise. * math/libm-test-ufromfpx.inc: Likewise. * math/libm-test-y0.inc: Likewise. * math/libm-test-y1.inc: Likewise. * math/libm-test-yn.inc: Likewise. * math/README.libm-test: Update.
2017-02-06 19:57:25 +01:00
$(objpfx)libm-have-vector-test.h: $(libm-test-incs) gen-libm-have-vector-test.sh
$(make-target-directory)
Split libm-test.inc by function. Continuing the process of splitting up libm tests into more reasonably sized units, this patch splits libm-test.inc into 121 separate libm-test-<function>.inc files, one per array of test data. (There are 126 libm *_test functions, but five of those are for functions that are aliases for test purposes and so share arrays of test data.) In the present patch, the 121 files get processed separately by gen-libm-test.pl, each using only the auto-libm-test-out-<function> file that is relevant (/dev/null for functions not using auto-libm-test-* at all). This effectively eliminates the serialization on running gen-libm-test.pl. However, the resulting .c files still all get #included together, so compiling the limited number of libm tests using libm-test.inc may still act as a serialization point (the compilations still all have 40 MB of code to process). libm-test.inc doesn't actually have anything in it any more that needs gen-libm-test.pl processing, but is left as a .inc file that gets processed to produce a .c file, rather than being renamed, since the intent of this patch is as an intermediate step before libm-test.inc gets removed and tests get compiled separately for each function being tested. Tested for x86_64. * math/libm-test.inc: Move all tests of individual functions to libm-test-*.inc and #include libm-test-*.c files. (acos_test_data): Remove. (acos_test): Likewise. (acosh_test_data): Likewise. (acosh_test): Likewise. (asin_test_data): Likewise. (asin_test): Likewise. (asinh_test_data): Likewise. (asinh_test): Likewise. (atan_test_data): Likewise. (atan_test): Likewise. (atanh_test_data): Likewise. (atanh_test): Likewise. (atan2_test_data): Likewise. (atan2_test): Likewise. (cabs_test_data): Likewise. (cabs_test): Likewise. (cacos_test_data): Likewise. (cacos_test): Likewise. (cacosh_test_data): Likewise. (cacosh_test): Likewise. (canonicalize_test_data): Likewise. (canonicalize_test): Likewise. (carg_test_data): Likewise. (carg_test): Likewise. (casin_test_data): Likewise. (casin_test): Likewise. (casinh_test_data): Likewise. (casinh_test): Likewise. (catan_test_data): Likewise. (catan_test): Likewise. (catanh_test_data): Likewise. (catanh_test): Likewise. (cbrt_test_data): Likewise. (cbrt_test): Likewise. (ccos_test_data): Likewise. (ccos_test): Likewise. (ccosh_test_data): Likewise. (ccosh_test): Likewise. (ceil_test_data): Likewise. (ceil_test): Likewise. (cexp_test_data): Likewise. (cexp_test): Likewise. (cimag_test_data): Likewise. (cimag_test): Likewise. (clog_test_data): Likewise. (clog_test): Likewise. (clog10_test_data): Likewise. (clog10_test): Likewise. (conj_test_data): Likewise. (conj_test): Likewise. (copysign_test_data): Likewise. (copysign_test): Likewise. (cos_test_data): Likewise. (cos_test): Likewise. (cosh_test_data): Likewise. (cosh_test): Likewise. (cpow_test_data): Likewise. (cpow_test): Likewise. (cproj_test_data): Likewise. (cproj_test): Likewise. (creal_test_data): Likewise. (creal_test): Likewise. (csin_test_data): Likewise. (csin_test): Likewise. (csinh_test_data): Likewise. (csinh_test): Likewise. (csqrt_test_data): Likewise. (csqrt_test): Likewise. (ctan_test_data): Likewise. (ctan_test): Likewise. (ctanh_test_data): Likewise. (ctanh_test): Likewise. (erf_test_data): Likewise. (erf_test): Likewise. (erfc_test_data): Likewise. (erfc_test): Likewise. (exp_test_data): Likewise. (exp_test): Likewise. (exp10_test_data): Likewise. (exp10_test): Likewise. (pow10_test): Likewise. (exp2_test_data): Likewise. (exp2_test): Likewise. (expm1_test_data): Likewise. (expm1_test): Likewise. (fabs_test_data): Likewise. (fabs_test): Likewise. (fdim_test_data): Likewise. (fdim_test): Likewise. (floor_test_data): Likewise. (floor_test): Likewise. (fma_test_data): Likewise. (fma_test): Likewise. (fmax_test_data): Likewise. (fmax_test): Likewise. (fmaxmag_test_data): Likewise. (fmaxmag_test): Likewise. (fmin_test_data): Likewise. (fmin_test): Likewise. (fminmag_test_data): Likewise. (fminmag_test): Likewise. (fmod_test_data): Likewise. (fmod_test): Likewise. (fpclassify_test_data): Likewise. (fpclassify_test): Likewise. (frexp_test_data): Likewise. (frexp_test): Likewise. (fromfp_test_data): Likewise. (fromfp_test): Likewise. (fromfpx_test_data): Likewise. (fromfpx_test): Likewise. (getpayload_test_data): Likewise. (getpayload_test): Likewise. (hypot_test_data): Likewise. (hypot_test): Likewise. (ilogb_test_data): Likewise. (ilogb_test): Likewise. (iscanonical_test_data): Likewise. (iscanonical_test): Likewise. (iseqsig_test_data): Likewise. (iseqsig_test): Likewise. (isfinite_test_data): Likewise. (isfinite_test): Likewise. (finite_test): Likewise. (isgreater_test_data): Likewise. (isgreater_test): Likewise. (isgreaterequal_test_data): Likewise. (isgreaterequal_test): Likewise. (isinf_test_data): Likewise. (isinf_test): Likewise. (isless_test_data): Likewise. (isless_test): Likewise. (islessequal_test_data): Likewise. (islessequal_test): Likewise. (islessgreater_test_data): Likewise. (islessgreater_test): Likewise. (isnan_test_data): Likewise. (isnan_test): Likewise. (isnormal_test_data): Likewise. (isnormal_test): Likewise. (issignaling_test_data): Likewise. (issignaling_test): Likewise. (issubnormal_test_data): Likewise. (issubnormal_test): Likewise. (isunordered_test_data): Likewise. (isunordered_test): Likewise. (iszero_test_data): Likewise. (iszero_test): Likewise. (j0_test_data): Likewise. (j0_test): Likewise. (j1_test_data): Likewise. (j1_test): Likewise. (jn_test_data): Likewise. (jn_test): Likewise. (lgamma_test_data): Likewise. (lgamma_test): Likewise. (gamma_test): Likewise. (llogb_test_data): Likewise. (llogb_test): Likewise. (lrint_test_data): Likewise. (lrint_test): Likewise. (llrint_test_data): Likewise. (llrint_test): Likewise. (log_test_data): Likewise. (log_test): Likewise. (log10_test_data): Likewise. (log10_test): Likewise. (log1p_test_data): Likewise. (log1p_test): Likewise. (log2_test_data): Likewise. (log2_test): Likewise. (logb_test_data): Likewise. (logb_test): Likewise. (lround_test_data): Likewise. (lround_test): Likewise. (llround_test_data): Likewise. (llround_test): Likewise. (modf_test_data): Likewise. (modf_test): Likewise. (nearbyint_test_data): Likewise. (nearbyint_test): Likewise. (nextafter_test_data): Likewise. (nextafter_test): Likewise. (nextup_test_data): Likewise. (nextup_test): Likewise. (nextdown_test_data): Likewise. (nextdown_test): Likewise. (nexttoward_test_data): Likewise. (nexttoward_test): Likewise. (pow_test_data): Likewise. (pow_test): Likewise. (remainder_test_data): Likewise. (remainder_test): Likewise. (drem_test): Likewise. (remquo_test_data): Likewise. (remquo_test): Likewise. (rint_test_data): Likewise. (rint_test): Likewise. (round_test_data): Likewise. (round_test): Likewise. (roundeven_test_data): Likewise. (roundeven_test): Likewise. (scalb_test_data): Likewise. (scalb_test): Likewise. (scalbn_test_data): Likewise. (scalbn_test): Likewise. (ldexp_test): Likewise. (scalbln_test_data): Likewise. (scalbln_test): Likewise. (setpayload_test_data): Likewise. (setpayload_test): Likewise. (setpayloadsig_test_data): Likewise. (setpayloadsig_test): Likewise. (signbit_test_data): Likewise. (signbit_test): Likewise. (sin_test_data): Likewise. (sin_test): Likewise. (sincos_test_data): Likewise. (sincos_test): Likewise. (sinh_test_data): Likewise. (sinh_test): Likewise. (sqrt_test_data): Likewise. (sqrt_test): Likewise. (tan_test_data): Likewise. (tan_test): Likewise. (tanh_test_data): Likewise. (tanh_test): Likewise. (tgamma_test_data): Likewise. (tgamma_test): Likewise. (totalorder_test_data): Likewise. (totalorder_test): Likewise. (totalordermag_test_data): Likewise. (totalordermag_test): Likewise. (trunc_test_data): Likewise. (trunc_test): Likewise. (ufromfp_test_data): Likewise. (ufromfp_test): Likewise. (ufromfpx_test_data): Likewise. (ufromfpx_test): Likewise. (y0_test_data): Likewise. (y0_test): Likewise. (y1_test_data): Likewise. (y1_test): Likewise. (yn_test_data): Likewise. (yn_test): Likewise. (significand_test_data): Likewise. (significand_test): Likewise. * math/Makefile (auto-libm-test-out-files): Remove variable. (libm-test-funcs-noauto): New variable. (libm-test-funcs-all): Likewise. (libm-test-c-auto): Likewise. (libm-test-c-noauto): Likewise. (libm-tests-generated): Add $(libm-test-c-auto) and $(libm-test-c-noauto). (generated): Do not add auto-libm-test-out. (libm-test-c-auto-obj): New variable. (libm-test-c-noauto-obj): Likewise. ($(objpfx)libm-test.c): Do not generate or use auto-libm-test-out. ($(libm-test-c-noauto-obj)): New static pattern rule. ($(libm-test-c-auto-obj)): Likewise. (libm-test-incs): New variable. ($(objpfx)libm-have-vector-test.h): Depend on $(libm-test-incs) and pass it to gen-libm-have-vector-test.sh. * math/gen-libm-have-vector-test.sh: Expect list of .inc files to be passed on command line. * math/libm-test-acos.inc: New file. Content from math/libm-test.inc. * math/libm-test-acosh.inc: Likewise. * math/libm-test-asin.inc: Likewise. * math/libm-test-asinh.inc: Likewise. * math/libm-test-atan.inc: Likewise. * math/libm-test-atan2.inc: Likewise. * math/libm-test-atanh.inc: Likewise. * math/libm-test-cabs.inc: Likewise. * math/libm-test-cacos.inc: Likewise. * math/libm-test-cacosh.inc: Likewise. * math/libm-test-canonicalize.inc: Likewise. * math/libm-test-carg.inc: Likewise. * math/libm-test-casin.inc: Likewise. * math/libm-test-casinh.inc: Likewise. * math/libm-test-catan.inc: Likewise. * math/libm-test-catanh.inc: Likewise. * math/libm-test-cbrt.inc: Likewise. * math/libm-test-ccos.inc: Likewise. * math/libm-test-ccosh.inc: Likewise. * math/libm-test-ceil.inc: Likewise. * math/libm-test-cexp.inc: Likewise. * math/libm-test-cimag.inc: Likewise. * math/libm-test-clog.inc: Likewise. * math/libm-test-clog10.inc: Likewise. * math/libm-test-conj.inc: Likewise. * math/libm-test-copysign.inc: Likewise. * math/libm-test-cos.inc: Likewise. * math/libm-test-cosh.inc: Likewise. * math/libm-test-cpow.inc: Likewise. * math/libm-test-cproj.inc: Likewise. * math/libm-test-creal.inc: Likewise. * math/libm-test-csin.inc: Likewise. * math/libm-test-csinh.inc: Likewise. * math/libm-test-csqrt.inc: Likewise. * math/libm-test-ctan.inc: Likewise. * math/libm-test-ctanh.inc: Likewise. * math/libm-test-erf.inc: Likewise. * math/libm-test-erfc.inc: Likewise. * math/libm-test-exp.inc: Likewise. * math/libm-test-exp10.inc: Likewise. * math/libm-test-exp2.inc: Likewise. * math/libm-test-expm1.inc: Likewise. * math/libm-test-fabs.inc: Likewise. * math/libm-test-fdim.inc: Likewise. * math/libm-test-floor.inc: Likewise. * math/libm-test-fma.inc: Likewise. * math/libm-test-fmax.inc: Likewise. * math/libm-test-fmaxmag.inc: Likewise. * math/libm-test-fmin.inc: Likewise. * math/libm-test-fminmag.inc: Likewise. * math/libm-test-fmod.inc: Likewise. * math/libm-test-fpclassify.inc: Likewise. * math/libm-test-frexp.inc: Likewise. * math/libm-test-fromfp.inc: Likewise. * math/libm-test-fromfpx.inc: Likewise. * math/libm-test-getpayload.inc: Likewise. * math/libm-test-hypot.inc: Likewise. * math/libm-test-ilogb.inc: Likewise. * math/libm-test-iscanonical.inc: Likewise. * math/libm-test-iseqsig.inc: Likewise. * math/libm-test-isfinite.inc: Likewise. * math/libm-test-isgreater.inc: Likewise. * math/libm-test-isgreaterequal.inc: Likewise. * math/libm-test-isinf.inc: Likewise. * math/libm-test-isless.inc: Likewise. * math/libm-test-islessequal.inc: Likewise. * math/libm-test-islessgreater.inc: Likewise. * math/libm-test-isnan.inc: Likewise. * math/libm-test-isnormal.inc: Likewise. * math/libm-test-issignaling.inc: Likewise. * math/libm-test-issubnormal.inc: Likewise. * math/libm-test-isunordered.inc: Likewise. * math/libm-test-iszero.inc: Likewise. * math/libm-test-j0.inc: Likewise. * math/libm-test-j1.inc: Likewise. * math/libm-test-jn.inc: Likewise. * math/libm-test-lgamma.inc: Likewise. * math/libm-test-llogb.inc: Likewise. * math/libm-test-llrint.inc: Likewise. * math/libm-test-llround.inc: Likewise. * math/libm-test-log.inc: Likewise. * math/libm-test-log10.inc: Likewise. * math/libm-test-log1p.inc: Likewise. * math/libm-test-log2.inc: Likewise. * math/libm-test-logb.inc: Likewise. * math/libm-test-lrint.inc: Likewise. * math/libm-test-lround.inc: Likewise. * math/libm-test-modf.inc: Likewise. * math/libm-test-nearbyint.inc: Likewise. * math/libm-test-nextafter.inc: Likewise. * math/libm-test-nextdown.inc: Likewise. * math/libm-test-nexttoward.inc: Likewise. * math/libm-test-nextup.inc: Likewise. * math/libm-test-pow.inc: Likewise. * math/libm-test-remainder.inc: Likewise. * math/libm-test-remquo.inc: Likewise. * math/libm-test-rint.inc: Likewise. * math/libm-test-round.inc: Likewise. * math/libm-test-roundeven.inc: Likewise. * math/libm-test-scalb.inc: Likewise. * math/libm-test-scalbln.inc: Likewise. * math/libm-test-scalbn.inc: Likewise. * math/libm-test-setpayload.inc: Likewise. * math/libm-test-setpayloadsig.inc: Likewise. * math/libm-test-signbit.inc: Likewise. * math/libm-test-significand.inc: Likewise. * math/libm-test-sin.inc: Likewise. * math/libm-test-sincos.inc: Likewise. * math/libm-test-sinh.inc: Likewise. * math/libm-test-sqrt.inc: Likewise. * math/libm-test-tan.inc: Likewise. * math/libm-test-tanh.inc: Likewise. * math/libm-test-tgamma.inc: Likewise. * math/libm-test-totalorder.inc: Likewise. * math/libm-test-totalordermag.inc: Likewise. * math/libm-test-trunc.inc: Likewise. * math/libm-test-ufromfp.inc: Likewise. * math/libm-test-ufromfpx.inc: Likewise. * math/libm-test-y0.inc: Likewise. * math/libm-test-y1.inc: Likewise. * math/libm-test-yn.inc: Likewise. * math/README.libm-test: Update.
2017-02-06 19:57:25 +01:00
$(SHELL) gen-libm-have-vector-test.sh $(sort $(libm-test-incs)) > $@
endif
Addition of testing infrastructure for vector math functions. We test vector math functions using scalar tests infrastructure with help of special wrappers from scalar versions to vector ones. Wrapper implemented using platform specific vector types and placed in separate file for compilation with architecture specific options, main part of test has no such options. With help of system of definitions unfolding of which is drived from test code we have wrapper called in individual testing function instead of scalar function. Also system of definitions includes generated during make check header math/libm-have-vector-test.h with series of conditional definitions which help to avoid build fails for functions having no vector versions; runtime architecture check to prevent runtime fails of test run on inappropriate hardware. * math/Makefile: Added rules for vector tests. * math/gen-libm-have-vector-test.sh: Added generation of wrapper declaration under condition. * math/test-double-vlen2.h: New file. * math/test-double-vlen4.h: New file. * math/test-double-vlen8.h: New file. * math/test-vec-loop.h: Added initialization macro. * sysdeps/x86_64/fpu/Makefile: Added variables for vector tests. * sysdeps/x86_64/fpu/libm-test-ulps: Regenarated. * sysdeps/x86_64/fpu/math-tests-arch.h: New file. * sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c: New file. * sysdeps/x86_64/fpu/test-double-vlen2.c: New file. * sysdeps/x86_64/fpu/test-double-vlen4-avx2-wrappers.c: New file. * sysdeps/x86_64/fpu/test-double-vlen4-avx2.c: New file. * sysdeps/x86_64/fpu/test-double-vlen4-wrappers.c: New file. * sysdeps/x86_64/fpu/test-double-vlen4.c: New file. * sysdeps/x86_64/fpu/test-double-vlen8-wrappers.c: New file. * sysdeps/x86_64/fpu/test-double-vlen8.c: New file.
2015-06-09 13:51:52 +02:00
libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
CFLAGS-test-double-vlen2.c = $(libm-test-vec-cflags)
CFLAGS-test-double-vlen4.c = $(libm-test-vec-cflags)
CFLAGS-test-double-vlen4-wrappers.c = $(double-vlen4-arch-ext-cflags)
CFLAGS-test-double-vlen8.c = $(libm-test-vec-cflags)
CFLAGS-test-double-vlen8-wrappers.c = $(double-vlen8-arch-ext-cflags)
CFLAGS-test-float-vlen4.c = $(libm-test-vec-cflags)
CFLAGS-test-float-vlen8.c = $(libm-test-vec-cflags)
CFLAGS-test-float-vlen8-wrappers.c = $(float-vlen8-arch-ext-cflags)
CFLAGS-test-float-vlen16.c = $(libm-test-vec-cflags)
CFLAGS-test-float-vlen16-wrappers.c = $(float-vlen16-arch-ext-cflags)
# The no-inline tests use -fsignaling-nans, and thereby use the
# versions of classification macros that support sNaNs. The inline
# function tests use the versions of classification macros that may
# raise spurious exceptions for sNaNs, but also do not test for
# exceptions. Thus both versions of the classification macros are
# validated.
libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
-fsignaling-nans
Run libm-test tests for finite-math-only functions. This patch arranges for the libm-test tests to be run for the finite-math-only function variants, in addition to the existing runs for out-of-line and bits/mathinline.h inline variants. gen-libm-test.pl is made to add a flag to all tests with non-finite inputs or outputs so that they can be skipped at runtime when the finite-math-only variants are being tested (skipping is for all rounding modes; that is, -ffinite-math-only is being treated as excluding overflow cases even when the rounding mode is such that the overflowed result is finite). errno setting is not tested for these variants (in general they don't set it, and it's implementation-defined in ISO C whether it's set on underflow, with the glibc definition being that it may not be for -ffinite-math-only; other cases where errno would normally be expected to be set are mostly excluded as having non-finite or overflowing arguments or results). As with the inline function tests, these ones are built with -D__FINITE_MATH_ONLY=1 to select the function variants, rather than -ffinite-math-only. Use of -ffinite-math-only would not be suitable for these tests because it would also affect libm-test.inc code that e.g. tests whether results are infinities or NaNs - if these function variants have bugs that incorrectly produce such results, we want them to show up in the tests, which means the compiler should not be optimizing the tests on the basis of results being finite. The finite-math-only functions share the same ulps settings as the main out-of-line functions. These interfaces were one significant group of untested ABIs listed at <https://sourceware.org/ml/libc-alpha/2013-07/msg00386.html>. I haven't rerun the script to list untested interfaces, but I expect that the vast bulk of interfaces there are still untested and could do with testcases being added (or, if applicable, being made compat symbols; in general, most symbols not starting '_' are safe bets to add tests for, while _* need more investigation of what the actual public API is, if any). I'd like to encourage people to help reduce the accumulation of untested interfaces by adding more tests. Tested for x86_64 and x86. Given my recent lgamma/gamma and log* fixes, the new tests pass (before those fixes, the new tests showed up those bugs, so illustrating the practical utility of having tests for these function variants). * math/libm-test.inc (NON_FINITE): New macro. (enable_test): Do not run tests flagged NON_FINITE if TEST_FINITE. * math/gen-libm-test.pl (show_exceptions): Add argument $non_finite. (parse_args): Update call to show_exceptions. * math/test-math-finite.h: New file. * math/test-math-no-finite.h: Likewise. * math/test-double-finite.c: Likewise. * math/test-float-finite.c: Likewise. * math/test-ldouble-finite.c: Likewise. * math/test-double.c: Include "test-math-no-finite.h". * math/test-float.c: Include "test-math-no-finite.h". * math/test-ldouble.c: Include "test-math-no-finite.h". * math/test-math-inline.h (TEST_FINITE): New macro. * math/test-math-vector.h (TEST_FINITE): Likewise. * math/Makefile (test-longdouble-yes): Add test-ldouble-finite. (libm-tests): Add test-float-finite and test-double-finite. ($(objpfx)test-float-finite.o): New dependency on $(objpfx)libm-test.stmp. ($(objpfx)test-double-finite.o): Likewise. ($(objpfx)test-ldouble-finite.o): Likewise. (libm-test-no-inline-cflags): New variable. (libm-test-finite-cflags): Likewise. (CFLAGS-test-float-finite.c): Likewise. (CFLAGS-test-double-finite.c): Likewise. (CFLAGS-test-ldouble-finite.c): Likewise. (CFLAGS-test-float.c): Use $(libm-test-no-inline-cflags). (CFLAGS-test-double.c): Likewise. (CFLAGS-test-ldouble.c): Likewise.
2015-11-06 00:28:16 +01:00
libm-test-finite-cflags = $(libm-test-no-inline-cflags) \
-U__FINITE_MATH_ONLY__ -D__FINITE_MATH_ONLY__=1
CFLAGS-test-float.c = $(libm-test-no-inline-cflags)
CFLAGS-test-float-finite.c = $(libm-test-finite-cflags)
Build most libm-test support code once per type. libm-test-driver.c contains various functions used in the course of libm testing, which are built as part of each test using this machinery. Currently, these functions get built for three tests for each type (e.g. test-float, test-ifloat, test-float-finite), plus the vector function tests. All these tests are huge and thus slow to build; the output of gen-libm-test.pl totals around 40 MB across all functions. To make the individual tests built from the Makefile smaller, it makes sense to split these tests up so the tests for each function are built separately (thus, three tests for each (function, type) pair, plus vector tests built only for functions that actually have vector versions). This improves parallelism and means that if tests fail, the summary of failed tests makes it more obvious where the problem might be without needing to look in the .out files to see which functions' tests failed (though architecture maintainers still need to keep libm-test-ulps up to date to avoid spurious failures of little interest). Simply including libm-test-driver.c as-is in such individual-function tests does not work because of unused static check_* functions (those functions only being used for the types of the outputs of the function under test). It also means the common code gets built over 1000 times instead of nine (plus vector tests). To avoid that issue, this patch splits out the bulk of the libm-test-driver.c code into a separate file libm-test-support.c (with a few functions made non-static). That separate file is built only once for each floating-point type (so at present three times, or twice on architectures with long double = double). Definitions needed in both libm-test-support.c and libm-test-driver.c go in libm-test-support.h (it's possible some of those are in fact only needed in one of the two files). libm-test-driver.c keeps definitions of a limited number of variables used to configure how libm-test-support.c behaves, various macros and structures needed by individual-function tests, and the main function. This move is also consistent in spirit with the move away from test-skeleton.c having all the test support code, to a small support/test-driver.c included in individual tests with most of the code built separately. Tested for x86_64 and x86. * math/libm-test-support.c: New file. Content from math/libm-test-driver.c. * math/libm-test-support.h: Likewise. * math/libm-test-support-double.c: New file. * math/libm-test-support-float.c: Likewise. * math/libm-test-support-ldouble.c: Likewise. * math/libm-test-driver.c: Remove main comment and header includes. Include libm-test-support.h. [!_GNU_SOURCE] (_GNU_SOURCE): Do not define. (flag_test_errno): Remove static. (flag_test_exceptions): Likewise. (flag_test_finite): Likewise. (flag_test_inline): Likewise. (flag_test_mathvec): Likewise. (test_msg): Likewise. (NO_EXCEPTION): Remove. (INVALID_EXCEPTION): Likewise. (DIVIDE_BY_ZERO_EXCEPTION): Likewise. (OVERFLOW_EXCEPTION): Likewise. (UNDERFLOW_EXCEPTION): Likewise. (INEXACT_EXCEPTION): Likewise. (INVALID_EXCEPTION_OK): Likewise. (DIVIDE_BY_ZERO_EXCEPTION_OK): Likewise. (OVERFLOW_EXCEPTION_OK): Likewise. (UNDERFLOW_EXCEPTION_OK): Likewise. (NO_INEXACT_EXCEPTION): Likewise. (EXCEPTIONS_OK): Likewise. (IGNORE_ZERO_INF_SIGN): Likewise. (TEST_NAN_SIGN): Likewise. (TEST_NAN_PAYLOAD): Likewise. (NO_TEST_INLINE): Likewise. (XFAIL_TEST): Likewise. (ERRNO_UNCHANGED): Likewise. (ERRNO_EDOM): Likewise. (ERRNO_ERANGE): Likewise. (IGNORE_RESULT): Likewise. (NON_FINITE): Likewise. (TEST_SNAN): Likewise. (NO_TEST_MATHVEC): Likewise. (__CONCATX): Likewise. (TYPE_MIN): Likewise. (TYPE_TRUE_MIN): Likewise. (TYPE_MAX): Likewise. (MIN_EXP): Likewise. (MAX_EXP): Likewise. (MANT_DIG): Likewise. (FSTR_MAX): Likewise. (ulp_idx): Likewise. (qtype_str): Remove static. (TEST_COND_binary32): Remove. (TEST_COND_binary64): Likewise. (TEST_COND_binary128): Likewise. (TEST_COND_ibm128): Likewise. (TEST_COND_intel96): Likewise. (TEST_COND_m68k96): Likewise. (TEST_COND_ibm128_libgcc): Likewise. (XFAIL_IBM128_LIBGCC): Likewise. (PAYLOAD_DIG): Likewise. (UNDERFLOW_EXCEPTION_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_OK_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_OK_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_LDOUBLE_IBM): Likewise. (UNDERFLOW_EXCEPTION_BEFORE_ROUNDING): Likewise. (TEST_COND_long32): Likewise. (TEST_COND_long64): Likewise. (TEST_COND_before_rounding): Likewise. (TEST_COND_after_rounding): Likewise. (ulps_file_name): Likewise. (ulps_file): Likewise. (output_ulps): Likewise. (output_dir): Likewise. (noErrors): Likewise. (noTests): Likewise. (noExcTests): Likewise. (noErrnoTests): Likewise. (verbose): Likewise. (output_max_error): Likewise. (output_points): Likewise. (ignore_max_ulp): Likewise. (max_error): Likewise. (real_max_error): Likewise. (imag_max_error): Likewise. (prev_max_error): Likewise. (prev_real_max_error): Likewise. (prev_imag_max_error): Likewise. (max_valid_error): Likewise. (TYPE_DECIMAL_DIG): Likewise. (TYPE_HEX_DIG): Likewise. (fmt_ftostr): Likewise. (compare_ulp_data): Likewise. (find_ulps): Likewise. (init_max_error): Likewise. (set_max_error): Likewise. (print_float): Likewise. (print_screen): Likewise. (print_screen_max_error): Likewise. (update_stats): Likewise. (print_function_ulps): Likewise. (print_complex_function_ulps): Likewise. (fpstack_test): Likewise. (print_max_error): Likewise. (print_complex_max_error): Likewise. (test_single_exception): Likewise. (test_exceptions): Likewise. (test_single_errno): Likewise. (test_errno): Likewise. (ULPDIFF): Likewise. (ulp): Likewise. (check_float_internal): Likewise. (check_float): Likewise. (check_complex): Likewise. (check_int): Likewise. (check_long): Likewise. (check_bool): Likewise. (check_longlong): Likewise. (check_intmax_t): Likewise. (check_uintmax_t): Likewise. (enable_test): Likewise. (matherr): Likewise. (initialize): Likewise. (options): Likewise. (doc): Remove static. (argp): Likewise. (parse_opt): Remove. (check_ulp): Likewise. (libm_test_init): Likewise. (libm_test_finish): Likewise. * math/Makefile (libm-test-support): New variable. (test-extras): Add libm-test-support files. (extra-test-objs): Likewise. (CFLAGS-libm-test-support-float.c): New variable. (CFLAGS-libm-test-support-double.c): Likewise. (CFLAGS-libm-test-support-ldouble.c): Likewise. ($(addprefix $(objpfx),$(libm-tests)): Depend on appropriate libm-test-support objects.
2017-02-08 22:11:49 +01:00
CFLAGS-libm-test-support-float.c = $(libm-test-no-inline-cflags)
Run libm-test tests for finite-math-only functions. This patch arranges for the libm-test tests to be run for the finite-math-only function variants, in addition to the existing runs for out-of-line and bits/mathinline.h inline variants. gen-libm-test.pl is made to add a flag to all tests with non-finite inputs or outputs so that they can be skipped at runtime when the finite-math-only variants are being tested (skipping is for all rounding modes; that is, -ffinite-math-only is being treated as excluding overflow cases even when the rounding mode is such that the overflowed result is finite). errno setting is not tested for these variants (in general they don't set it, and it's implementation-defined in ISO C whether it's set on underflow, with the glibc definition being that it may not be for -ffinite-math-only; other cases where errno would normally be expected to be set are mostly excluded as having non-finite or overflowing arguments or results). As with the inline function tests, these ones are built with -D__FINITE_MATH_ONLY=1 to select the function variants, rather than -ffinite-math-only. Use of -ffinite-math-only would not be suitable for these tests because it would also affect libm-test.inc code that e.g. tests whether results are infinities or NaNs - if these function variants have bugs that incorrectly produce such results, we want them to show up in the tests, which means the compiler should not be optimizing the tests on the basis of results being finite. The finite-math-only functions share the same ulps settings as the main out-of-line functions. These interfaces were one significant group of untested ABIs listed at <https://sourceware.org/ml/libc-alpha/2013-07/msg00386.html>. I haven't rerun the script to list untested interfaces, but I expect that the vast bulk of interfaces there are still untested and could do with testcases being added (or, if applicable, being made compat symbols; in general, most symbols not starting '_' are safe bets to add tests for, while _* need more investigation of what the actual public API is, if any). I'd like to encourage people to help reduce the accumulation of untested interfaces by adding more tests. Tested for x86_64 and x86. Given my recent lgamma/gamma and log* fixes, the new tests pass (before those fixes, the new tests showed up those bugs, so illustrating the practical utility of having tests for these function variants). * math/libm-test.inc (NON_FINITE): New macro. (enable_test): Do not run tests flagged NON_FINITE if TEST_FINITE. * math/gen-libm-test.pl (show_exceptions): Add argument $non_finite. (parse_args): Update call to show_exceptions. * math/test-math-finite.h: New file. * math/test-math-no-finite.h: Likewise. * math/test-double-finite.c: Likewise. * math/test-float-finite.c: Likewise. * math/test-ldouble-finite.c: Likewise. * math/test-double.c: Include "test-math-no-finite.h". * math/test-float.c: Include "test-math-no-finite.h". * math/test-ldouble.c: Include "test-math-no-finite.h". * math/test-math-inline.h (TEST_FINITE): New macro. * math/test-math-vector.h (TEST_FINITE): Likewise. * math/Makefile (test-longdouble-yes): Add test-ldouble-finite. (libm-tests): Add test-float-finite and test-double-finite. ($(objpfx)test-float-finite.o): New dependency on $(objpfx)libm-test.stmp. ($(objpfx)test-double-finite.o): Likewise. ($(objpfx)test-ldouble-finite.o): Likewise. (libm-test-no-inline-cflags): New variable. (libm-test-finite-cflags): Likewise. (CFLAGS-test-float-finite.c): Likewise. (CFLAGS-test-double-finite.c): Likewise. (CFLAGS-test-ldouble-finite.c): Likewise. (CFLAGS-test-float.c): Use $(libm-test-no-inline-cflags). (CFLAGS-test-double.c): Likewise. (CFLAGS-test-ldouble.c): Likewise.
2015-11-06 00:28:16 +01:00
CFLAGS-test-double.c = $(libm-test-no-inline-cflags)
CFLAGS-test-double-finite.c = $(libm-test-finite-cflags)
Build most libm-test support code once per type. libm-test-driver.c contains various functions used in the course of libm testing, which are built as part of each test using this machinery. Currently, these functions get built for three tests for each type (e.g. test-float, test-ifloat, test-float-finite), plus the vector function tests. All these tests are huge and thus slow to build; the output of gen-libm-test.pl totals around 40 MB across all functions. To make the individual tests built from the Makefile smaller, it makes sense to split these tests up so the tests for each function are built separately (thus, three tests for each (function, type) pair, plus vector tests built only for functions that actually have vector versions). This improves parallelism and means that if tests fail, the summary of failed tests makes it more obvious where the problem might be without needing to look in the .out files to see which functions' tests failed (though architecture maintainers still need to keep libm-test-ulps up to date to avoid spurious failures of little interest). Simply including libm-test-driver.c as-is in such individual-function tests does not work because of unused static check_* functions (those functions only being used for the types of the outputs of the function under test). It also means the common code gets built over 1000 times instead of nine (plus vector tests). To avoid that issue, this patch splits out the bulk of the libm-test-driver.c code into a separate file libm-test-support.c (with a few functions made non-static). That separate file is built only once for each floating-point type (so at present three times, or twice on architectures with long double = double). Definitions needed in both libm-test-support.c and libm-test-driver.c go in libm-test-support.h (it's possible some of those are in fact only needed in one of the two files). libm-test-driver.c keeps definitions of a limited number of variables used to configure how libm-test-support.c behaves, various macros and structures needed by individual-function tests, and the main function. This move is also consistent in spirit with the move away from test-skeleton.c having all the test support code, to a small support/test-driver.c included in individual tests with most of the code built separately. Tested for x86_64 and x86. * math/libm-test-support.c: New file. Content from math/libm-test-driver.c. * math/libm-test-support.h: Likewise. * math/libm-test-support-double.c: New file. * math/libm-test-support-float.c: Likewise. * math/libm-test-support-ldouble.c: Likewise. * math/libm-test-driver.c: Remove main comment and header includes. Include libm-test-support.h. [!_GNU_SOURCE] (_GNU_SOURCE): Do not define. (flag_test_errno): Remove static. (flag_test_exceptions): Likewise. (flag_test_finite): Likewise. (flag_test_inline): Likewise. (flag_test_mathvec): Likewise. (test_msg): Likewise. (NO_EXCEPTION): Remove. (INVALID_EXCEPTION): Likewise. (DIVIDE_BY_ZERO_EXCEPTION): Likewise. (OVERFLOW_EXCEPTION): Likewise. (UNDERFLOW_EXCEPTION): Likewise. (INEXACT_EXCEPTION): Likewise. (INVALID_EXCEPTION_OK): Likewise. (DIVIDE_BY_ZERO_EXCEPTION_OK): Likewise. (OVERFLOW_EXCEPTION_OK): Likewise. (UNDERFLOW_EXCEPTION_OK): Likewise. (NO_INEXACT_EXCEPTION): Likewise. (EXCEPTIONS_OK): Likewise. (IGNORE_ZERO_INF_SIGN): Likewise. (TEST_NAN_SIGN): Likewise. (TEST_NAN_PAYLOAD): Likewise. (NO_TEST_INLINE): Likewise. (XFAIL_TEST): Likewise. (ERRNO_UNCHANGED): Likewise. (ERRNO_EDOM): Likewise. (ERRNO_ERANGE): Likewise. (IGNORE_RESULT): Likewise. (NON_FINITE): Likewise. (TEST_SNAN): Likewise. (NO_TEST_MATHVEC): Likewise. (__CONCATX): Likewise. (TYPE_MIN): Likewise. (TYPE_TRUE_MIN): Likewise. (TYPE_MAX): Likewise. (MIN_EXP): Likewise. (MAX_EXP): Likewise. (MANT_DIG): Likewise. (FSTR_MAX): Likewise. (ulp_idx): Likewise. (qtype_str): Remove static. (TEST_COND_binary32): Remove. (TEST_COND_binary64): Likewise. (TEST_COND_binary128): Likewise. (TEST_COND_ibm128): Likewise. (TEST_COND_intel96): Likewise. (TEST_COND_m68k96): Likewise. (TEST_COND_ibm128_libgcc): Likewise. (XFAIL_IBM128_LIBGCC): Likewise. (PAYLOAD_DIG): Likewise. (UNDERFLOW_EXCEPTION_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_OK_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_OK_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_LDOUBLE_IBM): Likewise. (UNDERFLOW_EXCEPTION_BEFORE_ROUNDING): Likewise. (TEST_COND_long32): Likewise. (TEST_COND_long64): Likewise. (TEST_COND_before_rounding): Likewise. (TEST_COND_after_rounding): Likewise. (ulps_file_name): Likewise. (ulps_file): Likewise. (output_ulps): Likewise. (output_dir): Likewise. (noErrors): Likewise. (noTests): Likewise. (noExcTests): Likewise. (noErrnoTests): Likewise. (verbose): Likewise. (output_max_error): Likewise. (output_points): Likewise. (ignore_max_ulp): Likewise. (max_error): Likewise. (real_max_error): Likewise. (imag_max_error): Likewise. (prev_max_error): Likewise. (prev_real_max_error): Likewise. (prev_imag_max_error): Likewise. (max_valid_error): Likewise. (TYPE_DECIMAL_DIG): Likewise. (TYPE_HEX_DIG): Likewise. (fmt_ftostr): Likewise. (compare_ulp_data): Likewise. (find_ulps): Likewise. (init_max_error): Likewise. (set_max_error): Likewise. (print_float): Likewise. (print_screen): Likewise. (print_screen_max_error): Likewise. (update_stats): Likewise. (print_function_ulps): Likewise. (print_complex_function_ulps): Likewise. (fpstack_test): Likewise. (print_max_error): Likewise. (print_complex_max_error): Likewise. (test_single_exception): Likewise. (test_exceptions): Likewise. (test_single_errno): Likewise. (test_errno): Likewise. (ULPDIFF): Likewise. (ulp): Likewise. (check_float_internal): Likewise. (check_float): Likewise. (check_complex): Likewise. (check_int): Likewise. (check_long): Likewise. (check_bool): Likewise. (check_longlong): Likewise. (check_intmax_t): Likewise. (check_uintmax_t): Likewise. (enable_test): Likewise. (matherr): Likewise. (initialize): Likewise. (options): Likewise. (doc): Remove static. (argp): Likewise. (parse_opt): Remove. (check_ulp): Likewise. (libm_test_init): Likewise. (libm_test_finish): Likewise. * math/Makefile (libm-test-support): New variable. (test-extras): Add libm-test-support files. (extra-test-objs): Likewise. (CFLAGS-libm-test-support-float.c): New variable. (CFLAGS-libm-test-support-double.c): Likewise. (CFLAGS-libm-test-support-ldouble.c): Likewise. ($(addprefix $(objpfx),$(libm-tests)): Depend on appropriate libm-test-support objects.
2017-02-08 22:11:49 +01:00
CFLAGS-libm-test-support-double.c = $(libm-test-no-inline-cflags)
Run libm-test tests for finite-math-only functions. This patch arranges for the libm-test tests to be run for the finite-math-only function variants, in addition to the existing runs for out-of-line and bits/mathinline.h inline variants. gen-libm-test.pl is made to add a flag to all tests with non-finite inputs or outputs so that they can be skipped at runtime when the finite-math-only variants are being tested (skipping is for all rounding modes; that is, -ffinite-math-only is being treated as excluding overflow cases even when the rounding mode is such that the overflowed result is finite). errno setting is not tested for these variants (in general they don't set it, and it's implementation-defined in ISO C whether it's set on underflow, with the glibc definition being that it may not be for -ffinite-math-only; other cases where errno would normally be expected to be set are mostly excluded as having non-finite or overflowing arguments or results). As with the inline function tests, these ones are built with -D__FINITE_MATH_ONLY=1 to select the function variants, rather than -ffinite-math-only. Use of -ffinite-math-only would not be suitable for these tests because it would also affect libm-test.inc code that e.g. tests whether results are infinities or NaNs - if these function variants have bugs that incorrectly produce such results, we want them to show up in the tests, which means the compiler should not be optimizing the tests on the basis of results being finite. The finite-math-only functions share the same ulps settings as the main out-of-line functions. These interfaces were one significant group of untested ABIs listed at <https://sourceware.org/ml/libc-alpha/2013-07/msg00386.html>. I haven't rerun the script to list untested interfaces, but I expect that the vast bulk of interfaces there are still untested and could do with testcases being added (or, if applicable, being made compat symbols; in general, most symbols not starting '_' are safe bets to add tests for, while _* need more investigation of what the actual public API is, if any). I'd like to encourage people to help reduce the accumulation of untested interfaces by adding more tests. Tested for x86_64 and x86. Given my recent lgamma/gamma and log* fixes, the new tests pass (before those fixes, the new tests showed up those bugs, so illustrating the practical utility of having tests for these function variants). * math/libm-test.inc (NON_FINITE): New macro. (enable_test): Do not run tests flagged NON_FINITE if TEST_FINITE. * math/gen-libm-test.pl (show_exceptions): Add argument $non_finite. (parse_args): Update call to show_exceptions. * math/test-math-finite.h: New file. * math/test-math-no-finite.h: Likewise. * math/test-double-finite.c: Likewise. * math/test-float-finite.c: Likewise. * math/test-ldouble-finite.c: Likewise. * math/test-double.c: Include "test-math-no-finite.h". * math/test-float.c: Include "test-math-no-finite.h". * math/test-ldouble.c: Include "test-math-no-finite.h". * math/test-math-inline.h (TEST_FINITE): New macro. * math/test-math-vector.h (TEST_FINITE): Likewise. * math/Makefile (test-longdouble-yes): Add test-ldouble-finite. (libm-tests): Add test-float-finite and test-double-finite. ($(objpfx)test-float-finite.o): New dependency on $(objpfx)libm-test.stmp. ($(objpfx)test-double-finite.o): Likewise. ($(objpfx)test-ldouble-finite.o): Likewise. (libm-test-no-inline-cflags): New variable. (libm-test-finite-cflags): Likewise. (CFLAGS-test-float-finite.c): Likewise. (CFLAGS-test-double-finite.c): Likewise. (CFLAGS-test-ldouble-finite.c): Likewise. (CFLAGS-test-float.c): Use $(libm-test-no-inline-cflags). (CFLAGS-test-double.c): Likewise. (CFLAGS-test-ldouble.c): Likewise.
2015-11-06 00:28:16 +01:00
CFLAGS-test-ldouble.c = $(libm-test-no-inline-cflags)
CFLAGS-test-ldouble-finite.c = $(libm-test-finite-cflags)
Build most libm-test support code once per type. libm-test-driver.c contains various functions used in the course of libm testing, which are built as part of each test using this machinery. Currently, these functions get built for three tests for each type (e.g. test-float, test-ifloat, test-float-finite), plus the vector function tests. All these tests are huge and thus slow to build; the output of gen-libm-test.pl totals around 40 MB across all functions. To make the individual tests built from the Makefile smaller, it makes sense to split these tests up so the tests for each function are built separately (thus, three tests for each (function, type) pair, plus vector tests built only for functions that actually have vector versions). This improves parallelism and means that if tests fail, the summary of failed tests makes it more obvious where the problem might be without needing to look in the .out files to see which functions' tests failed (though architecture maintainers still need to keep libm-test-ulps up to date to avoid spurious failures of little interest). Simply including libm-test-driver.c as-is in such individual-function tests does not work because of unused static check_* functions (those functions only being used for the types of the outputs of the function under test). It also means the common code gets built over 1000 times instead of nine (plus vector tests). To avoid that issue, this patch splits out the bulk of the libm-test-driver.c code into a separate file libm-test-support.c (with a few functions made non-static). That separate file is built only once for each floating-point type (so at present three times, or twice on architectures with long double = double). Definitions needed in both libm-test-support.c and libm-test-driver.c go in libm-test-support.h (it's possible some of those are in fact only needed in one of the two files). libm-test-driver.c keeps definitions of a limited number of variables used to configure how libm-test-support.c behaves, various macros and structures needed by individual-function tests, and the main function. This move is also consistent in spirit with the move away from test-skeleton.c having all the test support code, to a small support/test-driver.c included in individual tests with most of the code built separately. Tested for x86_64 and x86. * math/libm-test-support.c: New file. Content from math/libm-test-driver.c. * math/libm-test-support.h: Likewise. * math/libm-test-support-double.c: New file. * math/libm-test-support-float.c: Likewise. * math/libm-test-support-ldouble.c: Likewise. * math/libm-test-driver.c: Remove main comment and header includes. Include libm-test-support.h. [!_GNU_SOURCE] (_GNU_SOURCE): Do not define. (flag_test_errno): Remove static. (flag_test_exceptions): Likewise. (flag_test_finite): Likewise. (flag_test_inline): Likewise. (flag_test_mathvec): Likewise. (test_msg): Likewise. (NO_EXCEPTION): Remove. (INVALID_EXCEPTION): Likewise. (DIVIDE_BY_ZERO_EXCEPTION): Likewise. (OVERFLOW_EXCEPTION): Likewise. (UNDERFLOW_EXCEPTION): Likewise. (INEXACT_EXCEPTION): Likewise. (INVALID_EXCEPTION_OK): Likewise. (DIVIDE_BY_ZERO_EXCEPTION_OK): Likewise. (OVERFLOW_EXCEPTION_OK): Likewise. (UNDERFLOW_EXCEPTION_OK): Likewise. (NO_INEXACT_EXCEPTION): Likewise. (EXCEPTIONS_OK): Likewise. (IGNORE_ZERO_INF_SIGN): Likewise. (TEST_NAN_SIGN): Likewise. (TEST_NAN_PAYLOAD): Likewise. (NO_TEST_INLINE): Likewise. (XFAIL_TEST): Likewise. (ERRNO_UNCHANGED): Likewise. (ERRNO_EDOM): Likewise. (ERRNO_ERANGE): Likewise. (IGNORE_RESULT): Likewise. (NON_FINITE): Likewise. (TEST_SNAN): Likewise. (NO_TEST_MATHVEC): Likewise. (__CONCATX): Likewise. (TYPE_MIN): Likewise. (TYPE_TRUE_MIN): Likewise. (TYPE_MAX): Likewise. (MIN_EXP): Likewise. (MAX_EXP): Likewise. (MANT_DIG): Likewise. (FSTR_MAX): Likewise. (ulp_idx): Likewise. (qtype_str): Remove static. (TEST_COND_binary32): Remove. (TEST_COND_binary64): Likewise. (TEST_COND_binary128): Likewise. (TEST_COND_ibm128): Likewise. (TEST_COND_intel96): Likewise. (TEST_COND_m68k96): Likewise. (TEST_COND_ibm128_libgcc): Likewise. (XFAIL_IBM128_LIBGCC): Likewise. (PAYLOAD_DIG): Likewise. (UNDERFLOW_EXCEPTION_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_OK_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_OK_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_LDOUBLE_IBM): Likewise. (UNDERFLOW_EXCEPTION_BEFORE_ROUNDING): Likewise. (TEST_COND_long32): Likewise. (TEST_COND_long64): Likewise. (TEST_COND_before_rounding): Likewise. (TEST_COND_after_rounding): Likewise. (ulps_file_name): Likewise. (ulps_file): Likewise. (output_ulps): Likewise. (output_dir): Likewise. (noErrors): Likewise. (noTests): Likewise. (noExcTests): Likewise. (noErrnoTests): Likewise. (verbose): Likewise. (output_max_error): Likewise. (output_points): Likewise. (ignore_max_ulp): Likewise. (max_error): Likewise. (real_max_error): Likewise. (imag_max_error): Likewise. (prev_max_error): Likewise. (prev_real_max_error): Likewise. (prev_imag_max_error): Likewise. (max_valid_error): Likewise. (TYPE_DECIMAL_DIG): Likewise. (TYPE_HEX_DIG): Likewise. (fmt_ftostr): Likewise. (compare_ulp_data): Likewise. (find_ulps): Likewise. (init_max_error): Likewise. (set_max_error): Likewise. (print_float): Likewise. (print_screen): Likewise. (print_screen_max_error): Likewise. (update_stats): Likewise. (print_function_ulps): Likewise. (print_complex_function_ulps): Likewise. (fpstack_test): Likewise. (print_max_error): Likewise. (print_complex_max_error): Likewise. (test_single_exception): Likewise. (test_exceptions): Likewise. (test_single_errno): Likewise. (test_errno): Likewise. (ULPDIFF): Likewise. (ulp): Likewise. (check_float_internal): Likewise. (check_float): Likewise. (check_complex): Likewise. (check_int): Likewise. (check_long): Likewise. (check_bool): Likewise. (check_longlong): Likewise. (check_intmax_t): Likewise. (check_uintmax_t): Likewise. (enable_test): Likewise. (matherr): Likewise. (initialize): Likewise. (options): Likewise. (doc): Remove static. (argp): Likewise. (parse_opt): Remove. (check_ulp): Likewise. (libm_test_init): Likewise. (libm_test_finish): Likewise. * math/Makefile (libm-test-support): New variable. (test-extras): Add libm-test-support files. (extra-test-objs): Likewise. (CFLAGS-libm-test-support-float.c): New variable. (CFLAGS-libm-test-support-double.c): Likewise. (CFLAGS-libm-test-support-ldouble.c): Likewise. ($(addprefix $(objpfx),$(libm-tests)): Depend on appropriate libm-test-support objects.
2017-02-08 22:11:49 +01:00
CFLAGS-libm-test-support-ldouble.c = $(libm-test-no-inline-cflags)
CFLAGS-test-tgmath.c = -fno-builtin
# The following testcase uses very long lines (>3 million), so it may take a
# while to compile it. See: http://llvm.org/bugs/show_bug.cgi?id=14106 and
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402
CFLAGS-test-tgmath2.c = -fno-builtin
CFLAGS-test-tgmath-ret.c = -fno-builtin
2011-05-19 01:50:48 +02:00
CFLAGS-test-powl.c = -fno-builtin
CFLAGS-test-snan.c = -fsignaling-nans
Move -U__LIBC_INTERNAL_MATH_INLINES to test-math-inline.h. The libm tests of inline functions undefine __NO_MATH_INLINES (from math-CPPFLAGS) in test-math-inline.h, but __LIBC_INTERNAL_MATH_INLINES via -U options in the makefile. This is an odd inconsistency between the handling of the two macros. It also depends on the ordering (in compilation commands) of the various variables providing compiler options (which I think is why it's using CPPFLAGS-*.c instead of CFLAGS-*.c). This patch moves the undefine to test-math-inline.h, so improving consistency and eliminating the dependency on the order in which variables go in the compilation commands. The CPPFLAGS-*.c variables are renamed to CFLAGS-*.c, matching those for the non-inline libm function tests. By moving the -U option to the header file, this should ensure that ordering issues don't arise with a subsequent move of the options to these tests to target-specific CFLAGS += ... variable settings (for when tests for each function are build separately and so compilation options need setting for many more makefile targets, for which target-specific variable settings seem to be the most convenient form to generate with iterators). Tested for x86_64. * math/test-math-inline.h (__LIBC_INTERNAL_MATH_INLINES): Undefine macro. * math/Makefile (CPPFLAGS-test-ifloat.c): Rename to ... (CFLAGS-test-ifloat.c): ... this. Remove -U__LIBC_INTERNAL_MATH_INLINES. * math/Makefile (CPPFLAGS-test-idouble.c): Rename to ... (CFLAGS-test-idouble.c): ... this. Remove -U__LIBC_INTERNAL_MATH_INLINES. * math/Makefile (CPPFLAGS-test-ildouble.c): Rename to ... (CFLAGS-test-ildouble.c): ... this. Remove -U__LIBC_INTERNAL_MATH_INLINES.
2017-02-09 18:32:48 +01:00
CFLAGS-test-ifloat.c = $(libm-test-fast-math-cflags)
CFLAGS-test-idouble.c = $(libm-test-fast-math-cflags)
CFLAGS-test-ildouble.c = $(libm-test-fast-math-cflags)
Update. 1997-03-20 01:49 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/s_tanhl.c (__tanhl): Correct handling of -inf. * Makeconfig: (rpath-link): Add math/ directory. (math-objdir): New variable. (link-extra-lib): Define to special version when $(common-objpfx)!=$(objpfx) to allow libraries outside $(common-objpfx) be linked to the application. * math/Makefile: Add rules to build and run test programs. * math/libm-test.c (_GNU_SOURCE): Define only if still undefined. (check_equal): Correct check for error. (ceil_test): Fix typo. (log_test): Fix typo. (floor_test): Fix typo. (pow_test): Fix typos. (log10_test): Allow slight incorrectness for `log10(e)'. (modf_test): New functions to test `modf' et.al. (hypot_test): Rewrite test completely. Patch partly by Andreas Jaeger. * math/test-double.h (__NO_MATH_INLINES): Define only if not already defined. * math/test-float.h: Likewise. * math/test-logdouble.h: Likewise. * setjmp/setjmp.h: Change references of ANSI C to ISO C. * setjmp/tst-setjmp.c: Correct and extend test suite. * sysdeps/i386/__longjmp.S: Update copyright. * sysdeps/i386/bsd-_setjmp.S: Correct fatal bug in jump to `__sigsetjmp' in PIC code. * sysdeps/i386/bsd-setjmp.S: Likewise. * sysdeps/libm-i387/e_pow.S: Correct recognition of mantissa overflow. * sysdeps/libm-i387/e_powf.S: Likewise. * sysdeps/libm-i387/s_expm1.S: Handle x == +-0 as a special case since expm1(-0) == -0. * sysdeps/libm-i387/s_expm1f.S: Likewise. * sysdeps/libm-i387/s_expm1l.S: Likewise. * sysdeps/libm-ieee754/s_modf.c: Optimize code by avoiding unneeded access to FP number. * sysdeps/libm-ieee754/s_modff.c: Likewise. * sysdeps/libm-ieee754/s_modfl.c: Correct former completely bogus code. It never worked correctly. * sysdeps/libm-ieee754/s_tanh.c: Handle x == +-0 as a special case since tanh(-0) == -0. * sysdeps/libm-ieee754/s_tanhf.c: Likewise. 1997-03-19 21:13 Ulrich Drepper <drepper@cygnus.com> * stdlib/strtod.c (STRTOL): Use wchar_t as type for `decimal' and `thousands' to support systems with sizeof(wchar_t) != sizeof(wint_t). Blargh. * sysdeps/unix/sysv/linux/socketbits.h: Remove definition of SOL_IP, SOL_TCP, SOL_UDP, and SOL_IPX as they are defined in appropriate headers. * sysdeps/unix/sysv/linux/writev.c: Don't use MAX_IOVEC. Test for UIO_FASTIOV and set to 8 if not available. * sysdeps/unix/sysv/linux/readv.c: Likewise. Patch by HJ Lu. * sysdeps/unix/sysv/linux/xstat.c: Include <kernel_stat.h>, not "kernel_stat.h". * sysdeps/unix/sysv/linux/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/fxstat.c: Likewise. Reported by fabsoft@fabsoft2.zarm.uni-bremen.de.
1997-03-20 03:20:57 +01:00
Fix finite-math-only lgamma functions signgam setting (bug 19211). The lgamma inline functions in bits/math-finite.h do not set signgam if __USE_ISOC99, even when other feature test macros mean a standard such as XSI POSIX is selected for which it should be set. (This is essentially the opposite issue to bug 15421, the out-of-line versions setting signgam even when they shouldn't.) This patch fixes those functions to use __USE_MISC || __USE_XOPEN as the condition for when to set signgam, since it's the condition for when math.h declares signgam. The legacy gamma* names are only declared at all if __USE_MISC || __USE_XOPEN, so they just set signgam unconditionally. Tests for certain standards or not using _GNU_SOURCE cannot use test-skeleton.c (this is a known issue noted on the wiki todo list). Thus, the new tests that signgam remains not set in ISO C modes do not use test-skeleton.c. They also define _ISOMAC to avoid running into declarations in the internal include/ headers that only work in _GNU_SOURCE mode. Tested for x86_64 and x86. [BZ #19211] * math/bits/math-finite.h (lgamma): Set signgam if [__USE_MISC || __USE_XOPEN], not if [!__USE_ISOC99]. (lgammaf): Likewise. (lgammal): Likewise. (gamma): Set signgam unconditionally, not if [!__USE_ISOC99]. (gammaf): Likewise. (gammal): Likewise. * math/test-signgam-finite-c11.c: New file. * math/test-signgam-finite-c99.c: Likewise. * math/test-signgam-finite.c: Likewise. * math/Makefile (tests): Add test-signgam-finite, test-signgam-finite-c99 and test-signgam-finite-c11. (CFLAGS-test-signgam-finite.c): New variable. (CFLAGS-test-signgam-finite-c99.c): Likewise. (CFLAGS-test-signgam-finite-c11.c): Likewise.
2015-11-05 22:23:07 +01:00
CFLAGS-test-signgam-finite.c = -ffinite-math-only
CFLAGS-test-signgam-finite-c99.c = -ffinite-math-only -std=c99
CFLAGS-test-signgam-finite-c11.c = -ffinite-math-only -std=c11
Fix lgamma setting signgam for ISO C (bug 15421). The lgamma (and likewise lgammaf, lgammal) function wrongly sets the signgam variable even when building for strict ISO C conformance (-std=c99 / -std=c11), although the user may define such a variable and it's only in the implementation namespace for POSIX with XSI extensions enabled. Following discussions starting at <https://sourceware.org/ml/libc-alpha/2013-04/msg00767.html> and <https://sourceware.org/ml/libc-alpha/2015-10/msg00844.html>, it seems that the safest approach for fixing this particular issue is for signgam to become a weak alias for a newly exported symbol __signgam, with the library functions only setting __signgam, at which point static linker magic will preserve the alias for newly linked binaries that refer to the library's signgam rather than defining their own, while breaking the alias for programs that define their own signgam, with new symbol versions for lgamma functions and with compat symbols for existing binaries that set both signgam and __signgam. This patch implements that approach for the fix. signgam is made into a weak alias. The four symbols __signgam, lgamma, lgammaf, lgammal get new symbol versions at version GLIBC_2.23, with the existing versions of lgamma, lgammaf and lgammal becoming compat symbols. When the compat versions are built, gamma, gammaf and gammal are aliases for the compat versions (i.e. always set signgam); this is OK as they are not ISO C functions, and avoids adding new symbol versions for them unnecessarily. When the compat versions are not built (i.e. for static linking and for future glibc ports), gamma, gammaf and gammal are aliases for the new versions that set __signgam. The ldbl-opt versions are updated accordingly. The lgamma wrappers are adjusted so that the same source files, included from different files with different definitions of USE_AS_COMPAT, can build either the new versions or the compat versions. Similar changes are made to the ia64 versions (untested). Tests are added that the lgamma functions do not interfere with a user variable called signgam for ISO C, with various choices for the size of that variable, whether it is initialized, and for static and dynamic linking. The conformtest whitelist entry is removed as well. Tested for x86_64, x86, mips64 and powerpc, including looking at objdump --dynamic-syms output to make sure the expected sets of symbols were aliases. Also spot-tested that a binary built with old glibc works properly (i.e. gets signgam set) when run with new glibc. [BZ #15421] * sysdeps/ieee754/s_signgam.c (signgam): Rename to __signgam, initialize with 0 and define as weak alias of __signgam. * include/math.h [!_ISOMAC] (__signgam): Declare. * math/Makefile (libm-calls): Add w_lgamma_compat. (tests): Add test-signgam-uchar, test-signgam-uchar-init, test-signgam-uint, test-signgam-uint-init, test-signgam-ullong and test-signgam-ullong-init. (tests-static): Add test-signgam-uchar-static, test-signgam-uchar-init-static, test-signgam-uint-static, test-signgam-uint-init-static, test-signgam-ullong-static and test-signgam-ullong-init-static. (CFLAGS-test-signgam-uchar.c): New variable. (CFLAGS-test-signgam-uchar-init.c): Likewise. (CFLAGS-test-signgam-uchar-static.c): Likewise. (CFLAGS-test-signgam-uchar-init-static.c): Likewise. (CFLAGS-test-signgam-uint.c): Likewise. (CFLAGS-test-signgam-uint-init.c): Likewise. (CFLAGS-test-signgam-uint-static.c): Likewise. (CFLAGS-test-signgam-uint-init-static.c): Likewise. (CFLAGS-test-signgam-ullong.c): Likewise. (CFLAGS-test-signgam-ullong-init.c): Likewise. (CFLAGS-test-signgam-ullong-static.c): Likewise. (CFLAGS-test-signgam-ullong-init-static.c): Likewise. * math/Versions (libm): Add GLIBC_2.23. * math/lgamma-compat.h: New file. * math/test-signgam-main.c: Likewise. * math/test-signgam-uchar-init-static.c: Likewise. * math/test-signgam-uchar-init.c: Likewise. * math/test-signgam-uchar-static.c: Likewise. * math/test-signgam-uchar.c: Likewise. * math/test-signgam-uint-init-static.c: Likewise. * math/test-signgam-uint-init.c: Likewise. * math/test-signgam-uint-static.c: Likewise. * math/test-signgam-uint.c: Likewise. * math/test-signgam-ullong-init-static.c: Likewise. * math/test-signgam-ullong-init.c: Likewise. * math/test-signgam-ullong-static.c: Likewise. * math/test-signgam-ullong.c: Likewise. * math/w_lgamma.c: Rename to w_lgamma_main.c and replace by wrapper of w_lgamma_main.c. * math/w_lgamma_compat.c: New file. * math/w_lgamma_compatf.c: Likewise. * math/w_lgamma_compatl.c: Likewise. * math/w_lgamma_main.c: New file. Based on w_lgamma.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgamma): Change to LGFUNC (__lgamma). Use CALL_LGAMMA. * math/w_lgammaf.c: Rename to w_lgammaf_main.c and replace by wrapper of w_lgammaf_main.c. * math/w_lgammaf_main.c: New file. Based on w_lgammaf.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgammaf): Change to LGFUNC (__lgammaf). Use CALL_LGAMMA. * math/w_lgammal.c: Rename to w_lgammal_main.c and replace by wrapper of w_lgammal_main.c. * math/w_lgammal_main.c: New file. Based on w_lgammal.c. Include <lgamma-compat.h>. Condition contents on [BUILD_LGAMMA]. Support defining compatibility symbols. (__lgammal): Change to LGFUNC (__lgammal). Use CALL_LGAMMA. * sysdeps/ia64/fpu/lgamma-compat.h: New file. * sysdeps/ia64/fpu/w_lgamma.c: Move to .... * sysdeps/ia64/fpu/w_lgamma_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgamma): Change to LGFUNC (lgamma). Use CALL_LGAMMA. (__ieee754_gamma): Define as alias. * sysdeps/ia64/fpu/w_lgammaf.c: Move to .... * sysdeps/ia64/fpu/w_lgammaf_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgammaf): Change to LGFUNC (lgammaf). Use CALL_LGAMMA. (__ieee754_gammaf): Define as alias. * sysdeps/ia64/fpu/w_lgammal.c: Move to .... * sysdeps/ia64/fpu/w_lgammal_main.c: ...here. Include <lgamma-compat.h>. (__ieee754_lgammal): Change to LGFUNC (lgammal). Use CALL_LGAMMA. (__ieee754_gammal): Define as alias. * sysdeps/ieee754/ldbl-opt/w_lgamma.c: Move to .... * sysdeps/ieee754/ldbl-opt/w_lgamma_compat.c: ...here. Include <math/w_lgamma_compat.c>. [LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)] (__lgammal_dbl_compat): Define as alias of __lgamma_compat and use in defining lgammal. * sysdeps/ieee754/ldbl-opt/w_lgammal.c: Move to .... * sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c: ...here. Include <math/lgamma-compat.h> and <math/w_lgamma_compatl.c>. (USE_AS_COMPAT): New macro. (LGAMMA_OLD_VER): Undefine and redefine. (lgammal): Do not define here. (gammal): Only define here if [GAMMA_ALIAS]. * conform/linknamespace.pl (@whitelist): Remove signgam. * 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.
2015-11-20 23:49:59 +01:00
CFLAGS-test-signgam-uchar.c = -std=c99
CFLAGS-test-signgam-uchar-init.c = -std=c99
CFLAGS-test-signgam-uchar-static.c = -std=c99
CFLAGS-test-signgam-uchar-init-static.c = -std=c99
CFLAGS-test-signgam-uint.c = -std=c99
CFLAGS-test-signgam-uint-init.c = -std=c99
CFLAGS-test-signgam-uint-static.c = -std=c99
CFLAGS-test-signgam-uint-init-static.c = -std=c99
CFLAGS-test-signgam-ullong.c = -std=c99
CFLAGS-test-signgam-ullong-init.c = -std=c99
CFLAGS-test-signgam-ullong-static.c = -std=c99
CFLAGS-test-signgam-ullong-init-static.c = -std=c99
Fix finite-math-only lgamma functions signgam setting (bug 19211). The lgamma inline functions in bits/math-finite.h do not set signgam if __USE_ISOC99, even when other feature test macros mean a standard such as XSI POSIX is selected for which it should be set. (This is essentially the opposite issue to bug 15421, the out-of-line versions setting signgam even when they shouldn't.) This patch fixes those functions to use __USE_MISC || __USE_XOPEN as the condition for when to set signgam, since it's the condition for when math.h declares signgam. The legacy gamma* names are only declared at all if __USE_MISC || __USE_XOPEN, so they just set signgam unconditionally. Tests for certain standards or not using _GNU_SOURCE cannot use test-skeleton.c (this is a known issue noted on the wiki todo list). Thus, the new tests that signgam remains not set in ISO C modes do not use test-skeleton.c. They also define _ISOMAC to avoid running into declarations in the internal include/ headers that only work in _GNU_SOURCE mode. Tested for x86_64 and x86. [BZ #19211] * math/bits/math-finite.h (lgamma): Set signgam if [__USE_MISC || __USE_XOPEN], not if [!__USE_ISOC99]. (lgammaf): Likewise. (lgammal): Likewise. (gamma): Set signgam unconditionally, not if [!__USE_ISOC99]. (gammaf): Likewise. (gammal): Likewise. * math/test-signgam-finite-c11.c: New file. * math/test-signgam-finite-c99.c: Likewise. * math/test-signgam-finite.c: Likewise. * math/Makefile (tests): Add test-signgam-finite, test-signgam-finite-c99 and test-signgam-finite-c11. (CFLAGS-test-signgam-finite.c): New variable. (CFLAGS-test-signgam-finite-c99.c): Likewise. (CFLAGS-test-signgam-finite-c11.c): Likewise.
2015-11-05 22:23:07 +01:00
CFLAGS-test-math-isinff.cc = -std=gnu++11
CFLAGS-test-math-iszero.cc = -std=gnu++11
CFLAGS-test-iszero-excess-precision.c = -fexcess-precision=standard
CFLAGS-test-iseqsig-excess-precision.c = -fexcess-precision=standard
Fix default float_t definition (bug 20855). The default (top-level) version of bits/mathdef.h defines float_t to double. It is used on ColdFire, MicroBlaze, Nios II and SH3, all of which define FLT_EVAL_METHOD to 0, so float_t should be float (and C11 requires a certain correspondence between these typedefs and FLT_EVAL_METHOD values). I proposed fixing this default in <https://sourceware.org/ml/libc-alpha/2015-01/msg00499.html>, with no objections from architecture maintainers, and this patch makes that fix. As noted in the NEWS entry added, this might affect the ABIs of non-glibc libraries (ImageMagick has been mentioned in gcc-patches discussion of the S/390 case - which is unaffected by this patch), but as noted in my previous message, affected libraries would have problems with -mfpmath=sse anyway on 32-bit x86. A (compilation) testcase is added to verify the required correspondence of typedefs to FLT_EVAL_METHOD values. This test is built with -fexcess-precision=standard to avoid any issues with GCC 7 on S/390 providing a more accurate FLT_EVAL_METHOD definition in the default (no excess precision) mode. (This will also be usable to test a fix for the recently reported bug about these typedefs on x86_64 -mfpmath=387, as architecture-specific tests can be added that It is entirely possible that the fixed default makes some architecture-specific versions of bits/mathdef.h semantically equivalent to the default version and so no longer required. I don't intend to investigate that separately from the refactoring I proposed in <https://sourceware.org/ml/libc-alpha/2016-11/msg00745.html>, which will create as few header variants as possible for each group of definitions. Tested (compilation only) with build-many-glibcs.py. [BZ #20855] * bits/mathdef.h (float_t): Define to float. * math/test-flt-eval-method.c: New file. * math/Makefile (tests): Add test-flt-eval-method. (CFLAGS-test-flt-eval-method.c): New variable.
2016-11-23 01:28:30 +01:00
CFLAGS-test-flt-eval-method.c = -fexcess-precision=standard
Define FE_SNANS_ALWAYS_SIGNAL. TS 18661-1 defines a macro FE_SNANS_ALWAYS_SIGNAL in <fenv.h>, to indicate that the recommended practice regarding sNaNs (that operations always produce a qNaN output with "invalid" exception, even in the fmax / fmin / hypot / pow cases where a qNaN input would not result in qNaN output) is followed. Now that those functions with C99 special cases for NaNs have been fixed not to apply those special cases to sNaN, only to qNaN, glibc follows that recommended practice. This patch makes it define the corresponding macro. Since compiler optimizations may affect whether sNaNs behave as expected and the macro relates to both language and library features, it is only defined if __SUPPORT_SNAN__ is defined (which GCC defines for -fsignaling-nans). It is also not defined if FE_INVALID is undefined, since the recommended practice specifically refers to raising the "invalid" exception, so it seems inappropriate to define the macro for soft-float cases without support for exceptions. (Further refinement would be possible in cases where bits/fenv.h is shared by configurations both with and without exceptions support.) Tested for x86_64 and x86, and also did compile-only testing for nios2 to cover the no-exceptions case. * math/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT) && FE_INVALID && __SUPPORT_SNAN__] (FE_SNANS_ALWAYS_SIGNAL): New macro. * math/test-fe-snans-always-signal.c: New file. * math/Makefile (tests): Add test-fe-snans-always-signal. (CFLAGS-test-fe-snans-always-signal.c): New variable. * manual/arith.texi (Infinity and NaN): Document FE_SNANS_ALWAYS_SIGNAL.
2016-12-16 19:03:25 +01:00
CFLAGS-test-fe-snans-always-signal.c = -fsignaling-nans
# The -lieee module sets the _LIB_VERSION_ switch to IEEE mode
# for error handling in the -lm functions.
install-lib += libieee.a
non-lib.a += libieee.a
extra-objs += libieee.a ieee-math.o
1995-02-18 02:27:10 +01:00
include ../Rules
gen-all-calls = $(gen-libm-calls) $(gen-calls)
generated += $(addsuffix .c,$(call type-foreach,$(gen-all-calls))) \
gen-libm-templates.stmp
# Create wrappers in the math build directory.
$(objpfx)gen-libm-templates.stmp: Makefile
$(make-target-directory)
for gcall in $(gen-all-calls); do \
func=$${gcall%F*}$${gcall#*F}; \
for type in $(foreach t,$(types),$(t)__$(type-$(t)-suffix)); do \
suff=$${type#*__}; \
type=$${type%__*}; \
file=$(objpfx)$${gcall%F*}$${suff}$${gcall#*F}.c; \
( \
echo "#include <math-type-macros-$${type}.h>"; \
echo "#include <$${func}_template.c>"; \
) > $${file}; \
done; \
done; \
echo > $(@)
# Add dependency to ensure the generator runs prior.
$(foreach t, $(call type-foreach, $(gen-all-calls)), \
$(objpfx)$(t).c): $(objpfx)gen-libm-templates.stmp
New Makefile target `regen-ulps'. The wiki "Regeneration" page has this to say about update ULPs. "The libm-test-ulps files are semiautomatically updated. To update an ulps baseline, run each of the failing tests (test-float, test-double, etc.) with -u; this will generate a file called ULPs; concatenate each of those files with the existing libm-test-ulps file, after removing any entries for particularly huge numbers of ulps that you do not want to mark as expected. Then run gen-libm-test.pl -n -u FILE where FILE is the concatenated file produced in the previous step. This generates a file called NewUlps which is the new sorted version of libm-test-ulps." The same information is listed in math/README.libm-test, and is a lot of manual work that you often want to run over-and-over again while working on a particular test. The `regen-ulps' convenience target does this automatically for developers. We strictly assume the source tree is readonly and add a new --output-dir option to libm-test.inc to allow for writing out ULPs to $(objpfx). When run the new target does the following: * Starts with the baseline ULPs file. * Runs each of the libm math tests with -u. * Adds new changes seen with -u to the baseline. * Sorts and prepares the test output with gen-libm-test.pl. * Leaves math/NewUlps in your build tree to copy to your source tree, cleanup, and checkin. The math test documentation in math/README.libm-test is updated document the new Makefile target. --- 2013-04-06 Carlos O'Donell <carlos@redhat.com> * Makefile.in (regen-ulps): New target. * math/Makefile [ifneq (no,$(PERL)]: Declare regen-ulps with .PHONY. [ifneq (no,$(PERL)] (run-regen-ulps): New variable. [ifneq (no,$(PERL)] (regen-ulps): New target. [ifeq (no,$(PERL)] (regen-ulps): New target. * math/libm-test.inc (ulps_file_name): Define. (output_dir): New variable. (options): Add "output-dir" option. (parse_opt): Handle 'o' case. (main): If output_dir is non-NULL use it as a prefix otherwise use "". * math/README.libm-test: Update `How can I generate "libm-test-ulps"?'
2013-04-06 22:22:47 +02:00
ifneq (no,$(PERL))
# This must come after the inclusion of sysdeps Makefiles via Rules.
$(addprefix $(objpfx), $(libm-tests.o)): $(addprefix $(objpfx),\
$(libm-tests-generated))
Build most libm-test support code once per type. libm-test-driver.c contains various functions used in the course of libm testing, which are built as part of each test using this machinery. Currently, these functions get built for three tests for each type (e.g. test-float, test-ifloat, test-float-finite), plus the vector function tests. All these tests are huge and thus slow to build; the output of gen-libm-test.pl totals around 40 MB across all functions. To make the individual tests built from the Makefile smaller, it makes sense to split these tests up so the tests for each function are built separately (thus, three tests for each (function, type) pair, plus vector tests built only for functions that actually have vector versions). This improves parallelism and means that if tests fail, the summary of failed tests makes it more obvious where the problem might be without needing to look in the .out files to see which functions' tests failed (though architecture maintainers still need to keep libm-test-ulps up to date to avoid spurious failures of little interest). Simply including libm-test-driver.c as-is in such individual-function tests does not work because of unused static check_* functions (those functions only being used for the types of the outputs of the function under test). It also means the common code gets built over 1000 times instead of nine (plus vector tests). To avoid that issue, this patch splits out the bulk of the libm-test-driver.c code into a separate file libm-test-support.c (with a few functions made non-static). That separate file is built only once for each floating-point type (so at present three times, or twice on architectures with long double = double). Definitions needed in both libm-test-support.c and libm-test-driver.c go in libm-test-support.h (it's possible some of those are in fact only needed in one of the two files). libm-test-driver.c keeps definitions of a limited number of variables used to configure how libm-test-support.c behaves, various macros and structures needed by individual-function tests, and the main function. This move is also consistent in spirit with the move away from test-skeleton.c having all the test support code, to a small support/test-driver.c included in individual tests with most of the code built separately. Tested for x86_64 and x86. * math/libm-test-support.c: New file. Content from math/libm-test-driver.c. * math/libm-test-support.h: Likewise. * math/libm-test-support-double.c: New file. * math/libm-test-support-float.c: Likewise. * math/libm-test-support-ldouble.c: Likewise. * math/libm-test-driver.c: Remove main comment and header includes. Include libm-test-support.h. [!_GNU_SOURCE] (_GNU_SOURCE): Do not define. (flag_test_errno): Remove static. (flag_test_exceptions): Likewise. (flag_test_finite): Likewise. (flag_test_inline): Likewise. (flag_test_mathvec): Likewise. (test_msg): Likewise. (NO_EXCEPTION): Remove. (INVALID_EXCEPTION): Likewise. (DIVIDE_BY_ZERO_EXCEPTION): Likewise. (OVERFLOW_EXCEPTION): Likewise. (UNDERFLOW_EXCEPTION): Likewise. (INEXACT_EXCEPTION): Likewise. (INVALID_EXCEPTION_OK): Likewise. (DIVIDE_BY_ZERO_EXCEPTION_OK): Likewise. (OVERFLOW_EXCEPTION_OK): Likewise. (UNDERFLOW_EXCEPTION_OK): Likewise. (NO_INEXACT_EXCEPTION): Likewise. (EXCEPTIONS_OK): Likewise. (IGNORE_ZERO_INF_SIGN): Likewise. (TEST_NAN_SIGN): Likewise. (TEST_NAN_PAYLOAD): Likewise. (NO_TEST_INLINE): Likewise. (XFAIL_TEST): Likewise. (ERRNO_UNCHANGED): Likewise. (ERRNO_EDOM): Likewise. (ERRNO_ERANGE): Likewise. (IGNORE_RESULT): Likewise. (NON_FINITE): Likewise. (TEST_SNAN): Likewise. (NO_TEST_MATHVEC): Likewise. (__CONCATX): Likewise. (TYPE_MIN): Likewise. (TYPE_TRUE_MIN): Likewise. (TYPE_MAX): Likewise. (MIN_EXP): Likewise. (MAX_EXP): Likewise. (MANT_DIG): Likewise. (FSTR_MAX): Likewise. (ulp_idx): Likewise. (qtype_str): Remove static. (TEST_COND_binary32): Remove. (TEST_COND_binary64): Likewise. (TEST_COND_binary128): Likewise. (TEST_COND_ibm128): Likewise. (TEST_COND_intel96): Likewise. (TEST_COND_m68k96): Likewise. (TEST_COND_ibm128_libgcc): Likewise. (XFAIL_IBM128_LIBGCC): Likewise. (PAYLOAD_DIG): Likewise. (UNDERFLOW_EXCEPTION_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_OK_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_OK_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_LDOUBLE_IBM): Likewise. (UNDERFLOW_EXCEPTION_BEFORE_ROUNDING): Likewise. (TEST_COND_long32): Likewise. (TEST_COND_long64): Likewise. (TEST_COND_before_rounding): Likewise. (TEST_COND_after_rounding): Likewise. (ulps_file_name): Likewise. (ulps_file): Likewise. (output_ulps): Likewise. (output_dir): Likewise. (noErrors): Likewise. (noTests): Likewise. (noExcTests): Likewise. (noErrnoTests): Likewise. (verbose): Likewise. (output_max_error): Likewise. (output_points): Likewise. (ignore_max_ulp): Likewise. (max_error): Likewise. (real_max_error): Likewise. (imag_max_error): Likewise. (prev_max_error): Likewise. (prev_real_max_error): Likewise. (prev_imag_max_error): Likewise. (max_valid_error): Likewise. (TYPE_DECIMAL_DIG): Likewise. (TYPE_HEX_DIG): Likewise. (fmt_ftostr): Likewise. (compare_ulp_data): Likewise. (find_ulps): Likewise. (init_max_error): Likewise. (set_max_error): Likewise. (print_float): Likewise. (print_screen): Likewise. (print_screen_max_error): Likewise. (update_stats): Likewise. (print_function_ulps): Likewise. (print_complex_function_ulps): Likewise. (fpstack_test): Likewise. (print_max_error): Likewise. (print_complex_max_error): Likewise. (test_single_exception): Likewise. (test_exceptions): Likewise. (test_single_errno): Likewise. (test_errno): Likewise. (ULPDIFF): Likewise. (ulp): Likewise. (check_float_internal): Likewise. (check_float): Likewise. (check_complex): Likewise. (check_int): Likewise. (check_long): Likewise. (check_bool): Likewise. (check_longlong): Likewise. (check_intmax_t): Likewise. (check_uintmax_t): Likewise. (enable_test): Likewise. (matherr): Likewise. (initialize): Likewise. (options): Likewise. (doc): Remove static. (argp): Likewise. (parse_opt): Remove. (check_ulp): Likewise. (libm_test_init): Likewise. (libm_test_finish): Likewise. * math/Makefile (libm-test-support): New variable. (test-extras): Add libm-test-support files. (extra-test-objs): Likewise. (CFLAGS-libm-test-support-float.c): New variable. (CFLAGS-libm-test-support-double.c): Likewise. (CFLAGS-libm-test-support-ldouble.c): Likewise. ($(addprefix $(objpfx),$(libm-tests)): Depend on appropriate libm-test-support objects.
2017-02-08 22:11:49 +01:00
$(addprefix $(objpfx),\
$(filter test-float% test-ifloat%,\
$(libm-tests))): $(objpfx)libm-test-support-float.o
$(addprefix $(objpfx),\
$(filter test-double% test-idouble%,\
$(libm-tests))): $(objpfx)libm-test-support-double.o
$(addprefix $(objpfx),\
$(filter test-ldouble% test-ildouble%,\
$(libm-tests))): $(objpfx)libm-test-support-ldouble.o
New Makefile target `regen-ulps'. The wiki "Regeneration" page has this to say about update ULPs. "The libm-test-ulps files are semiautomatically updated. To update an ulps baseline, run each of the failing tests (test-float, test-double, etc.) with -u; this will generate a file called ULPs; concatenate each of those files with the existing libm-test-ulps file, after removing any entries for particularly huge numbers of ulps that you do not want to mark as expected. Then run gen-libm-test.pl -n -u FILE where FILE is the concatenated file produced in the previous step. This generates a file called NewUlps which is the new sorted version of libm-test-ulps." The same information is listed in math/README.libm-test, and is a lot of manual work that you often want to run over-and-over again while working on a particular test. The `regen-ulps' convenience target does this automatically for developers. We strictly assume the source tree is readonly and add a new --output-dir option to libm-test.inc to allow for writing out ULPs to $(objpfx). When run the new target does the following: * Starts with the baseline ULPs file. * Runs each of the libm math tests with -u. * Adds new changes seen with -u to the baseline. * Sorts and prepares the test output with gen-libm-test.pl. * Leaves math/NewUlps in your build tree to copy to your source tree, cleanup, and checkin. The math test documentation in math/README.libm-test is updated document the new Makefile target. --- 2013-04-06 Carlos O'Donell <carlos@redhat.com> * Makefile.in (regen-ulps): New target. * math/Makefile [ifneq (no,$(PERL)]: Declare regen-ulps with .PHONY. [ifneq (no,$(PERL)] (run-regen-ulps): New variable. [ifneq (no,$(PERL)] (regen-ulps): New target. [ifeq (no,$(PERL)] (regen-ulps): New target. * math/libm-test.inc (ulps_file_name): Define. (output_dir): New variable. (options): Add "output-dir" option. (parse_opt): Handle 'o' case. (main): If output_dir is non-NULL use it as a prefix otherwise use "". * math/README.libm-test: Update `How can I generate "libm-test-ulps"?'
2013-04-06 22:22:47 +02:00
# Run the math programs to automatically generate ULPs files.
.PHONY: regen-ulps
run-regen-ulps = $(test-wrapper-env) \
Don't require test wrappers to preserve environment variables, use more consistent environment. One wart in the original support for test wrappers for cross testing, as noted in <https://sourceware.org/ml/libc-alpha/2012-10/msg00722.html>, is the requirement for test wrappers to pass a poorly-defined set of environment variables from the build system to the system running the glibc under test. Although some variables are passed explicitly via $(test-wrapper-env), including LD_* variables that simply can't be passed implicitly because of the side effects they'd have on the build system's dynamic linker, others are passed implicitly, including variables such as GCONV_PATH and LOCPATH that could potentially affect the build system's libc (so effectively relying on any such effects not breaking the wrappers). In addition, the code in cross-test-ssh.sh for preserving environment variables is fragile (it depends on how bash formats a list of exported variables, and could well break for multi-line variable definitions where the contents contain things looking like other variable definitions). This patch moves to explicitly passing environment variables via $(test-wrapper-env). Makefile variables that previously used $(test-wrapper) are split up into -before-env and -after-env parts that can be passed separately to the various .sh files used in testing, so those files can then insert environment settings between the two parts. The common default environment settings in make-test-out are made into a separate makefile variable that can also be passed to scripts, rather than many scripts duplicating those settings (for testing an installed glibc, it is desirable to have the GCONV_PATH setting on just one place, so just that one place needs to support it pointing to an installed sysroot instead of the build tree). The default settings are included in the variables such as $(test-program-prefix), so that if tests do not need any non-default settings they can continue to use single variables rather than the split-up variables. Although this patch cleans up LC_ALL=C settings (that being part of the common defaults), various LANG=C and LANGUAGE=C settings remain. Those are generally unnecessary and I propose a subsequent cleanup to remove them. LC_ALL takes precedence over LANG, and while LANGUAGE takes precedence over LC_ALL, it only does so for settings other than LC_ALL=C. So LC_ALL=C on its own is sufficient to ensure the C locale, and anything that gets LC_ALL=C does not need the other settings. While preparing this patch I noticed some tests with .sh files that appeared to do nothing beyond what the generic makefile support for tests can do (localedata/tst-wctype.sh - the makefiles support -ENV variables and .input files - and localedata/tst-mbswcs.sh - just runs five tests that could be run individually from the makefile). So I propose another subsequent cleanup to move those to using the generic support instead of special .sh files. Tested x86_64 (native) and powerpc32 (cross). * Makeconfig (run-program-env): New variable. (run-program-prefix-before-env): Likewise. (run-program-prefix-after-env): Likewise. (run-program-prefix): Define in terms of new variables. (built-program-cmd-before-env): New variable. (built-program-cmd-after-env): Likewise. (built-program-cmd): Define in terms of new variables. (test-program-prefix-before-env): New variable. (test-program-prefix-after-env): Likewise. (test-program-prefix): Define in terms of new variables. (test-program-cmd-before-env): New variable. (test-program-cmd-after-env): Likewise. (test-program-cmd): Define in terms of new variables. * Rules (make-test-out): Use $(run-program-env). * scripts/cross-test-ssh.sh (env_blacklist): Remove variable. (help): Do not mention environment variables. Mention --timeoutfactor option. (timeoutfactor): New variable. (blacklist_exports): Remove function. (exports): Remove variable. (command): Do not include ${exports}. * manual/install.texi (Configuring and compiling): Do not mention test wrappers preserving environment variables. Mention that last assignment to a variable must take precedence. * INSTALL: Regenerated. * benchtests/Makefile (run-bench): Use $(run-program-env). * catgets/Makefile ($(objpfx)test1.cat): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)test2.cat): Do not specify environment variables explicitly. ($(objpfx)de/libc.cat): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)test-gencat.out): Use $(test-program-cmd-before-env), $(run-program-env) and $(test-program-cmd-after-env). ($(objpfx)sample.SJIS.cat): Do not specify environment variables explicitly. * catgets/test-gencat.sh: Use test_program_cmd_before_env, run_program_env and test_program_cmd_after_env arguments. * elf/Makefile ($(objpfx)tst-pathopt.out): Use $(run-program-env). * elf/tst-pathopt.sh: Use run_program_env argument. * iconvdata/Makefile ($(objpfx)iconv-test.out): Use $(test-wrapper-env) and $(run-program-env). * iconvdata/run-iconv-test.sh: Use test_wrapper_env and run_program_env arguments. * iconvdata/tst-table.sh: Do not set GCONV_PATH explicitly. * intl/Makefile ($(objpfx)tst-gettext.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). ($(objpfx)tst-gettext2.out): Likewise. * intl/tst-gettext.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * intl/tst-gettext2.sh: Likewise. * intl/tst-gettext4.sh: Do not set environment variables explicitly. * intl/tst-gettext6.sh: Likewise. * intl/tst-translit.sh: Likewise. * malloc/Makefile ($(objpfx)tst-mtrace.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * malloc/tst-mtrace.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * math/Makefile (run-regen-ulps): Use $(run-program-env). * nptl/Makefile ($(objpfx)tst-tls6.out): Use $(run-program-env). * nptl/tst-tls6.sh: Use run_program_env argument. Set LANG=C explicitly with each use of ${test_wrapper_env}. * posix/Makefile ($(objpfx)wordexp-tst.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * posix/tst-getconf.sh: Do not set environment variables explicitly. * posix/wordexp-tst.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * stdio-common/tst-printf.sh: Do not set environment variables explicitly. * stdlib/Makefile ($(objpfx)tst-fmtmsg.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * stdlib/tst-fmtmsg.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. Split $test calls into $test_pre and $test. * timezone/Makefile (build-testdata): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). localedata/ChangeLog: * Makefile ($(addprefix $(objpfx),$(CTYPE_FILES))): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)sort-test.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). ($(objpfx)tst-fmon.out): Use $(run-program-prefix-before-env), $(run-program-env) and $(run-program-prefix-after-env). ($(objpfx)tst-locale.out): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)tst-trans.out): Use $(run-program-prefix-before-env), $(run-program-env), $(run-program-prefix-after-env), $(test-program-prefix-before-env) and $(test-program-prefix-after-env). ($(objpfx)tst-ctype.out): Use $(test-program-cmd-before-env), $(run-program-env) and $(test-program-cmd-after-env). ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. ($(objpfx)tst-langinfo-static.out): Likewise. * gen-locale.sh: Use localedef_before_env, run_program_env and localedef_after_env arguments. * sort-test.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * tst-ctype.sh: Use tst_ctype_before_env, run_program_env and tst_ctype_after_env arguments. * tst-fmon.sh: Use run_program_prefix_before_env, run_program_env and run_program_prefix_after_env arguments. * tst-langinfo.sh: Use tst_langinfo_before_env, run_program_env and tst_langinfo_after_env arguments. * tst-locale.sh: Use localedef_before_env, run_program_env and localedef_after_env arguments. * tst-mbswcs.sh: Do not set environment variables explicitly. * tst-numeric.sh: Likewise. * tst-rpmatch.sh: Likewise. * tst-trans.sh: Use run_program_prefix_before_env, run_program_env, run_program_prefix_after_env, test_program_prefix_before_env and test_program_prefix_after_env arguments. * tst-wctype.sh: Use tst_wctype_before_env, run_program_env and tst_wctype_after_env arguments.
2014-06-07 00:19:27 +02:00
$(run-program-env) \
$($*-ENV) $(rtld-prefix) $${run}
New Makefile target `regen-ulps'. The wiki "Regeneration" page has this to say about update ULPs. "The libm-test-ulps files are semiautomatically updated. To update an ulps baseline, run each of the failing tests (test-float, test-double, etc.) with -u; this will generate a file called ULPs; concatenate each of those files with the existing libm-test-ulps file, after removing any entries for particularly huge numbers of ulps that you do not want to mark as expected. Then run gen-libm-test.pl -n -u FILE where FILE is the concatenated file produced in the previous step. This generates a file called NewUlps which is the new sorted version of libm-test-ulps." The same information is listed in math/README.libm-test, and is a lot of manual work that you often want to run over-and-over again while working on a particular test. The `regen-ulps' convenience target does this automatically for developers. We strictly assume the source tree is readonly and add a new --output-dir option to libm-test.inc to allow for writing out ULPs to $(objpfx). When run the new target does the following: * Starts with the baseline ULPs file. * Runs each of the libm math tests with -u. * Adds new changes seen with -u to the baseline. * Sorts and prepares the test output with gen-libm-test.pl. * Leaves math/NewUlps in your build tree to copy to your source tree, cleanup, and checkin. The math test documentation in math/README.libm-test is updated document the new Makefile target. --- 2013-04-06 Carlos O'Donell <carlos@redhat.com> * Makefile.in (regen-ulps): New target. * math/Makefile [ifneq (no,$(PERL)]: Declare regen-ulps with .PHONY. [ifneq (no,$(PERL)] (run-regen-ulps): New variable. [ifneq (no,$(PERL)] (regen-ulps): New target. [ifeq (no,$(PERL)] (regen-ulps): New target. * math/libm-test.inc (ulps_file_name): Define. (output_dir): New variable. (options): Add "output-dir" option. (parse_opt): Handle 'o' case. (main): If output_dir is non-NULL use it as a prefix otherwise use "". * math/README.libm-test: Update `How can I generate "libm-test-ulps"?'
2013-04-06 22:22:47 +02:00
regen-ulps: $(addprefix $(objpfx),$(libm-tests))
rm -f $(objpfx)ULPs; rm -f $(objpfx)NewUlps; \
cp $(ulps-file) $(objpfx)libm-test-ulps; \
for run in $^; do \
echo "Regenerating ULPs for $${run}"; \
$(run-regen-ulps) -u -o $(objpfx); \
cat $(objpfx)ULPs >> $(objpfx)libm-test-ulps; \
rm $(objpfx)ULPs; \
done; \
Rework gen-libm-test.pl input/output handling. This patch reworks how input and output files are specified for gen-libm-test.pl. Previously, the script had names of various inputs and outputs hardcoded, with a -o option to specify an output directory. This patch replaces this with all inputs and outputs being specified explicitly as the arguments of options passed to the script. Outputs are only generated if the relevant option is passed, and only the processing required for the indicated outputs is done. The Makefile is made to pass options for generating libm-test-ulps.h in a separate invocation of gen-libm-test.pl from that generating libm-test.c. This is all in preparation for splitting up libm-test.inc and auto-libm-test-out and running tests separately for each function, when gen-libm-test.pl will be run separately for each function to generate the .c file but only once to generate libm-test-ulps.h (and those runs will be able to be in parallel). Tested for x86_64. The generated libm-test.c and libm-test-ulps.h are identical before and after the patch. Also tested the "make regen-ulps" case. * math/gen-libm-test.pl ($output_dir): Remove variable. ($srcdir): Likewise. ($opt_a): New variable. ($opt_c): Likewise. ($opt_C): Likewise. ($opt_H): Likewise. (-n): Make option take argument and use it as NewUlps output. (-a): New option. Use its argument for auto-libm-test-out input. (-c): New option. Use its argument for libm-test.inc input. (-C): New option. Use its argument for libm-test.c output. (-H): New option. Use its argument for libm-test-ulps.h output. (top level): Only process inputs needed to generate outputs specified by command-line options. Only generate outputs specified by command-line options. * math/README.libm-test: Update example gen-libm-test.pl command. * math/Makefile ($(objpfx)libm-test.stmp): Update gen-libm-test.pl commands. (regen-ulps): Likewise.
2017-02-06 19:20:15 +01:00
$(PERL) gen-libm-test.pl -n $(objpfx)NewUlps \
-u $(objpfx)libm-test-ulps; \
New Makefile target `regen-ulps'. The wiki "Regeneration" page has this to say about update ULPs. "The libm-test-ulps files are semiautomatically updated. To update an ulps baseline, run each of the failing tests (test-float, test-double, etc.) with -u; this will generate a file called ULPs; concatenate each of those files with the existing libm-test-ulps file, after removing any entries for particularly huge numbers of ulps that you do not want to mark as expected. Then run gen-libm-test.pl -n -u FILE where FILE is the concatenated file produced in the previous step. This generates a file called NewUlps which is the new sorted version of libm-test-ulps." The same information is listed in math/README.libm-test, and is a lot of manual work that you often want to run over-and-over again while working on a particular test. The `regen-ulps' convenience target does this automatically for developers. We strictly assume the source tree is readonly and add a new --output-dir option to libm-test.inc to allow for writing out ULPs to $(objpfx). When run the new target does the following: * Starts with the baseline ULPs file. * Runs each of the libm math tests with -u. * Adds new changes seen with -u to the baseline. * Sorts and prepares the test output with gen-libm-test.pl. * Leaves math/NewUlps in your build tree to copy to your source tree, cleanup, and checkin. The math test documentation in math/README.libm-test is updated document the new Makefile target. --- 2013-04-06 Carlos O'Donell <carlos@redhat.com> * Makefile.in (regen-ulps): New target. * math/Makefile [ifneq (no,$(PERL)]: Declare regen-ulps with .PHONY. [ifneq (no,$(PERL)] (run-regen-ulps): New variable. [ifneq (no,$(PERL)] (regen-ulps): New target. [ifeq (no,$(PERL)] (regen-ulps): New target. * math/libm-test.inc (ulps_file_name): Define. (output_dir): New variable. (options): Add "output-dir" option. (parse_opt): Handle 'o' case. (main): If output_dir is non-NULL use it as a prefix otherwise use "". * math/README.libm-test: Update `How can I generate "libm-test-ulps"?'
2013-04-06 22:22:47 +02:00
echo "Automatic regeneration of ULPs complete."; \
echo "Difference between the current baseline and the new baseline is:";\
diff -urN $(ulps-file) $(objpfx)NewUlps; \
echo "Copy $(objpfx)NewUlps to $(ulps-file) (relative to source)."
else
regen-ulps:
@echo "Automatic regeneration of ULPs requires perl."; \
exit 1;
endif
# The generated sysd-rules file defines rules like this for sources
# coming from sysdeps/ directories. These rules find the generic sources.
define o-iterator-doit
$(objpfx)m_%$o: s_%.c $(before-compile); $$(compile-command.c)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
# Likewise, for those generated files shared with libc.
define o-iterator-doit
$(objpfx)m_%$o: $(objpfx)s_%.c $(before-compile); $$(compile-command.c)
endef
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
# This file defines the default _LIB_VERSION variable that controls
# the error return conventions for the math functions.
CPPFLAGS-s_lib_version.c := -D_POSIX_MODE
Fri Apr 19 00:49:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * stdlib/rpmatch.c (rpmatch: try): Take new arg NOMATCH, return value for nonmatching nonerror (instead of !MATCH). (rpmatch): Use it, so we return -1 when NOEXPR doesn't match either. * resolv/getnetnamadr.c (getnetbyaddr): Use u_int32_t instead of unsigned long for variable NET2. * time/etcetera, time/europe, time/solar89: Updated from ADO's 96e. Tue Apr 9 14:37:31 1996 Ulrich Drepper <drepper@cygnus.com> * catgets/Makefile, catgets/catgets.c, catgets/catgetsinfo.h, catgets/config.h, catgets/gencat.c, catgets/nl_types.h, catgets/open_catalog.c: New files. Implementation of XPG4 compliant catgets() function and needed tools. * Makefile (subdirs): Add catgets. Thu Apr 18 23:36:11 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * math/Makefile (CPPFLAGS): Append -D__NO_MATH_INLINES. Wed Apr 10 20:48:43 1996 Ulrich Drepper <drepper@cygnus.com> * stdio-common/vfprintf.c: Correct some typos. * sysdeps/libm-ieee754/w_gammaf.c, sysdeps/libm-ieee754/w_lgamma.c, sysdeps/libm-ieee754/w_lgammaf.c: Reference signgam instead of __signgam. Thu Apr 18 21:07:27 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * Makerules (no-whole-archive): New variable. (build-shlib): Use it. * elf/Makefile (libdl.so): Use it. * configure.in (libc_cv_ld_no_whole_archive): New check for --no-whole-archive. * config.make.in (have-no-whole-archive): New variable. * stdio-common/printf_fp.c: Increase fudge factor for BIGNUM_SIZE calc from 3 to 4. * Make-dist: Include version.mk. (version, release): Variables removed. * Makeconfig (version.mk): New target. Fri Apr 19 01:42:18 1996 Ulrich Drepper <drepper@cygnus.com> * locale/Makefile (headers): Add langinfo.h. (CPPFLAGS): Remove -Iliblib.
1996-04-20 02:05:25 +02:00
# We don't want the fdlibm code to use the inline math functions,
# only the fdlibm code.
math-CPPFLAGS += -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES
Fri Apr 19 00:49:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * stdlib/rpmatch.c (rpmatch: try): Take new arg NOMATCH, return value for nonmatching nonerror (instead of !MATCH). (rpmatch): Use it, so we return -1 when NOEXPR doesn't match either. * resolv/getnetnamadr.c (getnetbyaddr): Use u_int32_t instead of unsigned long for variable NET2. * time/etcetera, time/europe, time/solar89: Updated from ADO's 96e. Tue Apr 9 14:37:31 1996 Ulrich Drepper <drepper@cygnus.com> * catgets/Makefile, catgets/catgets.c, catgets/catgetsinfo.h, catgets/config.h, catgets/gencat.c, catgets/nl_types.h, catgets/open_catalog.c: New files. Implementation of XPG4 compliant catgets() function and needed tools. * Makefile (subdirs): Add catgets. Thu Apr 18 23:36:11 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * math/Makefile (CPPFLAGS): Append -D__NO_MATH_INLINES. Wed Apr 10 20:48:43 1996 Ulrich Drepper <drepper@cygnus.com> * stdio-common/vfprintf.c: Correct some typos. * sysdeps/libm-ieee754/w_gammaf.c, sysdeps/libm-ieee754/w_lgamma.c, sysdeps/libm-ieee754/w_lgammaf.c: Reference signgam instead of __signgam. Thu Apr 18 21:07:27 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * Makerules (no-whole-archive): New variable. (build-shlib): Use it. * elf/Makefile (libdl.so): Use it. * configure.in (libc_cv_ld_no_whole_archive): New check for --no-whole-archive. * config.make.in (have-no-whole-archive): New variable. * stdio-common/printf_fp.c: Increase fudge factor for BIGNUM_SIZE calc from 3 to 4. * Make-dist: Include version.mk. (version, release): Variables removed. * Makeconfig (version.mk): New target. Fri Apr 19 01:42:18 1996 Ulrich Drepper <drepper@cygnus.com> * locale/Makefile (headers): Add langinfo.h. (CPPFLAGS): Remove -Iliblib.
1996-04-20 02:05:25 +02:00
ifneq ($(long-double-fcts),yes)
# The `double' and `long double' types are the same on this machine.
# We won't compile the `long double' code at all. Tell the `double' code
# to define aliases for the `FUNCl' names. To avoid type conflicts in
# defining those aliases, tell <math.h> to declare the `FUNCl' names with
# `double' instead of `long double'.
math-CPPFLAGS += -DNO_LONG_DOUBLE -D_Mlong_double_=double
endif
# These files quiet sNaNs in a way that is optimized away without
# -fsignaling-nans.
CFLAGS-s_modf.c += -fsignaling-nans
CFLAGS-s_modff.c += -fsignaling-nans
CFLAGS-s_modfl.c += -fsignaling-nans
# The -lieee library is actually an object file.
# The module just defines the _LIB_VERSION_ variable.
# It's not a library to make sure it is linked in instead of s_lib_version.o.
$(objpfx)libieee.a: $(objpfx)ieee-math.o
rm -f $@
$(patsubst %/,cd % &&,$(objpfx)) \
$(LN_S) $(<F) $(@F)
Update. 1997-03-25 02:15 Ulrich Drepper <drepper@cygnus.com> * gmon/gmon.c: Optimize a bit by using more sets of records to write in a single writev call. * math/math.h: Add definitions of macros __MATHCALLX and __MATHDECLX. * math/mathcalls.h: Use __MATHCALLX for fabs, infnan, copysign, nan, isnan, nextafter, trunc, __fpclassify and signbit to mark as `const'. Use __MATHDECLX for isinf and finite. * sysdeps/generic/setenv.c [_LIBC]: Define __clearenv and make clearenv a weak alias. Implement complex exponential function. * sysdeps/libm-ieee754/s_cexp.c: New file. * sysdeps/libm-ieee754/s_cexpf.c: New file. * sysdeps/libm-ieee754/s_cexpl.c: New file. * sysdeps/libm-ieee754/s_nan.c: Define function as __nan and make nan a weak alias. * sysdeps/libm-ieee754/s_nanf.c: Likewise for nanf. * sysdeps/libm-ieee754/s_nanl.c: Likewise for nanl. * sysdeps/unix/sysv/linux/iovec.h: Don't use kernel header because of type clashes. Add all definitions here. * sysdeps/unix/sysv/linux/shmat.c: Likewise. Correct types according to XPG4.2. * sysdeps/unix/sysv/linux/shmdt.c: Likewise. * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. * sysvipc/sys/shm.h (shmat, shmdt): Correct types. * sysdeps/unix/sysv/linux/sys/kd.h: Define _LINUX_TYPES_H to avoid use of kernel types. 1997-03-25 00:00 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/netinet/ip.h (struct ip_timestamp): Correct typos. Reported by a sun <asun@zoology.washington.edu>. 1997-03-20 21:58 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/s_asinhl.c: Fix sign of result. 1997-03-20 16:20 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/e_atan2l.c: Fix typo. 1997-03-20 14:23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/__math.h (__logb, logb): Don't define. * sysdeps/m68k/fpu/s_logb.c: Removed. * sysdeps/m68k/fpu/s_logbf.c: Removed. * sysdeps/m68k/fpu/s_logbl.c: Removed. * sysdeps/m68k/fpu/__math.h (__ieee754_atan2, __ieee754_pow): Don't define here. * sysdeps/m68k/fpu/e_atan2.c: Rewritten. * sysdeps/m68k/fpu/e_pow.c: Likewise. * sysdeps/m68k/fpu/e_atan2f.c: Based on e_atan2.c. * sysdeps/m68k/fpu/e_atan2l.c: Likewise. * sysdeps/m68k/fpu/e_powf.c: Based on e_pow.c. * sysdeps/m68k/fpu/e_powl.c: Likewise. * sysdeps/m68k/fpu/s_log2.c: New file. * sysdeps/m68k/fpu/s_log2f.c: New file. * sysdeps/m68k/fpu/s_log2l.c: New file. * sysdeps/m68k/fpu/s_exp2.c: New file. * sysdeps/m68k/fpu/s_exp2f.c: New file. * sysdeps/m68k/fpu/s_exp2l.c: New file. 1997-03-20 14:46 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makeconfig (all): Make sure this is always the default goal. 1997-03-20 11:09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/libm-test.c: Increase epsilon in many places. Fix many typos. Allow optinal argument also for short option. 1997-03-20 11:09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/Makefile ($(objpfx)$(tests)): Link against libm. 1997-03-24 23:14 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/s_fpclassifyl.c: Correct recognition of denormalized numbers. * sysdeps/i386/huge_val.h: Remove references to byte order macros. Don't include <endian.h>. 1997-03-19 15:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/huge_val.h: Remove references to byte order macros. Don't include <endian.h>. 1997-03-24 23:09 Ulrich Drepper <drepper@cygnus.com> * inet/rcmd.c (iruserok): Use access instead of euidaccess. 1997-03-15 18:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/cmathcalls.h: Remove whitespace before function name in use of __MATHDECL macro, to make it compilable with a traditional preprocessor. 1997-03-24 15:31 Ulrich Drepper <drepper@cygnus.com> * configure.in: Use AC_PROG_CC instead of AC_PROG_TOOL to find compiler. 1997-03-24 02:34 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/s_finitel.c (__finitel): Shift return value by 31 positions to get 0/1 result. Patch by Joe Keane <jgk@jgk.org>. 1997-03-23 12:15 H.J. Lu <hjl@gnu.ai.mit.edu> * posix/getopt.c (__getopt_nonoption_flags): Make it extern to prevent from ld linking in getopt.o even if there is another incompatible one. * posix/getopt_init.c (__getopt_nonoption_flags): Remove extern. 1997-03-23 23:30 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/nis_call.c (__do_niscall): Print message if cold start file does not exist. * nis/nis_file.c: Don't print error messages. * nis/nis_local_name.c (nis_local_host): Fix pointer errors. * nis/rpcsvc/ypclnt.h: Fix copyright and prototypes. * nis/rpcsvc/nis.h: Likewise. * nis/ypclnt.c: Fix prototypes. 1997-03-24 01:36 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-i387/e_scalb.S: Pop additional result before returning. * sysdeps/libm-i387/e_scalbf.S: Likewise. * sysdeps/libm-i387/e_scalbl.S: Likewise. Reported by Andreas Jaeger <aj@arthur.pfalz.de>. * elf/rtld.c (dl_main): Set main_map->l_opencount to 1 also if dynamic linker was called implicitly by the kernel. Reported by Eric Youngdale <eric@andante.jic.com>. * math/Makefile (CFLAGS-test-float.c, CFLAGS-test-double.c, CFLAGS-test-longdouble.c): New variables. Set to -fno-inline to prevent clever optimizations which corrupt the tests. 1997-03-23 21:33 Andreas Jaeger <aj@arthur.pfalz.de> * math/libm-test.c (scalb_test): New function. (sqrt_test): New function. (scalbn_test): New function. (ilogb_test): New function. (main): Added calls for new test functions. (ldexp_test): Add another test for ldexp(x,0). 1997-03-23 12:35 Andreas Jaeger <aj@arthur.pfalz.de> * math/libm-test.c (remquo_test): Correct messages so that they match the tests. (copysign_test): Likewise. 1997-03-23 16:28 Ulrich Drepper <drepper@cygnus.com> * stdio-common/Makefile (routines): Add printf_size. * stdio-common/printf.h: Add declarations for printf_size and printf_size_info. * stdio-common/printf-parse.h (__printf_arginfo_table): Correct declaration. (parse_one_spec): Test whether __printf_function_table is not NULL before using registered handlers and don't test __printf_arginfo_table. Update nargs also when handler is registered. * stdio-common/vfprintf.c (vfprintf): Count number of specifiers processed in fast loop. * stdio-common/printf_size: New file. 1997-03-22 04:53 Ulgmon_out_readrich Drepper <drepper@cygnus.com>
1997-03-25 02:45:04 +01:00
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-vec-tests),$(tests))): $(libm)
$(addprefix $(objpfx),$(tests-static)): $(objpfx)libm.a
$(addprefix $(objpfx), $(libm-vec-tests)): $(objpfx)%: $(objpfx)%-wrappers.o \
$(libm) $(libmvec)
2012-01-08 15:52:29 +01:00
gmp-objs = $(patsubst %,$(common-objpfx)stdlib/%.o,\
add_n sub_n cmp addmul_1 mul_1 mul_n divmod_1 \
lshift rshift mp_clz_tab udiv_qrnnd inlines \
$(gmp-sysdep_routines))
$(objpfx)atest-exp: $(gmp-objs)
$(objpfx)atest-sincos: $(gmp-objs)
$(objpfx)atest-exp2: $(gmp-objs)
Use existing makefile variables for dependencies on glibc libraries. glibc's Makeconfig defines some variables such as $(libm) and $(libdl) for linking with libraries built by glibc, and nptl/Makeconfig (included by the toplevel Makeconfig) defines others such as $(shared-thread-library). In some places glibc's Makefiles use those variables when linking against the relevant libraries, but in other places they hardcode the location of the libraries in the build tree. This patch cleans up various places to use the variables that already exist (in the case of libm, replacing several duplicate definitions of a $(link-libm) variable in subdirectory Makefiles). (It's not necessarily exactly equivalent to what the existing code does - in particular, $(shared-thread-library) includes libpthread_nonshared, but is replacing places that just referred to libpthread.so. But I think that change is desirable on the general principle of linking things as close as possible to the way in which they would be linked with an installed library, unless there is a clear reason not to do so.) To support running tests with an installed copy of glibc without needing the full build tree from when that copy was built, I think it will be useful to use such variables more generally and systematically - every time the rules for building a test refer to some file from the build tree that's also installed by glibc, use a makefile variable so that the installed-testing case can point those variables to installed copies of the files. This patch just deals with straightforward cases where such variables already exist. It's quite possible some uses of $(shared-thread-library) should actually be a new $(thread-library) variable that's set appropriately in the --disable-shared case, if those uses would in fact work without shared libraries. I didn't change the status quo that those cases hardcode use of a shared library whether or not it's actually needed (but other uses such as $(libm) and $(libdl) would now get the static library if the shared library isn't built, when some previously hardcoded use of the shared library - if they actually need shared libraries, the test itself needs an enable-shared conditional anyway). Tested x86_64. * benchtests/Makefile ($(addprefix $(objpfx)bench-,$(bench-math))): Depend on $(libm), not $(common-objpfx)math/libm.so. ($(addprefix $(objpfx)bench-,$(bench-pthread))): Depend on $(shared-thread-library), not $(common-objpfx)nptl/libpthread.so. * elf/Makefile ($(objpfx)noload): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. ($(objpfx)tst-audit8): Depend on $(libm), not $(common-objpfx)math/libm.so. * malloc/Makefile ($(objpfx)libmemusage.so): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. * math/Makefile ($(addprefix $(objpfx),$(filter-out $(tests-static),$(tests)))): Depend on $(libm), not $(objpfx)libm.so. Do not condition on [$(build-shared) = yes]. ($(objpfx)test-fenv-tls): Depend on $(shared-thread-library), not $(common-objpfx)nptl/libpthread.so. * misc/Makefile ($(objpfx)tst-tsearch): Depend on $(libm), not $(common-objpfx)math/libm.so$(libm.so-version) or $(common-objpfx)math/libm.a depending on [$(build-shared) = yes]. * nptl/Makefile ($(objpfx)tst-unload): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. * setjmp/Makefile (link-libm): Remove variable. ($(objpfx)tst-setjmp-fp): Depend on $(libm), not $(link-libm). * stdio-common/Makefile (link-libm): Remove variable. ($(objpfx)tst-printf-round): Depend on $(libm), not $(link-libm). * stdlib/Makefile (link-libm): Remove variable. ($(objpfx)bug-getcontext): Depend on $(libm), not $(link-libm). ($(objpfx)tst-strtod-round): Likewise. ($(objpfx)tst-tininess): Likewise. ($(objpfx)tst-strtod-underflow): Likewise. ($(objpfx)tst-strtod6): Likewise. ($(objpfx)tst-tls-atexit): Depend on $(shared-thread-library) and $(libdl), not $(common-objpfx)nptl/libpthread.so and $(common-objpfx)dlfcn/libdl.so.
2014-05-16 23:38:08 +02:00
$(objpfx)test-fenv-tls: $(shared-thread-library)