aboutsummaryrefslogtreecommitdiff
path: root/gcc/real.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/real.h')
-rw-r--r--gcc/real.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/real.h b/gcc/real.h
index 306e959..b14bcdd 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -286,11 +286,12 @@ extern bool real_isnan (const REAL_VALUE_TYPE *);
/* Determine whether a floating-point value X is a signaling NaN. */
extern bool real_issignaling_nan (const REAL_VALUE_TYPE *);
-/* Determine whether a floating-point value X is a denormal. */
+/* Determine whether floating-point value R is a denormal. This
+ function is only valid for normalized values. */
inline bool
-real_isdenormal (const REAL_VALUE_TYPE *r)
+real_isdenormal (const REAL_VALUE_TYPE *r, machine_mode mode)
{
- return r->cl == rvc_normal && (r->sig[SIGSZ-1] & SIG_MSB) == 0;
+ return r->cl == rvc_normal && REAL_EXP (r) < REAL_MODE_FORMAT (mode)->emin;
}
/* Determine whether a floating-point value X is finite. */