From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130813 invoked by alias); 11 Feb 2020 18:11:02 -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 130787 invoked by uid 89); 11 Feb 2020 18:11:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= 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; Tue, 11 Feb 2020 18:10:55 +0000 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01BHxBFU106406; Tue, 11 Feb 2020 13:10:54 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y3pqfr0yq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Feb 2020 13:10:53 -0500 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 01BI0KWu110778; Tue, 11 Feb 2020 13:10:53 -0500 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y3pqfr0y5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Feb 2020 13:10:53 -0500 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 01BIAFQA020106; Tue, 11 Feb 2020 18:10:52 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04dal.us.ibm.com with ESMTP id 2y1mm7td2j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Feb 2020 18:10:52 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01BIApwX33423680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Feb 2020 18:10:51 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0B5E2BE058; Tue, 11 Feb 2020 18:10:51 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6314BE054; Tue, 11 Feb 2020 18:10:50 +0000 (GMT) Received: from brimstone.rchland.ibm.com (unknown [9.10.86.107]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 11 Feb 2020 18:10:50 +0000 (GMT) Message-ID: <4c09df60d57b6d85040bb6f29e3ffc4309336264.camel@vnet.ibm.com> Subject: Re: [PATCH] Add ppc_ieee128_ok target-supports proc From: will schmidt To: Segher Boessenkool Cc: gcc-patches@gcc.gnu.org, David Edelsohn Date: Tue, 11 Feb 2020 18:11:00 -0000 In-Reply-To: <20200211034133.GS22482@gate.crashing.org> References: <192d0b37e3b4eb47d0c9eab58a6f359cbf130453.camel@vnet.ibm.com> <20200211034133.GS22482@gate.crashing.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00665.txt.bz2 Hi, Thanks for the feedback. Updated below. [v2] - removed some explicit disables that were not necessary. - updated options qualifier for the proc. [V1] Add a target_supports entry to check that the __ieee128 keyword is understood by the target. Also add a dg-requires check to the existing pr92796 testcase. Sniff tested on Linux (power6,power9) and AIX. OK for master? [testsuite] * lib/target-supports.exp (check_effective_target_ppc_ieee128_ok): New. * gcc.target/powerpc/pr92796.c: Add a require-effective-target statement for ppc_ieee128_ok. diff --git a/gcc/testsuite/gcc.target/powerpc/pr92796.c b/gcc/testsuite/gcc.target/powerpc/pr92796.c index aa15b2d..da4b6a4 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr92796.c +++ b/gcc/testsuite/gcc.target/powerpc/pr92796.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fstack-protector-strong -mcpu=power8" } */ +/* { dg-require-effective-target ppc_ieee128_ok } */ typedef union { __ieee128 a; int b; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index d3b2798..fb177c5 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2248,10 +2248,29 @@ proc check_ppc_float128_hw_available { } { } $options } }] } +# See if the __ieee128 keyword is understood. +proc check_effective_target_ppc_ieee128_ok { } { + return [check_cached_effective_target ppc_ieee128_ok { + # disable on AIX. + if { [istarget *-*-aix*] } { + expr 0 + } else { + set options "-mfloat128" + check_runtime_nocache ppc_ieee128_ok { + int main() + { + __ieee128 a; + return 0; + } + } $options + } + }] +} + # Return 1 if the target supports executing VSX instructions, 0 # otherwise. Cache the result. proc check_vsx_hw_available { } { return [check_cached_effective_target vsx_hw_available {