From patchwork Thu Oct 26 23:35:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 23897 Received: (qmail 48540 invoked by alias); 26 Oct 2017 23:36:05 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 48528 invoked by uid 89); 26 Oct 2017 23:36:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Thu, 26 Oct 2017 23:35:55 +0000 From: Joseph Myers To: Subject: Add SNAN macros for more _FloatN, _FloatNx types [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) This patch continues the preparation for additional _FloatN / _FloatNx type support by adding appropriately conditional definitions of SNAN* macros, corresponding to the SNANF128 definition already present. Tested for x86_64. Committed. 2017-10-26 Joseph Myers * math/math.h [__HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF16): New macro. [__HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF32): Likewise. [__HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF64): Likewise. [__HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF32X): Likewise. [__HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF64X): Likewise. [__HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF128X): Likewise. diff --git a/math/math.h b/math/math.h index 4affd2a..22ff23b 100644 --- a/math/math.h +++ b/math/math.h @@ -112,9 +112,27 @@ __BEGIN_DECLS # define SNANL (__builtin_nansl ("")) # endif #endif +#if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) +# define SNANF16 (__builtin_nansf16 ("")) +#endif +#if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) +# define SNANF32 (__builtin_nansf32 ("")) +#endif +#if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) +# define SNANF64 (__builtin_nansf64 ("")) +#endif #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define SNANF128 (__builtin_nansf128 ("")) #endif +#if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) +# define SNANF32X (__builtin_nansf32x ("")) +#endif +#if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) +# define SNANF64X (__builtin_nansf64x ("")) +#endif +#if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) +# define SNANF128X (__builtin_nansf128x ("")) +#endif /* Get __GLIBC_FLT_EVAL_METHOD. */ #include