From a278e2017797a7ba7f807ca93ce0c06a37c8bdaf Mon Sep 17 00:00:00 2001 From: Sujoy Saraswati Date: Sat, 19 Dec 2015 04:57:57 +0000 Subject: This series of patches fix PR61441. This patch adds REAL_VALUE_ISSIGNALING_NAN. Bootstrapped & regression-tested on x86_64-linux-gnu. gcc/ * real.c (real_issignaling_nan): New. * real.h (real_issignaling_nan, REAL_VALUE_ISSIGNALING_NAN): New. From-SVN: r231848 --- gcc/ChangeLog | 6 ++++++ gcc/real.c | 6 ++++++ gcc/real.h | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cccfd04..d024128 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-12-19 Sujoy Saraswati + + PR tree-optimization/61441 + * real.c (real_issignaling_nan): New. + * real.h (real_issignaling_nan, REAL_VALUE_ISSIGNALING_NAN): New. + 2015-13-18 John David Anglin PR target/68729 diff --git a/gcc/real.c b/gcc/real.c index 0cc5aec..17d79c2 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -1195,6 +1195,12 @@ real_isnan (const REAL_VALUE_TYPE *r) return (r->cl == rvc_nan); } +/* Determine whether a floating-point value X is a signaling NaN. */ +bool real_issignaling_nan (const REAL_VALUE_TYPE *r) +{ + return real_isnan (r) && r->signalling; +} + /* Determine whether a floating-point value X is finite. */ bool diff --git a/gcc/real.h b/gcc/real.h index df5ccc9..f92c480 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -262,6 +262,9 @@ extern bool real_isinf (const REAL_VALUE_TYPE *); /* Determine whether a floating-point value X is a NaN. */ 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 finite. */ extern bool real_isfinite (const REAL_VALUE_TYPE *); @@ -357,6 +360,9 @@ extern const struct real_format arm_half_format; /* Determine whether a floating-point value X is a NaN. */ #define REAL_VALUE_ISNAN(x) real_isnan (&(x)) +/* Determine whether a floating-point value X is a signaling NaN. */ +#define REAL_VALUE_ISSIGNALING_NAN(x) real_issignaling_nan (&(x)) + /* Determine whether a floating-point value X is negative. */ #define REAL_VALUE_NEGATIVE(x) real_isneg (&(x)) -- cgit v1.1