public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Nick Clifton <nickc@redhat.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] gas: retain whitespace between strings
Date: Thu, 17 Mar 2022 09:20:50 +0100	[thread overview]
Message-ID: <76486c50-3476-f357-a5a4-d5b08c9b7889@suse.com> (raw)
In-Reply-To: <941f3fdc-bc52-afc9-9f70-69d25a236bc1@redhat.com>

Nick,

On 16.03.2022 17:55, Nick Clifton wrote:
>> Change the scrubber to retain such whitespace, by making the processing
>> of strings more similar to that of symbols. And indeed this appears to
>> make sense when taking into account that for quite a while gas has been
>> supporting quoted symbol names.
> 
> OK, that makes sense.
> 
>> Taking a more general view, however, the change doesn't go quite far
>> enough. There are further cases where significant whitespace is removed
>> by the scrubber. The new testcase enumerates a few in its ".if 0"
>> section. I'm afraid the only way that I see to deal with this would be
>> to significantly simplify the scrubber, such that it wouldn't do much
>> more than collapse sequences of unquoted whitespace into a single blank.
>> To be honest problems in this area aren't really surprising when seeing
>> that there's hardly any checking of .macro use throughout the testsuite
>> (and in particular in the [relatively] generic tests under all/).
> 
> Plus assembler macro syntax has never been that well specified.
> 
> 
>> Partly RFC: While I did test this for x86, I didn't get around yet to
>> run a much wider set of tests.
> 
> I ran my regression tester with the patch applied and nothing turned up,
> so I am happy to approve the patch.

Thanks. I did meanwhile get around to do a full run as well, but for
now I can only say "likely nothing turned up" because I did this with
"ELF32: don't silently truncate relocation addends" also in place.
The regressions found are likely all from this 2nd patch (matching
what Alan did point out already). But I didn't get around yet to
inspect the test failures individually.

>  One thing though - I think that it
> would be a good idea to extend the documentation to cover this behaviour.
> I do not mind if you do that as a separate patch, or just an extension
> to this one, but I think that it should be done.

Hmm, I would probably want to fold a related doc change into the patch
right away, but I'm having trouble seeing where this behavior would
sensibly be described. It's an implementation detail, after all, which
simply ended up broken internally. The behavior can't be described for
any directive in particular (or for insns in general), and whether
adjacent strings (irrespective of the intervening whitespace) are
concatenated is directive-dependent.

Or did you mean me to merely describe the specific behavior for .macro,
leaving aside potential effects elsewhere?

Jan


  reply	other threads:[~2022-03-17  8:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  8:14 Jan Beulich
2022-03-16 16:55 ` Nick Clifton
2022-03-17  8:20   ` Jan Beulich [this message]
2022-03-18 15:44     ` Nick Clifton
2022-03-21  7:16       ` Jan Beulich
2022-03-21  9:39         ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76486c50-3476-f357-a5a4-d5b08c9b7889@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).