Skip to content

Commit

Permalink
STC2L_POST and STC2L_POST should be handled the same as STCL_POST/LDC…
Browse files Browse the repository at this point in the history
…_POST for the purposes of decoding all operands except the predicate.

Found by randomized testing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138003 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
resistor committed Aug 18, 2011
1 parent 846dd95 commit 78affc9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Target/ARM/Disassembler/ARMDisassembler.cpp
Expand Up @@ -927,6 +927,8 @@ static DecodeStatus DecodeCopMemInstruction(llvm::MCInst &Inst, unsigned Insn,
case ARM::STC2L_OPTION:
case ARM::LDCL_POST:
case ARM::STCL_POST:
case ARM::LDC2L_POST:
case ARM::STC2L_POST:
break;
default:
Inst.addOperand(MCOperand::CreateReg(0));
Expand All @@ -946,6 +948,8 @@ static DecodeStatus DecodeCopMemInstruction(llvm::MCInst &Inst, unsigned Insn,
switch (Inst.getOpcode()) {
case ARM::LDCL_POST:
case ARM::STCL_POST:
case ARM::LDC2L_POST:
case ARM::STC2L_POST:
imm |= U << 8;
case ARM::LDC_OPTION:
case ARM::LDCL_OPTION:
Expand Down
3 changes: 3 additions & 0 deletions test/MC/Disassembler/ARM/arm-tests.txt
Expand Up @@ -314,3 +314,6 @@

# CHECK: rfedb #4!
0x14 0x0 0x32 0xf9

# CHECK: stc2l p0, cr0, [r2], #-96
0x18 0x0 0x62 0xfc

0 comments on commit 78affc9

Please sign in to comment.