From patchwork Thu Nov 26 08:27:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujoy Saraswati X-Patchwork-Id: 57318 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp371104lbb; Thu, 26 Nov 2015 00:28:47 -0800 (PST) X-Received: by 10.98.15.91 with SMTP id x88mr38072788pfi.144.1448526527448; Thu, 26 Nov 2015 00:28:47 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id n14si40345613pfb.48.2015.11.26.00.28.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2015 00:28:47 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-415459-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-return-415459-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-415459-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=IfS SG+eGZfkm/bYUI7Y2r9YXY7GewVZ6hsYbs1JFhCSDdx+QkK3dyVaApASyJ8AdFS/ XhE2SmYhNcywBi9ZczuXGprlibMfotEaI36SCjyEsqEnNmOXEhvEufZJHfr7lbOG 18mgAc8bj5LYY2v1b3b5GKJKdzLHg0fdAsF9BfFc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=BFzelXlv8 66LAoeLX/GXs5exykk=; b=PAWlYwz7JcQW5dGTvLr0QbDKrHtkS6YSQE3J65wow LMuQfCX5SElNU2luPPYYWDCoimE+IWpeF1vNARBTonTydhOkgVOqse5W1inrmVMI UF8ZQ4as+2KR8YZ2chXheVMYpSZmlU78KHY6CuAJ5wPLsjd14MtOwKuCNs4uvPTX pw= Received: (qmail 83554 invoked by alias); 26 Nov 2015 08:28:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 83537 invoked by uid 89); 26 Nov 2015 08:28:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL, BAYES_50, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: g9t5008.houston.hp.com Received: from g9t5008.houston.hp.com (HELO g9t5008.houston.hp.com) (15.240.92.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 26 Nov 2015 08:28:35 +0000 Received: from G4W6310.americas.hpqcorp.net (g4w6310.houston.hp.com [16.210.26.217]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by g9t5008.houston.hp.com (Postfix) with ESMTPS id 6A40DAA; Thu, 26 Nov 2015 08:28:33 +0000 (UTC) Received: from G4W6306.americas.hpqcorp.net (16.210.26.231) by G4W6310.americas.hpqcorp.net (16.210.26.217) with Microsoft SMTP Server (TLS) id 14.3.169.1; Thu, 26 Nov 2015 08:27:59 +0000 Received: from G4W3297.americas.hpqcorp.net ([169.254.11.80]) by G4W6306.americas.hpqcorp.net ([16.210.26.231]) with mapi id 14.03.0169.001; Thu, 26 Nov 2015 08:27:59 +0000 From: "Saraswati, Sujoy (OSTL)" To: Joseph Myers , Sujoy Saraswati , GCC Patches CC: Richard Biener Subject: Fix 61441 [ 1/5] Add REAL_VALUE_ISSIGNALING_NAN Date: Thu, 26 Nov 2015 08:27:58 +0000 Message-ID: <5379BA8D7E9D7E4D87BF6749A92854C248FC90A4@G4W3297.americas.hpqcorp.net> MIME-Version: 1.0 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 PR tree-optimization/61441 * real.c (real_issignaling_nan): New. * real.h (real_issignaling_nan, REAL_VALUE_ISSIGNALING_NAN): New. 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))