glibc/sysdeps/generic
Joseph Myers b4e75104b4 Refactor some libm type-generic macros.
This patch refactors some type-generic libm macros, in both math.h and
math_private.h, to be based on a common __MATH_TG macro rather than
all replicating similar logic to choose a function to call based on
the type of the argument.

This should serve to illustrate what I think float128 support for such
macros should look like: common macros such as __MATH_TG may need
different definitions depending on whether float128 is supported in
glibc, so that the individual macros themselves do not need
conditionals on float128 support.

Tested for x86_64, x86, mips64 and powerpc.

	* math/math.h (__MATH_TG): New macro.
	[__USE_ISOC99] (fpclassify): Define using __MATH_TG.
	[__USE_ISOC99] (signbit): Likewise.
	[__USE_ISOC99] (isfinite): Likewise.
	[__USE_ISOC99] (isnan): Likewise.
	[__USE_ISOC99] (isinf): Likewise.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (issignaling): Likewise.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (__MATH_EVAL_FMT2): New macro.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (iseqsig): Define using
	__MATH_TG and __MATH_EVAL_FMT2.
	* sysdeps/generic/math_private.h (fabs_tg): Define using
	__MATH_TG.
	* sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
	[!__NO_LONG_DOUBLE_MATH] (__iscanonicalf): New macro.
	[!__NO_LONG_DOUBLE_MATH] (__iscanonical): Likewise.
	[!__NO_LONG_DOUBLE_MATH] (iscanonical): Define using __MATH_TG.
	* sysdeps/ieee754/ldbl-96/bits/iscanonical.h (__iscanonicalf): New
	macro.
	(__iscanonical): Likewise.
	(iscanonical): Define using __MATH_TG.
2016-11-10 21:41:56 +00:00
..
net Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
netinet Installed-header hygiene (BZ#20366): obsolete BSD u_* types. 2016-09-23 08:43:56 -04:00
nfs Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sys Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
_G_config.h
_itoa.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
a.out.h
abort-instr.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aio_misc.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
allocalim.h
asm-syntax.h
atomic-machine.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
c++-types.data Add placeholder c++-types.data and *.abilist files. 2015-02-13 15:41:34 -08:00
confstr.h
device-nrs.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dirstream.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-cache.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-dtprocnum.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-dtv.h elf: Avoid using memalign for TLS allocations [BZ #17730] 2016-08-03 16:15:38 +02:00
dl-fcntl.h hurd: Do not hide rtld symbols which need to be preempted 2016-03-20 19:51:42 +01:00
dl-fileid.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-fptr.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-hash.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-librecon.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-machine.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-mman.h Update copyright dates committed in 2016 2016-01-06 14:03:10 -08:00
dl-osinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-procinfo.c
dl-procinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-tls.h
dl-unistd.h Update copyright dates committed in 2016 2016-01-06 14:03:10 -08:00
dwarf2.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
elide.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
eloop-threshold.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
entry.h
errqueue.h
exit-thread.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fd_to_filename.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fips-private.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fix-fp-int-compare-invalid.h Add iseqsig. 2016-10-06 22:19:38 +00:00
fix-fp-int-convert-overflow.h S/390: Do not raise inexact exception in lrint/lround. [BZ #19486] 2016-01-18 12:48:06 +01:00
fix-int-fp-convert-zero.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fork.h
fpu_control.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
frame.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
framestate.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
gcc-compat.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
gmp-mparam.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
hp-timing-common.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
hp-timing.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ifreq.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ifunc-sel.h
intr-msg.h
inttypes.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ld.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
ldconfig.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ldsodefs.h Treat STV_HIDDEN and STV_INTERNAL symbols as STB_LOCAL 2016-07-01 23:48:52 +01:00
libanl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libBrokenLocale.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libc-lock.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libc-mmap.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libc-tsd.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libc.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libcidn.abilist
libcrypt.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libdl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libm-test-ulps
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
libm.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libnsl.abilist Add placeholder libnsl.abilist and libutil.abilist files 2016-03-07 00:49:36 +01:00
libnss_compat.abilist
libnss_db.abilist
libnss_dns.abilist
libnss_files.abilist
libnss_hesiod.abilist
libnss_nis.abilist
libnss_nisplus.abilist
libpthread.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libresolv.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
librt.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libutil.abilist Add placeholder libnsl.abilist and libutil.abilist files 2016-03-07 00:49:36 +01:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
local-setxid.h
localplt.data
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
machine-lock.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
machine-sp.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
malloc-machine.h malloc: Remove NO_THREADS 2016-02-19 17:07:45 +01:00
malloc-sysdep.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
math_ldbl_opt.h
math_ldbl.h
math_private.h Refactor some libm type-generic macros. 2016-11-10 21:41:56 +00:00
math-tests-arch.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
math-tests.h Add canonicalize, canonicalizef, canonicalizel. 2016-10-26 23:14:31 +00:00
math-type-macros-double.h Build s_nan* objects from a generic template 2016-09-20 14:37:42 -05:00
math-type-macros-float.h Build s_nan* objects from a generic template 2016-09-20 14:37:42 -05:00
math-type-macros-ldouble.h Build s_nan* objects from a generic template 2016-09-20 14:37:42 -05:00
math-type-macros.h Build s_nan* objects from a generic template 2016-09-20 14:37:42 -05:00
memcopy.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
nan-high-order-bit.h Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
not-cancel.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
nscd-types.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
pagecopy.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
paths.h
profil-counter.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
pty-private.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
rtld-lowlevel.h
safe-fatal.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
siglist.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigset-cvt-mask.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stackguard-macros.h
stackinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stdint.h Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00
stdio-lock.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
string_private.h Add _STRING_INLINE_unaligned and string_private.h 2016-02-18 14:55:29 -02:00
symbol-hacks.h
sysdep-cancel.h
sysdep.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
thread_state.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tininess.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tls-macros.h
tls.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-audit.h
tst-stack-align.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unsecvars.h
unwind-dw2-fde-glibc.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind-dw2-fde.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind-dw2-fde.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind-dw2.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind-pe.c
unwind-pe.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind-resume.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
utmp-equal.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00