1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Fix underflow generation in soft-fp.

* soft-fp/soft-fp.h (FP_CUR_EXCEPTIONS): Define.
	(FP_TRAPPING_EXCEPTIONS): Provide default implementation.
	* sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
	(FP_TRAPPING_EXCEPTIONS): Define.
	* sysdeps/sparc/sparc64/soft-fp/sfp-machine.h
	(FP_TRAPPING_EXCEPTIONS): Define.
	* soft-fp/op-common.h (_FP_PACK_SEMIRAW): Signal underflow for
	subnormals only when inexact has been signalled or underflow
	exceptions are enabled.
	(_FP_PACK_CANONICAL): Likewise.
This commit is contained in:
David S. Miller
2012-05-30 13:41:01 -07:00
parent 35c166e492
commit ae251b0b58
5 changed files with 34 additions and 5 deletions

View File

@ -128,6 +128,13 @@
#define FP_CLEAR_EXCEPTIONS \
_fex = 0
#define FP_CUR_EXCEPTIONS \
(_fex)
#ifndef FP_TRAPPING_EXCEPTIONS
#define FP_TRAPPING_EXCEPTIONS 0
#endif
#define _FP_ROUND_NEAREST(wc, X) \
do { \
if ((_FP_FRAC_LOW_##wc(X) & 15) != _FP_WORK_ROUND) \