Allow only disassembling of M-class MSR masks that the assembler knows how to assembl...
authorJames Molloy <james.molloy@arm.com>
Fri, 1 Aug 2014 12:42:11 +0000 (12:42 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 1 Aug 2014 12:42:11 +0000 (12:42 +0000)
commitea029d5b154a110778279dfb61c8c07d72ea1c06
treef8832f5b600efff69e5734d0314654f6486950de
parent93b7c0b8feff30c9e35910f3cf7270d2b4d4bbcf
Allow only disassembling of M-class MSR masks that the assembler knows how to assemble back.

Note: The current code in DecodeMSRMask() rejects the unpredictable A/R MSR mask '0000' with Fail. The code in the patch follows this style and rejects unpredictable M-class MSR masks also with Fail (instead of SoftFail). If SoftFail is preferred in this case then additional changes to ARMInstPrinter (to print non-symbolic masks) and ARMAsmParser (to parse non-symbolic masks) will be needed.

Patch by Petr Pavlu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214505 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/Disassembler/ARM/invalid-thumb-MSR-MClass.txt [new file with mode: 0644]
test/MC/Disassembler/ARM/thumb-MSR-MClass.txt