Explicitly disallow predication in Thumb1 assembly.

llvm-svn: 138562
This commit is contained in:
Jim Grosbach 2011-08-25 17:23:55 +00:00
parent aa7cbfd259
commit 1c171b121a
1 changed files with 6 additions and 0 deletions

View File

@ -2952,6 +2952,12 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc,
Mnemonic = splitMnemonic(Mnemonic, PredicationCode, CarrySetting,
ProcessorIMod);
// In Thumb1, only the branch (B) instruction can be predicated.
if (isThumbOne() && PredicationCode != ARMCC::AL && Mnemonic != "b") {
Parser.EatToEndOfStatement();
return Error(NameLoc, "conditional execution not supported in Thumb1");
}
Operands.push_back(ARMOperand::CreateToken(Mnemonic, NameLoc));
// FIXME: This is all a pretty gross hack. We should automatically handle