From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id F00D93856269 for ; Wed, 22 Jun 2022 11:15:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F00D93856269 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-450-A_ySK5h7M7GeCfstDk2WZQ-1; Wed, 22 Jun 2022 07:15:38 -0400 X-MC-Unique: A_ySK5h7M7GeCfstDk2WZQ-1 Received: by mail-wr1-f71.google.com with SMTP id v8-20020adfa1c8000000b0021b81a553fbso3292162wrv.18 for ; Wed, 22 Jun 2022 04:15:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:references:from:subject:in-reply-to :content-transfer-encoding; bh=/wmXK78/v6LzFD9ZpNpXNk4PnB0c3XYpSkw6upth8qU=; b=ja4cVfyXbaYjJuxjWQE7UDuQJ5CyYkpDrx0Zl4A63AA8YRv44wbdPswnFIyN7cHOTk ExgO4StlTGVUPO0YhXc5qkSrzW5YCT989BAcw6opso0vWo/yMf0XCW1K6fMIfxVvGgCQ B4xTL7AOJADkFPFRZUklCYZH5b+FFloRk5K7vmTiDACndRv7JHlw3WOFYQ8pjkwzYE2y ziBXN7iV1c/7yf0brODVQg8Ou3pNXnunzi02k+Up0wbpsuhTxDGd8kJWo2Ga9J2510fa dgk7fvqBEFHqUp6jXkYHju3udgFxt3dP2OVBixax0jvoBqwj470U8xMUHVPgbWb2w/NF 064g== X-Gm-Message-State: AJIora/FemORp90c5eBlgZZehb7RrrJMctFZDz5QA0LpZjDc04NfJh2+ GkARz6unvbynbVKxNsEqFCU4EAVdIEu/pI+pZDJE6JTaioR1nah8w0JEVxd46k9Al2OQus0igTx jnjEEPvTpZultt/rC0Q== X-Received: by 2002:adf:d1c6:0:b0:218:51ae:8812 with SMTP id b6-20020adfd1c6000000b0021851ae8812mr2782626wrd.178.1655896537393; Wed, 22 Jun 2022 04:15:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tP9EzzUt2t9w8MOujUr2QGQgLRGoS8IeuD6nHLX4/0xvMyx1Lv/GfPI8b9vskHfhfXCISNgg== X-Received: by 2002:adf:d1c6:0:b0:218:51ae:8812 with SMTP id b6-20020adfd1c6000000b0021851ae8812mr2782614wrd.178.1655896537142; Wed, 22 Jun 2022 04:15:37 -0700 (PDT) Received: from [192.168.1.6] (adsl-2-solo-236-177.claranet.co.uk. [80.168.236.177]) by smtp.gmail.com with ESMTPSA id b5-20020a056000054500b00212a83b93f3sm18657970wrf.88.2022.06.22.04.15.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jun 2022 04:15:36 -0700 (PDT) Message-ID: <0c1f6276-4e1e-a756-ba21-33855d073b2b@redhat.com> Date: Wed, 22 Jun 2022 12:15:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 To: Andrew Burgess , binutils@sourceware.org References: <96b9a3395da12da7c5a5ad7d5ae7498f5b81c28f.1655810414.git.aburgess@redhat.com> From: Nick Clifton Subject: Re: [PATCH 2/2] libopcodes/aarch64: add support for disassembler styling In-Reply-To: <96b9a3395da12da7c5a5ad7d5ae7498f5b81c28f.1655810414.git.aburgess@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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, 22 Jun 2022 11:15:42 -0000 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... > 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 ? The patch itself looks good to me, but I would like to wait to see if anyone else has any comments on the code before approving it. Cheers Nick