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)
commitc350acfda59336e54a5dd4e139dd5c650e6a1968
tree9d24215b1acda35d902d7113a1fe44c4ddc6d9f4
parent18b68e16af01f9493b25b12d654ac08794818eea
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.

llvm-svn: 209425
15 files changed:
llvm/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
llvm/lib/Target/ARM64/ARM64InstrAtomics.td
llvm/lib/Target/ARM64/ARM64InstrFormats.td
llvm/lib/Target/ARM64/ARM64InstrInfo.cpp
llvm/lib/Target/ARM64/ARM64InstrInfo.td
llvm/lib/Target/ARM64/ARM64RegisterInfo.td
llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
llvm/lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp
llvm/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
llvm/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.h
llvm/lib/Target/ARM64/MCTargetDesc/ARM64MCCodeEmitter.cpp
llvm/test/MC/AArch64/basic-a64-diagnostics.s
llvm/test/MC/AArch64/neon-diagnostics.s
llvm/test/MC/ARM64/diags.s
llvm/utils/TableGen/CodeGenDAGPatterns.cpp