summaryrefslogtreecommitdiff
path: root/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-30 16:13:20 +0000
committerTim Northover <tnorthover@apple.com>2014-04-30 16:13:20 +0000
commit50de5e4f579ef227c23964c1058cd4cc4e782682 (patch)
tree27ccd2cdac63282a919faab33a3efb830d456665 /lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
parent52f60f81d958c5ce7be81161dd6adee508605673 (diff)
downloadllvm-50de5e4f579ef227c23964c1058cd4cc4e782682.tar.gz
llvm-50de5e4f579ef227c23964c1058cd4cc4e782682.tar.bz2
llvm-50de5e4f579ef227c23964c1058cd4cc4e782682.tar.xz
AArch64/ARM64: add specific diagnostic for MRS/MSR and enable tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp')
-rw-r--r--lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp b/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
index 530bab80b6..7572691fcf 100644
--- a/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
+++ b/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp
@@ -3857,6 +3857,10 @@ bool ARM64AsmParser::showMatchError(SMLoc Loc, unsigned ErrCode) {
return Error(Loc, "immediate must be an integer in range [1,64].");
case Match_InvalidLabel:
return Error(Loc, "expected label or encodable integer pc offset");
+ case Match_MRS:
+ return Error(Loc, "expected readable system register");
+ case Match_MSR:
+ return Error(Loc, "expected writable system register or pstate");
case Match_MnemonicFail:
return Error(Loc, "unrecognized instruction mnemonic");
default:
@@ -4394,7 +4398,9 @@ bool ARM64AsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
case Match_InvalidImm1_16:
case Match_InvalidImm1_32:
case Match_InvalidImm1_64:
- case Match_InvalidLabel: {
+ case Match_InvalidLabel:
+ case Match_MSR:
+ case Match_MRS: {
// Any time we get here, there's nothing fancy to do. Just get the
// operand SMLoc and display the diagnostic.
SMLoc ErrorLoc = ((ARM64Operand *)Operands[ErrorInfo])->getStartLoc();