From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 7A7F63857C60 for ; Fri, 30 Apr 2021 12:42:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7A7F63857C60 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13UCWoIG045262; Fri, 30 Apr 2021 08:42:08 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 388h931r98-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Apr 2021 08:42:07 -0400 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 13UCXemL054328; Fri, 30 Apr 2021 08:42:07 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 388h931r8q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Apr 2021 08:42:07 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13UCRZKS004544; Fri, 30 Apr 2021 12:42:06 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma01dal.us.ibm.com with ESMTP id 384ay9xfan-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Apr 2021 12:42:06 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13UCg5Ow36897032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Apr 2021 12:42:05 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3290F136051; Fri, 30 Apr 2021 12:42:05 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0250B136055; Fri, 30 Apr 2021 12:42:04 +0000 (GMT) Received: from Bills-MacBook-Pro.local (unknown [9.211.124.117]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 30 Apr 2021 12:42:04 +0000 (GMT) Reply-To: wschmidt@linux.ibm.com Subject: [PATCH "59/57"] rs6000: Fix builtins that should have been available everywhere To: gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org, dje.gcc@gmail.com References: From: Bill Schmidt Message-ID: <965f7600-90f0-dd00-aaf7-c8059519b99b@linux.ibm.com> Date: Fri, 30 Apr 2021 07:42:04 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 3bL9H1KItR9faK2zvRmehQYvqwt6-Fi6 X-Proofpoint-GUID: QRsf5eChpVoOicOArvFviYRDsyl400DI X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-30_06:2021-04-30, 2021-04-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104300091 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2021 12:42:11 -0000 On 4/27/21 10:32 AM, Bill Schmidt wrote: > The design of the target-specific built-in function support in the > Power back end has not stood the test of time. The machinery is > grossly inefficient, confusing, and arcane; and adding new built-in > functions is inefficient and error-prone. This patch set introduces a > replacement. After I submitted these patches, Iain Sandoe was kind enough to test them on a PPC 970 running Darwin, and uncovered a couple of bugs.  I appreciate the extra testing! This is the second of two patches to fix these problems.  This one is simple:  I had unnecessarily restricted two built-ins to Power5 or later, when they should be treated as always available. Fixed by moving them to the correct stanza in rs6000-builtin-new.def. I'd appreciate consideration of this patch along with the rest of the patch set.  Thank you! Bill 2021-04-29 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def (__builtin_pack_longdouble): Move from [power5] to [always]. (__builtin_unpack_longdouble): Likewise. --- gcc/config/rs6000/rs6000-builtin-new.def | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new.def index 0ff2a0e1ed1..f106e1de1fd 100644 --- a/gcc/config/rs6000/rs6000-builtin-new.def +++ b/gcc/config/rs6000/rs6000-builtin-new.def @@ -208,6 +208,10 @@ double __builtin_mffs (); MFFS rs6000_mffs {} +; This will break for long double == _Float128. libgcc history. + const long double __builtin_pack_longdouble (double, double); + PACK_TF packtf {} + unsigned long __builtin_ppc_mftb (); MFTB rs6000_mftb_di {32bit} @@ -229,13 +233,13 @@ const double __builtin_unpack_ibm128 (__ibm128, const int<1>); UNPACK_IF unpackif {} +; This will break for long double == _Float128. libgcc history. + const double __builtin_unpack_longdouble (long double, const int<1>); + UNPACK_TF unpacktf {} + ; Builtins that have been around just about forever, but not quite. [power5] -; This will break for long double == _Float128. libgcc history. - const long double __builtin_pack_longdouble (double, double); - PACK_TF packtf {} - fpmath double __builtin_recipdiv (double, double); RECIP recipdf3 {} @@ -248,10 +252,6 @@ fpmath float __builtin_rsqrtf (float); RSQRTF rsqrtsf2 {} -; This will break for long double == _Float128. libgcc history. - const double __builtin_unpack_longdouble (long double, const int<1>); - UNPACK_TF unpacktf {} - ; Power6 builtins. [power6] -- 2.27.0