gas: blackfin: reign in overeager insn flag handling
commitd151fbb50bd73ac2fbce15822349ee16ba55aa71
authorMike Frysinger <vapier@gentoo.org>
Mon, 11 Oct 2010 08:37:19 +0000 (11 08:37 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 11 Oct 2010 08:37:19 +0000 (11 08:37 +0000)
tree77c7d3dae1e545ba8e7f4e89b17037c04a58b614
parent96709c617191c6d4ea3e084065bc093019aac39a
gas: blackfin: reign in overeager insn flag handling

Currently, trying to declare single letter variables in Blackfin assembly
can sometimes lead to parser errors if that letter is used for insn flags.
For example, X, Z, S, M, and T are used to change the behavior of insns:
    R0 = 1; R0 = 1 (X); R0 = 1 (Z);
But the current parser just looks for single letter tokens rather than
ones that show up in the (FLAGS) field.  So only match these letters as
flags when they're in parentheses.

Not a complete fix, but it at least lets gcc tests pass now (the test
gcc/testsuite/gcc.c-torture/compile/mangle-1.c to be exact).  A complete
fix would require a significant parser rewrite in order to handle:
    R0 = (x) (x);   /* zero extend the address of the symbol "x" */
    R0 = W; R0 = W[P0];

Signed-off-by: Steve Kilbane <steve.kilbane@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
gas/ChangeLog
gas/config/bfin-lex.l