gas: arm: handle multiple .directives on a single line (PR29519)
authorRichard Earnshaw <rearnsha@arm.com>
Wed, 24 Aug 2022 16:08:07 +0000 (17:08 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Wed, 24 Aug 2022 16:08:07 +0000 (17:08 +0100)
commita37854f9162fac592b669eda53f465fc190c9341
treea7044b2aa6e637b6b2dbaa3d74a03125b35e1df8
parent70175292616118bad315296ba6180f375326bb6c
gas: arm: handle multiple .directives on a single line (PR29519)

There's been a long-standing bug in the arm backend where
target-specific directives did not correctly handle lines with
multiple statements.  This patch fixes the issue for all the cases
I've been able to find.

It does result in a slight change in behaviour when errors are
encountered: where, previously,

  .cpu arm6 bar

would result in the error "junk at end of line, first unrecognized
character is `b'", we now get "unknown cpu `arm6 bar'", which I think
is slightly more helpful anyway.  Similar errors are generated for
other directives.
gas/config/tc-arm.c
gas/testsuite/gas/arm/directives.d [new file with mode: 0644]
gas/testsuite/gas/arm/directives.s [new file with mode: 0644]