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 DD6343858D38 for ; Thu, 22 Sep 2022 18:20:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD6343858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663870845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P/afoXlW+81VKyXI7ldvehR5TeIJJ2yySUACWoOqmQs=; b=fHTf7JNEkFbazB0VB4lOe6wF2VqsUMo0O6RXaukr3IUMMdfse42A+5CqPhKDCLGExFEwR3 EZRs/d2qa5zTZr9pjxMB5jj+7SOm3P92cjl8dui4MiZQJzdAq64Xox/HQUn3apXGQ7qReg UQXZZKGN7bmIdBEmjBsg1XX68hujhfQ= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-588-gV0lxdV3ON23HyphmfzHEw-1; Thu, 22 Sep 2022 14:20:44 -0400 X-MC-Unique: gV0lxdV3ON23HyphmfzHEw-1 Received: by mail-wm1-f70.google.com with SMTP id y15-20020a1c4b0f000000b003b47578405aso1034950wma.5 for ; Thu, 22 Sep 2022 11:20:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date; bh=P/afoXlW+81VKyXI7ldvehR5TeIJJ2yySUACWoOqmQs=; b=wJBOm+xFUiTK6s8SaFYNwCAlXZZZbsj4v76VCTUQ/Tx/H/e5yLRLMaqoZGvSbHaA+c w1KdavG5XWQf6Cxesnh/IhPfAXDD3BI9Si7aLj66V6orGWJOMASlqfDQHGmV1H8bW6eZ wczGCygVgVFGI5mMt2NXzaj6GemaUFCDFjWCEcTS1J17ZYCxFZ4voA2sNr5uqvDwFSdL LlhoCoWLEbjwqoAmvdyCSKdAxFeDcUBXh8shADPQrycLoZzRmF+Nj+aYG7xroV1+KenW zmGb0ZltnubEA6FE5ozRfH5wMPf8RmFbNoZ7s1mSveUMzWPAgkq1JFnK+hoPSJX6SosA wzgg== X-Gm-Message-State: ACrzQf3fLvklwqgwnu2163vVQGmDunOxNDTS+TXb/N5yjl153i3qqg56 vLUdjljjQNEszj4qdp13aRejFE0sHvoVC92v2jvps5MnL4dkEHtAZZT1nte3O8EY+ThowUx0Y+i IOqH8MrMhExBmm020kg== X-Received: by 2002:a05:600c:281:b0:3b5:a5:7c9c with SMTP id 1-20020a05600c028100b003b500a57c9cmr3355837wmk.202.1663870841765; Thu, 22 Sep 2022 11:20:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7cgUcIfCaQRVWMjmu0avgyscrVbdXLbUF+FCnUwb0fUYIuLkoqE9JOy7I9ocSctGKK1J0t1A== X-Received: by 2002:a05:600c:281:b0:3b5:a5:7c9c with SMTP id 1-20020a05600c028100b003b500a57c9cmr3355825wmk.202.1663870841477; Thu, 22 Sep 2022 11:20:41 -0700 (PDT) Received: from localhost (92.40.178.39.threembb.co.uk. [92.40.178.39]) by smtp.gmail.com with ESMTPSA id fc15-20020a05600c524f00b003a5537bb2besm246336wmb.25.2022.09.22.11.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 11:20:41 -0700 (PDT) From: Andrew Burgess To: Richard Earnshaw , binutils@sourceware.org Subject: Re: [PATCH 1/2] opcodes/arm: add missing ';' characters In-Reply-To: References: <8cc1b606a6e5c5164b03389d04f127f7909a2a36.1663334366.git.aburgess@redhat.com> <114cf7e5-aacf-ddba-4232-806278746aff@foss.arm.com> <87mtarepz1.fsf@redhat.com> Date: Thu, 22 Sep 2022 19:20:39 +0100 Message-ID: <877d1ve0eg.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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: Richard Earnshaw writes: > 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. Except I would like to style the disassembler output. Right now, based on what I was seeing, I've handled ';' as the start of a comment. Which is probably wrong. I could continue to treat ';' (in addition to '@') as a comment marker in disassembler output, which would proably give the best looking output. Or I can fix the disassembler to use '@' consistently? Which is probably the best all round solution. It sounds like you wouldn't object to this? Or I could treat ';' as a statement separator and style whatever's after it as... whatever it would be, immediate, text, label, etc? Which I think will give the most confusing output. Would value your thoughts, Thanks, Andrew