From patchwork Wed Jul 24 15:59:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Carlotti X-Patchwork-Id: 1964348 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=LqVyrPIC; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LqVyrPIC; 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 4WTdyw1VK3z1ybY for ; Thu, 25 Jul 2024 02:00:40 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6FA683861834 for ; Wed, 24 Jul 2024 16:00:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060a.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::60a]) by sourceware.org (Postfix) with ESMTPS id CB3053858CDB for ; Wed, 24 Jul 2024 16:00:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB3053858CDB 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 CB3053858CDB Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2612::60a ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1721836806; cv=pass; b=ouJylEXZ/+6DRqiQhrrHrl7vm62rdfkoziwbktP/0EfA4hkrAtiG8jz9ki1cc0+OuhuGeL7Q3uHZ4o0U/Jq1DSuPEN71+giizzqin49GIaDzqguYrtOG7GIOA8y0M7H8mmNR5QiIuL6Zf8i0JIWSw5x5aPKYlr8FIo88QeO40oI= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1721836806; c=relaxed/simple; bh=mW6l6Sb8nzX+cJ4wA+YGheUSswpj6qPscOBOGxjOpZ4=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=gHTAaswuaIwllJeuFWTXAazrG7cmU2Wwa9iZke9ncFWr7JxmYN1kQN8zc2Vj+WOyP9swOkY27v4oy5wq4k4HRzr8vR85UPzWSRONkVmVjo6jNN6Jm1bs0WqhQcjqfs4FfZJbg5jqmP83YBQL5EEgYzO0tGVups1cow2Rm5zvsYo= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=S05d3MjFlOF3cGEEeWiqSCmrdPPUzXJXhAM4jhH7V3I5wtxCghsvUULwLlxtf3dGRjQOMir/hT6GLI6+TAmGF2xv9hPiu6I5NV5UgD9TunQ7X16PVnNuuOWI9x/bxK0r/fH24wuRSXrKYgByzzaNyF5IDWcFqS+DeWChU7GntwKDb+7JjYSGtuwiwdfxRFGTFOvl6sK0PeDkKtDXoioA/R/eWPAqYdu12185G3VW5QKhlUr/CUmnJjHOrlUyVZRJeEC5DSqpExOukRQGS3MK/P/UQjTrXnFak2g9e8+flUSgEHhLDCG93TFWLbooI4mXBGXwA3+0x7m7yAaCzo46/g== 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=n5+dLjFSw2r7B4nlpIY9hpYHT2ZG23pBT4Yr1TMjCgM=; b=yrxEhCvK97ICpWzFoK/usnBaEaeZvMJH5CsgVuTgHJyGfLuE3CsGoZCtIfgiuoN+Umg3E9WClRCjxhfhjQBOLmjVxdsz4vja6nr5FACLfqxnpQkRh80Jje4/JeQsLsg/BmvMrGNLJBeXPuWeannQEOeTdmtLl7U0U8zzxFCglT5/m7HQ67G4fwY39FMyhD4fcZGcbtgB1FNgoEJ6FisFs4lHg63hVV/SUaz5fYCBI/C73NPHuzH8iUWStkC/E8myiVijPrp3lEcGA8YW7wlK2RGnFnjRAcghBBkeAiXeUTaptkVaopaD/FGRjr0WvWNvm4KrINKuDwCE/Vjrs5Amtw== 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=n5+dLjFSw2r7B4nlpIY9hpYHT2ZG23pBT4Yr1TMjCgM=; b=LqVyrPIC9HWG9YJxFUy8sV6PS+fEsVLQwE4SgMvaL/L6TAoqiKKsaEKzTHuUA2jRPpZWG9GWys2Xhvn8hvc5fVpiHqca5lkriL4wSj+5Lhayoy84sUhsOXi3YcFsYI1BDgNTRJ17+Sg1pxhfEmjDGkcSxIgJGe8plN7oJXhmI6Y= Received: from DUZPR01CA0252.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::22) by DB5PR08MB10113.eurprd08.prod.outlook.com (2603:10a6:10:4a6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.34; Wed, 24 Jul 2024 15:59:58 +0000 Received: from DU2PEPF0001E9C3.eurprd03.prod.outlook.com (2603:10a6:10:4b5:cafe::68) by DUZPR01CA0252.outlook.office365.com (2603:10a6:10:4b5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.18 via Frontend Transport; Wed, 24 Jul 2024 15:59:58 +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 DU2PEPF0001E9C3.mail.protection.outlook.com (10.167.8.72) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7784.11 via Frontend Transport; Wed, 24 Jul 2024 15:59:58 +0000 Received: ("Tessian outbound 93748f77c01b:v365"); Wed, 24 Jul 2024 15:59:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 11fc46970f71a5f5 X-CR-MTA-TID: 64aa7808 Received: from L3775fc91dc4e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D7049B25-CB02-4B9D-A266-6C7911DC40C4.1; Wed, 24 Jul 2024 15:59:51 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L3775fc91dc4e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Jul 2024 15:59:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UAAFRYI9e2W8zVldoyst+S00V4rNdHXpQQfG7YTOU5VhLE0F6l0qTClJ2bD3YW+a+Tl5t0WfBaO60ncgNLiJqG4i2jGjLbcfZzyVZWOflrjcP5pXFUeg9Ar8Au10PdLaRC0St7qs3ty4O8zT+XW2GhuTwoDfg0DbTTHOo4d5UA/agdmRxbax8VlFomZ0M5dfu6aBMOJVP3qaa3e9Y1It6eGdPIIcuRlKW9ZBCINlaXh6+31QuaVAxkj+oii3FDzMdXiUCH0NcnhIvkgbN5QlRAffnnJ/mohhhpcIOmaD88PcEcpyPTZJNTr3VleV9rxqeCIHb7qohMwyd2lJoj8tmw== 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=n5+dLjFSw2r7B4nlpIY9hpYHT2ZG23pBT4Yr1TMjCgM=; b=AH4XnToEfDJ4KswOUt78sFN8DShS8tkM+ft+EEukmZAWZF0L97F2chm9MzGwjfLTlHHhv8KKu1/HyJ5UtdXUILdXXpjStoOxjLqJCoMSDfYu2YPMxSMYDi4BXtCecUU0etEGLMZd3CdCgF3uUoxcLnC8AkodXYrMSVIW13bQrwp5fWOO60vL/qZce6pUD0g1/lnHFJOACBhSupcNwpc/42vZy/Q3/9bmBfmWRV5FWdDgrAc7DzGlCcHRj0cjmKXEvcOIzdaOmpdHoIxUlXndtU8SP8zVWvkrxtaIhePTRSxXyD29rtA5KxXqK9rf/PGwBHxWLQFyrZ4wU/mS0Gge/w== 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=n5+dLjFSw2r7B4nlpIY9hpYHT2ZG23pBT4Yr1TMjCgM=; b=LqVyrPIC9HWG9YJxFUy8sV6PS+fEsVLQwE4SgMvaL/L6TAoqiKKsaEKzTHuUA2jRPpZWG9GWys2Xhvn8hvc5fVpiHqca5lkriL4wSj+5Lhayoy84sUhsOXi3YcFsYI1BDgNTRJ17+Sg1pxhfEmjDGkcSxIgJGe8plN7oJXhmI6Y= 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 DB9PR08MB6588.eurprd08.prod.outlook.com (2603:10a6:10:25a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Wed, 24 Jul 2024 15:59:49 +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.7784.017; Wed, 24 Jul 2024 15:59:49 +0000 Date: Wed, 24 Jul 2024 16:59:46 +0100 From: Andrew Carlotti To: gcc-patches@gcc.gnu.org Subject: [committed 04/11] aarch64: Introduce aarch64_isa_mode type Message-ID: References: <262797c9-f27b-8dd0-02b2-ca15f8347d33@e124511.cambridge.arm.com> Content-Disposition: inline In-Reply-To: <262797c9-f27b-8dd0-02b2-ca15f8347d33@e124511.cambridge.arm.com> X-ClientProxiedBy: LO0P265CA0005.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:355::10) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|DB9PR08MB6588:EE_|DU2PEPF0001E9C3:EE_|DB5PR08MB10113:EE_ X-MS-Office365-Filtering-Correlation-Id: 749b5ff8-bcaf-4b25-4663-08dcabf9ab06 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|376014|1800799024; X-Microsoft-Antispam-Message-Info-Original: a1/tpmWCxg31TG2EZXXA4FR/O90ugr+GXsLKUzhKpxbk8DAs+pZtWn5OhziUXj2iHNDsZhJyKSmdh2SK7QyE4FFVQi51vaswqn4acZXbuI+5cz04b65Il/eCfQoQnVo0+PH0DmWZm+2Xfb/FRuHBcQ+ggME5naz3bk093eHA/5RD0o1lKtd68bxvoSZStwFCgSLpDgJ9hhT8PbV2RoLe558QHNUWhpwHGI1xUR3kmVNjiFTTjvd/aNfAKlp53XDvpSeI38jkU28sCUtZjRi8a6ZMG5RyyoL5c7MCBuq/y/G2nH2bC0O5VGWFrONR2gpAcLEFs5eJLBM1xDAyOg3rvgr5bDaDTEyu9cjehm/P2RtPvD/s4084BQ1eWXt/vJksTG5Ctp9cRYHAQyBL5hPAV76S5NfRd+/mjDKrdhwwcrwX9jOBrfPTPBOXEuEp1tFy+nFtQtIt392CzCyFVOt+1GD2jE5P2iRoZq/3wyX6Q5057py8M52b28vs8gZN9wZIALY/cxXf3fZ0cZrZSecoDKoIFkgCjwulepe3lGf21M57CFx2+5znCzu/ngiGXXjQGlvxFSAAto+kjsBv5zp54uAd/m1504iz+YXE2ORfzrWZwTA+3z3PVo2I5LCCC0Zh0kR9SYA6R33PhXq5U26rJKwqXIbG0T84Fl5L0vEoTricU1l0gIiW4YExYLxmcjbscofh+pkoar4hFOfnvgHB91SfSCDvBgDP6qj7PrjmG1Rl9maf/G179+JwzkH1MhmHY9XiZxzuNTK9VTTE3//MkYn7VaCtNHbw/Xj0HWMZpeIv7M73CgXJdor2eG+xA3JDASfO2WgUfXh0hwcbGbbyCZea4wZsoyp3IWsjRhskQMTkR/9DF1UBAjXO35szKIYIprKlJ9tZFrWSrJkEHQF386qm5DxRQvfJDhBG6C0i2qXcoEgxxuaQurGSxMWJq2yQaodptbGCmFAkLK27XUKwwFPuyNiguNOnepu6gaulsRVerG8gsyLbLK//zCtLEdstZ6Ij8kUjwk9FaRcLtD0aWgLuC8qdUdDFREKDg215pYEXn9Cv8/IuxVjjOZWfyfVLHXY482cutLew94KpTR8EhnftQRPNj//M7J6HcIPX05zi2ow0jQydfQBGUc05chxZbvBZlPOAaEeJq64PvPaMho/W6LwpP7inpYTG+A20iFeqkiEL+/oUC0NsgY1EQPIVZf6J5jzEIunDjc40JYDnAz0omj2Gj5srPizkkOX6PAI5c0BIa8v+wqA2VySd7333vERpP9TmIRrvljHM27akez1/9x00d77a/YYybcBcBuHmSuG6mJ6cz04iOzBEc0g3YFFmPfBzuNWGiKF4bWBPjg== 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)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6588 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-SkipListedInternetSender: ip=[2603:10a6:20b:398::8]; domain=AS8PR08MB6678.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF0001E9C3.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2077dfa0-6f0d-48ef-a0f6-08dcabf9a5da X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|35042699022|34020700016|82310400026|376014; X-Microsoft-Antispam-Message-Info: Z34dRgZ3bP/dZKSaeDLWk9/HRBC29gHasRyL+cAH7SGO4Jk6A+xSVGi4nqIJfhiRv29JT3/BWYea45P19Ci9bjzJEFHY4dUWe64S64saGjM/ti8Qs2MNgvoNM4TRmvJiQt30EIQJ9vG/ahbRUtMvhPSvVKMYcO0HG6XqByY1FoS5Kc+aSnHF9zUz1PPCuYN2/f9Kkm7WsrV77LJuYHBM247uJDaR3UBGFzh6Oe6wq/Zb1CwUBkHI4ST435tkqGyeORwGgVzqCsCCret3RhgcvRN6rvgPMvetPnQLmbBSUZqXkjkEyEQYduH0oZGWsZ7LiUmr+BmoXtjp93WSJodTn8sLm5CKYL/RlJycue1q1Rwm7Ib6BjjseYSEs6IOuDK3ObirJj0/22M+38d6asLigvUhXlnUQTBSxmOhXTtxTzLX8oCLS5tLjD2md97ybqLu6sihdC8fOLbFA3gY8Oq3OPoDt1ZMbBnxR16N9amuZ3BdORBFXfCdpIWczp75lQ6WsfxvQb9jbNUGj2m5Myf9xIGkq5PL4d1cRXKVWXR6Vf12UWuuRnzdgX/RcXzI5cr+O0T+7kCpAZ5YZzzXJiHJSaB4Dtwi1dSsJnq9e1jNvDDBsKXxi5cngwgkt/gRIKFhB3yqnr0p2TqMSrt1gjSQZm01zhZN7jvgUZBKutbP7WAV30RQ3rRd3vCcTmlskOq4NJKFr8Ovm+5G22a+o8q4HnuO9Kpj2DfIIeLTvdJPW+tFD2YLOXPt4OqmgXR2rZ43E0gURt//4lv47lfb2qgCQ/CyTIUHO9mHThmCqLZXKv/c+5racuN2XQw/NKU9fFpJ4V0S+/tO/nTP8ucpjeExIcvZyp57HsM10kSsfYpdeW7mYY3QZ6HNFN94RNVVQ1oVc7YkM/uCa1Ijm1dZ9cYe//3s1wAahHu6l5AjkDhUnHtRIaRJmAwhlfMtznXKQq7pU+ZeQBN4bzmnr6+e7G6crYjIrGR4zbrw9BEmW//vG5O8f3PsZBTEApZP0mIZt6b8HFXkriE2H/SBkz6+lToJleduHcKZo6weIBEzSUF4UOdfe1rVLYgRlw2GJZPU08c1/v1oKmW0S7kMHTMJCqKw+sHwbnbaXjrPyzDEyHBgEh55SFa1OyOARCLU8Dd0tabDuj0ERj1HnFKlSPoZYlamuJrfTVs/JaPhr2L9UGbWFHc3t4BZuySvB3YeBpl5hA0kBCnxAJmppbuyWRZH8g5JPFkUoSAbSak24GECGb5q+lKD3sZDMPqSCbx4xlN/39a7Xv9W37kQuDwLo7M7WVKHxFN1e2aZDu6MlmcNO0m7AWEKGQbc4GpLW9mTzszM73hmrQU8ntVVYfxLAn88gZcDVKOR37WjcjTFXClL3CWcXha0vp7Dr49K0kirOKDgJJu0kZblBRtdSHP1J6xzZzrLvFCQkZHgJPa/r27HsVcfE3z7fLA5oBLyRrURYxyqQPsM 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)(1800799024)(36860700013)(35042699022)(34020700016)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 15:59:58.4289 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 749b5ff8-bcaf-4b25-4663-08dcabf9ab06 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: DU2PEPF0001E9C3.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB10113 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, 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 4e3a4047ea80600d4c38f0359ba6962a15f77987..1b343c9ae1c7aef2a3fb3f28a3b2236ca270cfbd 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 - is measured relative to the SME vector length instead of the current - prevailing vector length. It is 0 otherwise. */ + 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: @@ -9878,7 +9877,7 @@ 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); + AARCH64_ISA_MODE); aarch64_sme_mode_switch_regs return_switch; if (sibcall) return_switch.add_call_args (sibcall); @@ -11159,7 +11158,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 +11175,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 +11231,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 +11386,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 +11412,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 +19097,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 +19119,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 +19134,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 +19203,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 +19245,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 +19324,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; } @@ -30050,11 +30052,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); @@ -30078,8 +30080,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 (); @@ -30174,7 +30176,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); }