AArch64: allow constant expressions for shifted reg literals
authorJim Grosbach <grosbach@apple.com>
Tue, 23 Sep 2014 22:16:02 +0000 (22:16 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 23 Sep 2014 22:16:02 +0000 (22:16 +0000)
commitbd847644b3aa71eb03cb5c71ef96c22ce9183505
tree7afbefd62aab35f1b96579a0e2b61d7d6c055aad
parent798f2849c39701276caad261ce3a66e21c567878
AArch64: allow constant expressions for shifted reg literals

e.g., add w1, w2, w3, lsl #(2 - 1)

This sort of thing comes up in pre-processed assembly playing macro games.
Still validate that it's an assembly time constant. The early exit error check
was just a bit overzealous and disallowed a left paren.

rdar://18430542

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218336 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
test/MC/AArch64/basic-a64-instructions.s