Be careful not to walk off the end of the operand info list while updating VFP predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138492 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2011-08-24 21:35:46 +00:00
parent 72f39f8436
commit 12a1e3bbcb

View File

@ -417,7 +417,8 @@ void ThumbDisassembler::UpdateThumbVFPPredicate(MCInst &MI) const {
const MCOperandInfo *OpInfo = ARMInsts[MI.getOpcode()].OpInfo;
MCInst::iterator I = MI.begin();
for (unsigned i = 0, e = MI.size(); i < e; ++i, ++I) {
unsigned short NumOps = ARMInsts[MI.getOpcode()].NumOperands;
for (unsigned i = 0; i < NumOps; ++i, ++I) {
if (OpInfo[i].isPredicate() ) {
I->setImm(CC);
++I;