Improve llvm-mc disassembler mode and refactor ARM tests to use it
authorTim Northover <tnorthover@apple.com>
Fri, 19 Jul 2013 10:05:04 +0000 (10:05 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 19 Jul 2013 10:05:04 +0000 (10:05 +0000)
commit48cf6cc416acd217a497172518147ebaf5e401f3
treeab6bc2fab5c2b4b616d4a08b6ed51979b216a032
parentb11c2c28389b7b2baffb4d849f92a094cdfdde28
Improve llvm-mc disassembler mode and refactor ARM tests to use it

This allows "llvm-mc -disassemble" to accept two new features:
  + Using comma as a byte separator
  + Grouping bytes with '[' and ']' pairs.

The behaviour outside a [...] group is unchanged. But within the group once
llvm-mc encounters a true error, it stops rather than trying to resynchronise
the stream at the next byte. This is more useful for disassembly tests, where
we have an almost-instruction in mind and don't care what the misaligned
interpretation would be. Particularly if it means llvm-mc won't actually see
the next intended almost-instruction.

As a side effect, this means llvm-mc can disassemble its own -show-encoding
output if copy-pasted.

llvm-svn: 186661
64 files changed:
llvm/test/MC/Disassembler/ARM/invalid-BFI-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-CDP2-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-CPS-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-CPS2p-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-CPS3p-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-IT-CBNZ-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-IT-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-LDC-form-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-LDM-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-LDR-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-LDRB_POST-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-LDRD_PRE-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-LDR_POST-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-LDR_PRE-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-LDRrs-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-MCR-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-MOVTi16-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-MOVr-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-MOVs-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-MRRC2-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-NEON-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-RFEorLDMIA-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-SBFX-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-SMLAD-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-SRS-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-STMIA_UPD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-STR-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-SXTB-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-UMAAL-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VCVT-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VEXTd-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VFP-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VLD1DUPq8_UPD-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VLD1LNd32_UPD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VLD3DUPd32_UPD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VLD4DUPd32_UPD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VLD4LNd32_UPD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VLDMSDB_UPD-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VLDST-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VMOV-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VQADD-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VST1LNd32_UPD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VST1d8Twb_register-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VST2b32_UPD-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-VST4LNd32_UPD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-armv7.txt [new file with mode: 0644]
llvm/test/MC/Disassembler/ARM/invalid-because-armv7.txt [new file with mode: 0644]
llvm/test/MC/Disassembler/ARM/invalid-hint-arm.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-hint-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2Bcc-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2LDRBT-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2LDREXD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2LDRSHi12-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2LDRSHi8-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2PUSH-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2STRD_PRE-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2STREXB-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2STREXD-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-t2STR_POST-thumb.txt [deleted file]
llvm/test/MC/Disassembler/ARM/invalid-thumbv7-xfail.txt [new file with mode: 0644]
llvm/test/MC/Disassembler/ARM/invalid-thumbv7.txt [new file with mode: 0644]
llvm/test/MC/Disassembler/ARM/invalid-v8fp.txt [deleted file]
llvm/tools/llvm-mc/Disassembler.cpp