diff options
| author | Tim Northover <tnorthover@apple.com> | 2014-04-28 11:27:43 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2014-04-28 11:27:43 +0000 |
| commit | 7b839f833d8c10f149da7fbfe97718505ffedf19 (patch) | |
| tree | 71017a8b7521a12e54cfe2add99ab41da3153baf /llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp | |
| parent | c00a7ff4b70c24b82069f5cb44477ccc8b9203cc (diff) | |
| download | bcm5719-llvm-7b839f833d8c10f149da7fbfe97718505ffedf19.tar.gz bcm5719-llvm-7b839f833d8c10f149da7fbfe97718505ffedf19.zip | |
ARM64: diagnose use of v16-v31 in certain indexed NEON instructions.
Someone couldn't bear to have a completely orthogonal set of floating-point
registers, so we've got some instructions that only accept v0-v15 (coming in
ARMv9, V128_prime: you're allowed v2, v3, v5, v7, ...).
Anyway, we were permitting even the out of range registers during assembly
(CodeGen handled it correctly). This adds a diagnostic.
llvm-svn: 207412
Diffstat (limited to 'llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp index 5fe0acc59da..71cf100daf9 100644 --- a/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp +++ b/llvm/lib/Target/ARM64/AsmParser/ARM64AsmParser.cpp @@ -688,6 +688,10 @@ public: } bool isReg() const { return Kind == k_Register && !Reg.isVector; } bool isVectorReg() const { return Kind == k_Register && Reg.isVector; } + bool isVectorRegLo() const { + return Kind == k_Register && Reg.isVector && + ARM64MCRegisterClasses[ARM64::FPR128_loRegClassID].contains(Reg.RegNum); + } /// Is this a vector list with the type implicit (presumably attached to the /// instruction itself)? @@ -1059,6 +1063,11 @@ public: Inst.addOperand(MCOperand::CreateReg(getReg())); } + void addVectorRegLoOperands(MCInst &Inst, unsigned N) const { + assert(N == 1 && "Invalid number of operands!"); + Inst.addOperand(MCOperand::CreateReg(getReg())); + } + template <unsigned NumRegs> void addVectorList64Operands(MCInst &Inst, unsigned N) const { assert(N == 1 && "Invalid number of operands!"); |

