[PATCH] D73176: [ARM] Fix dropped dollar sign from symbols in branch targets

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 08:26:19 PST 2020


chill added a comment.

Could you, please, add tests for the following cases (some of them will fail, and need to be fixed):

1. `b $4`

`$4` needs to be interpreted as a symbol name; It's GCC behaviour as well.

2. `b $foo + 4`

It's an error now; needs to be like `b foo + 4`, but with symbol `$foo`.

3. `b $ 4`, `b $ foo + 4` and `b $ foo`

These work as expected.

Rationale: GCC does not support `$` as introducing an expression, but does
allow an identifier to start with a `$`. IMHO, our approach here should be:
when there's ambiguity, resolve it in favour of the GCC's interpretation, e.g. `b $4` is parsed
as a branch to symbol.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73176/new/

https://reviews.llvm.org/D73176





More information about the llvm-commits mailing list