diff options
| author | Tim Northover <tnorthover@apple.com> | 2014-05-06 12:50:44 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2014-05-06 12:50:44 +0000 |
| commit | 05cbe7c80af0c89a3b573d64b5f6aed26dbab147 (patch) | |
| tree | a4f22a551440540547ffd6d482b81028a4a522bb /llvm/lib/Target/ARM64/AsmParser | |
| parent | 2e92e66f66ecef2af04c7edbf5e0786e94d4e8f9 (diff) | |
| download | bcm5719-llvm-05cbe7c80af0c89a3b573d64b5f6aed26dbab147.tar.gz bcm5719-llvm-05cbe7c80af0c89a3b573d64b5f6aed26dbab147.zip | |
AArch64/ARM64: add more specific diagnostic for invalid vector lanes
llvm-svn: 208081
Diffstat (limited to 'llvm/lib/Target/ARM64/AsmParser')
| -rw-r--r-- | llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp index f2f666bc33f..a4a48d37c04 100644 --- a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp +++ b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp @@ -3885,6 +3885,14 @@ bool ARM64AsmParser::showMatchError(SMLoc Loc, unsigned ErrCode) { return Error(Loc, "immediate must be an integer in range [1, 32]."); case Match_InvalidImm1_64: return Error(Loc, "immediate must be an integer in range [1, 64]."); + case Match_InvalidIndexB: + return Error(Loc, "vector lane must be an integer in range [0, 15]."); + case Match_InvalidIndexH: + return Error(Loc, "vector lane must be an integer in range [0, 7]."); + case Match_InvalidIndexS: + return Error(Loc, "vector lane must be an integer in range [0, 3]."); + case Match_InvalidIndexD: + return Error(Loc, "vector lane must be an integer in range [0, 1]."); case Match_InvalidLabel: return Error(Loc, "expected label or encodable integer pc offset"); case Match_MRS: @@ -4432,6 +4440,10 @@ bool ARM64AsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, case Match_InvalidImm1_16: case Match_InvalidImm1_32: case Match_InvalidImm1_64: + case Match_InvalidIndexB: + case Match_InvalidIndexH: + case Match_InvalidIndexS: + case Match_InvalidIndexD: case Match_InvalidLabel: case Match_MSR: case Match_MRS: { |

