From patchwork Wed Jun 17 19:46:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 1311463 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=r7Q1e1PZ; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49nFxY5kttz9sR4 for ; Thu, 18 Jun 2020 05:48:49 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 32340399783B; Wed, 17 Jun 2020 19:48:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32340399783B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592423284; bh=sJkrRAITEhCSjyLCoLJdTvaubPHYcgBR4KHJCMbiD64=; h=To:Subject:Date:In-Reply-To:References:In-Reply-To:References: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:From:Reply-To:Cc:From; b=r7Q1e1PZVbMNZhk9fyvDL906eYaJQO+Jxk3XMVmGEBxrs37fKa3SC1N9nm314x+X1 6LFDisyXeb4KHlhoGMithmMc1Odu9PZ/exRwg6AFWR52cc29zCou4aAilGG/7Py1Js yAvDGL0s0alhsY38S6DgusC1Kvhv6YBalVd8p7OE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 8C29A39E283F for ; Wed, 17 Jun 2020 19:48:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8C29A39E283F Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05HJWRRF179942; Wed, 17 Jun 2020 15:48:01 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31q6hw683q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jun 2020 15:48:01 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05HJWclc180364; Wed, 17 Jun 2020 15:48:00 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 31q6hw6836-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jun 2020 15:48:00 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05HJjc0A015529; Wed, 17 Jun 2020 19:47:59 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma05wdc.us.ibm.com with ESMTP id 31qqqbg482-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jun 2020 19:47:59 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05HJlxsY34734366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jun 2020 19:47:59 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2D9BA28059; Wed, 17 Jun 2020 19:47:59 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0AFCE28058; Wed, 17 Jun 2020 19:47:59 +0000 (GMT) Received: from localhost (unknown [9.40.194.84]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 17 Jun 2020 19:47:58 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 23/28] rs6000: Add available-everywhere and ancient builtins Date: Wed, 17 Jun 2020 14:46:46 -0500 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-17_10:2020-06-17, 2020-06-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=1 spamscore=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 cotscore=-2147483648 adultscore=0 phishscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006170144 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, 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 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-Patchwork-Original-From: Bill Schmidt via Gcc-patches From: Bill Schmidt Reply-To: Bill Schmidt Cc: dje.gcc@gmail.com, segher@kernel.crashing.org, willschm@linux.ibm.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" 2020-06-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add MASK_PPC_GFXOPT, MASK_POPCNTB, and MASK_CMPB builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 78 ++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new.def index cd2a024b410..871df324911 100644 --- a/gcc/config/rs6000/rs6000-builtin-new.def +++ b/gcc/config/rs6000/rs6000-builtin-new.def @@ -162,6 +162,84 @@ ; a semicolon are also treated as blank lines. +; Builtins that have been around since time immemorial or are just +; considered available everywhere. +[MASK_PPC_GFXOPT] + void __builtin_cpu_init (); + CPU_INIT nothing {cpu} + + unsigned int __builtin_cpu_is (const char *); + CPU_IS nothing {cpu} + + unsigned int __builtin_cpu_supports (const char *); + CPU_SUPPORTS nothing {cpu} + + unsigned long long __builtin_ppc_get_timebase (); + GET_TB rs6000_get_timebase {} + + double __builtin_mffs (); + MFFS rs6000_mffs {} + + unsigned long long __builtin_ppc_mftb (); + MFTB rs6000_mftb_di {} + + void __builtin_mtfsb0 (const int<5>); + MTFSB0 rs6000_mtfsb0 {} + + void __builtin_mtfsb1 (const int<5>); + MTFSB1 rs6000_mtfsb1 {} + + void __builtin_mtfsf (const int<8>, double); + MTFSF rs6000_mtfsf {} + + const __ibm128 __builtin_pack_ibm128 (double, double); + PACK_IF packif {} + + void __builtin_set_fpscr_rn (signed int); + SET_FPSCR_RN rs6000_set_fpscr_rn {} + + const double __builtin_unpack_ibm128 (__ibm128, const int<1>); + UNPACK_IF unpackif {} + + +; Builtins that have been around just about forever, but not quite. +[MASK_POPCNTB] +; #### Not sure what to do with this one. It is apparently another +; name for __builtin_pack_ibm128 when long double == __ibm128. +; There isn't a lot of sense in having pack and unpack for _Float128. +; Inclined to deprecate, should discuss with Steve Munroe. +; const long double __builtin_pack_longdouble (double, double); +; PACK_TF packtf {} + + fpmath double __builtin_recipdiv (double, double); + RECIP recipdf3 {} + + fpmath float __builtin_recipdivf (float, float); + RECIPF recipsf3 {} + + fpmath double __builtin_rsqrt (double); + RSQRT rsqrtdf2 {} + + fpmath float __builtin_rsqrtf (float); + RSQRTF rsqrtsf2 {} + +; #### Not sure what to do with this one. It is apparently another +; name for __builtin_unpack_ibm128 when long double == __ibm128. +; There isn't a lot of sense in having pack and unpack for _Float128. +; Inclined to deprecate, should discuss with Steve Munroe. +; const double __builtin_unpack_longdouble (long double, const int<1>); +; UNPACK_TF unpacktf {} + + +; Power6 builtins. +[MASK_CMPB] + const signed int __builtin_p6_cmpb (signed int, signed int); + CMPB cmpbdi3 {} + + const signed int __builtin_p6_cmpb_32 (signed int, signed int); + CMPB_32 cmpbsi3 {} + + ; AltiVec builtins. [MASK_ALTIVEC] const vsc __builtin_altivec_abs_v16qi (vsc);