From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2087.outbound.protection.outlook.com [40.107.6.87]) by sourceware.org (Postfix) with ESMTPS id 5208F3858C31 for ; Fri, 1 Mar 2024 10:10:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5208F3858C31 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 5208F3858C31 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.6.87 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709287873; cv=pass; b=dgvbKqc5TTzcEiZDFqX/8LTVKvwt4zeK/iO4ZnP8yxQIs0ZRYsH0lf9cnWZiZ0ni32t5+0Zs2vC0VQy6eMeDcjIg9l4O+M+fYyk/5yYqYN6VlG+NTYrDxD/98CcztLePCqXpGwP7E+2dO6OU5ybG5i2VQNXk3nMyswwvkIQU6FE= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709287873; c=relaxed/simple; bh=kw5Uj01F37ArbMgrHlJc4VlKInMKJ02aIcJZ4V3/2fg=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=VYwhsHy2XAqaHAxjIpUKz87zBQCcVd5A+LVfdaY5wVbw7uMStSXfafijrNiOa3hZ4n1/fdJZOa5Xh+Y850ovJVe00Rx3GKRp5CZ5U0UTLKorwDyBcQRCJdJWjow8V7tMrpfdtkS21ui1o8I31ssABCeXhGV2Znm8cw+3hW7GXa0= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=jU2T2NULKHKGGcIJ5S5GkpOvvkwvZ9P3v+7Wdpj2+Vz0mGz5T304u5q03Y+7fK12bnTPZs+V/lYiHcsjaMkD7csfrcmqlbrAffjPlEj70cMUUqSy5qOBshe+RRBpMbn4N8THiH35DDdmHObx2YJsZWeKHDCL2LQ31lignv7F9H5G96sW5bX/9IuJPJuHl5MV7XTc+MZZmDd7MKHfgzGTnk5GDPpk41RKPjanINXYa6rRVgry2rM+dsRY75ubA4+/XTTxTccGK2j+Hu0IiFSZ89sPr10wyfslnXgGhiCd0CO/L6lPi5WWc/Na+IZpMQXR98DT3CvwEvCSQNZhDKzCLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=OfEu+cyZpzwF+ggxFD4c/PiuGazgb7SVBt8WnDdDEAE=; b=kINl4ZkmhaNbUpNJ2e4NZ0l8EkJlaCjJdzlOce2sQD9sck4BDwsX7fVrF38IQMHhpAd8saJH0gtNoP9xXxCRnEqqP9gIIid99IR3deHRrwJrjVQfGod6jj8GRlVjGZ/yfXAFUQ/48FmZ//CPyVo0j9mUYwuAAJtnBcKKJWXFV0sVT+wKpy7/Qk7L9q1TGa+MQjejs6wSdbaveaGW1YBQK3HASM+PJl/1xJhXZhAzvdDDWeKZK1O32diWwgXXeE7cYEA4qMDaDZIPXzHBFNf7cAHQ5zI3/ASKZGDuij08LsfciJ2OktoAWSfY6+DHrt+Jzq72VRM7hEXd/cenDSE5qA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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=armh.onmicrosoft.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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OfEu+cyZpzwF+ggxFD4c/PiuGazgb7SVBt8WnDdDEAE=; b=xKXYqJgDzy62pkS2WgWfjo3Ug/P/1X27N5WejUYYK9fxu8lkbBiZgeC/9nN7w3Qu0FstD7QtW7dpqu4Bf9DEHiYHfHSL/MOd5AUdqC2oBq6l6UDm6hMaeZD7ZUFM0CLXiYjaZ8OTY6fZ6vJZX87k6MayPlkQzJRr5KWngPm3S1Y= Received: from DUZPR01CA0046.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::14) by AS8PR08MB8736.eurprd08.prod.outlook.com (2603:10a6:20b:562::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Fri, 1 Mar 2024 10:10:56 +0000 Received: from DB1PEPF00050A01.eurprd03.prod.outlook.com (2603:10a6:10:469:cafe::d8) by DUZPR01CA0046.outlook.office365.com (2603:10a6:10:469::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.49 via Frontend Transport; Fri, 1 Mar 2024 10:10:56 +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=armh.onmicrosoft.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 DB1PEPF00050A01.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Fri, 1 Mar 2024 10:10:56 +0000 Received: ("Tessian outbound c21fe6ca13cc:v228"); Fri, 01 Mar 2024 10:10:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1579c8d947a42b94 X-CR-MTA-TID: 64aa7808 Received: from 121ce705a260.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 51CA112B-2FAC-4269-81CD-CED7E2261613.1; Fri, 01 Mar 2024 10:10:49 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 121ce705a260.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 01 Mar 2024 10:10:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EQ0Q19dTbLRewA8tutwjwBiHaT01XCWinzyl743wjvGK00nWkS4hPHov+X+vqNN+/Jlepj/RDivblnygwZF/RWsF5WhH3f5XJacUoI8+fjdJ2Op4AcljlBnHESsnTugzBFHM0fTqg1kfXNvaXjrJNIrIeJQclDkhrXq1HLZRjgFbbVErhkrgJjqIqet9hK5A/17qN3i6Xx2I5mOgNZ/eI/b3KgCcT+uby1HIZm3K6/LlXF1CwrJdEfVFKn9zlHFXSosuJhSNBOCCyIP88533TI4j3WrjLxkmfYTz232oJsUUumpv59LQCZufe6uRLkPpVjTQD6gjViE8QroA3n2FpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=OfEu+cyZpzwF+ggxFD4c/PiuGazgb7SVBt8WnDdDEAE=; b=mUGwyCYqUheoD2sHYGLA/4wDyXuTI9MG+Vpesgni3mQI2IEZvgxcBvjS8APk3IVv2/PwPaRdmpsjlSriJcIMo7g3yuPbf17vCj+8P7iMS7DanCLtURN2wIzAz3LB/8mJLRIB3i37oJAnyIbWwhbunOyYZqGYWbjc/lXuPeVUSukdccgXfbOLiGLrgbwhJTk9XpmgiH8OKT4Al2FuEez5I6TFEIpNZadjfowRQNIc591IEs+0kPCPyv6NPFS3OozPe7w4aGS9SMxH05SS3IRJwYwbe+5PNZL+uWDBAghChpOC6Cs+PEwthP0WR+1k662sr4a06VE9dyOJnXrpxqcj8w== 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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OfEu+cyZpzwF+ggxFD4c/PiuGazgb7SVBt8WnDdDEAE=; b=xKXYqJgDzy62pkS2WgWfjo3Ug/P/1X27N5WejUYYK9fxu8lkbBiZgeC/9nN7w3Qu0FstD7QtW7dpqu4Bf9DEHiYHfHSL/MOd5AUdqC2oBq6l6UDm6hMaeZD7ZUFM0CLXiYjaZ8OTY6fZ6vJZX87k6MayPlkQzJRr5KWngPm3S1Y= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AM0PR08MB4227.eurprd08.prod.outlook.com (2603:10a6:208:13d::14) by AM7PR08MB5398.eurprd08.prod.outlook.com (2603:10a6:20b:103::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Fri, 1 Mar 2024 10:10:47 +0000 Received: from AM0PR08MB4227.eurprd08.prod.outlook.com ([fe80::19e8:d6af:16ee:de1e]) by AM0PR08MB4227.eurprd08.prod.outlook.com ([fe80::19e8:d6af:16ee:de1e%4]) with mapi id 15.20.7316.039; Fri, 1 Mar 2024 10:10:47 +0000 Message-ID: Date: Fri, 1 Mar 2024 10:10:45 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 4/4] aarch64: testsuite: share test utils macros and use them Content-Language: en-US To: Andrew Carlotti Cc: binutils@sourceware.org, Richard Earnshaw , Nick Clifton References: <20240227105917.295899-1-matthieu.longo@arm.com> <20240227105917.295899-5-matthieu.longo@arm.com> From: Matthieu Longo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0327.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a4::27) To AM0PR08MB4227.eurprd08.prod.outlook.com (2603:10a6:208:13d::14) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AM0PR08MB4227:EE_|AM7PR08MB5398:EE_|DB1PEPF00050A01:EE_|AS8PR08MB8736:EE_ X-MS-Office365-Filtering-Correlation-Id: 61b42ab1-7be3-48ba-d101-08dc39d7e2d3 X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wGLMC92nIdLLl4KUkZVcP134Kd1NMc6Q8OIT10zyFhsl6pL9XW2caFjTVwiDRej5TwNAO2D4jNtoTKbqf0LMWsMCFknLYLxZalHHSj+MIeUhPpBfzt0BEQWh0h1IkwADj1/SQkRlosxUEo6Z0GOnNMhJeg/NagKcCS2FtjcEhLa1oceQ77GyYdufO8k0RDNIPcPaS9uQfUZ1acwdB+nH4HXFQDKVmDiGD1BUenoA27L6K3+T/KSGQs19kdM1GB7IPxF9A92+FhnWCMf+oD4leph++KvEFVoN+Rt9Oho61BivwMins4VuRKtJI2FaKr2F7R5Qzdm4/1dplDHHoHsbU0wKRCgnhTOCp8JDAIWiQ+M9VoJ1C9iZIYbMBZHPSGAeFMawglkHThX561RizD1WQikMWNwnvLYypNXYwixe7yYcwTAfXOIfAPVMnaI+dNysKMWFYhFtocoCDCJfrvzAUFFE2pptYtnR0Y4UEJYN9kzRp2WdCv4qEaPt9+GngLa70hbZuHgOI6zKYLtnj84pyE2fhyLwiVJr9z7es6c2tdZq9H4RYy9fBRDr68w9dO6bxNaDQX16jk3NzpX+fCpmOlG1bPH2tUKkK4sAica2oNMgNUP30E3r+eKotIuLtrgQtqQ1orNjW16gKNaenzuCoQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR08MB4227.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5398 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: DB1PEPF00050A01.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e87ec398-7611-4a67-0d3b-08dc39d7dd4e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g26mbSNnFw+z+B7PyQ8C64lYW8ewWBJrb01XwiOFvjgvClGp4McVaUmJxVPvkZ7QQ+b6nFD+l/fUeQv/BXf0ZrUSdYsSmQrGtXOQOJuCPD1KUKx6wfJDq5yvaZrmQN4f7ZPGecvAi/VXDrZmDYZhouSbSlIdkNDZ0RJaFoIUPbshWc06wMy+EYLkkE3u7ZdI6sBCmpAB6q4Nuan0gt/XKxQXpxbfC3jL61ufJNONf866rLIwLDuT7J3Dz+5G3tVgypq6uQy1I1fS7FT3dHGtIqNqFrkxo7q6dm5AVw0gbxRL6mbACAMjWwtKwLeW/irBCJTHYA4l2U8o/Ukapys32DP2ewZNjhpGsy8Fu8X/AQTFb1IbSNkt8Gj/2pJLXbdBBlKz02G1Uhh/cA7HxI62HGbIOyvGc705eJkyx05Dm5fcBg8OwpjDOAvaU8ju9zYtXIWUn9eJp+gBMR1MTb73DfzpEPQOcF6f1gjL6NZYcpFiS0h5g3cZMa7RHYvQ2qbAofw4mw/xRxyMKa7qeB+e0tSb8thylw2clC4ce9nZBq+5usWUW8RQr1V4d4F0geO76U0R1aISHyw1mAE9JPnh2qEwZlnKqfZwU02Xtwf1L52NvFtOIVvd0yi+96mmLHAVhmNdPsYX101Ag5twBAQxqv3uiVAyrIj28GnSt2Ba865+3VFySybFNoBJgGCa9IZC1b3PAfgO5ZtfDeor6zTEe3EavIq0DnRuKzTqxmCzoHMokXhcYFIcelDAxmkzrgKK 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:(13230031)(82310400014)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2024 10:10:56.6052 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61b42ab1-7be3-48ba-d101-08dc39d7e2d3 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: DB1PEPF00050A01.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8736 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,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 List-Id: Just to make sure I understood you well, your main concern is about the difficulty of verifying the test cases caused by the proposed changes. Those difficulties can be summarized by the two following points: 1. Using macros which hide the instructions is not to be encouraged if there's little or no reduction in the size of the assembly file. 2. The macro adds lots of macro invocation messages to the error check files. (1) The file you took as an example (gas/testsuite/gas/aarch64/sysreg/armv8_9-a-sysregs.s) by the way is one of the files that I didn't change to remove r=1 w=1 which are the default values, and also that are still using a different register (x3) from the default (x0). That's why it looks so verbose, and sometimes worse than the original. In the proposed patch, the expansion of the helper macros always generates the same sequence of instructions: msr[r] and mr[r]s, and always in the same order. I agree that the usage of macros might add some complexity in others cases outside of the system registers tests. However, here it makes things better in my experience. The issues that I was trying to address here were: - Making things more explicit: w=1, r=0 is clear, the instruction name is more cryptic than rw_sys_reg, and I often need to check the doc. Even after several times, I am still confused which one is the read instruction, and which one is the write one. - Enforcing the order of emitted instructions (write before read) so that the reading of the generated assembly is easier (=more mechanical). - Uniformizing the macros across the different files. People have been reimplementing the same macros again and again, each time in a slightly different way. I am not aware of the reason behind their choice, but from the naming, I would guess that readability was their goal. Please, note that I didn't change every file, but only set up the boilerplates with some examples so that people starts using those macros. If you have a look at others assembly files that were changed, do you still feel that the macros are not helping for readability ? Your concern is fair. I am interested in feedback of others reviewers. (2) Regarding the macro invocation messages when checking for errors, I agree that they are very bothering. I actually prepared a patch to a new command line option --no-info (similar to --no-warn) which allows to disable such annoying messages. I plan to publish it later, but I expect it to be a bit controversial as it adds a new command line options to the CLI interface. Consequently, I preferred not to make my changes dependent on it. On 2024-02-27 16:31, Andrew Carlotti wrote: > On Tue, Feb 27, 2024 at 10:59:17AM +0000, Matthieu Longo wrote: >> >> This patch rewrites assembly tests to use utils macros declared in >> sysreg-test-utils.inc. Some tests were adapted to use the new macro >> rw_sys_reg. >> --- >> .../aarch64/sysreg/armv8_9-a-sysregs-bad.d | 2 +- >> .../aarch64/sysreg/armv8_9-a-sysregs-bad.l | 90 ++++- >> .../gas/aarch64/sysreg/armv8_9-a-sysregs.d | 3 +- >> .../gas/aarch64/sysreg/armv8_9-a-sysregs.s | 139 +++---- >> .../gas/aarch64/sysreg/illegal-sysreg-3.d | 2 +- >> .../gas/aarch64/sysreg/illegal-sysreg-4.d | 2 +- >> gas/testsuite/gas/aarch64/sysreg/sysreg-1.d | 2 + >> gas/testsuite/gas/aarch64/sysreg/sysreg-1.s | 223 ++++++------ >> gas/testsuite/gas/aarch64/sysreg/sysreg-2.d | 3 +- >> gas/testsuite/gas/aarch64/sysreg/sysreg-2.s | 47 ++- >> gas/testsuite/gas/aarch64/sysreg/sysreg-3.d | 3 +- >> gas/testsuite/gas/aarch64/sysreg/sysreg-3.s | 25 +- >> gas/testsuite/gas/aarch64/sysreg/sysreg-6.d | 2 + >> gas/testsuite/gas/aarch64/sysreg/sysreg-6.s | 7 +- >> gas/testsuite/gas/aarch64/sysreg/sysreg-7.d | 2 + >> gas/testsuite/gas/aarch64/sysreg/sysreg-7.s | 32 +- >> gas/testsuite/gas/aarch64/sysreg/sysreg-8.d | 2 + >> gas/testsuite/gas/aarch64/sysreg/sysreg-8.s | 339 +++++++++--------- >> .../gas/aarch64/sysreg/sysreg-test-utils.inc | 32 ++ >> gas/testsuite/gas/aarch64/sysreg/sysreg.d | 6 +- >> gas/testsuite/gas/aarch64/sysreg/sysreg.s | 63 ++-- >> gas/testsuite/gas/aarch64/sysreg/sysreg128.d | 42 +-- >> gas/testsuite/gas/aarch64/sysreg/sysreg128.s | 27 +- >> 23 files changed, 576 insertions(+), 519 deletions(-) >> create mode 100644 gas/testsuite/gas/aarch64/sysreg/sysreg-test-utils.inc >> > ... >> diff --git a/gas/testsuite/gas/aarch64/sysreg/armv8_9-a-sysregs.s b/gas/testsuite/gas/aarch64/sysreg/armv8_9-a-sysregs.s >> index bf9019c9ac8..318d8bb9097 100644 >> --- a/gas/testsuite/gas/aarch64/sysreg/armv8_9-a-sysregs.s >> +++ b/gas/testsuite/gas/aarch64/sysreg/armv8_9-a-sysregs.s >> @@ -1,32 +1,23 @@ >> - msr PMSDSFR_EL1, x3 >> - mrs x3, PMSDSFR_EL1 >> + .include "sysreg-test-utils.inc" >> + >> +.text >> + rw_sys_reg sys_reg=PMSDSFR_EL1 xreg=x3 r=1 w=1 >> >> mrs x0, ERXGSR_EL1 >> >> - msr SCTLR2_EL1, x3 >> - mrs x3, SCTLR2_EL1 >> - msr SCTLR2_EL12, x3 >> - mrs x3, SCTLR2_EL12 >> - msr SCTLR2_EL2, x3 >> - mrs x3, SCTLR2_EL2 >> - msr SCTLR2_EL3, x3 >> - mrs x3, SCTLR2_EL3 >> - >> - msr HDFGRTR2_EL2, x3 >> - mrs x3, HDFGRTR2_EL2 >> - msr HDFGWTR2_EL2, x3 >> - mrs x3, HDFGWTR2_EL2 >> - msr HFGRTR2_EL2, x3 >> - mrs x3, HFGRTR2_EL2 >> - msr HFGWTR2_EL2, x3 >> - mrs x3, HFGWTR2_EL2 >> - >> - msr PFAR_EL1, x0 >> - mrs x0, PFAR_EL1 >> - msr PFAR_EL2, x0 >> - mrs x0, PFAR_EL2 >> - msr PFAR_EL12, x0 >> - mrs x0, PFAR_EL12 >> + rw_sys_reg sys_reg=SCTLR2_EL1 xreg=x3 r=1 w=1 >> + rw_sys_reg sys_reg=SCTLR2_EL12 xreg=x3 r=1 w=1 >> + rw_sys_reg sys_reg=SCTLR2_EL2 xreg=x3 r=1 w=1 >> + rw_sys_reg sys_reg=SCTLR2_EL3 xreg=x3 r=1 w=1 >> + >> + rw_sys_reg sys_reg=HDFGRTR2_EL2 xreg=x3 r=1 w=1 >> + rw_sys_reg sys_reg=HDFGWTR2_EL2 xreg=x3 r=1 w=1 >> + rw_sys_reg sys_reg=HFGRTR2_EL2 xreg=x3 r=1 w=1 >> + rw_sys_reg sys_reg=HFGWTR2_EL2 xreg=x3 r=1 w=1 >> + >> + rw_sys_reg sys_reg=PFAR_EL1 xreg=x0 r=1 w=1 >> + rw_sys_reg sys_reg=PFAR_EL2 xreg=x0 r=1 w=1 >> + rw_sys_reg sys_reg=PFAR_EL12 xreg=x0 r=1 w=1 > > This may be just my preference, and I know you're just extending existing > practice here, but I'm not keen on hiding the actual instructions away behind > macros (especially if there's little or no reduction in the size of the > assembly file). I think it makes it harder to check that the input assembly > matches the output assembly, and I've seen several cases recently where such > discrepancies were missed. It also adds lots of macro invocation messages to > the error check files. > > In the case of a large multidimensional cross-product of operand values it > might make more sense to use macros, but in that case you'd still need to check > and include the full assembly contents in the .d file. You can probably get > equally effective test coverage in most cases by just checking each dimension > separately anyway.