Message ID | bf94891ecd8995fa1a4a2c3f9366cc88c969edfa.1643390744.git.wschmidt@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 50BB5385C40E for <patchwork@sourceware.org>; Fri, 28 Jan 2022 18:04:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50BB5385C40E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1643393068; bh=5ZX7lab2ayXib0fUVazQg8mNV77u0n25qUsf0j+7HL4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=aB8F7OzSwOyr6D80ONDLw0MKlqvAKnbp41OufnWIvqJdaqyZgmFxPoBo+aavjQKVk VsPPPFuJnHhmr31Q87FOxeokyojucpd/REk+VVUBSounWU4/lboaY9dfByWb3tioHe qV2HC3Rgn+/SYUm4Rf/+AjScXHWImfZOLOm0S8qg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 548623947C33 for <gcc-patches@gcc.gnu.org>; Fri, 28 Jan 2022 17:51:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 548623947C33 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20SFonfY024700; Fri, 28 Jan 2022 17:51:19 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dvgqwp6af-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jan 2022 17:51:19 +0000 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 20SGkuR8017980; Fri, 28 Jan 2022 17:51:18 GMT 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 3dvgqwp6a5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jan 2022 17:51:18 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20SHXRVo001460; Fri, 28 Jan 2022 17:51:18 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma04dal.us.ibm.com with ESMTP id 3dr9jd5629-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jan 2022 17:51:17 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20SHpGLi30474554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Jan 2022 17:51:16 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 65A9A112061; Fri, 28 Jan 2022 17:51:16 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4FEA4112064; Fri, 28 Jan 2022 17:51:15 +0000 (GMT) Received: from localhost.localdomain (unknown [9.211.95.53]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 28 Jan 2022 17:51:15 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 8/8] rs6000: Fix some missing built-in attributes [PR104004] Date: Fri, 28 Jan 2022 11:50:26 -0600 Message-Id: <bf94891ecd8995fa1a4a2c3f9366cc88c969edfa.1643390744.git.wschmidt@linux.ibm.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <cover.1643390744.git.wschmidt@linux.ibm.com> References: <cover.1643390744.git.wschmidt@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: iA2ENr_lPZh_iO9afQGzypfYRvrDozcp X-Proofpoint-GUID: XxnoK8d_WGp3geXcO9CstJaRrxFWf3lD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-28_05,2022-01-28_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 adultscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 suspectscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2201280106 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Bill Schmidt via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Bill Schmidt <wschmidt@linux.ibm.com> Cc: dje.gcc@gmail.com, segher@kernel.crashing.org Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
rs6000: Built-in function cleanups and bug fixes
|
|
Commit Message
Bill Schmidt
Jan. 28, 2022, 5:50 p.m. UTC
PR104004 caught some misses on my part in converting to the new built-in function infrastructure. In particular, I forgot to mark all of the "nosoft" built-ins, and one of those should also have been marked "no32bit". Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Thanks, Bill 2022-01-27 Bill Schmidt <wschmidt@linux.ibm.com> gcc/ * config/rs6000/rs6000-builtin.def (MFFSL): Mark nosoft. (MTFSB0): Likewise. (MTFSB1): Likewise. (SET_FPSCR_RN): Likewise. (SET_FPSCR_DRN): Mark nosoft and no32bit. --- gcc/config/rs6000/rs6000-builtins.def | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Comments
On Fri, Jan 28, 2022 at 11:50:26AM -0600, Bill Schmidt via Gcc-patches wrote: > PR104004 caught some misses on my part in converting to the new built-in > function infrastructure. In particular, I forgot to mark all of the "nosoft" > built-ins, and one of those should also have been marked "no32bit". > > Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. > Is this okay for trunk? > > Thanks, > Bill > > > 2022-01-27 Bill Schmidt <wschmidt@linux.ibm.com> > > gcc/ > * config/rs6000/rs6000-builtin.def (MFFSL): Mark nosoft. > (MTFSB0): Likewise. > (MTFSB1): Likewise. > (SET_FPSCR_RN): Likewise. > (SET_FPSCR_DRN): Mark nosoft and no32bit. This patch fixes a P1 regression and from my (limited) understanding doesn't depend on any other patch in the series. Is this ok for trunk (I agree some testcase coverage would be nice)? > diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def > index c8f0cf332eb..98619a649e3 100644 > --- a/gcc/config/rs6000/rs6000-builtins.def > +++ b/gcc/config/rs6000/rs6000-builtins.def > @@ -215,7 +215,7 @@ > ; processors, this builtin automatically falls back to mffs on older > ; platforms. Thus it appears here in the [always] stanza. > double __builtin_mffsl (); > - MFFSL rs6000_mffsl {} > + MFFSL rs6000_mffsl {nosoft} > > ; This is redundant with __builtin_pack_ibm128, as it requires long > ; double to be __ibm128. Should probably be deprecated. > @@ -226,10 +226,10 @@ > MFTB rs6000_mftb_di {32bit} > > void __builtin_mtfsb0 (const int<0,31>); > - MTFSB0 rs6000_mtfsb0 {} > + MTFSB0 rs6000_mtfsb0 {nosoft} > > void __builtin_mtfsb1 (const int<0,31>); > - MTFSB1 rs6000_mtfsb1 {} > + MTFSB1 rs6000_mtfsb1 {nosoft} > > void __builtin_mtfsf (const int<0,255>, double); > MTFSF rs6000_mtfsf {} > @@ -238,7 +238,7 @@ > PACK_IF packif {} > > void __builtin_set_fpscr_rn (const int[0,3]); > - SET_FPSCR_RN rs6000_set_fpscr_rn {} > + SET_FPSCR_RN rs6000_set_fpscr_rn {nosoft} > > const double __builtin_unpack_ibm128 (__ibm128, const int<0,1>); > UNPACK_IF unpackif {} > @@ -2969,7 +2969,7 @@ > PACK_TD packtd {} > > void __builtin_set_fpscr_drn (const int[0,7]); > - SET_FPSCR_DRN rs6000_set_fpscr_drn {} > + SET_FPSCR_DRN rs6000_set_fpscr_drn {nosoft,no32bit} > > const unsigned long long __builtin_unpack_dec128 (_Decimal128, \ > const int<0,1>); > -- > 2.27.0 Jakub
On Tue, Mar 15, 2022 at 02:18:00PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Fri, Jan 28, 2022 at 11:50:26AM -0600, Bill Schmidt via Gcc-patches wrote: > > PR104004 caught some misses on my part in converting to the new built-in > > function infrastructure. In particular, I forgot to mark all of the "nosoft" > > built-ins, and one of those should also have been marked "no32bit". > > > > Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. > > Is this okay for trunk? > > > > Thanks, > > Bill > > > > > > 2022-01-27 Bill Schmidt <wschmidt@linux.ibm.com> > > > > gcc/ > > * config/rs6000/rs6000-builtin.def (MFFSL): Mark nosoft. > > (MTFSB0): Likewise. > > (MTFSB1): Likewise. > > (SET_FPSCR_RN): Likewise. > > (SET_FPSCR_DRN): Mark nosoft and no32bit. > > This patch fixes a P1 regression and from my (limited) understanding > doesn't depend on any other patch in the series. > > Is this ok for trunk (I agree some testcase coverage would be nice)? I'd like to ping this again. > > diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def > > index c8f0cf332eb..98619a649e3 100644 > > --- a/gcc/config/rs6000/rs6000-builtins.def > > +++ b/gcc/config/rs6000/rs6000-builtins.def > > @@ -215,7 +215,7 @@ > > ; processors, this builtin automatically falls back to mffs on older > > ; platforms. Thus it appears here in the [always] stanza. > > double __builtin_mffsl (); > > - MFFSL rs6000_mffsl {} > > + MFFSL rs6000_mffsl {nosoft} > > > > ; This is redundant with __builtin_pack_ibm128, as it requires long > > ; double to be __ibm128. Should probably be deprecated. > > @@ -226,10 +226,10 @@ > > MFTB rs6000_mftb_di {32bit} > > > > void __builtin_mtfsb0 (const int<0,31>); > > - MTFSB0 rs6000_mtfsb0 {} > > + MTFSB0 rs6000_mtfsb0 {nosoft} > > > > void __builtin_mtfsb1 (const int<0,31>); > > - MTFSB1 rs6000_mtfsb1 {} > > + MTFSB1 rs6000_mtfsb1 {nosoft} > > > > void __builtin_mtfsf (const int<0,255>, double); > > MTFSF rs6000_mtfsf {} > > @@ -238,7 +238,7 @@ > > PACK_IF packif {} > > > > void __builtin_set_fpscr_rn (const int[0,3]); > > - SET_FPSCR_RN rs6000_set_fpscr_rn {} > > + SET_FPSCR_RN rs6000_set_fpscr_rn {nosoft} > > > > const double __builtin_unpack_ibm128 (__ibm128, const int<0,1>); > > UNPACK_IF unpackif {} > > @@ -2969,7 +2969,7 @@ > > PACK_TD packtd {} > > > > void __builtin_set_fpscr_drn (const int[0,7]); > > - SET_FPSCR_DRN rs6000_set_fpscr_drn {} > > + SET_FPSCR_DRN rs6000_set_fpscr_drn {nosoft,no32bit} > > > > const unsigned long long __builtin_unpack_dec128 (_Decimal128, \ > > const int<0,1>); > > -- > > 2.27.0 > > Jakub Jakub
On Fri, 2022-01-28 at 11:50 -0600, Bill Schmidt via Gcc-patches wrote: > PR104004 caught some misses on my part in converting to the new > built-in > function infrastructure. In particular, I forgot to mark all of the > "nosoft" > built-ins, and one of those should also have been marked "no32bit". > > Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. > Is this okay for trunk? > > Thanks, > Bill > Hi, The patch here seems reasonable to me. There are comments/subsequent pings that include commentary about additional test coverage. I see all of the builtins referenced here appear to be touched by the existing test gcc.target/powerpc/test_fpscr_drn_builtin.c . I could create a variation of that test forcing ! hard_dfp in case that would help, though i'm uncertain the value there. Thanks -Will > > 2022-01-27 Bill Schmidt <wschmidt@linux.ibm.com> > > gcc/ > * config/rs6000/rs6000-builtin.def (MFFSL): Mark nosoft. > (MTFSB0): Likewise. > (MTFSB1): Likewise. > (SET_FPSCR_RN): Likewise. > (SET_FPSCR_DRN): Mark nosoft and no32bit. > --- > gcc/config/rs6000/rs6000-builtins.def | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/gcc/config/rs6000/rs6000-builtins.def > b/gcc/config/rs6000/rs6000-builtins.def > index c8f0cf332eb..98619a649e3 100644 > --- a/gcc/config/rs6000/rs6000-builtins.def > +++ b/gcc/config/rs6000/rs6000-builtins.def > @@ -215,7 +215,7 @@ > ; processors, this builtin automatically falls back to mffs on older > ; platforms. Thus it appears here in the [always] stanza. > double __builtin_mffsl (); > - MFFSL rs6000_mffsl {} > + MFFSL rs6000_mffsl {nosoft} > > ; This is redundant with __builtin_pack_ibm128, as it requires long > ; double to be __ibm128. Should probably be deprecated. > @@ -226,10 +226,10 @@ > MFTB rs6000_mftb_di {32bit} > > void __builtin_mtfsb0 (const int<0,31>); > - MTFSB0 rs6000_mtfsb0 {} > + MTFSB0 rs6000_mtfsb0 {nosoft} > > void __builtin_mtfsb1 (const int<0,31>); > - MTFSB1 rs6000_mtfsb1 {} > + MTFSB1 rs6000_mtfsb1 {nosoft} > > void __builtin_mtfsf (const int<0,255>, double); > MTFSF rs6000_mtfsf {} > @@ -238,7 +238,7 @@ > PACK_IF packif {} > > void __builtin_set_fpscr_rn (const int[0,3]); > - SET_FPSCR_RN rs6000_set_fpscr_rn {} > + SET_FPSCR_RN rs6000_set_fpscr_rn {nosoft} > > const double __builtin_unpack_ibm128 (__ibm128, const int<0,1>); > UNPACK_IF unpackif {} > @@ -2969,7 +2969,7 @@ > PACK_TD packtd {} > > void __builtin_set_fpscr_drn (const int[0,7]); > - SET_FPSCR_DRN rs6000_set_fpscr_drn {} > + SET_FPSCR_DRN rs6000_set_fpscr_drn {nosoft,no32bit} > > const unsigned long long __builtin_unpack_dec128 (_Decimal128, \ > const int<0,1>);
On Tue, Mar 15, 2022 at 02:18:00PM +0100, Jakub Jelinek wrote: > On Fri, Jan 28, 2022 at 11:50:26AM -0600, Bill Schmidt via Gcc-patches wrote: > > PR104004 caught some misses on my part in converting to the new built-in > > function infrastructure. In particular, I forgot to mark all of the "nosoft" > > built-ins, and one of those should also have been marked "no32bit". > This patch fixes a P1 regression and from my (limited) understanding > doesn't depend on any other patch in the series. It depends on 3/8 which was only partially applied (or not at all even?) It is a mess :-( I'll look into it tomorrow. Segher
On Wed, Mar 30, 2022 at 06:07:26PM -0500, Segher Boessenkool wrote: > On Tue, Mar 15, 2022 at 02:18:00PM +0100, Jakub Jelinek wrote: > > On Fri, Jan 28, 2022 at 11:50:26AM -0600, Bill Schmidt via Gcc-patches wrote: > > > PR104004 caught some misses on my part in converting to the new built-in > > > function infrastructure. In particular, I forgot to mark all of the "nosoft" > > > built-ins, and one of those should also have been marked "no32bit". > > > This patch fixes a P1 regression and from my (limited) understanding > > doesn't depend on any other patch in the series. > > It depends on 3/8 which was only partially applied (or not at all even?) > It is a mess :-( > > I'll look into it tomorrow. 3/8 wasn't applied at all. I did some surgery to apply this 8/8 though. Segher
diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def index c8f0cf332eb..98619a649e3 100644 --- a/gcc/config/rs6000/rs6000-builtins.def +++ b/gcc/config/rs6000/rs6000-builtins.def @@ -215,7 +215,7 @@ ; processors, this builtin automatically falls back to mffs on older ; platforms. Thus it appears here in the [always] stanza. double __builtin_mffsl (); - MFFSL rs6000_mffsl {} + MFFSL rs6000_mffsl {nosoft} ; This is redundant with __builtin_pack_ibm128, as it requires long ; double to be __ibm128. Should probably be deprecated. @@ -226,10 +226,10 @@ MFTB rs6000_mftb_di {32bit} void __builtin_mtfsb0 (const int<0,31>); - MTFSB0 rs6000_mtfsb0 {} + MTFSB0 rs6000_mtfsb0 {nosoft} void __builtin_mtfsb1 (const int<0,31>); - MTFSB1 rs6000_mtfsb1 {} + MTFSB1 rs6000_mtfsb1 {nosoft} void __builtin_mtfsf (const int<0,255>, double); MTFSF rs6000_mtfsf {} @@ -238,7 +238,7 @@ PACK_IF packif {} void __builtin_set_fpscr_rn (const int[0,3]); - SET_FPSCR_RN rs6000_set_fpscr_rn {} + SET_FPSCR_RN rs6000_set_fpscr_rn {nosoft} const double __builtin_unpack_ibm128 (__ibm128, const int<0,1>); UNPACK_IF unpackif {} @@ -2969,7 +2969,7 @@ PACK_TD packtd {} void __builtin_set_fpscr_drn (const int[0,7]); - SET_FPSCR_DRN rs6000_set_fpscr_drn {} + SET_FPSCR_DRN rs6000_set_fpscr_drn {nosoft,no32bit} const unsigned long long __builtin_unpack_dec128 (_Decimal128, \ const int<0,1>);