From patchwork Wed Dec 6 22:15:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 24766 Received: (qmail 93675 invoked by alias); 6 Dec 2017 22:15:33 -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 93627 invoked by uid 89); 6 Dec 2017 22:15:31 -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: Wed, 6 Dec 2017 22:15:24 +0000 From: Joseph Myers To: Subject: Support _Float32 in libm_alias_float [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) This patch makes the libm_alias_float macro support creating _Float32 aliases, in preparation for enabling glibc support for that type. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float32 changes. Committed. 2017-12-06 Joseph Myers * sysdeps/generic/libm-alias-float.h: Include . [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (libm_alias_float_other_r): Create f32 alias. (libm_alias_float_r): Use semicolon before call to libm_alias_float_other_r. diff --git a/sysdeps/generic/libm-alias-float.h b/sysdeps/generic/libm-alias-float.h index 11bd472..b4a5f73 100644 --- a/sysdeps/generic/libm-alias-float.h +++ b/sysdeps/generic/libm-alias-float.h @@ -19,11 +19,18 @@ #ifndef _LIBM_ALIAS_FLOAT_H #define _LIBM_ALIAS_FLOAT_H +#include + /* Define _FloatN / _FloatNx aliases for a float libm function that has internal name FROM ## f ## R and public names TO ## suffix ## R for each suffix of a supported _FloatN / _FloatNx floating-point type with the same format as float. */ -#define libm_alias_float_other_r(from, to, r) +#if __HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32 +# define libm_alias_float_other_r(from, to, r) \ + weak_alias (from ## f ## r, to ## f32 ## r) +#else +# define libm_alias_float_other_r(from, to, r) +#endif /* Likewise, but without the R suffix. */ #define libm_alias_float_other(from, to) \ @@ -37,7 +44,7 @@ names (where there is one name per format, not per type) or for obsolescent functions not provided for _FloatN types. */ #define libm_alias_float_r(from, to, r) \ - weak_alias (from ## f ## r, to ## f ## r) \ + weak_alias (from ## f ## r, to ## f ## r); \ libm_alias_float_other_r (from, to, r) /* Likewise, but without the R suffix. */