1 //=-- SVEInstrFormats.td - AArch64 SVE Instruction classes -*- tablegen -*--=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // AArch64 Scalable Vector Extension (SVE) Instruction Class Definitions.
12 //===----------------------------------------------------------------------===//
14 //===----------------------------------------------------------------------===//
15 // SVE Integer Arithmetic - Unpredicated Group.
16 //===----------------------------------------------------------------------===//
18 class sve_int_bin_cons_arit_0<bits<2> sz8_64, bits<3> opc, string asm,
20 : I<(outs zprty:$Zd), (ins zprty:$Zn, zprty:$Zm),
21 asm, "\t$Zd, $Zn, $Zm",
26 let Inst{31-24} = 0b00000100;
27 let Inst{23-22} = sz8_64;
30 let Inst{15-13} = 0b000;
31 let Inst{12-10} = opc;
36 multiclass sve_int_bin_cons_arit_0<bits<3> opc, string asm> {
37 def _B : sve_int_bin_cons_arit_0<0b00, opc, asm, ZPR8>;
38 def _H : sve_int_bin_cons_arit_0<0b01, opc, asm, ZPR16>;
39 def _S : sve_int_bin_cons_arit_0<0b10, opc, asm, ZPR32>;
40 def _D : sve_int_bin_cons_arit_0<0b11, opc, asm, ZPR64>;
43 //===----------------------------------------------------------------------===//
44 // SVE Permute - In Lane Group
45 //===----------------------------------------------------------------------===//
47 class sve_int_perm_bin_perm_zz<bits<3> opc, bits<2> sz8_64, string asm,
49 : I<(outs zprty:$Zd), (ins zprty:$Zn, zprty:$Zm),
50 asm, "\t$Zd, $Zn, $Zm",
56 let Inst{31-24} = 0b00000101;
57 let Inst{23-22} = sz8_64;
60 let Inst{15-13} = 0b011;
61 let Inst{12-10} = opc;
66 multiclass sve_int_perm_bin_perm_zz<bits<3> opc, string asm> {
67 def _B : sve_int_perm_bin_perm_zz<opc, 0b00, asm, ZPR8>;
68 def _H : sve_int_perm_bin_perm_zz<opc, 0b01, asm, ZPR16>;
69 def _S : sve_int_perm_bin_perm_zz<opc, 0b10, asm, ZPR32>;
70 def _D : sve_int_perm_bin_perm_zz<opc, 0b11, asm, ZPR64>;
73 //===----------------------------------------------------------------------===//
74 // SVE Permute - Predicates Group
75 //===----------------------------------------------------------------------===//
77 class sve_int_perm_bin_perm_pp<bits<3> opc, bits<2> sz8_64, string asm,
79 : I<(outs pprty:$Pd), (ins pprty:$Pn, pprty:$Pm),
80 asm, "\t$Pd, $Pn, $Pm",
86 let Inst{31-24} = 0b00000101;
87 let Inst{23-22} = sz8_64;
88 let Inst{21-20} = 0b10;
90 let Inst{15-13} = 0b010;
91 let Inst{12-10} = opc;
98 multiclass sve_int_perm_bin_perm_pp<bits<3> opc, string asm> {
99 def _B : sve_int_perm_bin_perm_pp<opc, 0b00, asm, PPR8>;
100 def _H : sve_int_perm_bin_perm_pp<opc, 0b01, asm, PPR16>;
101 def _S : sve_int_perm_bin_perm_pp<opc, 0b10, asm, PPR32>;
102 def _D : sve_int_perm_bin_perm_pp<opc, 0b11, asm, PPR64>;