1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Fix PR10755 by checking for invalid predicate codes from UNPREDICTABLE t2IT instructions when decoding their successors.

This is the last disassembly crash detected by exhaustive Thumb2 instruction space.  Major thanks to Chandler Carruth for making this kind of exhaustive testing possible.

llvm-svn: 138625
This commit is contained in:
Owen Anderson 2011-08-26 06:19:51 +00:00
parent b20cee1e19
commit 87c906dabf

View File

@ -376,6 +376,8 @@ void ThumbDisassembler::AddThumbPredicate(MCInst &MI) const {
unsigned CC;
if (!ITBlock.empty()) {
CC = ITBlock.back();
if (CC == 0xF)
CC = ARMCC::AL;
ITBlock.pop_back();
} else
CC = ARMCC::AL;