[PATCH v2 0/5] x86 pseudo-normal numbers
Siddhesh Poyarekar
siddhesh@sourceware.org
Wed Dec 23 11:55:57 GMT 2020
Following is the patchset that harmonizes classification of
pseudo-normal numbers with gcc. Pseudo-NaNs, Pseudo-Infinities and
unnormal numbers are considered as signaling NaN as per classification
since that is how they behave when used as operands in x86.
In summary, the patchset does the following:
- Update fpclassify to cater for pseudo-normal numbers
- Consolidate isnanl so that it can be used by isnanl as well as
issignalingl.
- Update isnanl logic to return true for all pseudo-normal numbers
- Make issignalingl that returns true for all pseudo-normals.
Changes since v1:
- Consolidated the i386 and x86_64 versions of functions to x86.
- Update the test according to review comments
Siddhesh Poyarekar (5):
x86 long double: Support pseudo numbers in fpclassifyl
x86 long double: Support pseudo numbers in isnanl
Partially revert 681900d29683722b1cb0a8e565a0585846ec5a61
x86 long double: Consider pseudo numbers as signaling
x86 long double: Add tests for pseudo normal numbers
sysdeps/generic/nan-pseudo-number.h | 27 +++++
sysdeps/ieee754/ldbl-96/s_issignalingl.c | 7 +-
sysdeps/x86/fpu/Makefile | 3 +-
sysdeps/x86/fpu/nan-pseudo-number.h | 32 ++++++
sysdeps/{i386 => x86}/fpu/s_fpclassifyl.c | 4 +
sysdeps/{i386 => x86}/fpu/s_isnanl.c | 12 +-
sysdeps/x86/fpu/test-unnormal.c | 132 ++++++++++++++++++++++
sysdeps/x86/ldbl2mpn.c | 8 --
sysdeps/x86/tst-ldbl-nonnormal-printf.c | 5 +-
sysdeps/x86_64/fpu/s_fpclassifyl.c | 2 -
sysdeps/x86_64/fpu/s_isnanl.c | 1 -
11 files changed, 211 insertions(+), 22 deletions(-)
create mode 100644 sysdeps/generic/nan-pseudo-number.h
create mode 100644 sysdeps/x86/fpu/nan-pseudo-number.h
rename sysdeps/{i386 => x86}/fpu/s_fpclassifyl.c (87%)
rename sysdeps/{i386 => x86}/fpu/s_isnanl.c (76%)
create mode 100644 sysdeps/x86/fpu/test-unnormal.c
delete mode 100644 sysdeps/x86_64/fpu/s_fpclassifyl.c
delete mode 100644 sysdeps/x86_64/fpu/s_isnanl.c
--
2.29.2
More information about the Libc-alpha
mailing list