ARM: improve instruction validation for thumb mode
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 18 Dec 2014 05:24:38 +0000 (05:24 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 18 Dec 2014 05:24:38 +0000 (05:24 +0000)
commit9c1911b1059f6d90262b89dc5407be5bb787075e
treec33ad821309504576e07b5e4abe2fc9f6f515a00
parent4d3a8d8a3ad686d40e6a8ce301aa8ec76159e291
ARM: improve instruction validation for thumb mode

The ARM Architecture Reference Manual states the following:
  LDM{,IA,DB}:
    The SP cannot be in the list.
    The PC can be in the list.
    If the PC is in the list:
      • the LR must not be in the list
      • the instruction must be either outside any IT block, or the last
        instruction in an IT block.
  POP:
    The PC can be in the list.
    If the PC is in the list:
      • the LR must not be in the list
      • the instruction must be either outside any IT block, or the last
        instruction in an IT block.
  PUSH:
    The SP and PC can be in the list in ARM instructions, but not in Thumb
    instructions.
  STM:{,IA,DB}:
    The SP and PC can be in the list in ARM instructions, but not in Thumb
    instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224502 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/thumb-diagnostics.s
test/MC/ARM/thumb-load-store-multiple.s [new file with mode: 0644]
test/MC/ARM/v8_IT_manual.s