• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//==- HexagonInstrFormatsV60.td - Hexagon Instruction Formats -*- tablegen -==//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file describes the Hexagon V60 instruction classes in TableGen format.
11//
12//===----------------------------------------------------------------------===//
13
14//----------------------------------------------------------------------------//
15//                         Hexagon Intruction Flags +
16//
17//                        *** Must match BaseInfo.h ***
18//----------------------------------------------------------------------------//
19
20def TypeCVI_VA         : IType<13>;
21def TypeCVI_VA_DV      : IType<14>;
22def TypeCVI_VX         : IType<15>;
23def TypeCVI_VX_DV      : IType<16>;
24def TypeCVI_VP         : IType<17>;
25def TypeCVI_VP_VS      : IType<18>;
26def TypeCVI_VS         : IType<19>;
27def TypeCVI_VINLANESAT : IType<20>;
28def TypeCVI_VM_LD      : IType<21>;
29def TypeCVI_VM_TMP_LD  : IType<22>;
30def TypeCVI_VM_CUR_LD  : IType<23>;
31def TypeCVI_VM_VP_LDU  : IType<24>;
32def TypeCVI_VM_ST      : IType<25>;
33def TypeCVI_VM_NEW_ST  : IType<26>;
34def TypeCVI_VM_STU     : IType<27>;
35def TypeCVI_HIST       : IType<28>;
36//----------------------------------------------------------------------------//
37//                         Intruction Classes Definitions +
38//----------------------------------------------------------------------------//
39
40let validSubTargets = HasV60SubT in
41{
42class CVI_VA_Resource<dag outs, dag ins, string asmstr,
43                       list<dag> pattern = [], string cstr = "",
44                       InstrItinClass itin = CVI_VA>
45   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VA>,
46     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
47
48class CVI_VA_DV_Resource<dag outs, dag ins, string asmstr,
49                         list<dag> pattern = [], string cstr = "",
50                         InstrItinClass itin = CVI_VA_DV>
51   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VA_DV>,
52     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
53
54class CVI_VX_Resource_long<dag outs, dag ins, string asmstr,
55                       list<dag> pattern = [], string cstr = "",
56                       InstrItinClass itin = CVI_VX_LONG>
57   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VX>,
58     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
59
60class CVI_VX_Resource_late<dag outs, dag ins, string asmstr,
61                       list<dag> pattern = [], string cstr = "",
62                       InstrItinClass itin = CVI_VX_LATE>
63   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VX>,
64     Requires<[HasV60T, UseHVX]>;
65
66class CVI_VX_Resource<dag outs, dag ins, string asmstr,
67                       list<dag> pattern = [], string cstr = "",
68                       InstrItinClass itin = CVI_VX>
69   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VX>,
70     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
71
72class CVI_VX_DV_Resource<dag outs, dag ins, string asmstr,
73                       list<dag> pattern = [], string cstr = "",
74                       InstrItinClass itin = CVI_VX_DV>
75   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VX_DV>,
76     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
77
78class CVI_VX_DV_Slot2_Resource<dag outs, dag ins, string asmstr,
79                       list<dag> pattern = [], string cstr = "",
80                       InstrItinClass itin = CVI_VX_DV_SLOT2>
81   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VX_DV>,
82     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
83
84class CVI_VX_DV_Resource_long<dag outs, dag ins, string asmstr,
85                         list<dag> pattern = [], string cstr = "",
86                         InstrItinClass itin = CVI_VX_DV_LONG>
87   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VX_DV>,
88     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
89
90class CVI_VP_Resource_long<dag outs, dag ins, string asmstr,
91                         list<dag> pattern = [], string cstr = "",
92                         InstrItinClass itin = CVI_VP_LONG>
93   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VP>,
94     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
95
96class CVI_VP_VS_Resource_early<dag outs, dag ins, string asmstr,
97                         list<dag> pattern = [], string cstr = "",
98                         InstrItinClass itin = CVI_VP_VS_EARLY>
99   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VP_VS>,
100     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
101
102class CVI_VP_VS_Resource_long<dag outs, dag ins, string asmstr,
103                         list<dag> pattern = [], string cstr = "",
104                         InstrItinClass itin = CVI_VP_VS_LONG>
105   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VP_VS>,
106     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
107
108class CVI_VP_VS_Resource_long_early<dag outs, dag ins, string asmstr,
109                         list<dag> pattern = [], string cstr = "",
110                         InstrItinClass itin = CVI_VP_VS_LONG_EARLY>
111   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VP_VS>,
112     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
113
114class CVI_VS_Resource<dag outs, dag ins, string asmstr,
115                         list<dag> pattern = [], string cstr = "",
116                         InstrItinClass itin = CVI_VS>
117   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VS>,
118     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
119
120class CVI_VINLANESAT_Resource<dag outs, dag ins, string asmstr,
121                         list<dag> pattern = [], string cstr = "",
122                         InstrItinClass itin = CVI_VINLANESAT>
123   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VINLANESAT>,
124     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
125
126class CVI_VS_Resource_long<dag outs, dag ins, string asmstr,
127                           list<dag> pattern = [], string cstr = "",
128                           InstrItinClass itin = CVI_VS>
129  : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VS>,
130     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
131
132class CVI_VM_LD_Resource<dag outs, dag ins, string asmstr,
133                         list<dag> pattern = [], string cstr = "",
134                         InstrItinClass itin = CVI_VM_LD>
135   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_LD>,
136     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
137
138class CVI_VM_LD_Resource_long<dag outs, dag ins, string asmstr,
139                              list<dag> pattern = [], string cstr = "",
140                         InstrItinClass itin = CVI_VM_LD>
141   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_LD>,
142     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
143
144class CVI_VM_TMP_LD_Resource<dag outs, dag ins, string asmstr,
145                             list<dag> pattern = [], string cstr = "",
146                             InstrItinClass itin = CVI_VM_TMP_LD>
147   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_TMP_LD>,
148     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
149
150class CVI_VM_TMP_LD_Resource_long<dag outs, dag ins, string asmstr,
151                                  list<dag> pattern = [], string cstr = "",
152                                  InstrItinClass itin = CVI_VM_TMP_LD>
153   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_TMP_LD>,
154     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
155
156class CVI_VM_CUR_LD_Resource<dag outs, dag ins, string asmstr,
157                             list<dag> pattern = [], string cstr = "",
158                             InstrItinClass itin = CVI_VM_CUR_LD>
159   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_CUR_LD>,
160     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
161
162class CVI_VM_VP_LDU_Resource<dag outs, dag ins, string asmstr,
163                             list<dag> pattern = [], string cstr = "",
164                             InstrItinClass itin = CVI_VM_VP_LDU>
165   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_VP_LDU>,
166     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
167
168class CVI_VM_VP_LDU_Resource_long<dag outs, dag ins, string asmstr,
169                                  list<dag> pattern = [], string cstr = "",
170                                  InstrItinClass itin = CVI_VM_VP_LDU>
171   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_VP_LDU>,
172     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
173
174class CVI_VM_ST_Resource<dag outs, dag ins, string asmstr,
175                         list<dag> pattern = [], string cstr = "",
176                         InstrItinClass itin = CVI_VM_ST>
177   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_ST>,
178     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
179
180class CVI_VM_ST_Resource_long<dag outs, dag ins, string asmstr,
181                              list<dag> pattern = [], string cstr = "",
182                              InstrItinClass itin = CVI_VM_ST>
183   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_ST>,
184     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
185
186class CVI_VM_NEW_ST_Resource<dag outs, dag ins, string asmstr,
187                             list<dag> pattern = [], string cstr = "",
188                             InstrItinClass itin = CVI_VM_NEW_ST>
189   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_NEW_ST>,
190     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
191
192class CVI_VM_NEW_ST_Resource_long<dag outs, dag ins, string asmstr,
193                                  list<dag> pattern = [], string cstr = "",
194                                  InstrItinClass itin = CVI_VM_NEW_ST>
195   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_NEW_ST>,
196     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
197
198class CVI_VM_STU_Resource<dag outs, dag ins, string asmstr,
199                          list<dag> pattern = [], string cstr = "",
200                          InstrItinClass itin = CVI_VM_STU>
201   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_STU>,
202     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
203
204class CVI_VM_STU_Resource_long<dag outs, dag ins, string asmstr,
205                               list<dag> pattern = [], string cstr = "",
206                               InstrItinClass itin = CVI_VM_STU>
207   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VM_STU>,
208     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
209
210class CVI_HIST_Resource<dag outs, dag ins, string asmstr,
211                        list<dag> pattern = [], string cstr = "",
212                        InstrItinClass itin = CVI_HIST>
213   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_HIST>,
214     OpcodeHexagon, Requires<[HasV60T, UseHVX]>;
215}
216
217let validSubTargets = HasV60SubT in
218{
219class CVI_VA_Resource1<dag outs, dag ins, string asmstr,
220                       list<dag> pattern = [], string cstr = "",
221                       InstrItinClass itin = CVI_VA>
222   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VA>,
223     Requires<[HasV60T, UseHVX]>;
224
225class CVI_VX_DV_Resource1<dag outs, dag ins, string asmstr,
226                         list<dag> pattern = [], string cstr = "",
227                         InstrItinClass itin = CVI_VX_DV>
228   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_VX_DV>,
229     Requires<[HasV60T, UseHVX]>;
230
231class CVI_HIST_Resource1<dag outs, dag ins, string asmstr,
232                        list<dag> pattern = [], string cstr = "",
233                        InstrItinClass itin = CVI_HIST>
234   : InstHexagon<outs, ins, asmstr, pattern, cstr, itin, TypeCVI_HIST>,
235     Requires<[HasV60T, UseHVX]>;
236}
237
238
239