From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2082.outbound.protection.outlook.com [40.107.14.82]) by sourceware.org (Postfix) with ESMTPS id 10D823858D28 for ; Mon, 4 Mar 2024 14:43:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10D823858D28 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 10D823858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.14.82 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709563417; cv=pass; b=B3xt4FV68z/enlp3A2rUKRMn0bfcU1EHuwSS7g3YZh+hcGzR97zGbTShHZmOQK+ekQbnSU8CEqMdX7B6jtk3xuAopf++db7jbzEkSM4/z/Isul/LgV4BiZRz2HY6aMxtmwEk459ZtcNacFWidN7Fhqd6Z3M8jJqUJgvVpwGiKs8= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709563417; c=relaxed/simple; bh=XDWjD2Aik/wSRJDmPbctOqiAUWWNUPdWBYhzQlht7Zw=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=nCV/+s61RmuPDb/gez8f2wsOPdRJp/ugkqIysJ5P20jwmfuGwAI2Knn4+a9ZL2uDR3zN0ilJudg3CeaVIKeOy3Dyb2WNjPMEBtI0zssJ+tU5RqKCaHwlqLuMK4OrP/9nrm/DHHIKCT1rUmx2zaJupaT6Rf14Sg1vYp5gpyVZGrI= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=NhBxvMlCWlnatXEjAje6b2hwDPfkiMfZhsiZYN410kdYw2BignKgLjRlHLHTBT3CMI9Rpm/hq03cwjY+qWWWHaK10FbeEzqiJCJCy8LmfdG6w9NcfxKQSDOZhpB/StekjB3aIFEzefjlvic455I+aBCnAxWEd/KockzOnDMDqUIqA8NcnjF+BN7v/pHCId6Nnm7imZTF+Eg11+0SgdeRNh1HX6RbsLAyTA7M+2wwAX742kFrfOlWvZrsOIbo4aYQPDUo2KaWlYNhWcRIVngRKVUdlrMq3rlvac8iF8RzCg3L1vSYcXnBcHnDZCjHZAD89S6OKIa+FTK7BdhRcj0PUg== 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=aWBxdqFUeZUkTnMpkb9zkXpGKtHttEd6q3Hw0mBjqyw=; b=hn7t/FY35gexfrz4OmQMTJQdjsvdPPyvYRiQ+zH5P3WSG/2+Uw2CGF9OwRAaUeJLVqg5yL1ARsyeyoo/GJOo9dwt+uti/x9ydzxnzj0iaO24wJac65BuhdRNnNccldoRnujFc74qzvdJZSQb001h6gJIju+BMLuiyMelhOtqxybYU2SVc031iLgeNh11oBDyvqLjd57HEA3YDMLbIWpBugC2af/NpPJZQbLlJX1RIhuWzKUTiA3DLRBO7WlTi4rmAooh45AyYWYjQFkTeU7Qdx1/tdv51nO13tXo4Zj5Ldplk2uDD//cXxKvP5K4JYizWBfIllPCmv456OkBvOVG2w== 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=aWBxdqFUeZUkTnMpkb9zkXpGKtHttEd6q3Hw0mBjqyw=; b=zd5w4EPwTZvYUcNhJZ+oNU+kq1I8Zg8z/pvJQvXRrGEZiEMJzBngFAA2GYf0A1zlkKpQ0xYPV6C7OPFp7xGDGXckveHG4wX7EHggguyzNnhinGOt4N6F8MXXE5+7UMCCGaJjdW87wgzYzgBJQTXeZl7xNBBsgVaYIhgJnSG5Aw0= Received: from DUZPR01CA0033.eurprd01.prod.exchangelabs.com (2603:10a6:10:468::8) by AM8PR08MB5716.eurprd08.prod.outlook.com (2603:10a6:20b:1d5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Mon, 4 Mar 2024 14:43:29 +0000 Received: from DB5PEPF00014B89.eurprd02.prod.outlook.com (2603:10a6:10:468:cafe::2e) by DUZPR01CA0033.outlook.office365.com (2603:10a6:10:468::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38 via Frontend Transport; Mon, 4 Mar 2024 14:43:29 +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 DB5PEPF00014B89.mail.protection.outlook.com (10.167.8.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Mon, 4 Mar 2024 14:43:29 +0000 Received: ("Tessian outbound 3b68a75ac28e:v276"); Mon, 04 Mar 2024 14:43:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b51a2b0510f26de2 X-CR-MTA-TID: 64aa7808 Received: from e279d31c3ff4.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C2775D75-CE82-40B0-89CF-64CD0985F64B.1; Mon, 04 Mar 2024 14:43:17 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e279d31c3ff4.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 04 Mar 2024 14:43:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GthjH3KQIpGxO+Lf+1frdeDjz6pO8uPtskQkZRyN8JnpEJwzc2+Ag5IJ8IXZTlD+DI6Peg22oBB+PFjXWaDktAcuUYThod/D9ZKchNZhx3b8yjiP/l8XaagLBubwL5drahO+HRLK+Fekjtjuku2mPlNIxYiFPT8wnpLY2UNzzsl3CRnw6EZk/9f+OpXkJXM0J05m+UCY1Tiqo8yb9DRV0qJNc1dx1bQPtG/p+h3UCoAITuKfu5n3gtEcvlf3oODYmXndFQvFkb3DYFc6o9I4OHFJGct060BFazjm8etr9Ew5vqAJJrodPIGhsTjV5EUTA615J0VJG6GSmRnJsSF3AQ== 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=aWBxdqFUeZUkTnMpkb9zkXpGKtHttEd6q3Hw0mBjqyw=; b=f9XxYKz4f9keUhlm3wYOvlHf/3OWkUQWG1rJlsAi9ZAQorTi7S16lzmoOv839xFPyOMwdmVxOtrszEvaRBTXzmgbb/a24t1PURSIlpzfVm1NxE0QbFX/dAoosLK+93qtoTIQvsfH1WoKUDRhhgXsrabINpdbSBl6eZ4CQ0T1t0tGWOsu9A2wF0A6iBRv/wWvAioczLWy2j1q26fxfoClPwNCuXZR3dinpaduS0z5SA+w2Z74A1w1uMsSkz6eeY63ulw5y8i2Ot0ltFjdGVcV1NJVR24WQa7fBderIdcbsgeLbISFBIiO4qYnhN15vGmOU1/nlpYFAAlAdEwER6NF3A== 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=aWBxdqFUeZUkTnMpkb9zkXpGKtHttEd6q3Hw0mBjqyw=; b=zd5w4EPwTZvYUcNhJZ+oNU+kq1I8Zg8z/pvJQvXRrGEZiEMJzBngFAA2GYf0A1zlkKpQ0xYPV6C7OPFp7xGDGXckveHG4wX7EHggguyzNnhinGOt4N6F8MXXE5+7UMCCGaJjdW87wgzYzgBJQTXeZl7xNBBsgVaYIhgJnSG5Aw0= 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 DU0PR08MB9936.eurprd08.prod.outlook.com (2603:10a6:10:400::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Mon, 4 Mar 2024 14:43:14 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::1fe3:601e:cf90:c88c]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::1fe3:601e:cf90:c88c%3]) with mapi id 15.20.7339.035; Mon, 4 Mar 2024 14:43:14 +0000 Date: Mon, 4 Mar 2024 14:43:11 +0000 From: Andrew Carlotti To: Matthieu Longo Cc: binutils@sourceware.org, Richard Earnshaw , Nick Clifton Subject: Re: [PATCH v1 4/4] aarch64: testsuite: share test utils macros and use them Message-ID: <9070737f-e2fa-e9c7-fba2-951d53287204@e124511.cambridge.arm.com> References: <20240227105917.295899-1-matthieu.longo@arm.com> <20240227105917.295899-5-matthieu.longo@arm.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO2P265CA0370.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a3::22) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|DU0PR08MB9936:EE_|DB5PEPF00014B89:EE_|AM8PR08MB5716:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a1a717c-cbd8-4973-9fc0-08dc3c5974f5 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: Ktafov5DvrD4cM5WmxA1SosEHu6Tocl5XUJAQDBS1doiWR/RMOOdrJPZoG/bGpT7WCXyUQR09yIK/STu4G6ikxmHuy/IbmkKz3ricXMctblHxJIv9Me8FqNNg7GC5pg50Odqx8sieYY2P6V+/4SJ9EtrerVYRJcg3Z0hJ5AmcbQUcyszd4xbcfLOP9NH6b+bWDOjHIJipwmVYTR2PH+TWx5FALlFzrZr4kmt1gauN0wkvx99y1gIp5n+R3JOAuqOSMz9IbtbKlF7pVzJ9rfQDXiXwbjiOguci1iDU31jXwbLI2Xi2/SkSsV9+5dU/9ZYTxGZT0QkX66NKAT+ACAijJz3OfB5xP/Per0RkwtoTP8hZqBsfOx0/7tMfwLHAeNliq/XdFzBlTL4uBlBw51vaIQFCp38hV/yis5nabqoc+CWhIJ+d8s/2DQ7TFZ5HPnK7oaUSLl4Gfv+Vm32fHkHPLJvnkui96z/VsG113EyEi7QTDyxV79Bm5iztVLO8KEmcyd6ULS0rwsfQog6QWHbfEJPMBoOH3qQOyJtu8pPV9r2xrxbB/afR+SteuOCJSfkEYvEiyJ6TrFFNz0c3hcsewEYyfa+kRyuaxwF4q0uUrcn+bJ8/+6DhoNIAZXpdaVCDTYWCFbKARe/0qBSGc1IwC7YF0Xlm+74Kmst4rlyfQs= 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:(13230031)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9936 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: DB5PEPF00014B89.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ec9f19cf-bf69-4f4b-c733-08dc3c596c32 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DMxoI06MeuHPzrgFZ8J/f1PWIv3r8oFuLYDuAqsem/TxmsPioLlT4PlYmaVZGxfX59H0EhRN99KSu3fJDx87tRwuaYbNp+El+95zJmFHgNYsQ8H3lnmrqhqaTAE2zizFtlg9tlqKXNHOOSzllmHKGXJ0ym2QEsAOUdfu+QGfOEWAfkjVFf/mcotX9M58NLoaEt7M6TmO6RHyGLDdwI2/fzZlRoV2WKhOkrZ0k8sED+PgSXbD6c3hWETWLZXOIhDXacqQX48DNHZA6N4v3WQmaJgDYcAg04XgqVPBmOEIpuTkOamxfPmHhws8Yv5Qw/LYfXw60doUM1YJYnnBA/RJR8982/jf9LgZaXdJzgjQUiOMLfatlIUyL0KJdcznacdDh5ASvrALZ8fT3GJMSpr6gfyyeS1VNmvmQZKnt1nSU9jeni8f6Z0e92Kx9RKA/O2njo4Wcwafpikw8MT4sACW1owXPDfcKIFPHhDnWzyx3MZ8jGNTQfRW6d6AcHcLWKW1H6I565/0RQRrgFgxHmhGuJHNfi78a0y3fJ3O/ooxs71FhyzgkJ2u0loh6FGHBQ6g5gj+I1AH9z3Ot5bYwiW4FfgHIA6+khsgxXc/iJPnW8nVwQozN0JlObY0YV4Aj2bcuQPp/HlGrosFhVd1fVwQ2pRGNEWDmo+lLwLEMF/zT5hVAPMeDIn8AaHdf3f5WwaHkjHDwcXtACi6EdmbIeKBM08JNtBt01bp1d4Mz/kBXjKXwP0c/fiqYXqUV1RRKu22 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)(376005)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 14:43:29.1621 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0a1a717c-cbd8-4973-9fc0-08dc3c5974f5 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: DB5PEPF00014B89.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5716 X-Spam-Status: No, score=-12.2 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: On Fri, Mar 01, 2024 at 10:10:45AM +0000, Matthieu Longo wrote: > 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. My point is more about it being more difficult (in my opinion) to compare the input and output when one of them uses macros, regardless of any increase or decrease in codesize. > (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. Indeed - this is just my preference at the moment, and I don't think it should prevent this patch being merged (particularly since you're just homogenizing existing macro usage). Plenty of other people have used the macros before you, and must therefore have considered them to be beneficial. > (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.