From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67140 invoked by alias); 27 Nov 2017 19:26:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 66843 invoked by uid 89); 27 Nov 2017 19:26:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=IEEE, H*Ad:U*segher, Street X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Nov 2017 19:26:40 +0000 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vARJO8NZ084271 for ; Mon, 27 Nov 2017 14:26:38 -0500 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 2egrnm8jyp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 27 Nov 2017 14:26:38 -0500 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Nov 2017 12:21:36 -0700 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 27 Nov 2017 12:21:33 -0700 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vARJLXGQ66453622; Mon, 27 Nov 2017 12:21:33 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 10D106E040; Mon, 27 Nov 2017 12:21:33 -0700 (MST) Received: from ibm-tiger.the-meissners.org (unknown [9.32.77.111]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id DFF9E6E03A; Mon, 27 Nov 2017 12:21:32 -0700 (MST) Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id 3350A45CFB; Mon, 27 Nov 2017 14:21:32 -0500 (EST) Date: Mon, 27 Nov 2017 19:57:00 -0000 From: Michael Meissner To: GCC Patches , Segher Boessenkool , David Edelsohn , Bill Schmidt Subject: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c Mail-Followup-To: Michael Meissner , GCC Patches , Segher Boessenkool , David Edelsohn , Bill Schmidt MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ibTvN161/egqYuK8" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 x-cbid: 17112719-0004-0000-0000-00001349F607 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008121; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000241; SDB=6.00952069; UDB=6.00480928; IPR=6.00732150; BA=6.00005715; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018211; XFM=3.00000015; UTC=2017-11-27 19:21:35 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112719-0005-0000-0000-0000850B393A Message-Id: <20171127192131.GA15914@ibm-tiger.the-meissners.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-27_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711270260 X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg02327.txt.bz2 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-length: 1850 The new -Wattribute-alias option now issues warnings for old-style ifunc declarations that coerce the pointer to the function to void *. The float128-ifunc.c module in libgcc/config/rs6000 now gets a lot of warnings of the form: ../float128-ifunc.c:109:1: warning: ‘ifunc’ resolver for ‘__negkf2’ should return ‘TFtype (*)(TFtype) {aka _Float128 (*)(_Float128)}’ [-Wattribute-alias] This patch fixes these warnings. I have done a full bootstrap build and test suite run. I have verified that the ifunc handler works correctly, using software emulation on a power8 and the hardware instructions on power9. Can I check this into the trunk? 2017-11-27 Michael Meissner PR libgcc/83112 * config/rs6000/float128-ifunc.c (__addkf3_resolve): Use the correct type for all ifunc resolvers to silence -Wattribute-alias warnings. (__subkf3_resolve): Likewise. (__mulkf3_resolve): Likewise. (__divkf3_resolve): Likewise. (__negkf2_resolve): Likewise. (__eqkf2_resolve): Likewise. (__nekf2_resolve): Likewise. (__gekf2_resolve): Likewise. (__gtkf2_resolve): Likewise. (__lekf2_resolve): Likewise. (__ltkf2_resolve): Likewise. (__unordkf2_resolve): Likewise. (__extendsfkf2_resolve): Likewise. (__extenddfkf2_resolve): Likewise. (__trunckfsf2_resolve): Likewise. (__trunckfdf2_resolve): Likewise. (__fixkfsi_resolve): Likewise. (__fixkfdi_resolve): Likewise. (__fixunskfsi_resolve): Likewise. (__fixunskfdi_resolve): Likewise. (__floatsikf_resolve): Likewise. (__floatdikf_resolve): Likewise. (__floatunsikf_resolve): Likewise. (__floatundikf_resolve): Likewise. (__extendkftf2_resolve): Likewise. (__trunctfkf2_resolve): Likewise. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pr83112.patch01b" Content-length: 8616 Index: libgcc/config/rs6000/float128-ifunc.c =================================================================== --- libgcc/config/rs6000/float128-ifunc.c (revision 255033) +++ libgcc/config/rs6000/float128-ifunc.c (working copy) @@ -54,190 +54,208 @@ 128-bit integer types and 128-bit IEEE floating point, or vice versa. So use the emulator functions for these conversions. */ -static void *__addkf3_resolve (void); -static void *__subkf3_resolve (void); -static void *__mulkf3_resolve (void); -static void *__divkf3_resolve (void); -static void *__negkf2_resolve (void); -static void *__eqkf2_resolve (void); -static void *__nekf2_resolve (void); -static void *__gekf2_resolve (void); -static void *__gtkf2_resolve (void); -static void *__lekf2_resolve (void); -static void *__ltkf2_resolve (void); -static void *__unordkf2_resolve (void); -static void *__extendsfkf2_resolve (void); -static void *__extenddfkf2_resolve (void); -static void *__trunckfsf2_resolve (void); -static void *__trunckfdf2_resolve (void); -static void *__fixkfsi_resolve (void); -static void *__fixkfdi_resolve (void); -static void *__fixunskfsi_resolve (void); -static void *__fixunskfdi_resolve (void); -static void *__floatsikf_resolve (void); -static void *__floatdikf_resolve (void); -static void *__floatunsikf_resolve (void); -static void *__floatundikf_resolve (void); -static void *__extendkftf2_resolve (void); -static void *__trunctfkf2_resolve (void); +typedef TFtype (f128_func_f128_t)(TFtype); +typedef TFtype (f128_func_f128_f128_t)(TFtype, TFtype); +typedef CMPtype (cmp_func_f128_f128_t)(TFtype, TFtype); +typedef TFtype (f128_func_float_t)(float); +typedef TFtype (f128_func_double_t)(double); +typedef float (float_func_f128_t)(TFtype); +typedef double (double_func_f128_t)(TFtype); +typedef SItype_ppc (si_func_f128_t)(TFtype); +typedef DItype_ppc (di_func_f128_t)(TFtype); +typedef USItype_ppc (usi_func_f128_t)(TFtype); +typedef UDItype_ppc (udi_func_f128_t)(TFtype); +typedef TFtype (f128_func_si_t)(SItype_ppc); +typedef TFtype (f128_func_di_t)(DItype_ppc); +typedef TFtype (f128_func_usi_t)(USItype_ppc); +typedef TFtype (f128_func_udi_t)(UDItype_ppc); +typedef IBM128_TYPE (ibm_func_f128_t)(TFtype); +typedef TFtype (f128_func_ibm_t)(IBM128_TYPE); + +static f128_func_f128_f128_t *__addkf3_resolve (void); +static f128_func_f128_f128_t *__subkf3_resolve (void); +static f128_func_f128_f128_t *__mulkf3_resolve (void); +static f128_func_f128_f128_t *__divkf3_resolve (void); +static f128_func_f128_t *__negkf2_resolve (void); +static cmp_func_f128_f128_t *__eqkf2_resolve (void); +static cmp_func_f128_f128_t *__nekf2_resolve (void); +static cmp_func_f128_f128_t *__gekf2_resolve (void); +static cmp_func_f128_f128_t *__gtkf2_resolve (void); +static cmp_func_f128_f128_t *__lekf2_resolve (void); +static cmp_func_f128_f128_t *__ltkf2_resolve (void); +static cmp_func_f128_f128_t *__unordkf2_resolve (void); +static f128_func_float_t *__extendsfkf2_resolve (void); +static f128_func_double_t *__extenddfkf2_resolve (void); +static float_func_f128_t *__trunckfsf2_resolve (void); +static double_func_f128_t *__trunckfdf2_resolve (void); +static si_func_f128_t *__fixkfsi_resolve (void); +static di_func_f128_t *__fixkfdi_resolve (void); +static usi_func_f128_t *__fixunskfsi_resolve (void); +static udi_func_f128_t *__fixunskfdi_resolve (void); +static f128_func_si_t *__floatsikf_resolve (void); +static f128_func_di_t *__floatdikf_resolve (void); +static f128_func_usi_t *__floatunsikf_resolve (void); +static f128_func_udi_t *__floatundikf_resolve (void); +static ibm_func_f128_t *__extendkftf2_resolve (void); +static f128_func_ibm_t *__trunctfkf2_resolve (void); -static void * +static f128_func_f128_f128_t * __addkf3_resolve (void) { - return (void *) SW_OR_HW (__addkf3_sw, __addkf3_hw); + return SW_OR_HW (__addkf3_sw, __addkf3_hw); } -static void * +static f128_func_f128_f128_t * __subkf3_resolve (void) { - return (void *) SW_OR_HW (__subkf3_sw, __subkf3_hw); + return SW_OR_HW (__subkf3_sw, __subkf3_hw); } -static void * +static f128_func_f128_f128_t * __mulkf3_resolve (void) { - return (void *) SW_OR_HW (__mulkf3_sw, __mulkf3_hw); + return SW_OR_HW (__mulkf3_sw, __mulkf3_hw); } -static void * +static f128_func_f128_f128_t * __divkf3_resolve (void) { - return (void *) SW_OR_HW (__divkf3_sw, __divkf3_hw); + return SW_OR_HW (__divkf3_sw, __divkf3_hw); } -static void * +static f128_func_f128_t * __negkf2_resolve (void) { - return (void *) SW_OR_HW (__negkf2_sw, __negkf2_hw); + return SW_OR_HW (__negkf2_sw, __negkf2_hw); } -static void * +static f128_func_si_t * __floatsikf_resolve (void) { - return (void *) SW_OR_HW (__floatsikf_sw, __floatsikf_hw); + return SW_OR_HW (__floatsikf_sw, __floatsikf_hw); } -static void * +static f128_func_di_t * __floatdikf_resolve (void) { - return (void *) SW_OR_HW (__floatdikf_sw, __floatdikf_hw); + return SW_OR_HW (__floatdikf_sw, __floatdikf_hw); } -static void * +static f128_func_usi_t * __floatunsikf_resolve (void) { - return (void *) SW_OR_HW (__floatunsikf_sw, __floatunsikf_hw); + return SW_OR_HW (__floatunsikf_sw, __floatunsikf_hw); } -static void * +static f128_func_udi_t * __floatundikf_resolve (void) { - return (void *) SW_OR_HW (__floatundikf_sw, __floatundikf_hw); + return SW_OR_HW (__floatundikf_sw, __floatundikf_hw); } -static void * +static si_func_f128_t * __fixkfsi_resolve (void) { - return (void *) SW_OR_HW (__fixkfsi_sw, __fixkfsi_hw); + return SW_OR_HW (__fixkfsi_sw, __fixkfsi_hw); } -static void * +static di_func_f128_t * __fixkfdi_resolve (void) { - return (void *) SW_OR_HW (__fixkfdi_sw, __fixkfdi_hw); + return SW_OR_HW (__fixkfdi_sw, __fixkfdi_hw); } -static void * +static usi_func_f128_t * __fixunskfsi_resolve (void) { - return (void *) SW_OR_HW (__fixunskfsi_sw, __fixunskfsi_hw); + return SW_OR_HW (__fixunskfsi_sw, __fixunskfsi_hw); } -static void * +static udi_func_f128_t * __fixunskfdi_resolve (void) { - return (void *) SW_OR_HW (__fixunskfdi_sw, __fixunskfdi_hw); + return SW_OR_HW (__fixunskfdi_sw, __fixunskfdi_hw); } -static void * +static f128_func_float_t * __extendsfkf2_resolve (void) { - return (void *) SW_OR_HW (__extendsfkf2_sw, __extendsfkf2_hw); + return SW_OR_HW (__extendsfkf2_sw, __extendsfkf2_hw); } -static void * +static f128_func_double_t * __extenddfkf2_resolve (void) { - return (void *) SW_OR_HW (__extenddfkf2_sw, __extenddfkf2_hw); + return SW_OR_HW (__extenddfkf2_sw, __extenddfkf2_hw); } -static void * +static float_func_f128_t * __trunckfsf2_resolve (void) { - return (void *) SW_OR_HW (__trunckfsf2_sw, __trunckfsf2_hw); + return SW_OR_HW (__trunckfsf2_sw, __trunckfsf2_hw); } -static void * +static double_func_f128_t * __trunckfdf2_resolve (void) { return (void *) SW_OR_HW (__trunckfdf2_sw, __trunckfdf2_hw); } -static void * +static ibm_func_f128_t * __extendkftf2_resolve (void) { - return (void *) SW_OR_HW (__extendkftf2_sw, __extendkftf2_hw); + return SW_OR_HW (__extendkftf2_sw, __extendkftf2_hw); } -static void * +static f128_func_ibm_t * __trunctfkf2_resolve (void) { return (void *) SW_OR_HW (__trunctfkf2_sw, __trunctfkf2_hw); } -static void * +static cmp_func_f128_f128_t * __eqkf2_resolve (void) { - return (void *) SW_OR_HW (__eqkf2_sw, __eqkf2_hw); + return SW_OR_HW (__eqkf2_sw, __eqkf2_hw); } -static void * +static cmp_func_f128_f128_t * __gekf2_resolve (void) { - return (void *) SW_OR_HW (__gekf2_sw, __gekf2_hw); + return SW_OR_HW (__gekf2_sw, __gekf2_hw); } -static void * +static cmp_func_f128_f128_t * __lekf2_resolve (void) { - return (void *) SW_OR_HW (__lekf2_sw, __lekf2_hw); + return SW_OR_HW (__lekf2_sw, __lekf2_hw); } -static void * +static cmp_func_f128_f128_t * __unordkf2_resolve (void) { - return (void *) SW_OR_HW (__unordkf2_sw, __unordkf2_hw); + return SW_OR_HW (__unordkf2_sw, __unordkf2_hw); } /* Resolve __nekf2, __gtkf2, __ltkf2 like __eqkf2, __gekf2, and __lekf2, since the functions return the same values. */ -static void * +static cmp_func_f128_f128_t * __nekf2_resolve (void) { - return (void *) SW_OR_HW (__eqkf2_sw, __eqkf2_hw); + return SW_OR_HW (__eqkf2_sw, __eqkf2_hw); } -static void * +static cmp_func_f128_f128_t * __gtkf2_resolve (void) { - return (void *) SW_OR_HW (__gekf2_sw, __gekf2_hw); + return SW_OR_HW (__gekf2_sw, __gekf2_hw); } -static void * +static cmp_func_f128_f128_t * __ltkf2_resolve (void) { - return (void *) SW_OR_HW (__lekf2_sw, __lekf2_hw); + return SW_OR_HW (__lekf2_sw, __lekf2_hw); } --ibTvN161/egqYuK8--