forked from OSchip/llvm-project
Explicitly disallow predication in Thumb1 assembly.
llvm-svn: 138562
This commit is contained in:
parent
aa7cbfd259
commit
1c171b121a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue