mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 23:10:06 +00:00
2d6a47ba4c
As noted in <https://sourceware.org/ml/libc-alpha/2013-10/msg00516.html>, the soft-fp macro FP_CLEAR_EXCEPTIONS should not be necessary, as soft-fp code should never set an exception and later clear it. In fact, all four uses in glibc (for SPARC) are indeed unnecessary: they appear in files that convert 32-bit or 64-bit integers to IEEE binary128, an operation that can never raise any exceptions. If this was intended to enable the compiler to optimize away any FP_FROM_INT code testing for exceptional cases, we now have a better way of doing this: defining FP_NO_EXCEPTIONS before including soft-fp.h causes all code handling exceptions to be stubbed out, and the rounding mode to be hardwired for round-to-zero, to allow such optimizations for source files where (a) the operation in question, for the particular types in question, can never raise exceptions, but (b) some instances of the operation for other types can, so the macros used in the file do contain references to rounding or exceptions, albeit dead in that particular file. The uses in the Linux kernel are also unnecessary (clearing exceptions at a point where they are already cleared). This patch duly removes FP_CLEAR_EXCEPTIONS, making the SPARC code in question use FP_NO_EXCEPTIONS and stop using exception-related macros. * soft-fp/soft-fp.h (FP_CLEAR_EXCEPTIONS): Remove macro. * sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Define FP_NO_EXCEPTIONS. (_Q_itoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. * sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Define FP_NO_EXCEPTIONS. (_Q_lltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. * sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Define FP_NO_EXCEPTIONS. (_Q_ulltoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. * sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Define FP_NO_EXCEPTIONS. (_Q_utoq): Do not use FP_DECL_EX, FP_CLEAR_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. |
||
---|---|---|
.. | ||
bits | ||
fpu | ||
soft-fp | ||
sparcv8 | ||
sparcv9 | ||
__longjmp.S | ||
add_n.S | ||
addmul_1.S | ||
alloca.S | ||
backtrace.h | ||
bsd-_setjmp.S | ||
bsd-setjmp.S | ||
bzero.c | ||
divrem.m4 | ||
dl-irel.h | ||
dl-machine.h | ||
dl-plt.h | ||
dl-trampoline.S | ||
dotmul.S | ||
e_sqrt.c | ||
ieee754.h | ||
Implies | ||
jmpbuf-offsets.h | ||
jmpbuf-unwind.h | ||
lowlevellock.c | ||
lshift.S | ||
Makefile | ||
memchr.S | ||
memcpy.S | ||
memset.S | ||
mul_1.S | ||
pthread_barrier_wait.c | ||
pthread_spin_lock.S | ||
pthread_spin_trylock.S | ||
pthreaddef.h | ||
rem.S | ||
rshift.S | ||
sdiv.S | ||
sem_post.c | ||
sem_timedwait.c | ||
sem_trywait.c | ||
sem_wait.c | ||
setjmp.S | ||
stackguard-macros.h | ||
start.S | ||
stpcpy.S | ||
strcat.S | ||
strchr.S | ||
strcmp.S | ||
strcpy.S | ||
strlen.S | ||
strrchr.c | ||
sub_n.S | ||
submul_1.S | ||
tls-macros.h | ||
tst-audit.h | ||
udiv.S | ||
umul.S | ||
urem.S | ||
Versions |