ARM64: separate load/store operands to simplify assembler
authorTim Northover <tnorthover@apple.com>
Thu, 22 May 2014 11:56:09 +0000 (11:56 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 22 May 2014 11:56:09 +0000 (11:56 +0000)
commite072ed71c87ba1be56f1bca1a1a8057760badea0
tree35bf85d4abfca5a4d4d0edaf87e9d39ec3c80ba4
parentb08e03806f019366da41c75173b9358106a22edc
ARM64: separate load/store operands to simplify assembler

This changes ARM64 to use separate operands for each component of an
address, and look for separate '[', '$Rn, ..., ']' tokens when
parsing.

This allows us to do away with quite a bit of special C++ code to
handle monolithic "addressing modes" in the MC components. The more
incremental matching of the assembler operands also allows for better
diagnostics when LLVM is presented with invalid input.

Most of the complexity here is with the register-offset instructions,
which were extremely dodgy beforehand: even when the instruction used
wM, LLVM's model had xM as an operand. We papered over this
discrepancy before, but that approach doesn't work now so I split them
into separate X and W variants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209425 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
lib/Target/ARM64/ARM64InstrAtomics.td
lib/Target/ARM64/ARM64InstrFormats.td
lib/Target/ARM64/ARM64InstrInfo.cpp
lib/Target/ARM64/ARM64InstrInfo.td
lib/Target/ARM64/ARM64RegisterInfo.td
lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp
lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
lib/Target/ARM64/InstPrinter/ARM64InstPrinter.h
lib/Target/ARM64/MCTargetDesc/ARM64MCCodeEmitter.cpp
test/MC/AArch64/basic-a64-diagnostics.s
test/MC/AArch64/neon-diagnostics.s
test/MC/ARM64/diags.s
utils/TableGen/CodeGenDAGPatterns.cpp