glibc/sysdeps/unix/sysv/linux/x86_64
Joseph Myers 90f0ac10a7 Add fmaximum, fminimum functions
C2X adds new <math.h> functions for floating-point maximum and
minimum, corresponding to the new operations that were added in IEEE
754-2019 because of concerns about the old operations not being
associative in the presence of signaling NaNs.  fmaximum and fminimum
handle NaNs like most <math.h> functions (any NaN argument means the
result is a quiet NaN).  fmaximum_num and fminimum_num handle both
quiet and signaling NaNs the way fmax and fmin handle quiet NaNs (if
one argument is a number and the other is a NaN, return the number),
but still raise "invalid" for a signaling NaN argument, making them
exceptions to the normal rule that a function with a floating-point
result raising "invalid" also returns a quiet NaN.  fmaximum_mag,
fminimum_mag, fmaximum_mag_num and fminimum_mag_num are corresponding
functions returning the argument with greatest or least absolute
value.  All these functions also treat +0 as greater than -0.  There
are also corresponding <tgmath.h> type-generic macros.

Add these functions to glibc.  The implementations use type-generic
templates based on those for fmax, fmin, fmaxmag and fminmag, and test
inputs are based on those for those functions with appropriate
adjustments to the expected results.  The RISC-V maintainers might
wish to add optimized versions of fmaximum_num and fminimum_num (for
float and double), since RISC-V (F extension version 2.2 and later)
provides instructions corresponding to those functions - though it
might be at least as useful to add architecture-independent built-in
functions to GCC and teach the RISC-V back end to expand those
functions inline, which is what you generally want for functions that
can be implemented with a single instruction.

Tested for x86_64 and x86, and with build-many-glibcs.py.
2021-09-28 23:31:35 +00:00
..
64 Add fmaximum, fminimum functions 2021-09-28 23:31:35 +00:00
x32 Add fmaximum, fminimum functions 2021-09-28 23:31:35 +00:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__start_context.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
clone3.S x86-64: Add the clone3 wrapper 2021-07-14 06:34:13 -07:00
clone.S x86-64: Align child stack to 16 bytes [BZ #27902] 2021-05-31 12:03:36 -07:00
configure
configure.ac
dl-cache.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-procinfo.c
dl-procinfo.h x86: Set dl_platform and dl_hwcap from CPU features [BZ #21391] 2017-05-03 13:44:35 -07:00
getcontext.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Implies
kernel-features.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldconfig.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldd-rewrite.sed
libc_sigaction.c signal: Add __libc_sigaction 2021-03-18 15:54:39 -03:00
libmvec.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
makecontext.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Makefile ldconfig/x86: Store ISA level in cache and aux cache 2021-01-13 05:51:17 -08:00
register-dump.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setcontext.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
sigaltstack-offsets.sym
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
swapcontext.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
syscall.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
syscalls.list linux: Consolidate Linux setsockopt implementation 2021-07-06 11:45:35 -03:00
sysdep.h Typo: Rename HAVE_CLONE3_WAPPER to HAVE_CLONE3_WRAPPER 2021-07-28 10:19:08 -07:00
sysdep.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-glibc-hwcaps-2.c x86-64: Update tst-glibc-hwcaps-2.c for x86-64 baseline 2021-01-22 09:37:44 -08:00
ucontext_i.sym x86-64/CET: Extend ucontext_t to save shadow stack 2018-07-25 06:37:31 -07:00
Versions Linux: Move timer_settime, __timer_settime64 from librt to libc 2021-06-28 09:51:01 +02:00
vfork.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x86-64-isa-level-VALUE.c ldconfig/x86: Store ISA level in cache and aux cache 2021-01-13 05:51:17 -08:00