diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-03-24 17:04:22 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-03-24 17:04:22 +0000 |
commit | ce1868b21ce91245622964da1408cdec76af77a8 (patch) | |
tree | c7b3336fd9b44481e29bbbf21dd854a00b2ebbd7 /lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp | |
parent | 0a828fd7effe06a483c002a50228623552612a11 (diff) |
Add comments to the handling of opcode CPS3p to reject invalid instruction encoding,
a test case of invalid CPS3p encoding and one for invalid VLDMSDB due to regs out of range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128220 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp')
-rw-r--r-- | lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp b/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp index cc2469f8c2..a9d41325de 100644 --- a/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp +++ b/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp @@ -2946,6 +2946,8 @@ static bool DisassembleMiscFrm(MCInst &MI, unsigned Opcode, uint32_t insn, // of optional arguments is implemented. if (Opcode == ARM::CPS3p) { // Let's reject impossible imod values by returning false. + // AsmPrinter cannot handle imod=0b00, plus (imod=0b00,M=1,iflags!=0) is an + // invalid combination, so we just check for imod=0b00 here. if (slice(insn, 19, 18) == 0 || slice(insn, 19, 18) == 1) return false; MI.addOperand(MCOperand::CreateImm(slice(insn, 19, 18))); // imod |