diff options
Diffstat (limited to 'llvm/lib/Target/ARM64/ARM64InstrFormats.td')
| -rw-r--r-- | llvm/lib/Target/ARM64/ARM64InstrFormats.td | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64InstrFormats.td b/llvm/lib/Target/ARM64/ARM64InstrFormats.td index 26db1b2fac8..d14e0fd0c30 100644 --- a/llvm/lib/Target/ARM64/ARM64InstrFormats.td +++ b/llvm/lib/Target/ARM64/ARM64InstrFormats.td @@ -3735,10 +3735,15 @@ multiclass FPMoveImmediate<string asm> { // AdvSIMD //---------------------------------------------------------------------------- -def VectorIndexBOperand : AsmOperandClass { let Name = "VectorIndexB"; } -def VectorIndexHOperand : AsmOperandClass { let Name = "VectorIndexH"; } -def VectorIndexSOperand : AsmOperandClass { let Name = "VectorIndexS"; } -def VectorIndexDOperand : AsmOperandClass { let Name = "VectorIndexD"; } +class AsmVectorIndex<string Suffix> : AsmOperandClass { + let Name = "VectorIndex" # Suffix; + let DiagnosticType = "InvalidIndex" # Suffix; +} +def VectorIndexBOperand : AsmVectorIndex<"B">; +def VectorIndexHOperand : AsmVectorIndex<"H">; +def VectorIndexSOperand : AsmVectorIndex<"S">; +def VectorIndexDOperand : AsmVectorIndex<"D">; + def VectorIndexB : Operand<i64>, ImmLeaf<i64, [{ return ((uint64_t)Imm) < 16; }]> { |

