1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +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

@@ -1,6 +1,6 @@
/* Machine-dependent software floating-point definitions.
Sparc userland (_Q_*) version.
Copyright (C) 1997,1998,1999, 2002, 2006 Free Software Foundation, Inc.
Copyright (C) 1997,1998,1999,2002,2006,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz) and
@@ -192,6 +192,7 @@ do { \
_FPU_GETCW(_fcw); \
} while (0)
#define FP_TRAPPING_EXCEPTIONS ((_fcw >> 23) & 0x1f)
#define FP_INHIBIT_RESULTS ((_fcw >> 23) & _fex)
/* Simulate exceptions using double arithmetics. */

View File

@@ -1,6 +1,6 @@
/* Machine-dependent software floating-point definitions.
Sparc64 userland (_Q_* and _Qp_*) version.
Copyright (C) 1997, 1998, 1999, 2006 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 1999, 2006, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz) and
@@ -100,6 +100,7 @@ do { \
_FPU_GETCW(_fcw); \
} while (0)
#define FP_TRAPPING_EXCEPTIONS ((_fcw >> 23) & 0x1f)
#define FP_INHIBIT_RESULTS ((_fcw >> 23) & _fex)
/* Simulate exceptions using double arithmetics. */