From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30062.outbound.protection.outlook.com [40.107.3.62]) by sourceware.org (Postfix) with ESMTPS id 16DFC385AE4F for ; Wed, 29 Jun 2022 11:12:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16DFC385AE4F ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gleeJQpmdZFmAJf17qkQW1Cdbdq4uTRw3eky3CDdnecXZUZv4/tW8LstWoEZgh7oNcm05aNPA4+cCipjFH03MqBd6Liid1RA1KQJrKX7HVji+UHdQytk5bIw64s/udNR1wUyLuarbSiVPIU9JsGD6XCkw63xubLLZ3AkGQnntkwvIoIGa5KN42o9O2VzGWm/G7cAQPyGXHkBuuwpAZvIYSBceO00lQaqjA5BubhrQ2UPhfC/SrmdTv5hzFigtebFr2g0GsGAN4cSS3EF2YiiSK8mkg3D0ZgWoIs/0q5cgzHPqPAwCJcjCKN7zgt5Pt6SzULMgUFFNwFgXpj0mzq9RA== 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=WAPGr5ZBWIEKcfe+YZLYtrqJ2NHp+qMoIwlHMIRrrvU=; b=OniR50QkIQ8vkt0vIdf4EeP6sj84tgGNUhZ6ILtRMaM9a0e4pPu3Vh2n+CNsZyaVRQJW8R68yIPqWhMaiLf5kImur6bzzOOy0CAHN01gSSsNLZhskHr3cnpbLSavZXtEtpOTfHBqQ7H/SeR0rBQmb9HsKINLaun+7ipQRZB9Gc8c1OJTvGkzAWY+4M9zhsFqQebPVMPv7dl4cjlt6p+7QH5tx4LJBjnAqAY1eBEDeGzM0SGgWgmhy6h24Ub9SAaKjUSAsFyoJAItDQUs1hrt9wEpxMRDqmAfe34QOak4tTyxwyfTV1hM2OIgvEe2dGB6FtDCh/scMF1w3KP0LFCqkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by DB8PR04MB6700.eurprd04.prod.outlook.com (2603:10a6:10:109::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Wed, 29 Jun 2022 11:12:28 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::dfa:a64a:432f:e26b]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::dfa:a64a:432f:e26b%7]) with mapi id 15.20.5395.014; Wed, 29 Jun 2022 11:12:28 +0000 Message-ID: <3d42c571-4ec5-ab98-e985-5c6197031f79@suse.com> Date: Wed, 29 Jun 2022 13:12:27 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 2/2] libopcodes/aarch64: add support for disassembler styling Content-Language: en-US To: Andrew Burgess , Nick Clifton References: <96b9a3395da12da7c5a5ad7d5ae7498f5b81c28f.1655810414.git.aburgess@redhat.com> <0c1f6276-4e1e-a756-ba21-33855d073b2b@redhat.com> <87tu83d97o.fsf@redhat.com> Cc: binutils@sourceware.org From: Jan Beulich In-Reply-To: <87tu83d97o.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AS9PR01CA0004.eurprd01.prod.exchangelabs.com (2603:10a6:20b:540::13) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c51723b-870b-4205-79ef-08da59c040dd X-MS-TrafficTypeDiagnostic: DB8PR04MB6700:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UhX1WeQOiz9RLh8ulVuivlj2IrU/5SUNn8hiDncWp0r1X8sR9tigVOU/NpogH4sj9aafRiNMUPaNZk4kzyYl3sfDOpTCAWsEJyQrhov+6cdJ46fZ0pCJcyvg50uwOBaU+8ReQsTYLTHU6hOjwEf9F9InEUVm9hlFDnyx8Oa5FVdkAUqm2GKdPV3kE4BgsxltQxhUFzVK4zpRfeJwnOjtxXKqSv/vVsIMljtJjx1a3s3n5UI5b0eh0D4e8O4J2LwLNuPdSu63wS+vCtUxguxUKF/GOtjj/9HTx8Vv+EtQCMBRZhl0+OK1ROCMGUPoGF6A9f1hX4N+iSkewIfZ4D4JbJBvVJ+nlRFM/QJkD6QYXP327/KBuJo2UlhnyIw8Ijqj4lCFGpIk+QJ7P0Q5MrJMQCgke1IPX2hnZeW7xb/tPPY7Cras5B6rj0p96CaY9Rm0DtCFqhcSEeuCgCr3AquN0ykRp1wAJpIV5hH21FQ+nOUK9Xfc9BI+g7XueoDJ2uDNlANWFmKmWq20KJkxMJQZX08VpSV83ATwFvVEAyDz/W7dw15r9Tb78dpuxiv9abQ44XGQ+3Cp7PMvLocS46yywXZ6eF7vOOv8uDWB+jFD3E07ypSQvPk+8eIcNhCtg3t7F9LYSEi+IHB4TUwuRvO7P1SXcZq2eNWGhFQnvrsScGmXxOYZkAIHGhU8FW5r1ynSXWHYJV6RSrHbol3rfMwFfK0UUJP4Gz++9XyNXsjN93+S2zltYnYYDYblFH7FP4/CYzC9QnahjMV4RVFo9FO28d5MQZdwp92lUmDSV+5J4nT1jFVDoIamp0++2ZIx2ktQsMYGrsPYDPSQj1wSNOgLiw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6560.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(346002)(136003)(396003)(366004)(376002)(39860400002)(316002)(53546011)(5660300002)(2906002)(36756003)(41300700001)(31686004)(110136005)(86362001)(2616005)(186003)(66556008)(38100700002)(8676002)(6512007)(4326008)(66476007)(66946007)(6506007)(8936002)(26005)(31696002)(478600001)(6486002)(83380400001)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q1lVUUlPdFJONW1jOU9QY0wrNU5kWFpPdTNwdEJoaXorZXZEYXJjSk9JQWRO?= =?utf-8?B?U1MvRENxb0d3alFIdDAwN3FjU0x2MWo5MnVTOVdIZjVrN1Q4aStEcVNFYmp1?= =?utf-8?B?TEFaS2FaUDFicnNMOTN4RHJuV1h3NlIwY2FHUDJyWnM5bDFoaVNMeEIxTFlG?= =?utf-8?B?bk1ET25lNkFMd3VzZ2FJRm5XSVhndnZlUnVRSDM2L1R5S0JYV0VPbkQrWWFO?= =?utf-8?B?SmlQUE9aMGtyTWt1bG9RL2VtQ0tUMXFuaWJ0dEV3ZExpYXcwNTl3ek94a09s?= =?utf-8?B?dlQ3MHRPMWZ6VDdQUnFRNUM0QVhSYWxxM0V4KzI3cWNiaHd4L0t5aEpZQ20v?= =?utf-8?B?RDdkOEVYV3dwakR6cGhkRGt2bTgrblE3alluKzBVcUovTGZHRmxvRDJNempp?= =?utf-8?B?U3JvbmsvaEY4cS9KdEk3R1krT2JyQVpkbWNGcG5vL3Jvd081N2V5ZG9PVXZC?= =?utf-8?B?cjVHWW1OZVI5UjdHNG0wb0Q1UVJsSnFYWGEvdFRlZTduclUzaThleURLbUh6?= =?utf-8?B?YTFXeEZyaWpHMmErVHlnbHlvNnlRSmdyYVc3U1hlcFBsSHdMbkdzWkgyUXR6?= =?utf-8?B?cTNzb0k0WC9jdlNYY255bHRoej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qmw1S1QyZFlueW0walc2QkN2bnJyeXBldjUzWXRPVTl0?= =?utf-8?B?dVdNMnV2WVhObHhZZGtuZjRHcnZPenBGdlA0RHJyRnZLQ1RjVE1MbXp2Wnht?= =?utf-8?B?OHgvY0YrYTZiVnQ2UDdrZEFPaG1ZNGxnMUZnTFFvemNkcmJ1VjdHTHpxQ014?= =?utf-8?B?dUpRSU9FN0J2REJzSnRoYnBIclh2NlU0QUNKRjRVL0Z6YWlIU2t0WDVZTUVt?= =?utf-8?B?ZWlTVndLTkUwc0U0ZUhIZ1RjallvNnBVTmZMM1NiR1NrQ2U1QitCaHd1S2I0?= =?utf-8?B?L3RYU3VPanZuOHFPckMwWVpuZDExWGdEYytaeHQrd2o1S2lRTXBuSHIrbUJu?= =?utf-8?B?SWh1QnFIT241Q0hCOFdnN0RkTWdCZ3Fjc1ZYbXMweGlCa0dQUWpNWkpqanVi?= =?utf-8?B?bEtTa3VTT2xuOWtaWEhxVlRWa0l3T1dQWU5XR0lXdW91Mi9HN00rdUNQdUNn?= =?utf-8?B?WVloa0ZRUm9GSkNzVlY4c2pXNmNtM1FHbjNYU052ZDZiTzNCOE1ZVUE2VjU1?= =?utf-8?B?cWZtU2JDeTNRaHNyUkdyY0RLVUR5SFFqZW5haHFBQ3Y1dUZFL2NLTWZ1ZzE2?= =?utf-8?Q?ldQZwXfnkT909LgF2BfawKEpz?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c51723b-870b-4205-79ef-08da59c040dd X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2022 11:12:28.4133 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aeKOkv6CBRfs7QjfSYJZQIgEwWFUCUHDQBwtM1YyoYJZ0nZ7xnU7QoBWz39CvVvPLJCLphPs4G0DKTmT1+GDBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6700 X-Spam-Status: No, score=-3030.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2022 11:12:34 -0000 On 29.06.2022 13:01, Andrew Burgess via Binutils wrote: > Nick Clifton via Binutils writes: > >> Hi Andrew, >> >>> I do still have a few questions about how some elements should be >>> styled, consider this instruction: >>> >>> add x1, x2, x3, lsr #1 >>> ~~~~~ ~~ ~~ ~~ ~ Plain text. >>> ~~~ Mnemonic. >>> ~~ ~~ ~~ Register. >>> ~~ Immediate. >>> ??? What to use here? >>> >>> The current patch formats the 'lsr' as text, but I wonder if this >>> would be better formatted as mnemonic? Or maybe it should be >>> considered part of the immediate? >> >> My $0.02 worth: It is not an immediate - in fact that instruction does >> not have any immediates in it - nor is it just plain text. I suppose >> that you might consider it as being an extension of the mnemonic, but >> that also feels wrong to me. Could you create a new class for this >> part of the instruction ? eg 'shifter' or 'sub-mnemonic'. If not then >> I would go with mnemonic as that is the closest approximation. IMHO... > > We can add more styles. There's a small bit of work needed when we pass > 16 styles, but that really is trivial. > > My reluctance is to adding new styles for every single architectural > feature, ideally I'd like to map everything to a very small number of > styles, enough to highlight different parts of the instruction, but not > so many that the output looks like a crazy rainbow of colour. > > I initially went with mnemonic, but wasn't sure what people would think > of having the mnemonic split into multiple parts like this. > > Adding a sub-mnemonic could be a good solution, it keeps the number of > styles low, but allows us to (potentially) style these parts > differently in the future. Alternatively how about having an "operator" style? That wouldn't be arch-specific. Not sure though in how far ... >>> I have a similar question for how to format 'ge' in: >>> >>> ccmp x1, x2, #0xa, ge >> >> The same reasoning applies here I feel. This is "ccmp-ge" instruction >> with the condition expressed as a separate field in the disassembled >> text. Ideally a "condition-code" class could be used to express its >> style, but if that is not possible then mnemonic is the next best >> thing. >> >> >>> And how to format 'sxtb' in: >>> > adds x0, sp, w0, sxtb >> >> Ditto. Maybe an "extender" class could be used here ? ... this could also be considered an operator. Jan