From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id C257238582B8 for ; Thu, 22 Sep 2022 12:39:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C257238582B8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 01A371595; Thu, 22 Sep 2022 05:39:59 -0700 (PDT) Received: from [10.2.78.76] (unknown [10.2.78.76]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2BF73F73B; Thu, 22 Sep 2022 05:39:51 -0700 (PDT) Message-ID: Date: Thu, 22 Sep 2022 13:39:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 1/2] opcodes/arm: add missing ';' characters Content-Language: en-GB To: Andrew Burgess , binutils@sourceware.org References: <8cc1b606a6e5c5164b03389d04f127f7909a2a36.1663334366.git.aburgess@redhat.com> <114cf7e5-aacf-ddba-4232-806278746aff@foss.arm.com> <87mtarepz1.fsf@redhat.com> From: Richard Earnshaw In-Reply-To: <87mtarepz1.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3491.0 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,TXREP 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 22/09/2022 10:08, Andrew Burgess wrote: > Richard Earnshaw writes: > >> On 16/09/2022 14:21, Andrew Burgess via Binutils wrote: >>> I spotted a couple of places where the ARM disassembler produces what >>> seems to be some comment style text '@ Impl Def' without including a >>> comment character ';'. In other places where we have similar messages >>> a comment character is emitted, so I suspect this was just an >>> oversight. >>> >>> Fixed in this commit by adding two new comment characters, and >>> updating the expected test results. >> >> No, this is incorrect. @ is the comment marker on Arm; ';' is the >> statement separator. >> > > Wow! OK. So, I tested what you said, and you'd absolutely correct. > But does that mean all the places where the disassembler prints what (I > believe) is clearly a comment without printing '@' is actually a bug? > Or am I missing something really subtle here? > > Here are just a few of the many examples that can be found in the gas > testsuite for ARM: > > sub r0, r0, #32, 24 ; 0x2000 > add r0, r0, #32, 24 ; 0x2000 > nop ; (mov r0, r0) > subhi pc, pc, #805306368 ; 0x30000000 > ldrh r3, [pc, #-8] ; 8 > ldrsb r2, [r3, #255] ; 0xff > ldrsh r1, [r4, #-250] ; 0xffffff06 > ldrsb r1, [r5, #240] ; 0xf0 > strh r2, [pc, #48] ; 68 > > There are many more, but they are all pretty similar in content. > > Should I instead propose changing all these to use '@' ? > > Thanks, > Andrew > Technically, yes. But I don't think we've ever claimed that you could paste the output of the disassembler into an assembler and directly use the result. So while this would be good to fix, I don't think it's a disaster. R.