diff mbox

Fix 61441 [ 1/5] Add REAL_VALUE_ISSIGNALING_NAN

Message ID 5379BA8D7E9D7E4D87BF6749A92854C248FC90A4@G4W3297.americas.hpqcorp.net
State New
Headers show

Commit Message

Saraswati, Sujoy (OSTL) Nov. 26, 2015, 8:27 a.m. UTC
Hi,
  This series of patches fixes PR61441.  The fix is broken into 5 patches. 

  The first one adds REAL_VALUE_ISSIGNALING_NAN. 

  2015-11-26  Sujoy Saraswati <sujoy.saraswati@hpe.com>

       PR tree-optimization/61441
       * real.c (real_issignaling_nan): New.
       * real.h (real_issignaling_nan, REAL_VALUE_ISSIGNALING_NAN): New.

Comments

Jeff Law Dec. 2, 2015, 6:14 p.m. UTC | #1
On 11/26/2015 01:27 AM, Saraswati, Sujoy (OSTL) wrote:
> Hi,
>    This series of patches fixes PR61441.  The fix is broken into 5 patches.
>
>    The first one adds REAL_VALUE_ISSIGNALING_NAN.
>
>    2015-11-26  Sujoy Saraswati <sujoy.saraswati@hpe.com>
>
>         PR tree-optimization/61441
>         * real.c (real_issignaling_nan): New.
>         * real.h (real_issignaling_nan, REAL_VALUE_ISSIGNALING_NAN): New.
If you haven't set up write-access to the repository, please go ahead 
and get that process started:

https://www.gnu.org/software/gcc/svnwrite.html

You can list me as your sponsor on the form.

Once your account is set up, you can commit patches which have been 
approved.

I'll go ahead and approve #1, #2 and #4.  Richi has approved #3.

I'm still looking at #5.

Jeff
Saraswati, Sujoy (OSTL) Dec. 4, 2015, 9:01 a.m. UTC | #2
Hi,

> If you haven't set up write-access to the repository, please go ahead and get
> that process started:
> 
> https://www.gnu.org/software/gcc/svnwrite.html
> 
> You can list me as your sponsor on the form.
> 
> Once your account is set up, you can commit patches which have been
> approved.
> 
> I'll go ahead and approve #1, #2 and #4.  Richi has approved #3.

Thank you. I have filled the form for https://sourceware.org/cgi-bin/pdw/ps_form.cgi and mentioned you as the sponsor. I will commit the changes once the sourceware.org account request comes through.

> I'm still looking at #5.

I received your comments on this. I will correct the spelling mistakes as well as the space-tab usage and post it.

Regards,
Sujoy

> Jeff
diff mbox

Patch

Index: gcc/real.c
===================================================================
--- gcc/real.c  (revision 230851)
+++ gcc/real.c  (working copy)
@@ -1195,6 +1195,13 @@  real_isnan (const REAL_VALUE_TYPE *r)
   return (r->cl == rvc_nan);
 }

+/* Determine whether a floating-point value X is a signalling 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
Index: gcc/real.h
===================================================================
--- gcc/real.h  (revision 230851)
+++ gcc/real.h  (working copy)
@@ -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 signalling 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 signalling 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))