ARM: Fix encoding of hint instruction for Thumb.
authorQuentin Colombet <qcolombet@apple.com>
Fri, 26 Apr 2013 17:54:54 +0000 (17:54 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Fri, 26 Apr 2013 17:54:54 +0000 (17:54 +0000)
commit1ad3a410beff11913db0573942fb51b651d01a13
tree326f9e57d272f1977ee94dccdd59171a938b8afe
parent140536b936a59b359606dbca7b30d5d16472195a
ARM: Fix encoding of hint instruction for Thumb.
"hint" space for Thumb actually overlaps the encoding space of the CPS
instruction. In actuality, hints can be defined as CPS instructions where imod
and M bits are all nil.

Handle decoding of permitted nop-compatible hints (i.e. nop, yield, wfi, wfe,
sev) in DecodeT2CPSInstruction.

This commit adds a proper diagnostic message for Imm0_4 and updates all tests.

Patch by Mihail Popa <Mihail.Popa@arm.com>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180617 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/ARM/basic-arm-instructions.s
test/MC/ARM/basic-thumb2-instructions.s
test/MC/ARM/invalid-hint-arm.s [new file with mode: 0644]
test/MC/ARM/invalid-hint-thumb.s [new file with mode: 0644]
test/MC/Disassembler/ARM/invalid-hint-arm.txt [new file with mode: 0644]
test/MC/Disassembler/ARM/invalid-hint-thumb.txt [new file with mode: 0644]