[PATCH v2] gas: retain whitespace between strings

Hans-Peter Nilsson hp@bitrange.com
Thu Mar 24 01:31:04 GMT 2022


On Thu, 24 Mar 2022, Alan Modra via Binutils wrote:
> On Wed, Mar 23, 2022 at 08:00:15AM +0100, Jan Beulich wrote:
> > On 23.03.2022 02:06, Alan Modra wrote:
> > > On Mon, Mar 21, 2022 at 03:15:16PM +0100, Jan Beulich via Binutils wrote:
> > >> 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.
> > >
> > > Agreed.  I said much the same a long time ago.
> >
> > In this case, are there reasons speaking against doing so (besides the
> > effort it takes)?
>
> I don't think so.  The original intent regarding the gas preprocessor
> was to not preprocess gcc output (#NO_APP) *and* for the assembler to
> not accept unnecessary whitespace from gcc.  User assembly would be
> preprocessed to remove unnecessary whitespace so that most gas code
> would not need SKIP_WHITESPACE.  I think this was a bad design,
> because the preprocessor needed to know too much info about syntax.
> In any case the ideal proved difficult to achieve, so we have
> SKIP_WHITESPACE all over the place anyway.

For the record (you know it, I know it, Jan may know it, but
probably not many other people), few gcc targets actually emit a
valid "#NO_APP\n" (exactly) as the *very first* line from
gcc-generated assembly, and as such go through the scrubbing
process for also for all gcc-generated assembly code.

Looking closer, I see it's just one target at the moment,
because you also need to set targetm.asm_file_start_app_off to
true; that is, besides the '#define ASM_APP_OFF "#NO_APP\n"'.

brgds, H-P


More information about the Binutils mailing list