From patchwork Tue Jun 8 18:26:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 1489553 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) 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=vARmDUTo; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 4Fzzfq24svz9tkv for ; Wed, 9 Jun 2021 04:44:19 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 87453398080E for ; Tue, 8 Jun 2021 18:44:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87453398080E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1623177856; bh=nmvF6aFDLlrMUyxGzBeUHYcixdyQwKFuz8tk9DAG+qY=; 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=vARmDUToeEJaucCi0qY/P4FtFJhUsmGoMUYY3xy3HWbPrEZJ0Y/NlUJBVmrggfYln pIm3MWPkInS9svZkbfMmsZMQ/AeIulSSBURdPjKvNGSYK0p+M4qGbCaC1voMfwiQSa h5kB4vtokaeSkoLiYeagTRbXVfFVuitqULEvI5vI= 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 6AAF739730FA for ; Tue, 8 Jun 2021 18:27:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6AAF739730FA Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 158IHoa3140707; Tue, 8 Jun 2021 14:27:41 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 392dq286bs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Jun 2021 14:27:41 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 158IHZZa019706; Tue, 8 Jun 2021 18:27:40 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma02dal.us.ibm.com with ESMTP id 3900waqsdn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Jun 2021 18:27:40 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 158IRe0R20971942 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Jun 2021 18:27:40 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F25DCAE080; Tue, 8 Jun 2021 18:27:39 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D14F5AE06F; Tue, 8 Jun 2021 18:27:39 +0000 (GMT) Received: from localhost (unknown [9.40.194.84]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 8 Jun 2021 18:27:39 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 16/55] rs6000: Write output to the builtin definition include file Date: Tue, 8 Jun 2021 13:26:23 -0500 Message-Id: <65097646ce402df240b630c908c1145f4c9222a5.1623163679.git.wschmidt@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ORSn_tEIyyLBqDxnDmhnYGg7e78PTJ9R X-Proofpoint-ORIG-GUID: ORSn_tEIyyLBqDxnDmhnYGg7e78PTJ9R X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-08_14:2021-06-04, 2021-06-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106080117 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: segher@kernel.crashing.org Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 2021-06-07 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_defines_file): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c index fd5b4bd0211..fbc5e06c207 100644 --- a/gcc/config/rs6000/rs6000-gen-builtins.c +++ b/gcc/config/rs6000/rs6000-gen-builtins.c @@ -2006,6 +2006,23 @@ write_init_file (void) static int write_defines_file (void) { + fprintf (defines_file, "#ifndef _RS6000_VECDEFINES_H\n"); + fprintf (defines_file, "#define _RS6000_VECDEFINES_H 1\n\n"); + fprintf (defines_file, "#if defined(_ARCH_PPC64) && defined (_ARCH_PWR9)\n"); + fprintf (defines_file, " #define _ARCH_PPC64_PWR9 1\n"); + fprintf (defines_file, "#endif\n\n"); + for (int i = 0; i < num_ovld_stanzas; i++) + if (strcmp (ovld_stanzas[i].extern_name, "SKIP")) + { + if (ovld_stanzas[i].ifdef) + fprintf (defines_file, "#ifdef %s\n", ovld_stanzas[i].ifdef); + fprintf (defines_file, "#define %s %s\n", + ovld_stanzas[i].extern_name, + ovld_stanzas[i].intern_name); + if (ovld_stanzas[i].ifdef) + fprintf (defines_file, "#endif\n"); + } + fprintf (defines_file, "\n#endif\n"); return 1; }