]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: drop scrubber state -2
authorJan Beulich <jbeulich@suse.com>
Fri, 26 Jul 2024 06:00:42 +0000 (08:00 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Jul 2024 06:00:42 +0000 (08:00 +0200)
commite0b9535c824deb24e209acddcb7662124aeb413f
tree5a02d18ed2ba0d4f8d7fee385829cffb2f59d48a
parentc97f0d71ea9cc5c3bf63aacef34b5ebc95dd3b9a
gas: drop scrubber state -2

Instead re-use code handling LEX_IS_TWOCHAR_COMMENT_1ST, thus ensuring
that we wouldn't get bogus state transitions: For example, when we're in
states 0 or 1, a comment should be no different from whitespace
encountered in those states. Plus for e.g. x86 this results in such
comments now truly being converted to a blank, as mandated by
documentation. Both aspects apparently were a result of blindly (and
wrongly) moving to state 3 _before_ consuming the "ungot" blank.

Also amend a related comment elsewhere.

In the new testcase the .irp is to make visible in the listing all the
whitespace that the scrubber inserts / leaves in place.
gas/app.c
gas/testsuite/gas/i386/comments.l [new file with mode: 0644]
gas/testsuite/gas/i386/comments.s [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp