ARM: fix IT decoding

mask == 0 -> UNPRED

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Amaury de la Vieuville 2013-06-24 09:11:45 +00:00
parent 0c9f0c047d
commit ff08da15cf
2 changed files with 8 additions and 6 deletions

View File

@ -4667,10 +4667,8 @@ static DecodeStatus DecodeIT(MCInst &Inst, unsigned Insn,
S = MCDisassembler::SoftFail;
}
if (mask == 0x0) {
mask |= 0x8;
S = MCDisassembler::SoftFail;
}
if (mask == 0x0)
return MCDisassembler::Fail;
Inst.addOperand(MCOperand::CreateImm(pred));
Inst.addOperand(MCOperand::CreateImm(mask));

View File

@ -1,3 +1,7 @@
# RUN: llvm-mc --disassemble %s -triple=thumbv7-unknown-unknown 2>&1 | grep "potentially undefined instruction encoding"
# CHECK-UNPRED: potentially undefined instruction encoding
# CHECK-UNDEF: invalid instruction encoding
0xff 0xbf 0x6b 0x80 0x00 0x75
# RUN: echo "0xff 0xbf 0x6b 0x80 0x00 0x75" | llvm-mc -disassemble -triple thumbv7 2>&1 | FileCheck %s --check-prefix=CHECK-UNPRED
# mask = 0
# RUN: echo "0x50 0xbf 0x00 0x00" | llvm-mc -disassemble -triple thumbv7 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEF