From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72300 invoked by alias); 10 Feb 2020 21:40: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 72167 invoked by uid 89); 10 Feb 2020 21:40:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.5 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=UD:pr92796.c, pr92796.c, pr92796c X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Feb 2020 21:39:54 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01ALORsj141096; Mon, 10 Feb 2020 16:39:52 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y1u1jftqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Feb 2020 16:39:52 -0500 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 01ALQZu5012637; Mon, 10 Feb 2020 16:39:52 -0500 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y1u1jftq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Feb 2020 16:39:52 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 01ALVTR3031653; Mon, 10 Feb 2020 21:39:51 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma04wdc.us.ibm.com with ESMTP id 2y1mm6gtb8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Feb 2020 21:39:51 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01ALdos045154656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Feb 2020 21:39:50 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE1566A04D; Mon, 10 Feb 2020 21:39:49 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A637D6A058; Mon, 10 Feb 2020 21:39:49 +0000 (GMT) Received: from brimstone.rchland.ibm.com (unknown [9.10.86.107]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 10 Feb 2020 21:39:49 +0000 (GMT) Message-ID: <192d0b37e3b4eb47d0c9eab58a6f359cbf130453.camel@vnet.ibm.com> Subject: [PATCH] Add ppc_ieee128_ok target-supports proc From: will schmidt To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool , David Edelsohn Date: Mon, 10 Feb 2020 21:40:00 -0000 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00596.txt.bz2 Hi, This adds a target_supports entry to check that the _ieee128 keyword is understood by the target. Also adds that require-effective-target check to the existing pr92796 testcase. Sniff tested on Linux (power6,power9) and AIX. OK for master? Thanks -Will [testsuite] * lib/target-supports.exp (check_effective_target_ppc_ieee128_ok): New. * gcc.target/powerpc/pr92796.c: Add require-effective-target ppc64_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..0154457 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2248,10 +2248,32 @@ 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 Darwin, AIX. + if { [istarget powerpc-*-eabi] + || [istarget powerpc*-*-eabispe] + || [istarget *-*-darwin*] + || [istarget *-*-aix*] } { + expr 0 + } else { + set options "-mvsx" + 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 {