]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/SystemZ/SystemZScheduleZEC12.td
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / SystemZ / SystemZScheduleZEC12.td
1 //=- SystemZScheduleZEC12.td - SystemZ Scheduling Definitions --*- tblgen -*-=//
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 defines the machine model for ZEC12 to support instruction
11 // scheduling and other instruction cost heuristics.
12 //
13 // Pseudos expanded right after isel do not need to be modelled here.
14 //
15 //===----------------------------------------------------------------------===//
16
17 def ZEC12Model : SchedMachineModel {
18
19     let UnsupportedFeatures = Arch10UnsupportedFeatures.List;
20     
21     let IssueWidth = 3;
22     let MicroOpBufferSize = 40;     // Issue queues
23     let LoadLatency = 1;            // Optimistic load latency.
24
25     let PostRAScheduler = 1;
26
27     // Extra cycles for a mispredicted branch.
28     let MispredictPenalty = 16;
29 }
30
31 let SchedModel = ZEC12Model in {
32 // These definitions need the SchedModel value. They could be put in a
33 // subtarget common include file, but it seems the include system in Tablegen
34 // currently (2016) rejects multiple includes of same file.
35
36 // Decoder grouping rules
37 let NumMicroOps = 1 in {
38   def : WriteRes<NormalGr, []>;
39   def : WriteRes<BeginGroup, []> { let BeginGroup  = 1; }
40   def : WriteRes<EndGroup, []>   { let EndGroup    = 1; }
41 }
42 def : WriteRes<GroupAlone, []> {
43   let NumMicroOps = 3;
44   let BeginGroup  = 1;
45   let EndGroup    = 1;
46 }
47 def : WriteRes<GroupAlone2, []> {
48   let NumMicroOps = 6;
49   let BeginGroup  = 1;
50   let EndGroup    = 1;
51 }
52 def : WriteRes<GroupAlone3, []> {
53   let NumMicroOps = 9;
54   let BeginGroup  = 1;
55   let EndGroup    = 1;
56 }
57
58 // Incoming latency removed from the register operand which is used together
59 // with a memory operand by the instruction.
60 def : ReadAdvance<RegReadAdv, 4>;
61
62 // LoadLatency (above) is not used for instructions in this file. This is
63 // instead the role of LSULatency, which is the latency value added to the
64 // result of loads and instructions with folded memory operands.
65 def : WriteRes<LSULatency, []> { let Latency = 4; let NumMicroOps = 0; }
66
67 let NumMicroOps = 0 in {
68   foreach L = 1-30 in {
69     def : WriteRes<!cast<SchedWrite>("WLat"#L), []> { let Latency = L; }
70   }
71 }
72
73 // Execution units.
74 def ZEC12_FXUnit : ProcResource<2>;
75 def ZEC12_LSUnit : ProcResource<2>;
76 def ZEC12_FPUnit : ProcResource<1>;
77 def ZEC12_DFUnit : ProcResource<1>;
78 def ZEC12_VBUnit : ProcResource<1>;
79 def ZEC12_MCD    : ProcResource<1>;
80
81 // Subtarget specific definitions of scheduling resources.
82 let NumMicroOps = 0 in {
83   def : WriteRes<FXU, [ZEC12_FXUnit]>;
84   def : WriteRes<LSU, [ZEC12_LSUnit]>;
85   def : WriteRes<FPU, [ZEC12_FPUnit]>;
86   def : WriteRes<DFU, [ZEC12_DFUnit]>;
87   foreach Num = 2-6 in { let ResourceCycles = [Num] in {
88     def : WriteRes<!cast<SchedWrite>("FXU"#Num), [ZEC12_FXUnit]>;
89     def : WriteRes<!cast<SchedWrite>("LSU"#Num), [ZEC12_LSUnit]>;
90     def : WriteRes<!cast<SchedWrite>("FPU"#Num), [ZEC12_FPUnit]>;
91     def : WriteRes<!cast<SchedWrite>("DFU"#Num), [ZEC12_DFUnit]>;
92   }}
93
94   def : WriteRes<VBU,  [ZEC12_VBUnit]>; // Virtual Branching Unit
95 }
96
97 def : WriteRes<MCD, [ZEC12_MCD]> { let NumMicroOps = 3;
98                                    let BeginGroup  = 1;
99                                    let EndGroup    = 1; }
100
101 // -------------------------- INSTRUCTIONS ---------------------------------- //
102
103 // InstRW constructs have been used in order to preserve the
104 // readability of the InstrInfo files.
105
106 // For each instruction, as matched by a regexp, provide a list of
107 // resources that it needs. These will be combined into a SchedClass.
108
109 //===----------------------------------------------------------------------===//
110 // Stack allocation
111 //===----------------------------------------------------------------------===//
112
113 // Pseudo -> LA / LAY
114 def : InstRW<[WLat1, FXU, NormalGr], (instregex "ADJDYNALLOC$")>;
115
116 //===----------------------------------------------------------------------===//
117 // Branch instructions
118 //===----------------------------------------------------------------------===//
119
120 // Branch
121 def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?BRC(L)?(Asm.*)?$")>;
122 def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Call)?J(G)?(Asm.*)?$")>;
123 def : InstRW<[WLat1, LSU, NormalGr], (instregex "(Call)?BC(R)?(Asm.*)?$")>;
124 def : InstRW<[WLat1, LSU, NormalGr], (instregex "(Call)?B(R)?(Asm.*)?$")>;
125 def : InstRW<[WLat1, FXU, EndGroup], (instregex "BRCT(G)?$")>;
126 def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BRCTH$")>;
127 def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BCT(G)?(R)?$")>;
128 def : InstRW<[WLat1, FXU3, LSU, GroupAlone2],
129              (instregex "B(R)?X(H|L).*$")>;
130
131 // Compare and branch
132 def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>;
133 def : InstRW<[WLat1, FXU, LSU, GroupAlone],
134              (instregex "C(L)?(G)?(I|R)B(Call|Return|Asm.*)?$")>;
135
136 //===----------------------------------------------------------------------===//
137 // Trap instructions
138 //===----------------------------------------------------------------------===//
139
140 // Trap
141 def : InstRW<[WLat1, VBU, NormalGr], (instregex "(Cond)?Trap$")>;
142
143 // Compare and trap
144 def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(G)?(I|R)T(Asm.*)?$")>;
145 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CL(G)?RT(Asm.*)?$")>;
146 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CL(F|G)IT(Asm.*)?$")>;
147 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "CL(G)?T(Asm.*)?$")>;
148
149 //===----------------------------------------------------------------------===//
150 // Call and return instructions
151 //===----------------------------------------------------------------------===//
152
153 // Call
154 def : InstRW<[WLat1, FXU2, VBU, GroupAlone], (instregex "(Call)?BRAS$")>;
155 def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "(Call)?BRASL$")>;
156 def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "(Call)?BAS(R)?$")>;
157 def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "TLS_(G|L)DCALL$")>;
158
159 // Return
160 def : InstRW<[WLat1, LSU, EndGroup], (instregex "Return$")>;
161 def : InstRW<[WLat1, LSU, NormalGr], (instregex "CondReturn$")>;
162
163 //===----------------------------------------------------------------------===//
164 // Move instructions
165 //===----------------------------------------------------------------------===//
166
167 // Moves
168 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "MV(G|H)?HI$")>;
169 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "MVI(Y)?$")>;
170
171 // Move character
172 def : InstRW<[WLat1, FXU, LSU3, GroupAlone], (instregex "MVC$")>;
173 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVCL(E|U)?$")>;
174
175 // Pseudo -> reg move
176 def : InstRW<[WLat1, FXU, NormalGr], (instregex "COPY(_TO_REGCLASS)?$")>;
177 def : InstRW<[WLat1, FXU, NormalGr], (instregex "EXTRACT_SUBREG$")>;
178 def : InstRW<[WLat1, FXU, NormalGr], (instregex "INSERT_SUBREG$")>;
179 def : InstRW<[WLat1, FXU, NormalGr], (instregex "REG_SEQUENCE$")>;
180
181 // Loads
182 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(Y|FH|RL|Mux)?$")>;
183 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LG(RL)?$")>;
184 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L128$")>;
185
186 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLIH(F|H|L)$")>;
187 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLIL(F|H|L)$")>;
188
189 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LG(F|H)I$")>;
190 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LHI(Mux)?$")>;
191 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LR(Mux)?$")>;
192
193 // Load and trap
194 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "L(FH|G)?AT$")>;
195
196 // Load and test
197 def : InstRW<[WLat1LSU, WLat1LSU, LSU, FXU, NormalGr], (instregex "LT(G)?$")>;
198 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LT(G)?R$")>;
199
200 // Stores
201 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STG(RL)?$")>;
202 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST128$")>;
203 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST(Y|FH|RL|Mux)?$")>;
204
205 // String moves.
206 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "MVST$")>;
207
208 //===----------------------------------------------------------------------===//
209 // Conditional move instructions
210 //===----------------------------------------------------------------------===//
211
212 def : InstRW<[WLat2, FXU, NormalGr], (instregex "LOC(G)?R(Asm.*)?$")>;
213 def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
214              (instregex "LOC(G)?(Asm.*)?$")>;
215 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STOC(G)?(Asm.*)?$")>;
216
217 //===----------------------------------------------------------------------===//
218 // Sign extensions
219 //===----------------------------------------------------------------------===//
220
221 def : InstRW<[WLat1, FXU, NormalGr], (instregex "L(B|H|G)R$")>;
222 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LG(B|H|F)R$")>;
223
224 def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LTGF$")>;
225 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LTGFR$")>;
226
227 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LB(H|Mux)?$")>;
228 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LH(Y)?$")>;
229 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LH(H|Mux|RL)$")>;
230 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LG(B|H|F)$")>;
231 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LG(H|F)RL$")>;
232
233 //===----------------------------------------------------------------------===//
234 // Zero extensions
235 //===----------------------------------------------------------------------===//
236
237 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLCR(Mux)?$")>;
238 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLHR(Mux)?$")>;
239 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LLG(C|H|F|T)R$")>;
240 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLC(Mux)?$")>;
241 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLH(Mux)?$")>;
242 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LL(C|H)H$")>;
243 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLHRL$")>;
244 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LLG(C|H|F|T|HRL|FRL)$")>;
245
246 // Load and trap
247 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LLG(F|T)?AT$")>;
248
249 //===----------------------------------------------------------------------===//
250 // Truncations
251 //===----------------------------------------------------------------------===//
252
253 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STC(H|Y|Mux)?$")>;
254 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STH(H|Y|RL|Mux)?$")>;
255 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STCM(H|Y)?$")>;
256
257 //===----------------------------------------------------------------------===//
258 // Multi-register moves
259 //===----------------------------------------------------------------------===//
260
261 // Load multiple (estimated average of 5 ops)
262 def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LM(H|Y|G)?$")>;
263
264 // Load multiple disjoint
265 def : InstRW<[WLat30, WLat30, MCD], (instregex "LMD$")>;
266
267 // Store multiple (estimated average of 3 ops)
268 def : InstRW<[WLat1, LSU2, FXU5, GroupAlone], (instregex "STM(H|Y|G)?$")>;
269
270 //===----------------------------------------------------------------------===//
271 // Byte swaps
272 //===----------------------------------------------------------------------===//
273
274 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LRV(G)?R$")>;
275 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "LRV(G|H)?$")>;
276 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STRV(G|H)?$")>;
277 def : InstRW<[WLat30, MCD], (instregex "MVCIN$")>;
278
279 //===----------------------------------------------------------------------===//
280 // Load address instructions
281 //===----------------------------------------------------------------------===//
282
283 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LA(Y|RL)?$")>;
284
285 // Load the Global Offset Table address
286 def : InstRW<[WLat1, FXU, NormalGr], (instregex "GOT$")>;
287
288 //===----------------------------------------------------------------------===//
289 // Absolute and Negation
290 //===----------------------------------------------------------------------===//
291
292 def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "LP(G)?R$")>;
293 def : InstRW<[WLat3, WLat3, FXU2, GroupAlone], (instregex "L(N|P)GFR$")>;
294 def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "LN(R|GR)$")>;
295 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LC(R|GR)$")>;
296 def : InstRW<[WLat2, WLat2, FXU2, GroupAlone], (instregex "LCGFR$")>;
297
298 //===----------------------------------------------------------------------===//
299 // Insertion
300 //===----------------------------------------------------------------------===//
301
302 def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "IC(Y)?$")>;
303 def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
304              (instregex "IC32(Y)?$")>;
305 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
306              (instregex "ICM(H|Y)?$")>;
307 def : InstRW<[WLat1, FXU, NormalGr], (instregex "II(F|H|L)Mux$")>;
308 def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHF(64)?$")>;
309 def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHH(64)?$")>;
310 def : InstRW<[WLat1, FXU, NormalGr], (instregex "IIHL(64)?$")>;
311 def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILF(64)?$")>;
312 def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILH(64)?$")>;
313 def : InstRW<[WLat1, FXU, NormalGr], (instregex "IILL(64)?$")>;
314
315 //===----------------------------------------------------------------------===//
316 // Addition
317 //===----------------------------------------------------------------------===//
318
319 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
320              (instregex "A(L)?(Y)?$")>;
321 def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "A(L)?SI$")>;
322 def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
323              (instregex "AH(Y)?$")>;
324 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AIH$")>;
325 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AFI(Mux)?$")>;
326 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGFI$")>;
327 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGHI(K)?$")>;
328 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AGR(K)?$")>;
329 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AHI(K)?$")>;
330 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AHIMux(K)?$")>;
331 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AL(FI|HSIK)$")>;
332 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
333              (instregex "ALGF$")>;
334 def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGHSIK$")>;
335 def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGF(I|R)$")>;
336 def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALGR(K)?$")>;
337 def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALR(K)?$")>;
338 def : InstRW<[WLat1, FXU, NormalGr], (instregex "AR(K)?$")>;
339 def : InstRW<[WLat1, FXU, NormalGr], (instregex "A(L)?HHHR$")>;
340 def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "A(L)?HHLR$")>;
341 def : InstRW<[WLat1, FXU, NormalGr], (instregex "ALSIH(N)?$")>;
342 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
343              (instregex "A(L)?G$")>;
344 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "A(L)?GSI$")>;
345
346 // Logical addition with carry
347 def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, GroupAlone],
348              (instregex "ALC(G)?$")>;
349 def : InstRW<[WLat2, WLat2, FXU, GroupAlone], (instregex "ALC(G)?R$")>;
350
351 // Add with sign extension (32 -> 64)
352 def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
353              (instregex "AGF$")>;
354 def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "AGFR$")>;
355
356 //===----------------------------------------------------------------------===//
357 // Subtraction
358 //===----------------------------------------------------------------------===//
359
360 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
361              (instregex "S(G|Y)?$")>;
362 def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
363              (instregex "SH(Y)?$")>;
364 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SGR(K)?$")>;
365 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLFI$")>;
366 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
367              (instregex "SL(G|GF|Y)?$")>;
368 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLGF(I|R)$")>;
369 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLGR(K)?$")>;
370 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLR(K)?$")>;
371 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SR(K)?$")>;
372 def : InstRW<[WLat1, FXU, NormalGr], (instregex "S(L)?HHHR$")>;
373 def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "S(L)?HHLR$")>;
374
375 // Subtraction with borrow
376 def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, GroupAlone],
377              (instregex "SLB(G)?$")>;
378 def : InstRW<[WLat2, WLat2, FXU, GroupAlone], (instregex "SLB(G)?R$")>;
379
380 // Subtraction with sign extension (32 -> 64)
381 def : InstRW<[WLat2LSU, WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
382              (instregex "SGF$")>;
383 def : InstRW<[WLat2, WLat2, FXU, NormalGr], (instregex "SGFR$")>;
384
385 //===----------------------------------------------------------------------===//
386 // AND
387 //===----------------------------------------------------------------------===//
388
389 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
390              (instregex "N(G|Y)?$")>;
391 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NGR(K)?$")>;
392 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NI(FMux|HMux|LMux)$")>;
393 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "NI(Y)?$")>;
394 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHF(64)?$")>;
395 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHH(64)?$")>;
396 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIHL(64)?$")>;
397 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILF(64)?$")>;
398 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILH(64)?$")>;
399 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NILL(64)?$")>;
400 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NR(K)?$")>;
401 def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "NC$")>;
402
403 //===----------------------------------------------------------------------===//
404 // OR
405 //===----------------------------------------------------------------------===//
406
407 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
408              (instregex "O(G|Y)?$")>;
409 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OGR(K)?$")>;
410 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "OI(Y)?$")>;
411 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OI(FMux|HMux|LMux)$")>;
412 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHF(64)?$")>;
413 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHH(64)?$")>;
414 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OIHL(64)?$")>;
415 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILF(64)?$")>;
416 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILH(64)?$")>;
417 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OILL(64)?$")>;
418 def : InstRW<[WLat1, FXU, NormalGr], (instregex "OR(K)?$")>;
419 def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "OC$")>;
420
421 //===----------------------------------------------------------------------===//
422 // XOR
423 //===----------------------------------------------------------------------===//
424
425 def : InstRW<[WLat1LSU, WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
426              (instregex "X(G|Y)?$")>;
427 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "XI(Y)?$")>;
428 def : InstRW<[WLat1, FXU, NormalGr], (instregex "XIFMux$")>;
429 def : InstRW<[WLat1, FXU, NormalGr], (instregex "XGR(K)?$")>;
430 def : InstRW<[WLat1, FXU, NormalGr], (instregex "XIHF(64)?$")>;
431 def : InstRW<[WLat1, FXU, NormalGr], (instregex "XILF(64)?$")>;
432 def : InstRW<[WLat1, FXU, NormalGr], (instregex "XR(K)?$")>;
433 def : InstRW<[WLat5LSU, LSU2, FXU, GroupAlone], (instregex "XC$")>;
434
435 //===----------------------------------------------------------------------===//
436 // Multiplication
437 //===----------------------------------------------------------------------===//
438
439 def : InstRW<[WLat6LSU, RegReadAdv, FXU, LSU, NormalGr],
440              (instregex "MS(GF|Y)?$")>;
441 def : InstRW<[WLat6, FXU, NormalGr], (instregex "MS(R|FI)$")>;
442 def : InstRW<[WLat8LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "MSG$")>;
443 def : InstRW<[WLat8, FXU, NormalGr], (instregex "MSGR$")>;
444 def : InstRW<[WLat6, FXU, NormalGr], (instregex "MSGF(I|R)$")>;
445 def : InstRW<[WLat11LSU, RegReadAdv, FXU2, LSU, GroupAlone],
446              (instregex "MLG$")>;
447 def : InstRW<[WLat9, FXU2, GroupAlone], (instregex "MLGR$")>;
448 def : InstRW<[WLat5, FXU, NormalGr], (instregex "MGHI$")>;
449 def : InstRW<[WLat5, FXU, NormalGr], (instregex "MHI$")>;
450 def : InstRW<[WLat5LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "MH(Y)?$")>;
451 def : InstRW<[WLat7, FXU2, GroupAlone], (instregex "M(L)?R$")>;
452 def : InstRW<[WLat7LSU, RegReadAdv, FXU2, LSU, GroupAlone],
453              (instregex "M(FY|L)?$")>;
454
455 //===----------------------------------------------------------------------===//
456 // Division and remainder
457 //===----------------------------------------------------------------------===//
458
459 def : InstRW<[WLat30, FPU4, FXU5, GroupAlone3], (instregex "DR$")>;
460 def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU4, GroupAlone3],
461              (instregex "D$")>;
462 def : InstRW<[WLat30, FPU4, FXU4, GroupAlone3], (instregex "DSG(F)?R$")>;
463 def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU3, GroupAlone3],
464              (instregex "DSG(F)?$")>;
465 def : InstRW<[WLat30, FPU4, FXU5, GroupAlone3], (instregex "DL(G)?R$")>;
466 def : InstRW<[WLat30, RegReadAdv, FPU4, LSU, FXU4, GroupAlone3],
467              (instregex "DL(G)?$")>;
468
469 //===----------------------------------------------------------------------===//
470 // Shifts
471 //===----------------------------------------------------------------------===//
472
473 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLL(G|K)?$")>;
474 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SRL(G|K)?$")>;
475 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SRA(G|K)?$")>;
476 def : InstRW<[WLat1, FXU, NormalGr], (instregex "SLA(G|K)?$")>;
477 def : InstRW<[WLat5LSU, WLat5LSU, FXU4, LSU, GroupAlone2],
478              (instregex "S(L|R)D(A|L)$")>;
479
480 // Rotate
481 def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "RLL(G)?$")>;
482
483 // Rotate and insert
484 def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBG(N|32)?$")>;
485 def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBH(G|H|L)$")>;
486 def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBL(G|H|L)$")>;
487 def : InstRW<[WLat1, FXU, NormalGr], (instregex "RISBMux$")>;
488
489 // Rotate and Select
490 def : InstRW<[WLat3, WLat3, FXU2, GroupAlone], (instregex "R(N|O|X)SBG$")>;
491
492 //===----------------------------------------------------------------------===//
493 // Comparison
494 //===----------------------------------------------------------------------===//
495
496 def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "C(G|Y|Mux|RL)?$")>;
497 def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(F|H)I(Mux)?$")>;
498 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CG(F|H)I$")>;
499 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CG(HSI|RL)$")>;
500 def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(G)?R$")>;
501 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CIH$")>;
502 def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CHF$")>;
503 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CHSI$")>;
504 def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr],
505              (instregex "CL(Y|Mux)?$")>;
506 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLFHSI$")>;
507 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLFI(Mux)?$")>;
508 def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLG$")>;
509 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLG(HRL|HSI)$")>;
510 def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLGF$")>;
511 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLGFRL$")>;
512 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLGF(I|R)$")>;
513 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLGR$")>;
514 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLGRL$")>;
515 def : InstRW<[WLat1LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CLHF$")>;
516 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLH(RL|HSI)$")>;
517 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLIH$")>;
518 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLI(Y)?$")>;
519 def : InstRW<[WLat1, FXU, NormalGr], (instregex "CLR$")>;
520 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "CLRL$")>;
521 def : InstRW<[WLat1, FXU, NormalGr], (instregex "C(L)?HHR$")>;
522 def : InstRW<[WLat2, FXU, NormalGr], (instregex "C(L)?HLR$")>;
523
524 // Compare halfword
525 def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CH(Y)?$")>;
526 def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CHRL$")>;
527 def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CGH$")>;
528 def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CGHRL$")>;
529 def : InstRW<[WLat2LSU, FXU2, LSU, GroupAlone], (instregex "CHHSI$")>;
530
531 // Compare with sign extension (32 -> 64)
532 def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr], (instregex "CGF$")>;
533 def : InstRW<[WLat2LSU, FXU, LSU, NormalGr], (instregex "CGFRL$")>;
534 def : InstRW<[WLat2, FXU, NormalGr], (instregex "CGFR$")>;
535
536 // Compare logical character
537 def : InstRW<[WLat9, FXU, LSU2, GroupAlone], (instregex "CLC$")>;
538 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLCL(E|U)?$")>;
539 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CLST$")>;
540
541 // Test under mask
542 def : InstRW<[WLat1LSU, FXU, LSU, NormalGr], (instregex "TM(Y)?$")>;
543 def : InstRW<[WLat1, FXU, NormalGr], (instregex "TM(H|L)Mux$")>;
544 def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMHH(64)?$")>;
545 def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMHL(64)?$")>;
546 def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMLH(64)?$")>;
547 def : InstRW<[WLat1, FXU, NormalGr], (instregex "TMLL(64)?$")>;
548
549 // Compare logical characters under mask
550 def : InstRW<[WLat2LSU, RegReadAdv, FXU, LSU, NormalGr],
551              (instregex "CLM(H|Y)?$")>;
552
553 //===----------------------------------------------------------------------===//
554 // Prefetch and execution hint
555 //===----------------------------------------------------------------------===//
556
557 def : InstRW<[WLat1, LSU, NormalGr], (instregex "PFD(RL)?$")>;
558 def : InstRW<[WLat1, LSU, NormalGr], (instregex "BP(R)?P$")>;
559 def : InstRW<[WLat1, FXU, NormalGr], (instregex "NIAI$")>;
560
561 //===----------------------------------------------------------------------===//
562 // Atomic operations
563 //===----------------------------------------------------------------------===//
564
565 def : InstRW<[WLat1, LSU, EndGroup], (instregex "Serialize$")>;
566
567 def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAA(G)?$")>;
568 def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAAL(G)?$")>;
569 def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAN(G)?$")>;
570 def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAO(G)?$")>;
571 def : InstRW<[WLat1LSU, WLat1LSU, FXU, LSU, NormalGr], (instregex "LAX(G)?$")>;
572
573 // Test and set
574 def : InstRW<[WLat1LSU, FXU, LSU, EndGroup], (instregex "TS$")>;
575
576 // Compare and swap
577 def : InstRW<[WLat2LSU, WLat2LSU, FXU2, LSU, GroupAlone],
578              (instregex "CS(G|Y)?$")>;
579
580 // Compare double and swap
581 def : InstRW<[WLat5LSU, WLat5LSU, FXU5, LSU, GroupAlone2],
582              (instregex "CDS(Y)?$")>;
583 def : InstRW<[WLat12, WLat12, FXU6, LSU2, GroupAlone],
584              (instregex "CDSG$")>;
585
586 // Compare and swap and store
587 def : InstRW<[WLat30, MCD], (instregex "CSST$")>;
588
589 // Perform locked operation
590 def : InstRW<[WLat30, MCD], (instregex "PLO$")>;
591
592 // Load/store pair from/to quadword
593 def : InstRW<[WLat4LSU, LSU2, GroupAlone], (instregex "LPQ$")>;
594 def : InstRW<[WLat1, FXU2, LSU2, GroupAlone], (instregex "STPQ$")>;
595
596 // Load pair disjoint
597 def : InstRW<[WLat2LSU, WLat2LSU, LSU2, GroupAlone], (instregex "LPD(G)?$")>;
598
599 //===----------------------------------------------------------------------===//
600 // Translate and convert
601 //===----------------------------------------------------------------------===//
602
603 def : InstRW<[WLat1, LSU, GroupAlone], (instregex "TR$")>;
604 def : InstRW<[WLat30, WLat30, WLat30, FXU3, LSU2, GroupAlone2],
605              (instregex "TRT$")>;
606 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRTR$")>;
607 def : InstRW<[WLat30, WLat30, MCD], (instregex "TRE$")>;
608 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TRT(R)?E(Opt)?$")>;
609 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "TR(T|O)(T|O)(Opt)?$")>;
610 def : InstRW<[WLat30, WLat30, WLat30, MCD],
611              (instregex "CU(12|14|21|24|41|42)(Opt)?$")>;
612 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(CUUTF|CUTFU)(Opt)?$")>;
613
614 //===----------------------------------------------------------------------===//
615 // Message-security assist
616 //===----------------------------------------------------------------------===//
617
618 def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD],
619              (instregex "KM(C|F|O|CTR)?$")>;
620 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "(KIMD|KLMD|KMAC|PCC)$")>;
621
622 //===----------------------------------------------------------------------===//
623 // Decimal arithmetic
624 //===----------------------------------------------------------------------===//
625
626 def : InstRW<[WLat30, RegReadAdv, FXU, DFU2, LSU2, GroupAlone2],
627              (instregex "CVBG$")>;
628 def : InstRW<[WLat20, RegReadAdv, FXU, DFU, LSU, GroupAlone],
629              (instregex "CVB(Y)?$")>;
630 def : InstRW<[WLat1, FXU3, DFU4, LSU, GroupAlone3], (instregex "CVDG$")>;
631 def : InstRW<[WLat1, FXU2, DFU, LSU, GroupAlone], (instregex "CVD(Y)?$")>;
632 def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "MV(N|O|Z)$")>;
633 def : InstRW<[WLat1, LSU5, GroupAlone], (instregex "(PACK|PKA|PKU)$")>;
634 def : InstRW<[WLat10, LSU5, GroupAlone], (instregex "UNPK(A|U)$")>;
635 def : InstRW<[WLat1, FXU, LSU2, GroupAlone], (instregex "UNPK$")>;
636
637 def : InstRW<[WLat11LSU, FXU, DFU4, LSU2, GroupAlone],
638              (instregex "(A|S|ZA)P$")>;
639 def : InstRW<[WLat1, FXU, DFU4, LSU2, GroupAlone], (instregex "(M|D)P$")>;
640 def : InstRW<[WLat15, FXU2, DFU4, LSU3, GroupAlone], (instregex "SRP$")>;
641 def : InstRW<[WLat11, DFU4, LSU2, GroupAlone], (instregex "CP$")>;
642 def : InstRW<[WLat5LSU, DFU2, LSU2, GroupAlone], (instregex "TP$")>;
643 def : InstRW<[WLat30, MCD], (instregex "ED(MK)?$")>;
644
645 //===----------------------------------------------------------------------===//
646 // Access registers
647 //===----------------------------------------------------------------------===//
648
649 // Extract/set/copy access register
650 def : InstRW<[WLat3, LSU, NormalGr], (instregex "(EAR|SAR|CPYA)$")>;
651
652 // Load address extended
653 def : InstRW<[WLat5, LSU, FXU, GroupAlone], (instregex "LAE(Y)?$")>;
654
655 // Load/store access multiple (not modeled precisely)
656 def : InstRW<[WLat10, WLat10, LSU5, GroupAlone], (instregex "LAM(Y)?$")>;
657 def : InstRW<[WLat1, FXU5, LSU5, GroupAlone], (instregex "STAM(Y)?$")>;
658
659 //===----------------------------------------------------------------------===//
660 // Program mask and addressing mode
661 //===----------------------------------------------------------------------===//
662
663 // Insert Program Mask
664 def : InstRW<[WLat3, FXU, EndGroup], (instregex "IPM$")>;
665
666 // Set Program Mask
667 def : InstRW<[WLat3, LSU, EndGroup], (instregex "SPM$")>;
668
669 // Branch and link
670 def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "BAL(R)?$")>;
671
672 // Test addressing mode
673 def : InstRW<[WLat1, FXU, NormalGr], (instregex "TAM$")>;
674
675 // Set addressing mode
676 def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAM(24|31|64)$")>;
677
678 // Branch (and save) and set mode.
679 def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "BSM$")>;
680 def : InstRW<[WLat1, FXU2, LSU, GroupAlone], (instregex "BASSM$")>;
681
682 //===----------------------------------------------------------------------===//
683 // Transactional execution
684 //===----------------------------------------------------------------------===//
685
686 // Transaction begin
687 def : InstRW<[WLat9, LSU2, FXU5, GroupAlone], (instregex "TBEGIN(C)?$")>;
688
689 // Transaction end
690 def : InstRW<[WLat4, LSU, GroupAlone], (instregex "TEND$")>;
691
692 // Transaction abort
693 def : InstRW<[WLat30, MCD], (instregex "TABORT$")>;
694
695 // Extract Transaction Nesting Depth
696 def : InstRW<[WLat30, MCD], (instregex "ETND$")>;
697
698 // Nontransactional store
699 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "NTSTG$")>;
700
701 //===----------------------------------------------------------------------===//
702 // Processor assist
703 //===----------------------------------------------------------------------===//
704
705 def : InstRW<[WLat30, MCD], (instregex "PPA$")>;
706
707 //===----------------------------------------------------------------------===//
708 // Miscellaneous Instructions.
709 //===----------------------------------------------------------------------===//
710
711 // Find leftmost one
712 def : InstRW<[WLat7, WLat7, FXU2, GroupAlone], (instregex "FLOGR$")>;
713
714 // Population count
715 def : InstRW<[WLat3, WLat3, FXU, NormalGr], (instregex "POPCNT$")>;
716
717 // String instructions
718 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "SRST(U)?$")>;
719 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CUSE$")>;
720
721 // Various complex instructions
722 def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CFC$")>;
723 def : InstRW<[WLat30, WLat30, WLat30, WLat30, WLat30, WLat30, MCD],
724              (instregex "UPT$")>;
725 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "CKSM$")>;
726 def : InstRW<[WLat30, WLat30, WLat30, WLat30, MCD], (instregex "CMPSC$")>;
727
728 // Execute
729 def : InstRW<[LSU, GroupAlone], (instregex "EX(RL)?$")>;
730
731 //===----------------------------------------------------------------------===//
732 // .insn directive instructions
733 //===----------------------------------------------------------------------===//
734
735 // An "empty" sched-class will be assigned instead of the "invalid sched-class".
736 // getNumDecoderSlots() will then return 1 instead of 0.
737 def : InstRW<[], (instregex "Insn.*")>;
738
739
740 // ----------------------------- Floating point ----------------------------- //
741
742 //===----------------------------------------------------------------------===//
743 // FP: Move instructions
744 //===----------------------------------------------------------------------===//
745
746 // Load zero
747 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LZ(DR|ER)$")>;
748 def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "LZXR$")>;
749
750 // Load
751 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LER$")>;
752 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LD(R|R32|GR)$")>;
753 def : InstRW<[WLat3, FXU, NormalGr], (instregex "LGDR$")>;
754 def : InstRW<[WLat2, FXU2, GroupAlone], (instregex "LXR$")>;
755
756 // Load and Test
757 def : InstRW<[WLat9, WLat9, FPU, NormalGr], (instregex "LT(E|D)BR$")>;
758 def : InstRW<[WLat9, FPU, NormalGr], (instregex "LT(E|D)BRCompare$")>;
759 def : InstRW<[WLat10, WLat10, FPU4, GroupAlone], (instregex "LTXBR(Compare)?$")>;
760
761 // Copy sign
762 def : InstRW<[WLat5, FXU2, GroupAlone], (instregex "CPSDR(d|s)(d|s)$")>;
763
764 //===----------------------------------------------------------------------===//
765 // FP: Load instructions
766 //===----------------------------------------------------------------------===//
767
768 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "L(E|D)(Y|E32)?$")>;
769 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LX$")>;
770
771 //===----------------------------------------------------------------------===//
772 // FP: Store instructions
773 //===----------------------------------------------------------------------===//
774
775 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "ST(E|D)(Y)?$")>;
776 def : InstRW<[WLat1, FXU, LSU, NormalGr], (instregex "STX$")>;
777
778 //===----------------------------------------------------------------------===//
779 // FP: Conversion instructions
780 //===----------------------------------------------------------------------===//
781
782 // Load rounded
783 def : InstRW<[WLat7, FPU, NormalGr], (instregex "LEDBR(A)?$")>;
784 def : InstRW<[WLat9, FPU2, NormalGr], (instregex "L(E|D)XBR(A)?$")>;
785
786 // Load lengthened
787 def : InstRW<[WLat7LSU, FPU, LSU, NormalGr], (instregex "LDEB$")>;
788 def : InstRW<[WLat7, FPU, NormalGr], (instregex "LDEBR$")>;
789 def : InstRW<[WLat11LSU, FPU4, LSU, GroupAlone], (instregex "LX(E|D)B$")>;
790 def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "LX(E|D)BR$")>;
791
792 // Convert from fixed / logical
793 def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "C(E|D)(F|G)BR(A)?$")>;
794 def : InstRW<[WLat11, FXU, FPU4, GroupAlone2], (instregex "CX(F|G)BR(A?)$")>;
795 def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "CEL(F|G)BR$")>;
796 def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "CDL(F|G)BR$")>;
797 def : InstRW<[WLat11, FXU, FPU4, GroupAlone2], (instregex "CXL(F|G)BR$")>;
798
799 // Convert to fixed / logical
800 def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone],
801              (instregex "C(F|G)(E|D)BR(A?)$")>;
802 def : InstRW<[WLat12, WLat12, FXU, FPU2, GroupAlone],
803              (instregex "C(F|G)XBR(A?)$")>;
804 def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone],
805              (instregex "CL(F|G)(E|D)BR$")>;
806 def : InstRW<[WLat12, WLat12, FXU, FPU2, GroupAlone], (instregex "CL(F|G)XBR$")>;
807
808 //===----------------------------------------------------------------------===//
809 // FP: Unary arithmetic
810 //===----------------------------------------------------------------------===//
811
812 // Load Complement / Negative / Positive
813 def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "L(C|N|P)(E|D)BR$")>;
814 def : InstRW<[WLat1, FXU, NormalGr], (instregex "L(C|N|P)DFR(_32)?$")>;
815 def : InstRW<[WLat10, WLat10, FPU4, GroupAlone], (instregex "L(C|N|P)XBR$")>;
816
817 // Square root
818 def : InstRW<[WLat30, FPU, LSU, NormalGr], (instregex "SQ(E|D)B$")>;
819 def : InstRW<[WLat30, FPU, NormalGr], (instregex "SQ(E|D)BR$")>;
820 def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "SQXBR$")>;
821
822 // Load FP integer
823 def : InstRW<[WLat7, FPU, NormalGr], (instregex "FI(E|D)BR(A)?$")>;
824 def : InstRW<[WLat15, FPU4, GroupAlone], (instregex "FIXBR(A)?$")>;
825
826 //===----------------------------------------------------------------------===//
827 // FP: Binary arithmetic
828 //===----------------------------------------------------------------------===//
829
830 // Addition
831 def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
832              (instregex "A(E|D)B$")>;
833 def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "A(E|D)BR$")>;
834 def : InstRW<[WLat20, WLat20, FPU4, GroupAlone], (instregex "AXBR$")>;
835
836 // Subtraction
837 def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
838              (instregex "S(E|D)B$")>;
839 def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "S(E|D)BR$")>;
840 def : InstRW<[WLat20, WLat20, FPU4, GroupAlone], (instregex "SXBR$")>;
841
842 // Multiply
843 def : InstRW<[WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
844              (instregex "M(D|DE|EE)B$")>;
845 def : InstRW<[WLat7, FPU, NormalGr], (instregex "M(D|DE|EE)BR$")>;
846 def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone],
847              (instregex "MXDB$")>;
848 def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MXDBR$")>;
849 def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "MXBR$")>;
850
851 // Multiply and add / subtract
852 def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone],
853              (instregex "M(A|S)EB$")>;
854 def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)EBR$")>;
855 def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone],
856              (instregex "M(A|S)DB$")>;
857 def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)DBR$")>;
858
859 // Division
860 def : InstRW<[WLat30, RegReadAdv, FPU, LSU, NormalGr], (instregex "D(E|D)B$")>;
861 def : InstRW<[WLat30, FPU, NormalGr], (instregex "D(E|D)BR$")>;
862 def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "DXBR$")>;
863
864 // Divide to integer
865 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "DI(E|D)BR$")>;
866
867 //===----------------------------------------------------------------------===//
868 // FP: Comparisons
869 //===----------------------------------------------------------------------===//
870
871 // Compare
872 def : InstRW<[WLat11LSU, RegReadAdv, FPU, LSU, NormalGr],
873              (instregex "(K|C)(E|D)B$")>;
874 def : InstRW<[WLat9, FPU, NormalGr], (instregex "(K|C)(E|D)BR$")>;
875 def : InstRW<[WLat30, FPU2, NormalGr], (instregex "(K|C)XBR$")>;
876
877 // Test Data Class
878 def : InstRW<[WLat15, FPU, LSU, NormalGr], (instregex "TC(E|D)B$")>;
879 def : InstRW<[WLat15, FPU4, LSU, GroupAlone], (instregex "TCXB$")>;
880
881 //===----------------------------------------------------------------------===//
882 // FP: Floating-point control register instructions
883 //===----------------------------------------------------------------------===//
884
885 def : InstRW<[WLat4, FXU, LSU, GroupAlone], (instregex "EFPC$")>;
886 def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "STFPC$")>;
887 def : InstRW<[WLat1, LSU, GroupAlone], (instregex "SFPC$")>;
888 def : InstRW<[WLat1, LSU2, GroupAlone], (instregex "LFPC$")>;
889 def : InstRW<[WLat30, MCD], (instregex "SFASR$")>;
890 def : InstRW<[WLat30, MCD], (instregex "LFAS$")>;
891 def : InstRW<[WLat2, FXU, GroupAlone], (instregex "SRNM(B|T)?$")>;
892
893
894 // --------------------- Hexadecimal floating point ------------------------- //
895
896 //===----------------------------------------------------------------------===//
897 // HFP: Move instructions
898 //===----------------------------------------------------------------------===//
899
900 // Load and Test
901 def : InstRW<[WLat9, WLat9, FPU, NormalGr], (instregex "LT(E|D)R$")>;
902 def : InstRW<[WLat9, WLat9, FPU4, GroupAlone], (instregex "LTXR$")>;
903
904 //===----------------------------------------------------------------------===//
905 // HFP: Conversion instructions
906 //===----------------------------------------------------------------------===//
907
908 // Load rounded
909 def : InstRW<[WLat7, FPU, NormalGr], (instregex "(LEDR|LRER)$")>;
910 def : InstRW<[WLat7, FPU, NormalGr], (instregex "LEXR$")>;
911 def : InstRW<[WLat9, FPU, NormalGr], (instregex "(LDXR|LRDR)$")>;
912
913 // Load lengthened
914 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "LDE$")>;
915 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LDER$")>;
916 def : InstRW<[WLat11LSU, FPU4, LSU, GroupAlone], (instregex "LX(E|D)$")>;
917 def : InstRW<[WLat9, FPU4, GroupAlone], (instregex "LX(E|D)R$")>;
918
919 // Convert from fixed
920 def : InstRW<[WLat8, FXU, FPU, GroupAlone], (instregex "C(E|D)(F|G)R$")>;
921 def : InstRW<[WLat10, FXU, FPU4, GroupAlone2], (instregex "CX(F|G)R$")>;
922
923 // Convert to fixed
924 def : InstRW<[WLat12, WLat12, FXU, FPU, GroupAlone],
925              (instregex "C(F|G)(E|D)R$")>;
926 def : InstRW<[WLat30, WLat30, FXU, FPU2, GroupAlone], (instregex "C(F|G)XR$")>;
927
928 // Convert BFP to HFP / HFP to BFP.
929 def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "THD(E)?R$")>;
930 def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "TB(E)?DR$")>;
931
932 //===----------------------------------------------------------------------===//
933 // HFP: Unary arithmetic
934 //===----------------------------------------------------------------------===//
935
936 // Load Complement / Negative / Positive
937 def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "L(C|N|P)(E|D)R$")>;
938 def : InstRW<[WLat9, WLat9, FPU4, GroupAlone], (instregex "L(C|N|P)XR$")>;
939
940 // Halve
941 def : InstRW<[WLat7, FPU, NormalGr], (instregex "H(E|D)R$")>;
942
943 // Square root
944 def : InstRW<[WLat30, FPU, LSU, NormalGr], (instregex "SQ(E|D)$")>;
945 def : InstRW<[WLat30, FPU, NormalGr], (instregex "SQ(E|D)R$")>;
946 def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "SQXR$")>;
947
948 // Load FP integer
949 def : InstRW<[WLat7, FPU, NormalGr], (instregex "FI(E|D)R$")>;
950 def : InstRW<[WLat15, FPU4, GroupAlone], (instregex "FIXR$")>;
951
952 //===----------------------------------------------------------------------===//
953 // HFP: Binary arithmetic
954 //===----------------------------------------------------------------------===//
955
956 // Addition
957 def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
958              (instregex "A(E|D|U|W)$")>;
959 def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "A(E|D|U|W)R$")>;
960 def : InstRW<[WLat15, WLat15, FPU4, GroupAlone], (instregex "AXR$")>;
961
962 // Subtraction
963 def : InstRW<[WLat7LSU, WLat7LSU, RegReadAdv, FPU, LSU, NormalGr],
964              (instregex "S(E|D|U|W)$")>;
965 def : InstRW<[WLat7, WLat7, FPU, NormalGr], (instregex "S(E|D|U|W)R$")>;
966 def : InstRW<[WLat15, WLat15, FPU4, GroupAlone], (instregex "SXR$")>;
967
968 // Multiply
969 def : InstRW<[WLat7LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "M(D|EE)$")>;
970 def : InstRW<[WLat8LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "M(DE|E)$")>;
971 def : InstRW<[WLat7, FPU, NormalGr], (instregex "M(D|EE)R$")>;
972 def : InstRW<[WLat8, FPU, NormalGr], (instregex "M(DE|E)R$")>;
973 def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], (instregex "MXD$")>;
974 def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MXDR$")>;
975 def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "MXR$")>;
976 def : InstRW<[WLat11LSU, RegReadAdv, FPU4, LSU, GroupAlone], (instregex "MY$")>;
977 def : InstRW<[WLat7LSU, RegReadAdv, FPU2, LSU, GroupAlone],
978              (instregex "MY(H|L)$")>;
979 def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MYR$")>;
980 def : InstRW<[WLat7, FPU, GroupAlone], (instregex "MY(H|L)R$")>;
981
982 // Multiply and add / subtract
983 def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone],
984              (instregex "M(A|S)(E|D)$")>;
985 def : InstRW<[WLat7, FPU, GroupAlone], (instregex "M(A|S)(E|D)R$")>;
986 def : InstRW<[WLat11LSU, RegReadAdv, RegReadAdv, FPU4, LSU, GroupAlone],
987              (instregex "MAY$")>;
988 def : InstRW<[WLat7LSU, RegReadAdv, RegReadAdv, FPU2, LSU, GroupAlone],
989              (instregex "MAY(H|L)$")>;
990 def : InstRW<[WLat10, FPU4, GroupAlone], (instregex "MAYR$")>;
991 def : InstRW<[WLat7, FPU, GroupAlone], (instregex "MAY(H|L)R$")>;
992
993 // Division
994 def : InstRW<[WLat30, RegReadAdv, FPU, LSU, NormalGr], (instregex "D(E|D)$")>;
995 def : InstRW<[WLat30, FPU, NormalGr], (instregex "D(E|D)R$")>;
996 def : InstRW<[WLat30, FPU4, GroupAlone], (instregex "DXR$")>;
997
998 //===----------------------------------------------------------------------===//
999 // HFP: Comparisons
1000 //===----------------------------------------------------------------------===//
1001
1002 // Compare
1003 def : InstRW<[WLat11LSU, RegReadAdv, FPU, LSU, NormalGr], (instregex "C(E|D)$")>;
1004 def : InstRW<[WLat9, FPU, NormalGr], (instregex "C(E|D)R$")>;
1005 def : InstRW<[WLat15, FPU2, NormalGr], (instregex "CXR$")>;
1006
1007
1008 // ------------------------ Decimal floating point -------------------------- //
1009
1010 //===----------------------------------------------------------------------===//
1011 // DFP: Move instructions
1012 //===----------------------------------------------------------------------===//
1013
1014 // Load and Test
1015 def : InstRW<[WLat4, WLat4, DFU, NormalGr], (instregex "LTDTR$")>;
1016 def : InstRW<[WLat6, WLat6, DFU4, GroupAlone], (instregex "LTXTR$")>;
1017
1018 //===----------------------------------------------------------------------===//
1019 // DFP: Conversion instructions
1020 //===----------------------------------------------------------------------===//
1021
1022 // Load rounded
1023 def : InstRW<[WLat30, DFU, NormalGr], (instregex "LEDTR$")>;
1024 def : InstRW<[WLat30, DFU2, NormalGr], (instregex "LDXTR$")>;
1025
1026 // Load lengthened
1027 def : InstRW<[WLat7, DFU, NormalGr], (instregex "LDETR$")>;
1028 def : InstRW<[WLat6, DFU4, GroupAlone], (instregex "LXDTR$")>;
1029
1030 // Convert from fixed / logical
1031 def : InstRW<[WLat9, FXU, DFU, GroupAlone], (instregex "CDFTR$")>;
1032 def : InstRW<[WLat30, FXU, DFU, GroupAlone], (instregex "CDGTR(A)?$")>;
1033 def : InstRW<[WLat5, FXU, DFU4, GroupAlone2], (instregex "CXFTR(A)?$")>;
1034 def : InstRW<[WLat30, FXU, DFU4, GroupAlone2], (instregex "CXGTR(A)?$")>;
1035 def : InstRW<[WLat9, FXU, DFU, GroupAlone], (instregex "CDL(F|G)TR$")>;
1036 def : InstRW<[WLat9, FXU, DFU4, GroupAlone2], (instregex "CXLFTR$")>;
1037 def : InstRW<[WLat5, FXU, DFU4, GroupAlone2], (instregex "CXLGTR$")>;
1038
1039 // Convert to fixed / logical
1040 def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "CFDTR(A)?$")>;
1041 def : InstRW<[WLat30, WLat30, FXU, DFU, GroupAlone], (instregex "CGDTR(A)?$")>;
1042 def : InstRW<[WLat7, WLat7, FXU, DFU2, GroupAlone], (instregex "CFXTR$")>;
1043 def : InstRW<[WLat30, WLat30, FXU, DFU2, GroupAlone], (instregex "CGXTR(A)?$")>;
1044 def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "CL(F|G)DTR$")>;
1045 def : InstRW<[WLat7, WLat7, FXU, DFU2, GroupAlone], (instregex "CL(F|G)XTR$")>;
1046
1047 // Convert from / to signed / unsigned packed
1048 def : InstRW<[WLat5, FXU, DFU, GroupAlone], (instregex "CD(S|U)TR$")>;
1049 def : InstRW<[WLat8, FXU2, DFU4, GroupAlone2], (instregex "CX(S|U)TR$")>;
1050 def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "C(S|U)DTR$")>;
1051 def : InstRW<[WLat12, FXU2, DFU4, GroupAlone2], (instregex "C(S|U)XTR$")>;
1052
1053 // Convert from / to zoned
1054 def : InstRW<[WLat4LSU, LSU, DFU2, GroupAlone], (instregex "CDZT$")>;
1055 def : InstRW<[WLat11LSU, LSU2, DFU4, GroupAlone3], (instregex "CXZT$")>;
1056 def : InstRW<[WLat1, FXU, LSU, DFU2, GroupAlone], (instregex "CZDT$")>;
1057 def : InstRW<[WLat1, FXU, LSU, DFU2, GroupAlone], (instregex "CZXT$")>;
1058
1059 // Perform floating-point operation
1060 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "PFPO$")>;
1061
1062 //===----------------------------------------------------------------------===//
1063 // DFP: Unary arithmetic
1064 //===----------------------------------------------------------------------===//
1065
1066 // Load FP integer
1067 def : InstRW<[WLat8, DFU, NormalGr], (instregex "FIDTR$")>;
1068 def : InstRW<[WLat10, DFU4, GroupAlone], (instregex "FIXTR$")>;
1069
1070 // Extract biased exponent
1071 def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "EEDTR$")>;
1072 def : InstRW<[WLat8, FXU, DFU2, GroupAlone], (instregex "EEXTR$")>;
1073
1074 // Extract significance
1075 def : InstRW<[WLat7, FXU, DFU, GroupAlone], (instregex "ESDTR$")>;
1076 def : InstRW<[WLat8, FXU, DFU2, GroupAlone], (instregex "ESXTR$")>;
1077
1078 //===----------------------------------------------------------------------===//
1079 // DFP: Binary arithmetic
1080 //===----------------------------------------------------------------------===//
1081
1082 // Addition
1083 def : InstRW<[WLat9, WLat9, DFU, NormalGr], (instregex "ADTR(A)?$")>;
1084 def : InstRW<[WLat30, WLat30, DFU4, GroupAlone], (instregex "AXTR(A)?$")>;
1085
1086 // Subtraction
1087 def : InstRW<[WLat9, WLat9, DFU, NormalGr], (instregex "SDTR(A)?$")>;
1088 def : InstRW<[WLat30, WLat30, DFU4, GroupAlone], (instregex "SXTR(A)?$")>;
1089
1090 // Multiply
1091 def : InstRW<[WLat30, DFU, NormalGr], (instregex "MDTR(A)?$")>;
1092 def : InstRW<[WLat30, DFU4, GroupAlone], (instregex "MXTR(A)?$")>;
1093
1094 // Division
1095 def : InstRW<[WLat30, DFU, NormalGr], (instregex "DDTR(A)?$")>;
1096 def : InstRW<[WLat30, DFU4, GroupAlone], (instregex "DXTR(A)?$")>;
1097
1098 // Quantize
1099 def : InstRW<[WLat8, WLat8, DFU, NormalGr], (instregex "QADTR$")>;
1100 def : InstRW<[WLat10, WLat10, DFU4, GroupAlone], (instregex "QAXTR$")>;
1101
1102 // Reround
1103 def : InstRW<[WLat11, WLat11, FXU, DFU, GroupAlone], (instregex "RRDTR$")>;
1104 def : InstRW<[WLat30, WLat30, FXU, DFU4, GroupAlone2], (instregex "RRXTR$")>;
1105
1106 // Shift significand left/right
1107 def : InstRW<[WLat7LSU, LSU, DFU, GroupAlone], (instregex "S(L|R)DT$")>;
1108 def : InstRW<[WLat11LSU, LSU, DFU4, GroupAlone], (instregex "S(L|R)XT$")>;
1109
1110 // Insert biased exponent
1111 def : InstRW<[WLat5, FXU, DFU, GroupAlone], (instregex "IEDTR$")>;
1112 def : InstRW<[WLat7, FXU, DFU4, GroupAlone2], (instregex "IEXTR$")>;
1113
1114 //===----------------------------------------------------------------------===//
1115 // DFP: Comparisons
1116 //===----------------------------------------------------------------------===//
1117
1118 // Compare
1119 def : InstRW<[WLat9, DFU, NormalGr], (instregex "(K|C)DTR$")>;
1120 def : InstRW<[WLat10, DFU2, NormalGr], (instregex "(K|C)XTR$")>;
1121
1122 // Compare biased exponent
1123 def : InstRW<[WLat4, DFU, NormalGr], (instregex "CEDTR$")>;
1124 def : InstRW<[WLat5, DFU2, NormalGr], (instregex "CEXTR$")>;
1125
1126 // Test Data Class/Group
1127 def : InstRW<[WLat9, LSU, DFU, NormalGr], (instregex "TD(C|G)DT$")>;
1128 def : InstRW<[WLat10, LSU, DFU, NormalGr], (instregex "TD(C|G)ET$")>;
1129 def : InstRW<[WLat10, LSU, DFU2, NormalGr], (instregex "TD(C|G)XT$")>;
1130
1131
1132 // -------------------------------- System ---------------------------------- //
1133
1134 //===----------------------------------------------------------------------===//
1135 // System: Program-Status Word Instructions
1136 //===----------------------------------------------------------------------===//
1137
1138 def : InstRW<[WLat30, WLat30, MCD], (instregex "EPSW$")>;
1139 def : InstRW<[WLat30, MCD], (instregex "LPSW(E)?$")>;
1140 def : InstRW<[WLat3, FXU, GroupAlone], (instregex "IPK$")>;
1141 def : InstRW<[WLat1, LSU, EndGroup], (instregex "SPKA$")>;
1142 def : InstRW<[WLat1, LSU, EndGroup], (instregex "SSM$")>;
1143 def : InstRW<[WLat1, FXU, LSU, GroupAlone], (instregex "ST(N|O)SM$")>;
1144 def : InstRW<[WLat3, FXU, NormalGr], (instregex "IAC$")>;
1145 def : InstRW<[WLat1, LSU, EndGroup], (instregex "SAC(F)?$")>;
1146
1147 //===----------------------------------------------------------------------===//
1148 // System: Control Register Instructions
1149 //===----------------------------------------------------------------------===//
1150
1151 def : InstRW<[WLat10, WLat10, FXU, LSU, NormalGr], (instregex "LCTL(G)?$")>;
1152 def : InstRW<[WLat1, FXU5, LSU5, GroupAlone], (instregex "STCT(L|G)$")>;
1153 def : InstRW<[LSULatency, LSU, NormalGr], (instregex "E(P|S)A(I)?R$")>;
1154 def : InstRW<[WLat30, MCD], (instregex "SSA(I)?R$")>;
1155 def : InstRW<[WLat30, MCD], (instregex "ESEA$")>;
1156
1157 //===----------------------------------------------------------------------===//
1158 // System: Prefix-Register Instructions
1159 //===----------------------------------------------------------------------===//
1160
1161 def : InstRW<[WLat30, MCD], (instregex "S(T)?PX$")>;
1162
1163 //===----------------------------------------------------------------------===//
1164 // System: Storage-Key and Real Memory Instructions
1165 //===----------------------------------------------------------------------===//
1166
1167 def : InstRW<[WLat30, MCD], (instregex "ISKE$")>;
1168 def : InstRW<[WLat30, MCD], (instregex "IVSK$")>;
1169 def : InstRW<[WLat30, MCD], (instregex "SSKE(Opt)?$")>;
1170 def : InstRW<[WLat30, MCD], (instregex "RRB(E|M)$")>;
1171 def : InstRW<[WLat30, MCD], (instregex "PFMF$")>;
1172 def : InstRW<[WLat30, WLat30, MCD], (instregex "TB$")>;
1173 def : InstRW<[WLat30, MCD], (instregex "PGIN$")>;
1174 def : InstRW<[WLat30, MCD], (instregex "PGOUT$")>;
1175
1176 //===----------------------------------------------------------------------===//
1177 // System: Dynamic-Address-Translation Instructions
1178 //===----------------------------------------------------------------------===//
1179
1180 def : InstRW<[WLat30, MCD], (instregex "IPTE(Opt)?(Opt)?$")>;
1181 def : InstRW<[WLat30, MCD], (instregex "IDTE(Opt)?$")>;
1182 def : InstRW<[WLat30, MCD], (instregex "CRDTE(Opt)?$")>;
1183 def : InstRW<[WLat30, MCD], (instregex "PTLB$")>;
1184 def : InstRW<[WLat30, WLat30, MCD], (instregex "CSP(G)?$")>;
1185 def : InstRW<[WLat30, WLat30, WLat30, MCD], (instregex "LPTEA$")>;
1186 def : InstRW<[WLat30, WLat30, MCD], (instregex "LRA(Y|G)?$")>;
1187 def : InstRW<[WLat30, MCD], (instregex "STRAG$")>;
1188 def : InstRW<[WLat30, MCD], (instregex "LURA(G)?$")>;
1189 def : InstRW<[WLat30, MCD], (instregex "STUR(A|G)$")>;
1190 def : InstRW<[WLat30, MCD], (instregex "TPROT$")>;
1191
1192 //===----------------------------------------------------------------------===//
1193 // System: Memory-move Instructions
1194 //===----------------------------------------------------------------------===//
1195
1196 def : InstRW<[WLat30, MCD], (instregex "MVC(K|P|S)$")>;
1197 def : InstRW<[WLat30, MCD], (instregex "MVC(S|D)K$")>;
1198 def : InstRW<[WLat30, MCD], (instregex "MVCOS$")>;
1199 def : InstRW<[WLat30, MCD], (instregex "MVPG$")>;
1200
1201 //===----------------------------------------------------------------------===//
1202 // System: Address-Space Instructions
1203 //===----------------------------------------------------------------------===//
1204
1205 def : InstRW<[WLat30, MCD], (instregex "LASP$")>;
1206 def : InstRW<[WLat1, LSU, GroupAlone], (instregex "PALB$")>;
1207 def : InstRW<[WLat30, MCD], (instregex "PC$")>;
1208 def : InstRW<[WLat30, MCD], (instregex "PR$")>;
1209 def : InstRW<[WLat30, MCD], (instregex "PT(I)?$")>;
1210 def : InstRW<[WLat30, MCD], (instregex "RP$")>;
1211 def : InstRW<[WLat30, MCD], (instregex "BS(G|A)$")>;
1212 def : InstRW<[WLat30, MCD], (instregex "TAR$")>;
1213
1214 //===----------------------------------------------------------------------===//
1215 // System: Linkage-Stack Instructions
1216 //===----------------------------------------------------------------------===//
1217
1218 def : InstRW<[WLat30, MCD], (instregex "BAKR$")>;
1219 def : InstRW<[WLat30, MCD], (instregex "EREG(G)?$")>;
1220 def : InstRW<[WLat30, WLat30, MCD], (instregex "(E|M)STA$")>;
1221
1222 //===----------------------------------------------------------------------===//
1223 // System: Time-Related Instructions
1224 //===----------------------------------------------------------------------===//
1225
1226 def : InstRW<[WLat30, MCD], (instregex "PTFF$")>;
1227 def : InstRW<[WLat30, MCD], (instregex "SCK$")>;
1228 def : InstRW<[WLat30, MCD], (instregex "SCKPF$")>;
1229 def : InstRW<[WLat30, MCD], (instregex "SCKC$")>;
1230 def : InstRW<[WLat30, MCD], (instregex "SPT$")>;
1231 def : InstRW<[WLat9, FXU, LSU2, GroupAlone], (instregex "STCK(F)?$")>;
1232 def : InstRW<[WLat20, LSU4, FXU2, GroupAlone2], (instregex "STCKE$")>;
1233 def : InstRW<[WLat30, MCD], (instregex "STCKC$")>;
1234 def : InstRW<[WLat30, MCD], (instregex "STPT$")>;
1235
1236 //===----------------------------------------------------------------------===//
1237 // System: CPU-Related Instructions
1238 //===----------------------------------------------------------------------===//
1239
1240 def : InstRW<[WLat30, MCD], (instregex "STAP$")>;
1241 def : InstRW<[WLat30, MCD], (instregex "STIDP$")>;
1242 def : InstRW<[WLat30, WLat30, MCD], (instregex "STSI$")>;
1243 def : InstRW<[WLat30, WLat30, MCD], (instregex "STFL(E)?$")>;
1244 def : InstRW<[WLat30, MCD], (instregex "ECAG$")>;
1245 def : InstRW<[WLat30, WLat30, MCD], (instregex "ECTG$")>;
1246 def : InstRW<[WLat30, MCD], (instregex "PTF$")>;
1247 def : InstRW<[WLat30, MCD], (instregex "PCKMO$")>;
1248
1249 //===----------------------------------------------------------------------===//
1250 // System: Miscellaneous Instructions
1251 //===----------------------------------------------------------------------===//
1252
1253 def : InstRW<[WLat30, MCD], (instregex "SVC$")>;
1254 def : InstRW<[WLat1, FXU, GroupAlone], (instregex "MC$")>;
1255 def : InstRW<[WLat30, MCD], (instregex "DIAG$")>;
1256 def : InstRW<[WLat1, FXU, NormalGr], (instregex "TRAC(E|G)$")>;
1257 def : InstRW<[WLat30, MCD], (instregex "TRAP(2|4)$")>;
1258 def : InstRW<[WLat30, MCD], (instregex "SIG(P|A)$")>;
1259 def : InstRW<[WLat30, MCD], (instregex "SIE$")>;
1260
1261 //===----------------------------------------------------------------------===//
1262 // System: CPU-Measurement Facility Instructions
1263 //===----------------------------------------------------------------------===//
1264
1265 def : InstRW<[WLat1, FXU, NormalGr], (instregex "LPP$")>;
1266 def : InstRW<[WLat30, WLat30, MCD], (instregex "ECPGA$")>;
1267 def : InstRW<[WLat30, WLat30, MCD], (instregex "E(C|P)CTR$")>;
1268 def : InstRW<[WLat30, MCD], (instregex "LCCTL$")>;
1269 def : InstRW<[WLat30, MCD], (instregex "L(P|S)CTL$")>;
1270 def : InstRW<[WLat30, MCD], (instregex "Q(S|CTR)I$")>;
1271 def : InstRW<[WLat30, MCD], (instregex "S(C|P)CTR$")>;
1272
1273 //===----------------------------------------------------------------------===//
1274 // System: I/O Instructions
1275 //===----------------------------------------------------------------------===//
1276
1277 def : InstRW<[WLat30, MCD], (instregex "(C|H|R|X)SCH$")>;
1278 def : InstRW<[WLat30, MCD], (instregex "(M|S|ST|T)SCH$")>;
1279 def : InstRW<[WLat30, MCD], (instregex "RCHP$")>;
1280 def : InstRW<[WLat30, MCD], (instregex "SCHM$")>;
1281 def : InstRW<[WLat30, MCD], (instregex "STC(PS|RW)$")>;
1282 def : InstRW<[WLat30, MCD], (instregex "TPI$")>;
1283 def : InstRW<[WLat30, MCD], (instregex "SAL$")>;
1284
1285 }
1286