summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/AsmParser
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2014-09-24 14:20:01 +0000
committerOliver Stannard <oliver.stannard@arm.com>2014-09-24 14:20:01 +0000
commit1ae8b476f4f8983a3a654ad3c649c6fb036d6c02 (patch)
tree59cd0b5f33bf43df2edfc5e43f2884aee8c538bb /llvm/lib/Target/ARM/AsmParser
parentf086a14d532ed7a7622bcd742f377434c76f43d4 (diff)
downloadbcm5719-llvm-1ae8b476f4f8983a3a654ad3c649c6fb036d6c02.tar.gz
bcm5719-llvm-1ae8b476f4f8983a3a654ad3c649c6fb036d6c02.zip
[Thumb] 32-bit encodings of 'cps' are not valid for v7M
v7M only allows the 16-bit encoding of the 'cps' (Change Processor State) instruction, and does not have the 32-bit encoding which is valid from v6T2 onwards. llvm-svn: 218382
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 7e33ec5617d..211157c7203 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -5514,6 +5514,8 @@ bool ARMAsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
Operands.push_back(ARMOperand::CreateImm(
MCConstantExpr::Create(ProcessorIMod, getContext()),
NameLoc, NameLoc));
+ } else if (Mnemonic == "cps" && isMClass()) {
+ return Error(NameLoc, "instruction 'cps' requires effect for M-class");
}
// Add the remaining tokens in the mnemonic.
OpenPOWER on IntegriCloud