From patchwork Thu Jul 11 12:12:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Carlotti X-Patchwork-Id: 1959294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=J/Ye/CfJ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=J/Ye/CfJ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WKYYD3zLhz1xqj for ; Thu, 11 Jul 2024 22:13:52 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B98AB387101A for ; Thu, 11 Jul 2024 12:13:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::600]) by sourceware.org (Postfix) with ESMTPS id 0778938708C3 for ; Thu, 11 Jul 2024 12:13:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0778938708C3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0778938708C3 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::600 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1720700005; cv=pass; b=M7sJLDVlAlaCbf+o/TXdu8EzJAyf1y77UnObNiTr8SW/RzPVhMYRTXaFj8Mk3dieN4+IepeuaiogWqdlFOEP0z0v1ZeimfKOG4ahZsd51EwBJ4Bg1TNRjM/o2mA73XgiYQWcUzfU9bPjsgv0jv+f02yOxVV18muBIeooKHzJy4g= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1720700005; c=relaxed/simple; bh=GcrEuN8SXUpDfS8jss4Ltothxf5waFjpf21KjV6axno=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=f7P1A759s9dodpqYE8N1bRpDJhXMO3enSWEFUY2OGgTioYxZc+O7EO6GrrdfjtUCQikRofioY3xodlbk1EAg1EUsl+Wbpm031wXg99HM1UYUaKVzvWNYChHVI6f0i/+it7NSsWETJLBG+HWH+SD4KveMrN17z1GYmM75n9mg6Aw= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=cttE9etj1wt1yehrxW0T37mhN7bJCZEXhMllqwYhFJX+HzSt4fnDzoI9RNCMumMr3z4fu2FjT0bBK+n9Bn+JXx6Vjur4240btgfNORJKpnXXdjEdycHve1jXfwuh33pI8Zw/IOrBVD2j9kTn/0vyRUK00nxbUuZ0tRmN9zo0EaUlhdyJgrcBYvCHMjEy0lVWhQn+J/0AN/fBxMcEuI68bu1PibQQGAqzzpY2g/eUfYKyyMN/+0XDcLPvDt0nsAuGkC3Df4/qfSrLb6Lwwm+yMNziDh9HG9jEmQSKOBMNEkTILRMCqIgXjtuJLfv0BfowoDuHpoiU8Ax/0XEyCnf3zA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uuHQqCge3AHJxC9QHoCZ9ZpT1TXB/SWj4aPlb7aa530=; b=kBsOmXklrm/iPgRzb8rGapctWmxBS0NJ1YxlnEtIXH5CWUGrOkDJF+hVuxOsKL2pq3uw+9F5RSK8lUAkKeVATOkgTLDTISfs//w/SNRWqZGqtMN/bQu06l3mU/EAn16jdiDTQrE3qsmdfDLffj6Z7yDNY0lYA6C3O0eXiOZl9hN+BrNHnnJRP64YEa1mA9xm5yWRYgDzxpgQUsgyirUId5phwztn1OucZo/yRTqQFWXEn0DHAycd7VkZb25ND9NzR16F8+sBaJ0GDbdI5mK/9U/aDlraXbiT0ChlFcdRUOVOJ7MVCFOocTDNBZiSjmP7WdSrcdDeBRLnTsIhsjkQuA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uuHQqCge3AHJxC9QHoCZ9ZpT1TXB/SWj4aPlb7aa530=; b=J/Ye/CfJ2VlNCYkxurKFS3TJ1bxnHEfSSHuMqy+ppODNfiMmvH+9M84mffdeS4mOHyu6vInY4Eh6egnfgrvwYi82x+6Exm3Cb8LIXy0oiIxa1bPj8hMpTOUfefiYi9q/tZu+vbEkr23MF9VmBNy2jvYq29PCNRtDKphG/iEwceU= Received: from AM6P191CA0074.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8a::15) by AS8PR08MB6502.eurprd08.prod.outlook.com (2603:10a6:20b:335::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.19; Thu, 11 Jul 2024 12:13:17 +0000 Received: from AMS1EPF00000044.eurprd04.prod.outlook.com (2603:10a6:209:8a:cafe::50) by AM6P191CA0074.outlook.office365.com (2603:10a6:209:8a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.22 via Frontend Transport; Thu, 11 Jul 2024 12:13:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS1EPF00000044.mail.protection.outlook.com (10.167.16.41) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Thu, 11 Jul 2024 12:13:16 +0000 Received: ("Tessian outbound 22141d90e140:v359"); Thu, 11 Jul 2024 12:13:16 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d0a4c7d65f4133c0 X-CR-MTA-TID: 64aa7808 Received: from 1b4782b8f970.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C137F0FB-37A5-43F1-A8F6-24F3E79FC084.1; Thu, 11 Jul 2024 12:13:05 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1b4782b8f970.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 11 Jul 2024 12:13:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aY5llL0JcAuH3nogT+uQZAVDEGkgE2P7FL4mvp6NKPF/AcflToPr8612jIx3JuMpijG9Oa7OmVcdcQSPspY+5iMxB2vhWvmx/+TePvMGj0sYCWVD5sH7JXaHmIUU2K2uM0g/Qgt9uK+D7sxZZRAGGX1BntuPc1ALUF5k8gxLVbyZZUAKx0u19S7U4MCF26drF87CNQJLf+AiZvMnWfxq5E1P3fWr94xcauHTpNJNDH21tj+3VKtczoSLUy9y+aPlvZMdBX+l22mRcTWrAA7VKNiKORKM0OOxeQqh1ZbC6xszQIv7T3ELMOjDXFgQvu46KosJC8l1WGZs18vjfH3dcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uuHQqCge3AHJxC9QHoCZ9ZpT1TXB/SWj4aPlb7aa530=; b=yqFW0MMVRt13qeWJuruu1QXTKkitWU76q6c/Kx165sal+TM0tSTzNKr5VSNTx50rjiIYz1GxRpppa2wG3abfm9c4xIBR9R0WS/E02NwrDP7nWBn6xmKnZLRNkhYEddpWlPy7jN3Qqxu4R1Ia20rNAQ7UsQ3oR7odmuJ4COQ+imKcjsbQ0JbN4O9UAaEaFDcLLETyilWDpam0L2FSOuBqpGtCp6Wku/2kErfS0EdSzP5AOjYV6aA5O2MHmnrrUE2NZmzMV8rXtGkLdfWRXrlhqgGQIa/ljgzT/SlYbLXWnX40yozMJcFNjiUBB5qoPQAqTxkdiKru0iDpp82da8VJCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uuHQqCge3AHJxC9QHoCZ9ZpT1TXB/SWj4aPlb7aa530=; b=J/Ye/CfJ2VlNCYkxurKFS3TJ1bxnHEfSSHuMqy+ppODNfiMmvH+9M84mffdeS4mOHyu6vInY4Eh6egnfgrvwYi82x+6Exm3Cb8LIXy0oiIxa1bPj8hMpTOUfefiYi9q/tZu+vbEkr23MF9VmBNy2jvYq29PCNRtDKphG/iEwceU= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) by AS8PR08MB9742.eurprd08.prod.outlook.com (2603:10a6:20b:616::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Thu, 11 Jul 2024 12:13:03 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::3b48:ae45:5b79:cc29]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::3b48:ae45:5b79:cc29%3]) with mapi id 15.20.7762.016; Thu, 11 Jul 2024 12:13:03 +0000 Date: Thu, 11 Jul 2024 13:12:56 +0100 From: Andrew Carlotti To: gcc-patches@gcc.gnu.org Cc: Richard Biener , Richard Sandiford , Jeff Law Subject: [PATCH v2 04/11] aarch64: Introduce aarch64_isa_mode type Message-ID: <223f83d0-33bc-5f88-8772-ca876be1523c@e124511.cambridge.arm.com> References: Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO2P265CA0143.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::35) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|AS8PR08MB9742:EE_|AMS1EPF00000044:EE_|AS8PR08MB6502:EE_ X-MS-Office365-Filtering-Correlation-Id: bf30805a-d912-48e9-39bd-08dca1a2d883 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info-Original: MNS09OZVMbYAlxSoNP0RsqqVoN6QcGL98L1lRQbXwbHGLQn39E3ucMLBMpBX00hv0JZ7zLBRbZx9RFnwvB/CFuo2NF3AR7hea8m+yqnPZ+7u+mbf98VatCFycMMLWoI6mDu60eQKUuysBrp/jXLkUSf9y1GchhPNMjChn73jmGjmDsbCMdRQBe7aczzm9tG4G3cBUlFjoC+6HcMOqKdYTPoT4SaHjDr/zbEACm67SdsKlPZ5zww588BrGciucpYn5YW72YpuURrW38/cUUIcmEfnF+Zx/QUfsptYR0HuKeZMLP32TMOE/eK/hlwqsc5rXjDZ1Q4UXJiOG4BR31uaeWN70YuRDqlbxwjNH3b4oWrcZHlJOMev9TMqi3GeDVd7Zf88ygP5jiRjFDpFAaNXSHEeVawntttbrrMwxWY80M8+awn1l4DgZt1Y9W+1Hqu/5BlVAXHQJ0W8ojE6Pe5p9rY3XhKbP95AoMci+tDwfkx9s7C029Z2+g/GOHohh/6ANaC82f+pBj3O79L53UgrWn8Anx3eUKKQ1MH/l0aa56yB0TIu/Xoa5lj3/ktCCeC8JVp2l5a7olqp9VN4fhoCc8LSDAXXtmNXNNlX7LMnRkPONWtkoF9qgj9RxiURs7GXCd8b9nfiIEL3JfIZJcKmRYkwQik2nGwT8XiO3+t94XGZNzQRFQb7YBcNKR7qtQ7yxfmysd/a6kMEqFh6atBziCXpJH9O71iMs8x+0/j4ej+W0NCqbOwQIx39i1QjufSujWM9IOGSPWAKxU2XZV18+wLbL3erNkNzGUjIYDWwjNWG4zsqJmcZhGzUnajm4QNxRy5PYYHeoQwtdsxFY/Jh719151wt6taaJ+yp0vj74E3CM6HNP6TdlpDMtKrt9+yr0NWuTYfJTbFxpxNyA+w1od7TqFpoixhH9U2lJ7GXyL79ZKJvsd7t4OxaRBJqMIDr5uu4BH7emKxpC17Gmb+ne8Zdm2MAQTyoBjE1q7wQZdp8m3r6OWvrSVR001F+Yj/Ib96hfTJf+/kakB7FO5Z0uNCnSZBjaDyP7CwRmOteG2bJSPtRzf+kNZ/fLtggTVqgPSU6xdR6WDRaGea5V6bmCfSmfj9PaWDUERImHmpQrWi0FJlcsa607Ng29wmEuDDqgSh1ZjKeG42WiRuJxeQ3fFQiuDbqvKm0RBBqwSlPKQwAd+m7c8+NnBr0ffyhjCi8m2ET99UumjvIki9nKKIaQP9MfNoJQjZoAnjJ6vFjxCOHzQ48+4Vyllen1wWchDnz07Pg7/xTuc4i20fUaqzInjmSQdHIbPJxcDhUmEvGMkwygz3JbCP9QrW/ry6UdVoeZ+T6yBcJW1uyep0zr25+Fw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB6678.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9742 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF00000044.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 91459f6f-e58a-49a3-60f7-08dca1a2d012 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|36860700013|35042699022|1800799024; X-Microsoft-Antispam-Message-Info: OHoimvNBj68XS+C4WWe568ZYQ1lDrKvhPAFt+c2Qw7tmPmYJ11ScgZE2GVHvgbuL6heaWxy8+9CBjsMPb+VC9Qb8HncMNROUD3wKncuqy03xEwXdoROPCnFnkIeTnwwYWlCCLtqU3h3F2mMyyjU4lB8VWSFjVOL2E9joR6dk+iqr90CVjHJ5vIGM5C8in4f2qtML+XnTBFeJ2mSVcmpp2xhxc0D8RbTbLPty4G3XZD651O6a66H9V45y8rTlpK/gzkYSWdDkt2TU71rWNf1niWwjVl2Iz8kEF86JwNrViI2ZCH4kuMb3mR5spZbEV/i6qcsvyZxENBfLAf9ZMFwQfmJlb8hHZYNuUa/ClypA5inRJ+qovO4YluP88hHCGlEgNvjNX4aVFz9y8snQtAkk5VWJ1Agtw0wH61qyV218WnLCSw2vT3K0+popFvLoJkDU6SbbpmP/E9r5TxwXP4MYwoeJSBKaUd+W2d/CoBsudt6FxOIxCLJ4WMIzlkD7ziPFoR/zKztiJSgsEPegLjPWs/U76BDzMOy7o1Z413jpMneDfSMaws3Ce6AYGyw8LrJO+q7XQjOqE/JEE9IdCXR16oy278mTLiGF5QgbdWN3AwnrNscOzFRTTm/G+UZcxndWNxv7n2DYDt/NW6BGzK7nUGv5rlXEJfGTFKnPeWOcqWNWf29YtpM828APsEfHUOK9W4HiZnluk4694t3yE/aq/DkQ2cgyEHSbUambzd4okYIbp7KSCmt7vBEJ89YQM6xb4erOVuf4sjGM6J5hiqB9KpFXC6GO84cbWXsJYLSr1ahTzoqAwIYUiSOFB+Vt/iBm2pnMB10POP9+ynnpl/wRAhyvR2XbjtnWZXqNQv8L+xQEloiNGu19BO8//T7Df2d1UvwH1EQAGeuZs+B6JH7QluFEMeXlO9IaPpBgYJbfjybijVzwXFJodC8gAFBVHVGZoj3N01SoiwKX/UgvI28p29ErEVgcOpzJp1OJKuLEsT9f5b/wGKe4p6es7SfIDy2UgZt+KhAgranFHxaOgWRa6hP9p6jEk6GamPZG9P0pCxdo00+hVGxGO6VhjKbnZS+RF6NXyw0TlI95wsNFH9+XX+1/wV3XX+TyISHXx7sJz1SbS2XdjUa23KJ3aXEE1gZAcR1y0halFYitPthA6zMtmQiy+jjZDHKLup0BES7ffbp9wsMSaqL4Ol2GY2N/beVd+/5HkkMP+fPjKaoT9eiJB0rCcK8ZG2ExA57Ot9sG7DFZQxEFjDxwHetLAQoxQzOrqJBarBqqUch5pNesLBDjzUqDpUMpgZUK4FUyM0cNS0SQZzKgccixC/1d94azPNCMnmcwoPN1IKMF+dwkI3iBNNyu12NUxyO2KA5OhdsFufbNvXJEhFaGDTJ2LIkQtE4zD6GpwAYGBJqjYTfxO0vU5AgH76i6fNrRsShCaxswCkN/lVXfUDWi45VUWz+jyctC X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(376014)(82310400026)(36860700013)(35042699022)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2024 12:13:16.7614 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf30805a-d912-48e9-39bd-08dca1a2d883 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF00000044.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6502 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, T_FILL_THIS_FORM_SHORT, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Currently there are many places where an aarch64_feature_flags variable is used, but only the bottom three isa mode bits are set and read. Using a separate data type for these value makes it more clear that they're not expected or required to have any of their upper feature bits set. It will also make things simpler and more efficient when we extend aarch64_feature_flags to 128 bits. This patch uses explicit casts whenever converting from an aarch64_feature_flags value to an aarch64_isa_mode value. This isn't strictly necessary, but serves to highlight the locations where an explicit conversion will become necessary later. gcc/ChangeLog: * config/aarch64/aarch64-opts.h: Add aarch64_isa_mode typedef. * config/aarch64/aarch64-protos.h (aarch64_gen_callee_cookie): Use aarch64_isa_mode parameter. (aarch64_sme_vq_immediate): Ditto. * config/aarch64/aarch64.cc (aarch64_fntype_pstate_sm): Use aarch64_isa_mode values. (aarch64_fntype_pstate_za): Ditto. (aarch64_fndecl_pstate_sm): Ditto. (aarch64_fndecl_pstate_za): Ditto. (aarch64_fndecl_isa_mode): Ditto. (aarch64_cfun_incoming_pstate_sm): Ditto. (aarch64_cfun_enables_pstate_sm): Ditto. (aarch64_call_switches_pstate_sm): Ditto. (aarch64_gen_callee_cookie): Ditto. (aarch64_callee_isa_mode): Ditto. (aarch64_insn_callee_abi): Ditto. (aarch64_sme_vq_immediate): Ditto. (aarch64_add_offset_temporaries): Ditto. (aarch64_add_offset): Ditto. (aarch64_add_sp): Ditto. (aarch64_sub_sp): Ditto. (aarch64_guard_switch_pstate_sm): Ditto. (aarch64_switch_pstate_sm): Ditto. (aarch64_init_cumulative_args): Ditto. (aarch64_allocate_and_probe_stack_space): Ditto. (aarch64_expand_prologue): Ditto. (aarch64_expand_epilogue): Ditto. (aarch64_start_call_args): Ditto. (aarch64_expand_call): Ditto. (aarch64_end_call_args): Ditto. (aarch64_set_current_function): Ditto, with added conversions. (aarch64_handle_attr_arch): Avoid macro with changed type. (aarch64_handle_attr_cpu): Ditto. (aarch64_handle_attr_isa_flags): Ditto. (aarch64_switch_pstate_sm_for_landing_pad): Use arch64_isa_mode values. (aarch64_switch_pstate_sm_for_jump): Ditto. (pass_switch_pstate_sm::gate): Ditto. * config/aarch64/aarch64.h (AARCH64_ISA_MODE_{SM_ON|SM_OFF|ZA_ON}): New macros. (AARCH64_FL_SM_STATE): Mark as possibly unused. (AARCH64_ISA_MODE_SM_STATE): New aarch64_isa_mode mask. (AARCH64_DEFAULT_ISA_MODE): New aarch64_isa_mode value. (AARCH64_FL_DEFAULT_ISA_MODE): Define using above value. (AARCH64_ISA_MODE): Change type to aarch64_isa_mode. (arm_pcs): Use aarch64_isa_mode value. diff --git a/gcc/config/aarch64/aarch64-opts.h b/gcc/config/aarch64/aarch64-opts.h index 06a4fed3833482543891b4f7c778933f7cebd631..2c36bfaad19b999238601d44709c280ef987046b 100644 --- a/gcc/config/aarch64/aarch64-opts.h +++ b/gcc/config/aarch64/aarch64-opts.h @@ -23,6 +23,8 @@ #define GCC_AARCH64_OPTS_H #ifndef USED_FOR_TARGET +typedef uint64_t aarch64_isa_mode; + typedef uint64_t aarch64_feature_flags; constexpr unsigned int AARCH64_NUM_ISA_MODES = (0 diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 42639e9efcf1e0f9362f759ae63a31b8eeb0d581..f64afe2889018e1c4735a1677e6bf5febc4a7665 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -767,7 +767,7 @@ bool aarch64_constant_address_p (rtx); bool aarch64_emit_approx_div (rtx, rtx, rtx); bool aarch64_emit_approx_sqrt (rtx, rtx, bool); tree aarch64_vector_load_decl (tree); -rtx aarch64_gen_callee_cookie (aarch64_feature_flags, arm_pcs); +rtx aarch64_gen_callee_cookie (aarch64_isa_mode, arm_pcs); void aarch64_expand_call (rtx, rtx, rtx, bool); bool aarch64_expand_cpymem_mops (rtx *, bool); bool aarch64_expand_cpymem (rtx *, bool); @@ -808,7 +808,7 @@ int aarch64_add_offset_temporaries (rtx); void aarch64_split_add_offset (scalar_int_mode, rtx, rtx, rtx, rtx, rtx); bool aarch64_rdsvl_immediate_p (const_rtx); rtx aarch64_sme_vq_immediate (machine_mode mode, HOST_WIDE_INT, - aarch64_feature_flags); + aarch64_isa_mode); char *aarch64_output_rdsvl (const_rtx); bool aarch64_addsvl_addspl_immediate_p (const_rtx); char *aarch64_output_addsvl_addspl (rtx); diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 2be6dc4089b81d2a4e1ba6861b25094774198406..dfb244307635a7aa1c552acd55a635cd0bdeeb39 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -181,7 +181,17 @@ enum class aarch64_feature : unsigned char { #include "aarch64-arches.def" #undef HANDLE -constexpr auto AARCH64_FL_SM_STATE = AARCH64_FL_SM_ON | AARCH64_FL_SM_OFF; +/* Define aarch64_isa_mode masks. */ +#define DEF_AARCH64_ISA_MODE(IDENT) \ + constexpr auto AARCH64_ISA_MODE_##IDENT ATTRIBUTE_UNUSED \ + = aarch64_isa_mode (1) << int (aarch64_feature::IDENT); +#include "aarch64-isa-modes.def" +#undef HANDLE + +constexpr auto AARCH64_FL_SM_STATE ATTRIBUTE_UNUSED + = AARCH64_FL_SM_ON | AARCH64_FL_SM_OFF; +constexpr auto AARCH64_ISA_MODE_SM_STATE ATTRIBUTE_UNUSED + = AARCH64_ISA_MODE_SM_ON | AARCH64_ISA_MODE_SM_OFF; /* The mask of all ISA modes. */ constexpr auto AARCH64_FL_ISA_MODES @@ -189,7 +199,10 @@ constexpr auto AARCH64_FL_ISA_MODES /* The default ISA mode, for functions with no attributes that specify something to the contrary. */ -constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = AARCH64_FL_SM_OFF; +constexpr auto AARCH64_DEFAULT_ISA_MODE ATTRIBUTE_UNUSED + = AARCH64_ISA_MODE_SM_OFF; +constexpr auto AARCH64_FL_DEFAULT_ISA_MODE ATTRIBUTE_UNUSED + = aarch64_feature_flags (AARCH64_DEFAULT_ISA_MODE); #endif @@ -202,7 +215,7 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = AARCH64_FL_SM_OFF; #define AARCH64_ISA_SM_OFF (aarch64_isa_flags & AARCH64_FL_SM_OFF) #define AARCH64_ISA_SM_ON (aarch64_isa_flags & AARCH64_FL_SM_ON) #define AARCH64_ISA_ZA_ON (aarch64_isa_flags & AARCH64_FL_ZA_ON) -#define AARCH64_ISA_MODE (aarch64_isa_flags & AARCH64_FL_ISA_MODES) +#define AARCH64_ISA_MODE (aarch64_isa_mode) (aarch64_isa_flags & AARCH64_FL_ISA_MODES) #define AARCH64_ISA_V8A (aarch64_isa_flags & AARCH64_FL_V8A) #define AARCH64_ISA_V8_1A (aarch64_isa_flags & AARCH64_FL_V8_1A) #define AARCH64_ISA_CRC (aarch64_isa_flags & AARCH64_FL_CRC) @@ -1131,7 +1144,7 @@ enum arm_pcs typedef struct { enum arm_pcs pcs_variant; - aarch64_feature_flags isa_mode; + aarch64_isa_mode isa_mode; int aapcs_arg_processed; /* No need to lay out this argument again. */ int aapcs_ncrn; /* Next Core register number. */ int aapcs_nextncrn; /* Next next core register number. */ diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 67c97569b7d4b5502e8dfc111eced65d2aee5cb2..726f769e708d09285a291472bda4babcc3241d00 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -2166,17 +2166,17 @@ aarch64_fntype_abi (const_tree fntype) /* Return the state of PSTATE.SM on entry to functions of type FNTYPE. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_fntype_pstate_sm (const_tree fntype) { if (lookup_attribute ("arm", "streaming", TYPE_ATTRIBUTES (fntype))) - return AARCH64_FL_SM_ON; + return AARCH64_ISA_MODE_SM_ON; if (lookup_attribute ("arm", "streaming_compatible", TYPE_ATTRIBUTES (fntype))) return 0; - return AARCH64_FL_SM_OFF; + return AARCH64_ISA_MODE_SM_OFF; } /* Return state flags that describe whether and how functions of type @@ -2191,19 +2191,19 @@ aarch64_fntype_shared_flags (const_tree fntype, const char *state_name) /* Return the state of PSTATE.ZA on entry to functions of type FNTYPE. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_fntype_pstate_za (const_tree fntype) { if (aarch64_fntype_shared_flags (fntype, "za") || aarch64_fntype_shared_flags (fntype, "zt0")) - return AARCH64_FL_ZA_ON; + return AARCH64_ISA_MODE_ZA_ON; return 0; } /* Return the ISA mode on entry to functions of type FNTYPE. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_fntype_isa_mode (const_tree fntype) { return (aarch64_fntype_pstate_sm (fntype) @@ -2224,11 +2224,11 @@ aarch64_fndecl_is_locally_streaming (const_tree fndecl) function FNDECL. This might be different from the state of PSTATE.SM on entry. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_fndecl_pstate_sm (const_tree fndecl) { if (aarch64_fndecl_is_locally_streaming (fndecl)) - return AARCH64_FL_SM_ON; + return AARCH64_ISA_MODE_SM_ON; return aarch64_fntype_pstate_sm (TREE_TYPE (fndecl)); } @@ -2247,12 +2247,12 @@ aarch64_fndecl_has_state (tree fndecl, const char *state_name) /* Return the state of PSTATE.ZA when compiling the body of function FNDECL. This might be different from the state of PSTATE.ZA on entry. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_fndecl_pstate_za (const_tree fndecl) { if (aarch64_fndecl_has_new_state (fndecl, "za") || aarch64_fndecl_has_new_state (fndecl, "zt0")) - return AARCH64_FL_ZA_ON; + return AARCH64_ISA_MODE_ZA_ON; return aarch64_fntype_pstate_za (TREE_TYPE (fndecl)); } @@ -2260,7 +2260,7 @@ aarch64_fndecl_pstate_za (const_tree fndecl) /* Return the ISA mode that should be used to compile the body of function FNDECL. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_fndecl_isa_mode (const_tree fndecl) { return (aarch64_fndecl_pstate_sm (fndecl) @@ -2271,7 +2271,7 @@ aarch64_fndecl_isa_mode (const_tree fndecl) This might be different from the state of PSTATE.SM in the function body. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_cfun_incoming_pstate_sm () { return aarch64_fntype_pstate_sm (TREE_TYPE (cfun->decl)); @@ -2281,7 +2281,7 @@ aarch64_cfun_incoming_pstate_sm () This might be different from the state of PSTATE.ZA in the function body. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_cfun_incoming_pstate_za () { return aarch64_fntype_pstate_za (TREE_TYPE (cfun->decl)); @@ -2313,7 +2313,7 @@ static bool aarch64_cfun_enables_pstate_sm () { return (aarch64_fndecl_is_locally_streaming (cfun->decl) - && aarch64_cfun_incoming_pstate_sm () != AARCH64_FL_SM_ON); + && aarch64_cfun_incoming_pstate_sm () != AARCH64_ISA_MODE_SM_ON); } /* Return true if the current function has state STATE_NAME, either by @@ -2330,9 +2330,9 @@ aarch64_cfun_has_state (const char *state_name) the BL instruction. */ static bool -aarch64_call_switches_pstate_sm (aarch64_feature_flags callee_mode) +aarch64_call_switches_pstate_sm (aarch64_isa_mode callee_mode) { - return (callee_mode & ~AARCH64_ISA_MODE & AARCH64_FL_SM_STATE) != 0; + return (bool) (callee_mode & ~AARCH64_ISA_MODE & AARCH64_ISA_MODE_SM_STATE); } /* Implement TARGET_COMPATIBLE_VECTOR_TYPES_P. */ @@ -2401,7 +2401,7 @@ aarch64_reg_save_mode (unsigned int regno) return the CONST_INT that should be placed in an UNSPEC_CALLEE_ABI rtx. */ rtx -aarch64_gen_callee_cookie (aarch64_feature_flags isa_mode, arm_pcs pcs_variant) +aarch64_gen_callee_cookie (aarch64_isa_mode isa_mode, arm_pcs pcs_variant) { return gen_int_mode ((unsigned int) isa_mode | (unsigned int) pcs_variant << AARCH64_NUM_ISA_MODES, @@ -2421,10 +2421,10 @@ aarch64_callee_abi (rtx cookie) required ISA mode on entry to the callee, which is also the ISA mode on return from the callee. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_callee_isa_mode (rtx cookie) { - return UINTVAL (cookie) & AARCH64_FL_ISA_MODES; + return UINTVAL (cookie) & ((1 << AARCH64_NUM_ISA_MODES) - 1); } /* INSN is a call instruction. Return the CONST_INT stored in its @@ -2452,7 +2452,7 @@ aarch64_insn_callee_abi (const rtx_insn *insn) /* INSN is a call instruction. Return the required ISA mode on entry to the callee, which is also the ISA mode on return from the callee. */ -static aarch64_feature_flags +static aarch64_isa_mode aarch64_insn_callee_isa_mode (const rtx_insn *insn) { return aarch64_callee_isa_mode (aarch64_insn_callee_cookie (insn)); @@ -3986,10 +3986,10 @@ aarch64_output_sve_vector_inc_dec (const char *operands, rtx x) rtx aarch64_sme_vq_immediate (machine_mode mode, HOST_WIDE_INT factor, - aarch64_feature_flags isa_mode) + aarch64_isa_mode isa_mode) { gcc_assert (aarch64_sve_rdvl_addvl_factor_p (factor)); - if (isa_mode & AARCH64_FL_SM_ON) + if (isa_mode & AARCH64_ISA_MODE_SM_ON) /* We're in streaming mode, so we can use normal poly-int values. */ return gen_int_mode ({ factor, factor }, mode); @@ -4640,7 +4640,7 @@ aarch64_add_offset_temporaries (rtx x) TEMP2, if nonnull, is a second temporary register that doesn't overlap either DEST or REG. - FORCE_ISA_MODE is AARCH64_FL_SM_ON if any variable component of OFFSET + FORCE_ISA_MODE is AARCH64_ISA_MODE_SM_ON if any variable component of OFFSET is measured relative to the SME vector length instead of the current prevailing vector length. It is 0 otherwise. @@ -4652,7 +4652,7 @@ aarch64_add_offset_temporaries (rtx x) static void aarch64_add_offset (scalar_int_mode mode, rtx dest, rtx src, poly_int64 offset, rtx temp1, rtx temp2, - aarch64_feature_flags force_isa_mode, + aarch64_isa_mode force_isa_mode, bool frame_related_p, bool emit_move_imm = true) { gcc_assert (emit_move_imm || temp1 != NULL_RTX); @@ -4673,7 +4673,7 @@ aarch64_add_offset (scalar_int_mode mode, rtx dest, rtx src, offset_rtx = aarch64_sme_vq_immediate (mode, offset.coeffs[0], 0); rtx_insn *insn = emit_insn (gen_add3_insn (dest, src, offset_rtx)); RTX_FRAME_RELATED_P (insn) = frame_related_p; - if (frame_related_p && (force_isa_mode & AARCH64_FL_SM_ON)) + if (frame_related_p && (force_isa_mode & AARCH64_ISA_MODE_SM_ON)) add_reg_note (insn, REG_CFA_ADJUST_CFA, gen_rtx_SET (dest, plus_constant (Pmode, src, offset))); @@ -4701,7 +4701,7 @@ aarch64_add_offset (scalar_int_mode mode, rtx dest, rtx src, { rtx_insn *insn = emit_insn (gen_add3_insn (dest, src, offset_rtx)); RTX_FRAME_RELATED_P (insn) = true; - if (force_isa_mode & AARCH64_FL_SM_ON) + if (force_isa_mode & AARCH64_ISA_MODE_SM_ON) add_reg_note (insn, REG_CFA_ADJUST_CFA, gen_rtx_SET (dest, plus_constant (Pmode, src, poly_offset))); @@ -4735,7 +4735,7 @@ aarch64_add_offset (scalar_int_mode mode, rtx dest, rtx src, rtx val; if (IN_RANGE (rel_factor, -32, 31)) { - if (force_isa_mode & AARCH64_FL_SM_ON) + if (force_isa_mode & AARCH64_ISA_MODE_SM_ON) { /* Try to use an unshifted RDSVL, otherwise fall back on a shifted RDSVL #1. */ @@ -4783,7 +4783,7 @@ aarch64_add_offset (scalar_int_mode mode, rtx dest, rtx src, val = gen_int_mode (poly_int64 (low_bit, low_bit), mode); shift = 0; } - else if ((force_isa_mode & AARCH64_FL_SM_ON) + else if ((force_isa_mode & AARCH64_ISA_MODE_SM_ON) && aarch64_sve_rdvl_addvl_factor_p (low_bit)) { val = aarch64_sme_vq_immediate (mode, low_bit, 0); @@ -4886,7 +4886,7 @@ aarch64_split_add_offset (scalar_int_mode mode, rtx dest, rtx src, static inline void aarch64_add_sp (rtx temp1, rtx temp2, poly_int64 delta, - aarch64_feature_flags force_isa_mode, bool emit_move_imm) + aarch64_isa_mode force_isa_mode, bool emit_move_imm) { aarch64_add_offset (Pmode, stack_pointer_rtx, stack_pointer_rtx, delta, temp1, temp2, force_isa_mode, true, emit_move_imm); @@ -4898,7 +4898,7 @@ aarch64_add_sp (rtx temp1, rtx temp2, poly_int64 delta, static inline void aarch64_sub_sp (rtx temp1, rtx temp2, poly_int64 delta, - aarch64_feature_flags force_isa_mode, + aarch64_isa_mode force_isa_mode, bool frame_related_p, bool emit_move_imm = true) { aarch64_add_offset (Pmode, stack_pointer_rtx, stack_pointer_rtx, -delta, @@ -4915,11 +4915,11 @@ aarch64_sub_sp (rtx temp1, rtx temp2, poly_int64 delta, matches LOCAL_MODE. Return the label that the branch jumps to. */ static rtx_insn * -aarch64_guard_switch_pstate_sm (rtx old_svcr, aarch64_feature_flags local_mode) +aarch64_guard_switch_pstate_sm (rtx old_svcr, aarch64_isa_mode local_mode) { - local_mode &= AARCH64_FL_SM_STATE; + local_mode &= AARCH64_ISA_MODE_SM_STATE; gcc_assert (local_mode != 0); - auto already_ok_cond = (local_mode & AARCH64_FL_SM_ON ? NE : EQ); + auto already_ok_cond = (local_mode & AARCH64_ISA_MODE_SM_ON ? NE : EQ); auto *label = gen_label_rtx (); auto branch = aarch64_gen_test_and_branch (already_ok_cond, old_svcr, 0, label); @@ -4933,15 +4933,14 @@ aarch64_guard_switch_pstate_sm (rtx old_svcr, aarch64_feature_flags local_mode) an SMSTOP SM. */ static void -aarch64_switch_pstate_sm (aarch64_feature_flags old_mode, - aarch64_feature_flags new_mode) +aarch64_switch_pstate_sm (aarch64_isa_mode old_mode, aarch64_isa_mode new_mode) { - old_mode &= AARCH64_FL_SM_STATE; - new_mode &= AARCH64_FL_SM_STATE; + old_mode &= AARCH64_ISA_MODE_SM_STATE; + new_mode &= AARCH64_ISA_MODE_SM_STATE; gcc_assert (old_mode != new_mode); - if ((new_mode & AARCH64_FL_SM_ON) - || (new_mode == 0 && (old_mode & AARCH64_FL_SM_OFF))) + if ((new_mode & AARCH64_ISA_MODE_SM_ON) + || (!new_mode && (old_mode & AARCH64_ISA_MODE_SM_OFF))) emit_insn (gen_aarch64_smstart_sm ()); else emit_insn (gen_aarch64_smstop_sm ()); @@ -7222,7 +7221,7 @@ aarch64_init_cumulative_args (CUMULATIVE_ARGS *pcum, else { pcum->pcs_variant = ARM_PCS_AAPCS64; - pcum->isa_mode = AARCH64_FL_DEFAULT_ISA_MODE; + pcum->isa_mode = AARCH64_DEFAULT_ISA_MODE; } pcum->aapcs_reg = NULL_RTX; pcum->aapcs_arg_processed = false; @@ -9157,14 +9156,14 @@ aarch64_emit_stack_tie (rtx reg) then the signal handler doesn't know the state of the stack and can make no assumptions about which pages have been probed. - FORCE_ISA_MODE is AARCH64_FL_SM_ON if any variable component of POLY_SIZE + FORCE_ISA_MODE is AARCH64_ISA_MODE_SM_ON if any variable component of POLY_SIZE is measured relative to the SME vector length instead of the current prevailing vector length. It is 0 otherwise. */ static void aarch64_allocate_and_probe_stack_space (rtx temp1, rtx temp2, poly_int64 poly_size, - aarch64_feature_flags force_isa_mode, + aarch64_isa_mode force_isa_mode, bool frame_related_p, bool final_adjustment_p) { @@ -9477,7 +9476,7 @@ aarch64_read_old_svcr (unsigned int regno) static rtx_insn * aarch64_guard_switch_pstate_sm (unsigned int regno, - aarch64_feature_flags local_mode) + aarch64_isa_mode local_mode) { rtx old_svcr = aarch64_read_old_svcr (regno); return aarch64_guard_switch_pstate_sm (old_svcr, local_mode); @@ -9578,9 +9577,9 @@ aarch64_expand_prologue (void) unsigned reg2 = frame.wb_push_candidate2; bool emit_frame_chain = frame.emit_frame_chain; rtx_insn *insn; - aarch64_feature_flags force_isa_mode = 0; + aarch64_isa_mode force_isa_mode = 0; if (aarch64_cfun_enables_pstate_sm ()) - force_isa_mode = AARCH64_FL_SM_ON; + force_isa_mode = AARCH64_ISA_MODE_SM_ON; if (flag_stack_clash_protection && known_eq (callee_adjust, 0) @@ -9784,7 +9783,7 @@ aarch64_expand_prologue (void) emit_insn (gen_aarch64_read_svcr (svcr)); emit_move_insn (aarch64_old_svcr_mem (), svcr); guard_label = aarch64_guard_switch_pstate_sm (svcr, - aarch64_isa_flags); + AARCH64_ISA_MODE); } aarch64_sme_mode_switch_regs args_switch; auto &args = crtl->args.info; @@ -9845,9 +9844,9 @@ aarch64_expand_epilogue (rtx_call_insn *sibcall) HOST_WIDE_INT guard_size = 1 << param_stack_clash_protection_guard_size; HOST_WIDE_INT guard_used_by_caller = STACK_CLASH_CALLER_GUARD; - aarch64_feature_flags force_isa_mode = 0; + aarch64_isa_mode force_isa_mode = 0; if (aarch64_cfun_enables_pstate_sm ()) - force_isa_mode = AARCH64_FL_SM_ON; + force_isa_mode = AARCH64_ISA_MODE_SM_ON; /* We can re-use the registers when: @@ -9877,8 +9876,10 @@ aarch64_expand_epilogue (rtx_call_insn *sibcall) { rtx_insn *guard_label = nullptr; if (known_ge (cfun->machine->frame.old_svcr_offset, 0)) - guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, - aarch64_isa_flags); + { + guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, + AARCH64_ISA_MODE); + } aarch64_sme_mode_switch_regs return_switch; if (sibcall) return_switch.add_call_args (sibcall); @@ -11159,7 +11160,7 @@ aarch64_start_call_args (cumulative_args_t ca_v) { CUMULATIVE_ARGS *ca = get_cumulative_args (ca_v); - if (!TARGET_SME && (ca->isa_mode & AARCH64_FL_SM_ON)) + if (!TARGET_SME && (ca->isa_mode & AARCH64_ISA_MODE_SM_ON)) { error ("calling a streaming function requires the ISA extension %qs", "sme"); @@ -11176,20 +11177,20 @@ aarch64_start_call_args (cumulative_args_t ca_v) && !aarch64_cfun_has_state ("zt0")) error ("call to a function that shares %qs state from a function" " that has no %qs state", "zt0", "zt0"); - else if (!TARGET_ZA && (ca->isa_mode & AARCH64_FL_ZA_ON)) + else if (!TARGET_ZA && (ca->isa_mode & AARCH64_ISA_MODE_ZA_ON)) error ("call to a function that shares SME state from a function" " that has no SME state"); /* If this is a call to a private ZA function, emit a marker to indicate where any necessary set-up code could be inserted. The code itself is inserted by the mode-switching pass. */ - if (TARGET_ZA && !(ca->isa_mode & AARCH64_FL_ZA_ON)) + if (TARGET_ZA && !(ca->isa_mode & AARCH64_ISA_MODE_ZA_ON)) emit_insn (gen_aarch64_start_private_za_call ()); /* If this is a call to a shared-ZA function that doesn't share ZT0, save and restore ZT0 around the call. */ if (aarch64_cfun_has_state ("zt0") - && (ca->isa_mode & AARCH64_FL_ZA_ON) + && (ca->isa_mode & AARCH64_ISA_MODE_ZA_ON) && ca->shared_zt0_flags == 0) aarch64_save_zt0 (); } @@ -11232,7 +11233,7 @@ aarch64_expand_call (rtx result, rtx mem, rtx cookie, bool sibcall) auto callee_isa_mode = aarch64_callee_isa_mode (callee_abi); if (aarch64_cfun_has_state ("za") - && (callee_isa_mode & AARCH64_FL_ZA_ON) + && (callee_isa_mode & AARCH64_ISA_MODE_ZA_ON) && !shared_za_flags) { sorry ("call to a function that shares state other than %qs" @@ -11387,7 +11388,7 @@ aarch64_expand_call (rtx result, rtx mem, rtx cookie, bool sibcall) gen_rtx_REG (VNx16BImode, ZA_SAVED_REGNUM)); /* Keep the aarch64_start/end_private_za_call markers live. */ - if (!(callee_isa_mode & AARCH64_FL_ZA_ON)) + if (!(callee_isa_mode & AARCH64_ISA_MODE_ZA_ON)) use_reg (&CALL_INSN_FUNCTION_USAGE (call_insn), gen_rtx_REG (VNx16BImode, LOWERING_REGNUM)); @@ -11413,13 +11414,13 @@ aarch64_end_call_args (cumulative_args_t ca_v) /* If this is a call to a private ZA function, emit a marker to indicate where any necessary restoration code could be inserted. The code itself is inserted by the mode-switching pass. */ - if (TARGET_ZA && !(ca->isa_mode & AARCH64_FL_ZA_ON)) + if (TARGET_ZA && !(ca->isa_mode & AARCH64_ISA_MODE_ZA_ON)) emit_insn (gen_aarch64_end_private_za_call ()); /* If this is a call to a shared-ZA function that doesn't share ZT0, save and restore ZT0 around the call. */ if (aarch64_cfun_has_state ("zt0") - && (ca->isa_mode & AARCH64_FL_ZA_ON) + && (ca->isa_mode & AARCH64_ISA_MODE_ZA_ON) && ca->shared_zt0_flags == 0) aarch64_restore_zt0 (false); } @@ -19098,7 +19099,7 @@ aarch64_set_current_function (tree fndecl) auto new_isa_mode = (fndecl ? aarch64_fndecl_isa_mode (fndecl) - : AARCH64_FL_DEFAULT_ISA_MODE); + : AARCH64_DEFAULT_ISA_MODE); auto isa_flags = TREE_TARGET_OPTION (new_tree)->x_aarch64_isa_flags; static bool reported_zt0_p; @@ -19120,7 +19121,7 @@ aarch64_set_current_function (tree fndecl) aarch64_pragma_target_parse. */ if (old_tree == new_tree && (!fndecl || aarch64_previous_fndecl) - && (isa_flags & AARCH64_FL_ISA_MODES) == new_isa_mode) + && (aarch64_isa_mode) (isa_flags & AARCH64_FL_ISA_MODES) == new_isa_mode) { gcc_assert (AARCH64_ISA_MODE == new_isa_mode); return; @@ -19135,10 +19136,11 @@ aarch64_set_current_function (tree fndecl) /* The ISA mode can vary based on function type attributes and function declaration attributes. Make sure that the target options correctly reflect these attributes. */ - if ((isa_flags & AARCH64_FL_ISA_MODES) != new_isa_mode) + if ((aarch64_isa_mode) (isa_flags & AARCH64_FL_ISA_MODES) != new_isa_mode) { auto base_flags = (aarch64_asm_isa_flags & ~AARCH64_FL_ISA_MODES); - aarch64_set_asm_isa_flags (base_flags | new_isa_mode); + aarch64_set_asm_isa_flags (base_flags + | (aarch64_feature_flags) new_isa_mode); aarch64_override_options_internal (&global_options); new_tree = build_target_option_node (&global_options, @@ -19203,7 +19205,8 @@ aarch64_handle_attr_arch (const char *str) { gcc_assert (tmp_arch); selected_arch = tmp_arch->arch; - aarch64_set_asm_isa_flags (tmp_flags | AARCH64_ISA_MODE); + aarch64_set_asm_isa_flags (tmp_flags | (aarch64_asm_isa_flags + & AARCH64_FL_ISA_MODES)); return true; } @@ -19244,7 +19247,8 @@ aarch64_handle_attr_cpu (const char *str) gcc_assert (tmp_cpu); selected_tune = tmp_cpu->ident; selected_arch = tmp_cpu->arch; - aarch64_set_asm_isa_flags (tmp_flags | AARCH64_ISA_MODE); + aarch64_set_asm_isa_flags (tmp_flags | (aarch64_asm_isa_flags + & AARCH64_FL_ISA_MODES)); return true; } @@ -19322,7 +19326,7 @@ aarch64_handle_attr_isa_flags (char *str) features if the user wants to handpick specific features. */ if (strncmp ("+nothing", str, 8) == 0) { - isa_flags = AARCH64_ISA_MODE; + isa_flags &= AARCH64_FL_ISA_MODES; str += 8; } @@ -30036,11 +30040,11 @@ aarch64_switch_pstate_sm_for_landing_pad (basic_block bb) rtx_insn *guard_label = nullptr; if (TARGET_STREAMING_COMPATIBLE) guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, - AARCH64_FL_SM_OFF); + AARCH64_ISA_MODE_SM_OFF); aarch64_sme_mode_switch_regs args_switch; args_switch.add_call_preserved_regs (df_get_live_in (bb)); args_switch.emit_prologue (); - aarch64_switch_pstate_sm (AARCH64_FL_SM_OFF, AARCH64_FL_SM_ON); + aarch64_switch_pstate_sm (AARCH64_ISA_MODE_SM_OFF, AARCH64_ISA_MODE_SM_ON); args_switch.emit_epilogue (); if (guard_label) emit_label (guard_label); @@ -30064,8 +30068,8 @@ aarch64_switch_pstate_sm_for_jump (rtx_insn *jump) rtx_insn *guard_label = nullptr; if (TARGET_STREAMING_COMPATIBLE) guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, - AARCH64_FL_SM_OFF); - aarch64_switch_pstate_sm (AARCH64_FL_SM_ON, AARCH64_FL_SM_OFF); + AARCH64_ISA_MODE_SM_OFF); + aarch64_switch_pstate_sm (AARCH64_ISA_MODE_SM_ON, AARCH64_ISA_MODE_SM_OFF); if (guard_label) emit_label (guard_label); auto seq = get_insns (); @@ -30160,7 +30164,7 @@ public: bool pass_switch_pstate_sm::gate (function *fn) { - return (aarch64_fndecl_pstate_sm (fn->decl) != AARCH64_FL_SM_OFF + return (aarch64_fndecl_pstate_sm (fn->decl) != AARCH64_ISA_MODE_SM_OFF || cfun->machine->call_switches_pstate_sm); }