libc/winsup/cygwin/include
J.H. van de Water 4c4c19f548 Keep the denormal-operand exception masked; modify FE_ALL_EXCEPT accordingly.
By excluding the denormal-operand exception from FE_ALL_EXCEPT, it will not
be possible anymore to UNmask this exception by means of the API defined by
/usr/include/fenv.h

Note: terminology has changed since IEEE Std 854-1987; denormalized numbers
are called subnormal numbers nowadays.

This modification has basically been motivated by the fact that it is also
not possible on Linux to manipulate the denormal-operand exception by means
of the interface as defined by /usr/include/fenv.h. This has been the state
of affairs on Linux since 2001 (Andreas Jaeger).

The exceptions required by the standard (IEEE Std 754), in case they can be
supported by the implementation, are:
FE_INEXACT, FE_UNDERFLOW, FE_OVERFLOW, FE_DIVBYZERO and FE_INVALID.

Although it is allowed to define additional exceptions, there is no reason
to support the "denormal-operand exception" in this case (fenv.h), because
the subnormal numbers can be handled almost as fast the normalized numbers
by the hardware of the x86/x86_64 architecture. Said differently, a reason
to trap on the input of subnormal numbers does not exist. At least that is
what William Kahan and others at Intel asserted around 2000.
(that is William Kahan of the K-C-S draft, the precursor to the standard)

This commit modifies winsup/cygwin/include/fenv.h as follows:
 - redefines FE_ALL_EXCEPT from 0x3f to 0x3d
 - removes the definition for FE_DENORMAL
 - introduces __FE_DENORM (0x2) (enum in Linux also uses __FE_DENORM)
 - introduces FE_ALL_EXCEPT_X86 (0x3f), i.e. ALL x86/x86_64 FP exceptions
2018-08-15 18:02:22 +02:00
..
acl
arpa Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
asm Cygwin: Define SO_PASSCRED and SCM_CREDENTIALS 2018-02-23 21:00:43 +01:00
attr ansification: remove _EXFUN, _EXFUN_NOTHROW 2018-01-17 11:47:29 -06:00
bits Cygwin: create separate bits/byteswap.h 2017-02-08 17:01:34 -06:00
cygwin Cygwin: implement sched_getcpu 2018-08-07 14:51:10 +02:00
machine Add elf.h to newlib 2017-08-02 01:18:55 -05:00
net Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
netinet Cygwin: bindresvport: Guard prototypes with __MISC_VISIBLE 2018-02-05 21:06:29 +01:00
ssp cygwin: add Object Size Checking to sys/socket.h 2017-11-30 04:06:48 -06:00
sys Cygwin: delete /dev/kmsg and thus fhandler_mailslot without substitution 2018-03-25 12:38:14 +02:00
a.out.h cygwin: convert most #ifndef __x86_64__ to #ifdef __i386__ 2017-11-27 14:36:06 +01:00
aio.h POSIX Asynchronous I/O support: aio files 2018-07-25 09:36:22 +02:00
byteswap.h Cygwin: create separate bits/byteswap.h 2017-02-08 17:01:34 -06:00
dlfcn.h Implement dladdr() (partially) 2017-03-08 17:49:08 +00:00
endian.h Cygwin: create separate bits/byteswap.h 2017-02-08 17:01:34 -06:00
err.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
error.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
fcntl.h ansification: remove _PARAMS 2018-01-17 11:47:13 -06:00
features.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
fenv.h Keep the denormal-operand exception masked; modify FE_ALL_EXCEPT accordingly. 2018-08-15 18:02:22 +02:00
fnmatch.h
fts.h
ftw.h
getopt.h
glob.h
icmp.h
ifaddrs.h
io.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
lastlog.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
limits.h POSIX Asynchronous I/O support: other files 2018-07-25 09:36:24 +02:00
mapi.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
mntent.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
monetary.h Rename <sys/_locale.h> to <xlocale.h> 2017-03-22 10:03:45 +01:00
mqueue.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
netdb.h cygwin: fix gethostbyaddr argument types 2017-10-10 13:51:23 -05:00
nl_types.h cygwin: add catopen, catgets, catclose 2018-01-19 13:19:21 -06:00
paths.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
poll.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
process.h
pthread.h Cygwin: define pthread_tryjoin_np/pthread_timedjoin_np _GNU_VISIBLE 2018-06-27 18:20:47 +02:00
pty.h ansification: remove _EXFUN, _EXFUN_NOTHROW 2018-01-17 11:47:29 -06:00
regex.h
resolv.h
search.h
semaphore.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
sysexits.h
syslog.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
termio.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
tzfile.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
ucontext.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
utmpx.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
wait.h Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00