]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ14.td
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r308421, and update
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / SystemZ / SystemZScheduleZ14.td
1 //-- SystemZScheduleZ14.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 Z14 to support instruction
11 // scheduling and other instruction cost heuristics.
12 //
13 //===----------------------------------------------------------------------===//
14
15 def Z14Model : SchedMachineModel {
16
17     let UnsupportedFeatures = Arch12UnsupportedFeatures.List;
18
19     let IssueWidth = 8;
20     let MicroOpBufferSize = 60;     // Issue queues
21     let LoadLatency = 1;            // Optimistic load latency.
22
23     let PostRAScheduler = 1;
24
25     // Extra cycles for a mispredicted branch.
26     let MispredictPenalty = 20;
27 }
28
29 let SchedModel = Z14Model in  {
30
31 // These definitions could be put in a subtarget common include file,
32 // but it seems the include system in Tablegen currently rejects
33 // multiple includes of same file.
34 def : WriteRes<GroupAlone, []> {
35   let NumMicroOps = 0;
36   let BeginGroup  = 1;
37   let EndGroup    = 1;
38 }
39 def : WriteRes<BeginGroup, []> {
40   let NumMicroOps = 0;
41   let BeginGroup  = 1;
42 }
43 def : WriteRes<EndGroup, []> {
44   let NumMicroOps = 0;
45   let EndGroup    = 1;
46 }
47 def : WriteRes<Lat2, []> { let Latency = 2; let NumMicroOps = 0;}
48 def : WriteRes<Lat3, []> { let Latency = 3; let NumMicroOps = 0;}
49 def : WriteRes<Lat4, []> { let Latency = 4; let NumMicroOps = 0;}
50 def : WriteRes<Lat5, []> { let Latency = 5; let NumMicroOps = 0;}
51 def : WriteRes<Lat6, []> { let Latency = 6; let NumMicroOps = 0;}
52 def : WriteRes<Lat7, []> { let Latency = 7; let NumMicroOps = 0;}
53 def : WriteRes<Lat8, []> { let Latency = 8; let NumMicroOps = 0;}
54 def : WriteRes<Lat9, []> { let Latency = 9; let NumMicroOps = 0;}
55 def : WriteRes<Lat10, []> { let Latency = 10; let NumMicroOps = 0;}
56 def : WriteRes<Lat11, []> { let Latency = 11; let NumMicroOps = 0;}
57 def : WriteRes<Lat12, []> { let Latency = 12; let NumMicroOps = 0;}
58 def : WriteRes<Lat15, []> { let Latency = 15; let NumMicroOps = 0;}
59 def : WriteRes<Lat20, []> { let Latency = 20; let NumMicroOps = 0;}
60 def : WriteRes<Lat30, []> { let Latency = 30; let NumMicroOps = 0;}
61
62 // Execution units.
63 def Z14_FXaUnit     : ProcResource<2>;
64 def Z14_FXbUnit     : ProcResource<2>;
65 def Z14_LSUnit      : ProcResource<2>;
66 def Z14_VecUnit     : ProcResource<2>;
67 def Z14_VecFPdUnit  : ProcResource<2> { let BufferSize = 1; /* blocking */ }
68 def Z14_VBUnit      : ProcResource<2>;
69
70 // Subtarget specific definitions of scheduling resources.
71 def : WriteRes<FXa,     [Z14_FXaUnit]> { let Latency = 1; }
72 def : WriteRes<FXa2,    [Z14_FXaUnit, Z14_FXaUnit]> { let Latency = 2; }
73 def : WriteRes<FXb,     [Z14_FXbUnit]> { let Latency = 1; }
74 def : WriteRes<LSU,     [Z14_LSUnit]>  { let Latency = 4; }
75 def : WriteRes<VecBF,   [Z14_VecUnit]> { let Latency = 8; }
76 def : WriteRes<VecBF2,  [Z14_VecUnit, Z14_VecUnit]> { let Latency = 9; }
77 def : WriteRes<VecDF,   [Z14_VecUnit]> { let Latency = 8; }
78 def : WriteRes<VecDF2,  [Z14_VecUnit, Z14_VecUnit]> { let Latency = 9; }
79 def : WriteRes<VecDFX,  [Z14_VecUnit]> { let Latency = 1; }
80 def : WriteRes<VecDFX2, [Z14_VecUnit, Z14_VecUnit]> { let Latency = 2; }
81 def : WriteRes<VecFPd,  [Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
82                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
83                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
84                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
85                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
86                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
87                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
88                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
89                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit,
90                          Z14_VecFPdUnit, Z14_VecFPdUnit, Z14_VecFPdUnit]>
91                          { let Latency = 30; }
92 def : WriteRes<VecMul,  [Z14_VecUnit]> { let Latency = 5; }
93 def : WriteRes<VecStr,  [Z14_VecUnit]> { let Latency = 4; }
94 def : WriteRes<VecXsPm, [Z14_VecUnit]> { let Latency = 3; }
95 def : WriteRes<VBU,     [Z14_VBUnit]>; // Virtual Branching Unit
96
97 // -------------------------- INSTRUCTIONS ---------------------------------- //
98
99 // InstRW constructs have been used in order to preserve the
100 // readability of the InstrInfo files.
101
102 // For each instruction, as matched by a regexp, provide a list of
103 // resources that it needs. These will be combined into a SchedClass.
104
105 //===----------------------------------------------------------------------===//
106 // Stack allocation
107 //===----------------------------------------------------------------------===//
108
109 def : InstRW<[FXa], (instregex "ADJDYNALLOC$")>; // Pseudo -> LA / LAY
110
111 //===----------------------------------------------------------------------===//
112 // Branch instructions
113 //===----------------------------------------------------------------------===//
114
115 // Branch
116 def : InstRW<[VBU], (instregex "(Call)?BRC(L)?(Asm.*)?$")>;
117 def : InstRW<[VBU], (instregex "(Call)?J(G)?(Asm.*)?$")>;
118 def : InstRW<[FXb], (instregex "(Call)?BC(R)?(Asm.*)?$")>;
119 def : InstRW<[FXb], (instregex "(Call)?B(R)?(Asm.*)?$")>;
120 def : InstRW<[FXb, LSU, Lat5], (instregex "BI(C)?(Asm.*)?$")>;
121 def : InstRW<[FXa, EndGroup], (instregex "BRCT(G)?$")>;
122 def : InstRW<[FXb, FXa, Lat2, GroupAlone], (instregex "BRCTH$")>;
123 def : InstRW<[FXb, FXa, Lat2, GroupAlone], (instregex "BCT(G)?(R)?$")>;
124 def : InstRW<[FXa, FXa, FXb, FXb, Lat4, GroupAlone],
125              (instregex "B(R)?X(H|L).*$")>;
126
127 // Compare and branch
128 def : InstRW<[FXb], (instregex "C(L)?(G)?(I|R)J(Asm.*)?$")>;
129 def : InstRW<[FXb, FXb, Lat2, GroupAlone],
130              (instregex "C(L)?(G)?(I|R)B(Call|Return|Asm.*)?$")>;
131
132 //===----------------------------------------------------------------------===//
133 // Trap instructions
134 //===----------------------------------------------------------------------===//
135
136 // Trap
137 def : InstRW<[VBU], (instregex "(Cond)?Trap$")>;
138
139 // Compare and trap
140 def : InstRW<[FXb], (instregex "C(G)?(I|R)T(Asm.*)?$")>;
141 def : InstRW<[FXb], (instregex "CL(G)?RT(Asm.*)?$")>;
142 def : InstRW<[FXb], (instregex "CL(F|G)IT(Asm.*)?$")>;
143 def : InstRW<[FXb, LSU, Lat5], (instregex "CL(G)?T(Asm.*)?$")>;
144
145 //===----------------------------------------------------------------------===//
146 // Call and return instructions
147 //===----------------------------------------------------------------------===//
148
149 // Call
150 def : InstRW<[VBU, FXa, FXa, Lat3, GroupAlone], (instregex "(Call)?BRAS$")>;
151 def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "(Call)?BRASL$")>;
152 def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "(Call)?BAS(R)?$")>;
153 def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "TLS_(G|L)DCALL$")>;
154
155 // Return
156 def : InstRW<[FXb, EndGroup], (instregex "Return$")>;
157 def : InstRW<[FXb], (instregex "CondReturn$")>;
158
159 //===----------------------------------------------------------------------===//
160 // Select instructions
161 //===----------------------------------------------------------------------===//
162
163 // Select pseudo
164 def : InstRW<[FXa], (instregex "Select(32|64|32Mux)$")>;
165
166 // CondStore pseudos
167 def : InstRW<[FXa], (instregex "CondStore16(Inv)?$")>;
168 def : InstRW<[FXa], (instregex "CondStore16Mux(Inv)?$")>;
169 def : InstRW<[FXa], (instregex "CondStore32(Inv)?$")>;
170 def : InstRW<[FXa], (instregex "CondStore32Mux(Inv)?$")>;
171 def : InstRW<[FXa], (instregex "CondStore64(Inv)?$")>;
172 def : InstRW<[FXa], (instregex "CondStore8(Inv)?$")>;
173 def : InstRW<[FXa], (instregex "CondStore8Mux(Inv)?$")>;
174
175 //===----------------------------------------------------------------------===//
176 // Move instructions
177 //===----------------------------------------------------------------------===//
178
179 // Moves
180 def : InstRW<[FXb, LSU, Lat5], (instregex "MV(G|H)?HI$")>;
181 def : InstRW<[FXb, LSU, Lat5], (instregex "MVI(Y)?$")>;
182
183 // Move character
184 def : InstRW<[FXb, LSU, LSU, LSU, Lat8, GroupAlone], (instregex "MVC$")>;
185 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCL(E|U)?$")>;
186
187 // Pseudo -> reg move
188 def : InstRW<[FXa], (instregex "COPY(_TO_REGCLASS)?$")>;
189 def : InstRW<[FXa], (instregex "EXTRACT_SUBREG$")>;
190 def : InstRW<[FXa], (instregex "INSERT_SUBREG$")>;
191 def : InstRW<[FXa], (instregex "REG_SEQUENCE$")>;
192 def : InstRW<[FXa], (instregex "SUBREG_TO_REG$")>;
193
194 // Loads
195 def : InstRW<[LSU], (instregex "L(Y|FH|RL|Mux|CBB)?$")>;
196 def : InstRW<[LSU], (instregex "LG(RL)?$")>;
197 def : InstRW<[LSU], (instregex "L128$")>;
198
199 def : InstRW<[FXa], (instregex "LLIH(F|H|L)$")>;
200 def : InstRW<[FXa], (instregex "LLIL(F|H|L)$")>;
201
202 def : InstRW<[FXa], (instregex "LG(F|H)I$")>;
203 def : InstRW<[FXa], (instregex "LHI(Mux)?$")>;
204 def : InstRW<[FXa], (instregex "LR(Mux)?$")>;
205
206 // Load and zero rightmost byte
207 def : InstRW<[LSU], (instregex "LZR(F|G)$")>;
208
209 // Load and trap
210 def : InstRW<[FXb, LSU, Lat5], (instregex "L(FH|G)?AT$")>;
211
212 // Load and test
213 def : InstRW<[FXa, LSU, Lat5], (instregex "LT(G)?$")>;
214 def : InstRW<[FXa], (instregex "LT(G)?R$")>;
215
216 // Stores
217 def : InstRW<[FXb, LSU, Lat5], (instregex "STG(RL)?$")>;
218 def : InstRW<[FXb, LSU, Lat5], (instregex "ST128$")>;
219 def : InstRW<[FXb, LSU, Lat5], (instregex "ST(Y|FH|RL|Mux)?$")>;
220
221 // String moves.
222 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVST$")>;
223
224 //===----------------------------------------------------------------------===//
225 // Conditional move instructions
226 //===----------------------------------------------------------------------===//
227
228 def : InstRW<[FXa, Lat2], (instregex "LOCRMux$")>;
229 def : InstRW<[FXa, Lat2], (instregex "LOC(G|FH)?R(Asm.*)?$")>;
230 def : InstRW<[FXa, Lat2], (instregex "LOC(G|H)?HI(Mux|(Asm.*))?$")>;
231 def : InstRW<[FXa, LSU, Lat6], (instregex "LOC(G|FH|Mux)?(Asm.*)?$")>;
232 def : InstRW<[FXb, LSU, Lat5], (instregex "STOC(G|FH|Mux)?(Asm.*)?$")>;
233
234 //===----------------------------------------------------------------------===//
235 // Sign extensions
236 //===----------------------------------------------------------------------===//
237
238 def : InstRW<[FXa], (instregex "L(B|H|G)R$")>;
239 def : InstRW<[FXa], (instregex "LG(B|H|F)R$")>;
240
241 def : InstRW<[FXa, LSU, Lat5], (instregex "LTGF$")>;
242 def : InstRW<[FXa], (instregex "LTGFR$")>;
243
244 def : InstRW<[FXa, LSU, Lat5], (instregex "LB(H|Mux)?$")>;
245 def : InstRW<[FXa, LSU, Lat5], (instregex "LH(Y)?$")>;
246 def : InstRW<[FXa, LSU, Lat5], (instregex "LH(H|Mux|RL)$")>;
247 def : InstRW<[FXa, LSU, Lat5], (instregex "LG(B|H|F)$")>;
248 def : InstRW<[FXa, LSU, Lat5], (instregex "LG(H|F)RL$")>;
249
250 //===----------------------------------------------------------------------===//
251 // Zero extensions
252 //===----------------------------------------------------------------------===//
253
254 def : InstRW<[FXa], (instregex "LLCR(Mux)?$")>;
255 def : InstRW<[FXa], (instregex "LLHR(Mux)?$")>;
256 def : InstRW<[FXa], (instregex "LLG(C|H|F|T)R$")>;
257 def : InstRW<[LSU], (instregex "LLC(Mux)?$")>;
258 def : InstRW<[LSU], (instregex "LLH(Mux)?$")>;
259 def : InstRW<[FXa, LSU, Lat5], (instregex "LL(C|H)H$")>;
260 def : InstRW<[LSU], (instregex "LLHRL$")>;
261 def : InstRW<[LSU], (instregex "LLG(C|H|F|T|HRL|FRL)$")>;
262
263 // Load and zero rightmost byte
264 def : InstRW<[LSU], (instregex "LLZRGF$")>;
265
266 // Load and trap
267 def : InstRW<[FXb, LSU, Lat5], (instregex "LLG(F|T)?AT$")>;
268
269 //===----------------------------------------------------------------------===//
270 // Truncations
271 //===----------------------------------------------------------------------===//
272
273 def : InstRW<[FXb, LSU, Lat5], (instregex "STC(H|Y|Mux)?$")>;
274 def : InstRW<[FXb, LSU, Lat5], (instregex "STH(H|Y|RL|Mux)?$")>;
275 def : InstRW<[FXb, LSU, Lat5], (instregex "STCM(H|Y)?$")>;
276
277 //===----------------------------------------------------------------------===//
278 // Multi-register moves
279 //===----------------------------------------------------------------------===//
280
281 // Load multiple (estimated average of 5 ops)
282 def : InstRW<[LSU, LSU, LSU, LSU, LSU, Lat10, GroupAlone],
283              (instregex "LM(H|Y|G)?$")>;
284
285 // Load multiple disjoint
286 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "LMD$")>;
287
288 // Store multiple (estimated average of ceil(5/2) FXb ops)
289 def : InstRW<[LSU, LSU, FXb, FXb, FXb, Lat10,
290               GroupAlone], (instregex "STM(G|H|Y)?$")>;
291
292 //===----------------------------------------------------------------------===//
293 // Byte swaps
294 //===----------------------------------------------------------------------===//
295
296 def : InstRW<[FXa], (instregex "LRV(G)?R$")>;
297 def : InstRW<[FXa, LSU, Lat5], (instregex "LRV(G|H)?$")>;
298 def : InstRW<[FXb, LSU, Lat5], (instregex "STRV(G|H)?$")>;
299 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVCIN$")>;
300
301 //===----------------------------------------------------------------------===//
302 // Load address instructions
303 //===----------------------------------------------------------------------===//
304
305 def : InstRW<[FXa], (instregex "LA(Y|RL)?$")>;
306
307 // Load the Global Offset Table address ( -> larl )
308 def : InstRW<[FXa], (instregex "GOT$")>;
309
310 //===----------------------------------------------------------------------===//
311 // Absolute and Negation
312 //===----------------------------------------------------------------------===//
313
314 def : InstRW<[FXa], (instregex "LP(G)?R$")>;
315 def : InstRW<[FXa, FXa, Lat2, BeginGroup], (instregex "L(N|P)GFR$")>;
316 def : InstRW<[FXa], (instregex "LN(R|GR)$")>;
317 def : InstRW<[FXa], (instregex "LC(R|GR)$")>;
318 def : InstRW<[FXa, FXa, Lat2, BeginGroup], (instregex "LCGFR$")>;
319
320 //===----------------------------------------------------------------------===//
321 // Insertion
322 //===----------------------------------------------------------------------===//
323
324 def : InstRW<[FXa, LSU, Lat5], (instregex "IC(Y)?$")>;
325 def : InstRW<[FXa, LSU, Lat5], (instregex "IC32(Y)?$")>;
326 def : InstRW<[FXa, LSU, Lat5], (instregex "ICM(H|Y)?$")>;
327 def : InstRW<[FXa], (instregex "II(F|H|L)Mux$")>;
328 def : InstRW<[FXa], (instregex "IIHF(64)?$")>;
329 def : InstRW<[FXa], (instregex "IIHH(64)?$")>;
330 def : InstRW<[FXa], (instregex "IIHL(64)?$")>;
331 def : InstRW<[FXa], (instregex "IILF(64)?$")>;
332 def : InstRW<[FXa], (instregex "IILH(64)?$")>;
333 def : InstRW<[FXa], (instregex "IILL(64)?$")>;
334
335 //===----------------------------------------------------------------------===//
336 // Addition
337 //===----------------------------------------------------------------------===//
338
339 def : InstRW<[FXa, LSU, Lat5], (instregex "A(Y)?$")>;
340 def : InstRW<[FXa, LSU, Lat6], (instregex "AH(Y)?$")>;
341 def : InstRW<[FXa], (instregex "AIH$")>;
342 def : InstRW<[FXa], (instregex "AFI(Mux)?$")>;
343 def : InstRW<[FXa, LSU, Lat5], (instregex "AG$")>;
344 def : InstRW<[FXa], (instregex "AGFI$")>;
345 def : InstRW<[FXa], (instregex "AGHI(K)?$")>;
346 def : InstRW<[FXa], (instregex "AGR(K)?$")>;
347 def : InstRW<[FXa], (instregex "AHI(K)?$")>;
348 def : InstRW<[FXa], (instregex "AHIMux(K)?$")>;
349 def : InstRW<[FXa, LSU, Lat5], (instregex "AL(Y)?$")>;
350 def : InstRW<[FXa], (instregex "AL(FI|HSIK)$")>;
351 def : InstRW<[FXa, LSU, Lat5], (instregex "ALG(F)?$")>;
352 def : InstRW<[FXa], (instregex "ALGHSIK$")>;
353 def : InstRW<[FXa], (instregex "ALGF(I|R)$")>;
354 def : InstRW<[FXa], (instregex "ALGR(K)?$")>;
355 def : InstRW<[FXa], (instregex "ALR(K)?$")>;
356 def : InstRW<[FXa], (instregex "AR(K)?$")>;
357 def : InstRW<[FXa], (instregex "A(L)?HHHR$")>;
358 def : InstRW<[FXa, Lat2], (instregex "A(L)?HHLR$")>;
359 def : InstRW<[FXa], (instregex "ALSIH(N)?$")>;
360 def : InstRW<[FXb, LSU, Lat5], (instregex "A(L)?(G)?SI$")>;
361
362 // Logical addition with carry
363 def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "ALC(G)?$")>;
364 def : InstRW<[FXa, Lat2, GroupAlone], (instregex "ALC(G)?R$")>;
365
366 // Add with sign extension (16/32 -> 64)
367 def : InstRW<[FXa, LSU, Lat6], (instregex "AG(F|H)$")>;
368 def : InstRW<[FXa, Lat2], (instregex "AGFR$")>;
369
370 //===----------------------------------------------------------------------===//
371 // Subtraction
372 //===----------------------------------------------------------------------===//
373
374 def : InstRW<[FXa, LSU, Lat5], (instregex "S(G|Y)?$")>;
375 def : InstRW<[FXa, LSU, Lat6], (instregex "SH(Y)?$")>;
376 def : InstRW<[FXa], (instregex "SGR(K)?$")>;
377 def : InstRW<[FXa], (instregex "SLFI$")>;
378 def : InstRW<[FXa, LSU, Lat5], (instregex "SL(G|GF|Y)?$")>;
379 def : InstRW<[FXa], (instregex "SLGF(I|R)$")>;
380 def : InstRW<[FXa], (instregex "SLGR(K)?$")>;
381 def : InstRW<[FXa], (instregex "SLR(K)?$")>;
382 def : InstRW<[FXa], (instregex "SR(K)?$")>;
383 def : InstRW<[FXa], (instregex "S(L)?HHHR$")>;
384 def : InstRW<[FXa, Lat2], (instregex "S(L)?HHLR$")>;
385
386 // Subtraction with borrow
387 def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "SLB(G)?$")>;
388 def : InstRW<[FXa, Lat2, GroupAlone], (instregex "SLB(G)?R$")>;
389
390 // Subtraction with sign extension (16/32 -> 64)
391 def : InstRW<[FXa, LSU, Lat6], (instregex "SG(F|H)$")>;
392 def : InstRW<[FXa, Lat2], (instregex "SGFR$")>;
393
394 //===----------------------------------------------------------------------===//
395 // AND
396 //===----------------------------------------------------------------------===//
397
398 def : InstRW<[FXa, LSU, Lat5], (instregex "N(G|Y)?$")>;
399 def : InstRW<[FXa], (instregex "NGR(K)?$")>;
400 def : InstRW<[FXa], (instregex "NI(FMux|HMux|LMux)$")>;
401 def : InstRW<[FXb, LSU, Lat5], (instregex "NI(Y)?$")>;
402 def : InstRW<[FXa], (instregex "NIHF(64)?$")>;
403 def : InstRW<[FXa], (instregex "NIHH(64)?$")>;
404 def : InstRW<[FXa], (instregex "NIHL(64)?$")>;
405 def : InstRW<[FXa], (instregex "NILF(64)?$")>;
406 def : InstRW<[FXa], (instregex "NILH(64)?$")>;
407 def : InstRW<[FXa], (instregex "NILL(64)?$")>;
408 def : InstRW<[FXa], (instregex "NR(K)?$")>;
409 def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "NC$")>;
410
411 //===----------------------------------------------------------------------===//
412 // OR
413 //===----------------------------------------------------------------------===//
414
415 def : InstRW<[FXa, LSU, Lat5], (instregex "O(G|Y)?$")>;
416 def : InstRW<[FXa], (instregex "OGR(K)?$")>;
417 def : InstRW<[FXb, LSU, Lat5], (instregex "OI(Y)?$")>;
418 def : InstRW<[FXa], (instregex "OI(FMux|HMux|LMux)$")>;
419 def : InstRW<[FXa], (instregex "OIHF(64)?$")>;
420 def : InstRW<[FXa], (instregex "OIHH(64)?$")>;
421 def : InstRW<[FXa], (instregex "OIHL(64)?$")>;
422 def : InstRW<[FXa], (instregex "OILF(64)?$")>;
423 def : InstRW<[FXa], (instregex "OILH(64)?$")>;
424 def : InstRW<[FXa], (instregex "OILL(64)?$")>;
425 def : InstRW<[FXa], (instregex "OR(K)?$")>;
426 def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "OC$")>;
427
428 //===----------------------------------------------------------------------===//
429 // XOR
430 //===----------------------------------------------------------------------===//
431
432 def : InstRW<[FXa, LSU, Lat5], (instregex "X(G|Y)?$")>;
433 def : InstRW<[FXb, LSU, Lat5], (instregex "XI(Y)?$")>;
434 def : InstRW<[FXa], (instregex "XIFMux$")>;
435 def : InstRW<[FXa], (instregex "XGR(K)?$")>;
436 def : InstRW<[FXa], (instregex "XIHF(64)?$")>;
437 def : InstRW<[FXa], (instregex "XILF(64)?$")>;
438 def : InstRW<[FXa], (instregex "XR(K)?$")>;
439 def : InstRW<[LSU, LSU, FXb, Lat9, BeginGroup], (instregex "XC$")>;
440
441 //===----------------------------------------------------------------------===//
442 // Multiplication
443 //===----------------------------------------------------------------------===//
444
445 def : InstRW<[FXa, LSU, Lat9], (instregex "MS(GF|Y)?$")>;
446 def : InstRW<[FXa, Lat5], (instregex "MS(R|FI)$")>;
447 def : InstRW<[FXa, LSU, Lat11], (instregex "MSG$")>;
448 def : InstRW<[FXa, Lat7], (instregex "MSGR$")>;
449 def : InstRW<[FXa, Lat5], (instregex "MSGF(I|R)$")>;
450 def : InstRW<[FXa2, LSU, Lat12, GroupAlone], (instregex "MLG$")>;
451 def : InstRW<[FXa2, Lat8, GroupAlone], (instregex "MLGR$")>;
452 def : InstRW<[FXa, Lat4], (instregex "MGHI$")>;
453 def : InstRW<[FXa, Lat4], (instregex "MHI$")>;
454 def : InstRW<[FXa, LSU, Lat8], (instregex "MH(Y)?$")>;
455 def : InstRW<[FXa2, Lat6, GroupAlone], (instregex "M(L)?R$")>;
456 def : InstRW<[FXa2, LSU, Lat10, GroupAlone], (instregex "M(FY|L)?$")>;
457 def : InstRW<[FXa, LSU, Lat8], (instregex "MGH$")>;
458 def : InstRW<[FXa, LSU, Lat12, GroupAlone], (instregex "MG$")>;
459 def : InstRW<[FXa, Lat8, GroupAlone], (instregex "MGRK$")>;
460 def : InstRW<[FXa, LSU, Lat9, GroupAlone], (instregex "MSC$")>;
461 def : InstRW<[FXa, LSU, Lat11, GroupAlone], (instregex "MSGC$")>;
462 def : InstRW<[FXa, Lat5], (instregex "MSRKC$")>;
463 def : InstRW<[FXa, Lat7], (instregex "MSGRKC$")>;
464
465 //===----------------------------------------------------------------------===//
466 // Division and remainder
467 //===----------------------------------------------------------------------===//
468
469 def : InstRW<[FXa2, FXa2, Lat20, GroupAlone], (instregex "DR$")>;
470 def : InstRW<[FXa2, FXa2, LSU, Lat30, GroupAlone], (instregex "D$")>;
471 def : InstRW<[FXa2, Lat30, GroupAlone], (instregex "DSG(F)?R$")>;
472 def : InstRW<[LSU, FXa2, Lat30, GroupAlone], (instregex "DSG(F)?$")>;
473 def : InstRW<[FXa2, FXa2, Lat20, GroupAlone], (instregex "DLR$")>;
474 def : InstRW<[FXa2, FXa2, Lat30, GroupAlone], (instregex "DLGR$")>;
475 def : InstRW<[FXa2, FXa2, LSU, Lat30, GroupAlone], (instregex "DL(G)?$")>;
476
477 //===----------------------------------------------------------------------===//
478 // Shifts
479 //===----------------------------------------------------------------------===//
480
481 def : InstRW<[FXa], (instregex "SLL(G|K)?$")>;
482 def : InstRW<[FXa], (instregex "SRL(G|K)?$")>;
483 def : InstRW<[FXa], (instregex "SRA(G|K)?$")>;
484 def : InstRW<[FXa], (instregex "SLA(G|K)?$")>;
485 def : InstRW<[FXa, FXa, FXa, FXa, LSU, Lat8, GroupAlone],
486              (instregex "S(L|R)D(A|L)$")>;
487
488 // Rotate
489 def : InstRW<[FXa, LSU, Lat6], (instregex "RLL(G)?$")>;
490
491 // Rotate and insert
492 def : InstRW<[FXa], (instregex "RISBG(N|32)?$")>;
493 def : InstRW<[FXa], (instregex "RISBH(G|H|L)$")>;
494 def : InstRW<[FXa], (instregex "RISBL(G|H|L)$")>;
495 def : InstRW<[FXa], (instregex "RISBMux$")>;
496
497 // Rotate and Select
498 def : InstRW<[FXa, FXa, Lat2, BeginGroup], (instregex "R(N|O|X)SBG$")>;
499
500 //===----------------------------------------------------------------------===//
501 // Comparison
502 //===----------------------------------------------------------------------===//
503
504 def : InstRW<[FXb, LSU, Lat5], (instregex "C(G|Y|Mux|RL)?$")>;
505 def : InstRW<[FXb], (instregex "C(F|H)I(Mux)?$")>;
506 def : InstRW<[FXb], (instregex "CG(F|H)I$")>;
507 def : InstRW<[FXb, LSU, Lat5], (instregex "CG(HSI|RL)$")>;
508 def : InstRW<[FXb], (instregex "C(G)?R$")>;
509 def : InstRW<[FXb], (instregex "CIH$")>;
510 def : InstRW<[FXb, LSU, Lat5], (instregex "CH(F|SI)$")>;
511 def : InstRW<[FXb, LSU, Lat5], (instregex "CL(Y|Mux|FHSI)?$")>;
512 def : InstRW<[FXb], (instregex "CLFI(Mux)?$")>;
513 def : InstRW<[FXb, LSU, Lat5], (instregex "CLG(HRL|HSI)?$")>;
514 def : InstRW<[FXb, LSU, Lat5], (instregex "CLGF(RL)?$")>;
515 def : InstRW<[FXb], (instregex "CLGF(I|R)$")>;
516 def : InstRW<[FXb], (instregex "CLGR$")>;
517 def : InstRW<[FXb, LSU, Lat5], (instregex "CLGRL$")>;
518 def : InstRW<[FXb, LSU, Lat5], (instregex "CLH(F|RL|HSI)$")>;
519 def : InstRW<[FXb], (instregex "CLIH$")>;
520 def : InstRW<[FXb, LSU, Lat5], (instregex "CLI(Y)?$")>;
521 def : InstRW<[FXb], (instregex "CLR$")>;
522 def : InstRW<[FXb, LSU, Lat5], (instregex "CLRL$")>;
523 def : InstRW<[FXb], (instregex "C(L)?HHR$")>;
524 def : InstRW<[FXb, Lat2], (instregex "C(L)?HLR$")>;
525
526 // Compare halfword
527 def : InstRW<[FXb, LSU, Lat6], (instregex "CH(Y|RL)?$")>;
528 def : InstRW<[FXb, LSU, Lat6], (instregex "CGH(RL)?$")>;
529 def : InstRW<[FXa, FXb, LSU, Lat6, BeginGroup], (instregex "CHHSI$")>;
530
531 // Compare with sign extension (32 -> 64)
532 def : InstRW<[FXb, LSU, Lat6], (instregex "CGF(RL)?$")>;
533 def : InstRW<[FXb, Lat2], (instregex "CGFR$")>;
534
535 // Compare logical character
536 def : InstRW<[FXb, LSU, LSU, Lat9, BeginGroup], (instregex "CLC$")>;
537 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLCL(E|U)?$")>;
538 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CLST$")>;
539
540 // Test under mask
541 def : InstRW<[FXb, LSU, Lat5], (instregex "TM(Y)?$")>;
542 def : InstRW<[FXb], (instregex "TM(H|L)Mux$")>;
543 def : InstRW<[FXb], (instregex "TMHH(64)?$")>;
544 def : InstRW<[FXb], (instregex "TMHL(64)?$")>;
545 def : InstRW<[FXb], (instregex "TMLH(64)?$")>;
546 def : InstRW<[FXb], (instregex "TMLL(64)?$")>;
547
548 // Compare logical characters under mask
549 def : InstRW<[FXb, LSU, Lat6], (instregex "CLM(H|Y)?$")>;
550
551 //===----------------------------------------------------------------------===//
552 // Prefetch and execution hint
553 //===----------------------------------------------------------------------===//
554
555 def : InstRW<[LSU], (instregex "PFD(RL)?$")>;
556 def : InstRW<[FXb, Lat2], (instregex "BPP$")>;
557 def : InstRW<[FXb, EndGroup], (instregex "BPRP$")>;
558 def : InstRW<[FXb], (instregex "NIAI$")>;
559
560 //===----------------------------------------------------------------------===//
561 // Atomic operations
562 //===----------------------------------------------------------------------===//
563
564 def : InstRW<[FXb, EndGroup], (instregex "Serialize$")>;
565
566 def : InstRW<[FXb, LSU, Lat5], (instregex "LAA(G)?$")>;
567 def : InstRW<[FXb, LSU, Lat5], (instregex "LAAL(G)?$")>;
568 def : InstRW<[FXb, LSU, Lat5], (instregex "LAN(G)?$")>;
569 def : InstRW<[FXb, LSU, Lat5], (instregex "LAO(G)?$")>;
570 def : InstRW<[FXb, LSU, Lat5], (instregex "LAX(G)?$")>;
571
572 // Test and set
573 def : InstRW<[FXb, LSU, Lat5, EndGroup], (instregex "TS$")>;
574
575 // Compare and swap
576 def : InstRW<[FXa, FXb, LSU, Lat6, GroupAlone], (instregex "CS(G|Y)?$")>;
577
578 // Compare double and swap
579 def : InstRW<[FXa, FXa, FXb, FXb, FXa, LSU, Lat10, GroupAlone],
580              (instregex "CDS(Y)?$")>;
581 def : InstRW<[FXa, FXa, FXb, FXb, LSU, FXb, FXb, LSU, LSU, Lat20, GroupAlone],
582              (instregex "CDSG$")>;
583
584 // Compare and swap and store
585 def : InstRW<[FXa, LSU, Lat30], (instregex "CSST$")>;
586
587 // Perform locked operation
588 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "PLO$")>;
589
590 // Load/store pair from/to quadword
591 def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPQ$")>;
592 def : InstRW<[FXb, FXb, LSU, Lat6, GroupAlone], (instregex "STPQ$")>;
593
594 // Load pair disjoint
595 def : InstRW<[LSU, LSU, Lat5, GroupAlone], (instregex "LPD(G)?$")>;
596
597 //===----------------------------------------------------------------------===//
598 // Translate and convert
599 //===----------------------------------------------------------------------===//
600
601 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "TR$")>;
602 def : InstRW<[FXa, FXa, FXa, LSU, LSU, Lat30, GroupAlone], (instregex "TRT$")>;
603 def : InstRW<[FXa, LSU, Lat30], (instregex "TRTR$")>;
604 def : InstRW<[FXa, Lat30], (instregex "TR(TR)?(T)?(E|EOpt)?$")>;
605 def : InstRW<[LSU, Lat30], (instregex "TR(T|O)(T|O)(Opt)?$")>;
606 def : InstRW<[FXa, Lat30], (instregex "CU(12|14|21|24|41|42)(Opt)?$")>;
607 def : InstRW<[FXa, Lat30], (instregex "(CUUTF|CUTFU)(Opt)?$")>;
608
609 //===----------------------------------------------------------------------===//
610 // Message-security assist
611 //===----------------------------------------------------------------------===//
612
613 def : InstRW<[FXa, Lat30], (instregex "KM(C|F|O|CTR|A)?$")>;
614 def : InstRW<[FXa, Lat30], (instregex "(KIMD|KLMD|KMAC)$")>;
615 def : InstRW<[FXa, Lat30], (instregex "(PCC|PPNO|PRNO)$")>;
616
617 //===----------------------------------------------------------------------===//
618 // Guarded storage
619 //===----------------------------------------------------------------------===//
620
621 def : InstRW<[LSU], (instregex "LGG$")>;
622 def : InstRW<[LSU, Lat5], (instregex "LLGFSG$")>;
623 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(L|ST)GSC$")>;
624
625 //===----------------------------------------------------------------------===//
626 // Decimal arithmetic
627 //===----------------------------------------------------------------------===//
628
629 def : InstRW<[FXb, VecDF, VecDF, LSU, LSU, Lat30, GroupAlone],
630              (instregex "CVBG$")>;
631 def : InstRW<[FXb, VecDF, LSU, Lat30, GroupAlone], (instregex "CVB(Y)?$")>;
632 def : InstRW<[FXb, FXb, FXb, VecDF2, VecDF2, LSU, Lat30, GroupAlone],
633              (instregex "CVDG$")>;
634 def : InstRW<[FXb, VecDF, FXb, LSU, Lat30, GroupAlone], (instregex "CVD(Y)?$")>;
635 def : InstRW<[LSU, Lat10, GroupAlone], (instregex "MVO$")>;
636 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MV(N|Z)$")>;
637 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(PACK|PKA|PKU)$")>;
638 def : InstRW<[LSU, Lat12, GroupAlone], (instregex "UNPK(A|U)$")>;
639 def : InstRW<[FXb, LSU, LSU, Lat9, BeginGroup], (instregex "UNPK$")>;
640
641 def : InstRW<[FXb, VecDFX, LSU, LSU, LSU, Lat9, GroupAlone],
642              (instregex "(A|S|ZA)P$")>;
643 def : InstRW<[FXb, VecDFX2, VecDFX2, LSU, LSU, LSU, Lat30, GroupAlone],
644              (instregex "(M|D)P$")>;
645 def : InstRW<[FXb, VecDFX, VecDFX, LSU, LSU, Lat15, GroupAlone],
646              (instregex "SRP$")>;
647 def : InstRW<[VecDFX, LSU, LSU, Lat5, GroupAlone], (instregex "CP$")>;
648 def : InstRW<[VecDFX, LSU, Lat4, BeginGroup], (instregex "TP$")>;
649 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "ED(MK)?$")>;
650
651 //===----------------------------------------------------------------------===//
652 // Access registers
653 //===----------------------------------------------------------------------===//
654
655 // Extract/set/copy access register
656 def : InstRW<[LSU], (instregex "(EAR|SAR|CPYA)$")>;
657
658 // Load address extended
659 def : InstRW<[LSU, FXa, Lat5, BeginGroup], (instregex "LAE(Y)?$")>;
660
661 // Load/store access multiple (not modeled precisely)
662 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(L|ST)AM(Y)?$")>;
663
664 //===----------------------------------------------------------------------===//
665 // Program mask and addressing mode
666 //===----------------------------------------------------------------------===//
667
668 // Insert Program Mask
669 def : InstRW<[FXa, Lat3, EndGroup], (instregex "IPM$")>;
670
671 // Set Program Mask
672 def : InstRW<[LSU, EndGroup], (instregex "SPM$")>;
673
674 // Branch and link
675 def : InstRW<[FXa, FXa, FXb, Lat5, GroupAlone], (instregex "BAL(R)?$")>;
676
677 // Test addressing mode
678 def : InstRW<[FXb], (instregex "TAM$")>;
679
680 // Set addressing mode
681 def : InstRW<[FXb, Lat2, EndGroup], (instregex "SAM(24|31|64)$")>;
682
683 // Branch (and save) and set mode.
684 def : InstRW<[FXa, FXb, Lat2, GroupAlone], (instregex "BSM$")>;
685 def : InstRW<[FXa, FXa, FXb, Lat3, GroupAlone], (instregex "BASSM$")>;
686
687 //===----------------------------------------------------------------------===//
688 // Transactional execution
689 //===----------------------------------------------------------------------===//
690
691 // Transaction begin
692 def : InstRW<[LSU, LSU, FXb, FXb, FXb, FXb, FXb, Lat15, GroupAlone],
693               (instregex "TBEGIN(C|_nofloat)?$")>;
694
695 // Transaction end
696 def : InstRW<[FXb, GroupAlone], (instregex "TEND$")>;
697
698 // Transaction abort
699 def : InstRW<[LSU, GroupAlone], (instregex "TABORT$")>;
700
701 // Extract Transaction Nesting Depth
702 def : InstRW<[FXa], (instregex "ETND$")>;
703
704 // Nontransactional store
705 def : InstRW<[FXb, LSU, Lat5], (instregex "NTSTG$")>;
706
707 //===----------------------------------------------------------------------===//
708 // Processor assist
709 //===----------------------------------------------------------------------===//
710
711 def : InstRW<[FXb], (instregex "PPA$")>;
712
713 //===----------------------------------------------------------------------===//
714 // Miscellaneous Instructions.
715 //===----------------------------------------------------------------------===//
716
717 // Find leftmost one
718 def : InstRW<[FXa, FXa, Lat4, GroupAlone], (instregex "FLOGR$")>;
719
720 // Population count
721 def : InstRW<[FXa, Lat3], (instregex "POPCNT$")>;
722
723 // Extend
724 def : InstRW<[FXa], (instregex "AEXT128$")>;
725 def : InstRW<[FXa], (instregex "ZEXT128$")>;
726
727 // String instructions
728 def : InstRW<[FXa, LSU, Lat30], (instregex "SRST$")>;
729 def : InstRW<[FXa, Lat30], (instregex "SRSTU$")>;
730 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "CUSE$")>;
731
732 // Various complex instructions
733 def : InstRW<[LSU, Lat30], (instregex "CFC$")>;
734 def : InstRW<[FXb, LSU, Lat30], (instregex "UPT$")>;
735 def : InstRW<[LSU, Lat30], (instregex "CKSM$")>;
736 def : InstRW<[FXa, Lat30], (instregex "CMPSC$")>;
737
738 // Execute
739 def : InstRW<[FXb, GroupAlone], (instregex "EX(RL)?$")>;
740
741 //===----------------------------------------------------------------------===//
742 // .insn directive instructions
743 //===----------------------------------------------------------------------===//
744
745 // An "empty" sched-class will be assigned instead of the "invalid sched-class".
746 // getNumDecoderSlots() will then return 1 instead of 0.
747 def : InstRW<[], (instregex "Insn.*")>;
748
749
750 // ----------------------------- Floating point ----------------------------- //
751
752 //===----------------------------------------------------------------------===//
753 // FP: Select instructions
754 //===----------------------------------------------------------------------===//
755
756 def : InstRW<[FXa], (instregex "Select(F32|F64|F128|VR128)$")>;
757 def : InstRW<[FXa], (instregex "CondStoreF32(Inv)?$")>;
758 def : InstRW<[FXa], (instregex "CondStoreF64(Inv)?$")>;
759
760 //===----------------------------------------------------------------------===//
761 // FP: Move instructions
762 //===----------------------------------------------------------------------===//
763
764 // Load zero
765 def : InstRW<[FXb], (instregex "LZ(DR|ER)$")>;
766 def : InstRW<[FXb, FXb, Lat2, BeginGroup], (instregex "LZXR$")>;
767
768 // Load
769 def : InstRW<[VecXsPm], (instregex "LER$")>;
770 def : InstRW<[FXb], (instregex "LD(R|R32|GR)$")>;
771 def : InstRW<[FXb, Lat3], (instregex "LGDR$")>;
772 def : InstRW<[FXb, FXb, Lat2, GroupAlone], (instregex "LXR$")>;
773
774 // Load and Test
775 def : InstRW<[VecXsPm, Lat4], (instregex "LT(D|E)BR$")>;
776 def : InstRW<[VecXsPm, Lat4], (instregex "LTEBRCompare(_VecPseudo)?$")>;
777 def : InstRW<[VecXsPm, Lat4], (instregex "LTDBRCompare(_VecPseudo)?$")>;
778 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXBR$")>;
779 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone],
780              (instregex "LTXBRCompare(_VecPseudo)?$")>;
781
782 // Copy sign
783 def : InstRW<[VecXsPm], (instregex "CPSDRd(d|s)$")>;
784 def : InstRW<[VecXsPm], (instregex "CPSDRs(d|s)$")>;
785
786 //===----------------------------------------------------------------------===//
787 // FP: Load instructions
788 //===----------------------------------------------------------------------===//
789
790 def : InstRW<[VecXsPm, LSU, Lat7], (instregex "LE(Y)?$")>;
791 def : InstRW<[LSU], (instregex "LD(Y|E32)?$")>;
792 def : InstRW<[LSU], (instregex "LX$")>;
793
794 //===----------------------------------------------------------------------===//
795 // FP: Store instructions
796 //===----------------------------------------------------------------------===//
797
798 def : InstRW<[FXb, LSU, Lat7], (instregex "STD(Y)?$")>;
799 def : InstRW<[FXb, LSU, Lat7], (instregex "STE(Y)?$")>;
800 def : InstRW<[FXb, LSU, Lat5], (instregex "STX$")>;
801
802 //===----------------------------------------------------------------------===//
803 // FP: Conversion instructions
804 //===----------------------------------------------------------------------===//
805
806 // Load rounded
807 def : InstRW<[VecBF], (instregex "LEDBR(A)?$")>;
808 def : InstRW<[VecDF, VecDF, Lat20], (instregex "LEXBR(A)?$")>;
809 def : InstRW<[VecDF, VecDF, Lat20], (instregex "LDXBR(A)?$")>;
810
811 // Load lengthened
812 def : InstRW<[VecBF, LSU, Lat12], (instregex "LDEB$")>;
813 def : InstRW<[VecBF], (instregex "LDEBR$")>;
814 def : InstRW<[VecBF2, VecBF2, LSU, Lat12 , GroupAlone], (instregex "LX(D|E)B$")>;
815 def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "LX(D|E)BR$")>;
816
817 // Convert from fixed / logical
818 def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CE(F|G)BR(A)?$")>;
819 def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CD(F|G)BR(A)?$")>;
820 def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CX(F|G)BR(A)?$")>;
821 def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CEL(F|G)BR$")>;
822 def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CDL(F|G)BR$")>;
823 def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CXL(F|G)BR$")>;
824
825 // Convert to fixed / logical
826 def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CF(E|D)BR(A)?$")>;
827 def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CG(E|D)BR(A)?$")>;
828 def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "C(F|G)XBR(A)?$")>;
829 def : InstRW<[FXb, VecBF, Lat11, GroupAlone], (instregex "CLFEBR$")>;
830 def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CLFDBR$")>;
831 def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CLG(E|D)BR$")>;
832 def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "CL(F|G)XBR$")>;
833
834 //===----------------------------------------------------------------------===//
835 // FP: Unary arithmetic
836 //===----------------------------------------------------------------------===//
837
838 // Load Complement / Negative / Positive
839 def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)DBR$")>;
840 def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)EBR$")>;
841 def : InstRW<[FXb], (instregex "LCDFR(_32)?$")>;
842 def : InstRW<[FXb], (instregex "LNDFR(_32)?$")>;
843 def : InstRW<[FXb], (instregex "LPDFR(_32)?$")>;
844 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "L(C|N|P)XBR$")>;
845
846 // Square root
847 def : InstRW<[VecFPd, LSU], (instregex "SQ(E|D)B$")>;
848 def : InstRW<[VecFPd], (instregex "SQ(E|D)BR$")>;
849 def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "SQXBR$")>;
850
851 // Load FP integer
852 def : InstRW<[VecBF], (instregex "FIEBR(A)?$")>;
853 def : InstRW<[VecBF], (instregex "FIDBR(A)?$")>;
854 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXBR(A)?$")>;
855
856 //===----------------------------------------------------------------------===//
857 // FP: Binary arithmetic
858 //===----------------------------------------------------------------------===//
859
860 // Addition
861 def : InstRW<[VecBF, LSU, Lat12], (instregex "A(E|D)B$")>;
862 def : InstRW<[VecBF], (instregex "A(E|D)BR$")>;
863 def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXBR$")>;
864
865 // Subtraction
866 def : InstRW<[VecBF, LSU, Lat12], (instregex "S(E|D)B$")>;
867 def : InstRW<[VecBF], (instregex "S(E|D)BR$")>;
868 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXBR$")>;
869
870 // Multiply
871 def : InstRW<[VecBF, LSU, Lat12], (instregex "M(D|DE|EE)B$")>;
872 def : InstRW<[VecBF], (instregex "M(D|DE|EE)BR$")>;
873 def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MXDB$")>;
874 def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MXDBR$")>;
875 def : InstRW<[VecDF2, VecDF2, Lat20, GroupAlone], (instregex "MXBR$")>;
876
877 // Multiply and add / subtract
878 def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)EB$")>;
879 def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)EBR$")>;
880 def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)DB$")>;
881 def : InstRW<[VecBF], (instregex "M(A|S)DBR$")>;
882
883 // Division
884 def : InstRW<[VecFPd, LSU], (instregex "D(E|D)B$")>;
885 def : InstRW<[VecFPd], (instregex "D(E|D)BR$")>;
886 def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "DXBR$")>;
887
888 // Divide to integer
889 def : InstRW<[VecFPd, Lat30], (instregex "DI(E|D)BR$")>;
890
891 //===----------------------------------------------------------------------===//
892 // FP: Comparisons
893 //===----------------------------------------------------------------------===//
894
895 // Compare
896 def : InstRW<[VecXsPm, LSU, Lat8], (instregex "(K|C)(E|D)B$")>;
897 def : InstRW<[VecXsPm, Lat4], (instregex "(K|C)(E|D)BR?$")>;
898 def : InstRW<[VecDF, VecDF, Lat20, GroupAlone], (instregex "(K|C)XBR$")>;
899
900 // Test Data Class
901 def : InstRW<[LSU, VecXsPm, Lat9], (instregex "TC(E|D)B$")>;
902 def : InstRW<[LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "TCXB$")>;
903
904 //===----------------------------------------------------------------------===//
905 // FP: Floating-point control register instructions
906 //===----------------------------------------------------------------------===//
907
908 def : InstRW<[FXa, LSU, Lat4, GroupAlone], (instregex "EFPC$")>;
909 def : InstRW<[FXb, LSU, Lat5, GroupAlone], (instregex "STFPC$")>;
910 def : InstRW<[LSU, Lat3, GroupAlone], (instregex "SFPC$")>;
911 def : InstRW<[LSU, LSU, Lat6, GroupAlone], (instregex "LFPC$")>;
912 def : InstRW<[FXa, Lat30], (instregex "SFASR$")>;
913 def : InstRW<[FXa, LSU, Lat30], (instregex "LFAS$")>;
914 def : InstRW<[FXb, Lat3, GroupAlone], (instregex "SRNM(B|T)?$")>;
915
916
917 // --------------------- Hexadecimal floating point ------------------------- //
918
919 //===----------------------------------------------------------------------===//
920 // HFP: Move instructions
921 //===----------------------------------------------------------------------===//
922
923 // Load and Test
924 def : InstRW<[VecXsPm, Lat4], (instregex "LT(D|E)R$")>;
925 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXR$")>;
926
927 //===----------------------------------------------------------------------===//
928 // HFP: Conversion instructions
929 //===----------------------------------------------------------------------===//
930
931 // Load rounded
932 def : InstRW<[VecBF], (instregex "(LEDR|LRER)$")>;
933 def : InstRW<[VecBF], (instregex "LEXR$")>;
934 def : InstRW<[VecDF2], (instregex "(LDXR|LRDR)$")>;
935
936 // Load lengthened
937 def : InstRW<[LSU], (instregex "LDE$")>;
938 def : InstRW<[FXb], (instregex "LDER$")>;
939 def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "LX(D|E)$")>;
940 def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "LX(D|E)R$")>;
941
942 // Convert from fixed
943 def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CE(F|G)R$")>;
944 def : InstRW<[FXb, VecBF, Lat9, BeginGroup], (instregex "CD(F|G)R$")>;
945 def : InstRW<[FXb, VecDF2, VecDF2, Lat12, GroupAlone], (instregex "CX(F|G)R$")>;
946
947 // Convert to fixed
948 def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CF(E|D)R$")>;
949 def : InstRW<[FXb, VecBF, Lat11, BeginGroup], (instregex "CG(E|D)R$")>;
950 def : InstRW<[FXb, VecDF, VecDF, Lat20, BeginGroup], (instregex "C(F|G)XR$")>;
951
952 // Convert BFP to HFP / HFP to BFP.
953 def : InstRW<[VecBF], (instregex "THD(E)?R$")>;
954 def : InstRW<[VecBF], (instregex "TB(E)?DR$")>;
955
956 //===----------------------------------------------------------------------===//
957 // HFP: Unary arithmetic
958 //===----------------------------------------------------------------------===//
959
960 // Load Complement / Negative / Positive
961 def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)DR$")>;
962 def : InstRW<[VecXsPm, Lat4], (instregex "L(C|N|P)ER$")>;
963 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "L(C|N|P)XR$")>;
964
965 // Halve
966 def : InstRW<[VecBF], (instregex "H(E|D)R$")>;
967
968 // Square root
969 def : InstRW<[VecFPd, LSU], (instregex "SQ(E|D)$")>;
970 def : InstRW<[VecFPd], (instregex "SQ(E|D)R$")>;
971 def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "SQXR$")>;
972
973 // Load FP integer
974 def : InstRW<[VecBF], (instregex "FIER$")>;
975 def : InstRW<[VecBF], (instregex "FIDR$")>;
976 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXR$")>;
977
978 //===----------------------------------------------------------------------===//
979 // HFP: Binary arithmetic
980 //===----------------------------------------------------------------------===//
981
982 // Addition
983 def : InstRW<[VecBF, LSU, Lat12], (instregex "A(E|D|U|W)$")>;
984 def : InstRW<[VecBF], (instregex "A(E|D|U|W)R$")>;
985 def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXR$")>;
986
987 // Subtraction
988 def : InstRW<[VecBF, LSU, Lat12], (instregex "S(E|D|U|W)$")>;
989 def : InstRW<[VecBF], (instregex "S(E|D|U|W)R$")>;
990 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXR$")>;
991
992 // Multiply
993 def : InstRW<[VecBF, LSU, Lat12], (instregex "M(D|DE|E|EE)$")>;
994 def : InstRW<[VecBF], (instregex "M(D|DE|E|EE)R$")>;
995 def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MXD$")>;
996 def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MXDR$")>;
997 def : InstRW<[VecDF2, VecDF2, Lat20, GroupAlone], (instregex "MXR$")>;
998 def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MY$")>;
999 def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "MY(H|L)$")>;
1000 def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MYR$")>;
1001 def : InstRW<[VecBF, GroupAlone], (instregex "MY(H|L)R$")>;
1002
1003 // Multiply and add / subtract
1004 def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)E$")>;
1005 def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)ER$")>;
1006 def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "M(A|S)D$")>;
1007 def : InstRW<[VecBF, GroupAlone], (instregex "M(A|S)DR$")>;
1008 def : InstRW<[VecBF2, LSU, Lat12, GroupAlone], (instregex "MAY(H|L)$")>;
1009 def : InstRW<[VecBF2, VecBF2, LSU, Lat12, GroupAlone], (instregex "MAY$")>;
1010 def : InstRW<[VecBF, GroupAlone], (instregex "MAY(H|L)R$")>;
1011 def : InstRW<[VecBF2, VecBF2, GroupAlone], (instregex "MAYR$")>;
1012
1013 // Division
1014 def : InstRW<[VecFPd, LSU], (instregex "D(E|D)$")>;
1015 def : InstRW<[VecFPd], (instregex "D(E|D)R$")>;
1016 def : InstRW<[VecFPd, VecFPd, GroupAlone], (instregex "DXR$")>;
1017
1018 //===----------------------------------------------------------------------===//
1019 // HFP: Comparisons
1020 //===----------------------------------------------------------------------===//
1021
1022 // Compare
1023 def : InstRW<[VecBF, LSU, Lat12], (instregex "C(E|D)$")>;
1024 def : InstRW<[VecBF], (instregex "C(E|D)R$")>;
1025 def : InstRW<[VecDF, VecDF, Lat20, GroupAlone], (instregex "CXR$")>;
1026
1027
1028 // ------------------------ Decimal floating point -------------------------- //
1029
1030 //===----------------------------------------------------------------------===//
1031 // DFP: Move instructions
1032 //===----------------------------------------------------------------------===//
1033
1034 // Load and Test
1035 def : InstRW<[VecDF], (instregex "LTDTR$")>;
1036 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LTXTR$")>;
1037
1038 //===----------------------------------------------------------------------===//
1039 // DFP: Conversion instructions
1040 //===----------------------------------------------------------------------===//
1041
1042 // Load rounded
1043 def : InstRW<[VecDF, Lat15], (instregex "LEDTR$")>;
1044 def : InstRW<[VecDF, VecDF, Lat20], (instregex "LDXTR$")>;
1045
1046 // Load lengthened
1047 def : InstRW<[VecDF], (instregex "LDETR$")>;
1048 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "LXDTR$")>;
1049
1050 // Convert from fixed / logical
1051 def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CD(F|G)TR(A)?$")>;
1052 def : InstRW<[FXb, VecDF2, VecDF2, Lat30, GroupAlone], (instregex "CX(F|G)TR(A)?$")>;
1053 def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CDL(F|G)TR$")>;
1054 def : InstRW<[FXb, VecDF2, VecDF2, Lat30, GroupAlone], (instregex "CXL(F|G)TR$")>;
1055
1056 // Convert to fixed / logical
1057 def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "C(F|G)DTR(A)?$")>;
1058 def : InstRW<[FXb, VecDF, VecDF, Lat30, BeginGroup], (instregex "C(F|G)XTR(A)?$")>;
1059 def : InstRW<[FXb, VecDF, Lat30, BeginGroup], (instregex "CL(F|G)DTR$")>;
1060 def : InstRW<[FXb, VecDF, VecDF, Lat30, BeginGroup], (instregex "CL(F|G)XTR$")>;
1061
1062 // Convert from / to signed / unsigned packed
1063 def : InstRW<[FXb, VecDF, Lat9, BeginGroup], (instregex "CD(S|U)TR$")>;
1064 def : InstRW<[FXb, FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CX(S|U)TR$")>;
1065 def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "C(S|U)DTR$")>;
1066 def : InstRW<[FXb, FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "C(S|U)XTR$")>;
1067
1068 // Convert from / to zoned
1069 def : InstRW<[LSU, VecDF, Lat11, BeginGroup], (instregex "CDZT$")>;
1070 def : InstRW<[LSU, LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CXZT$")>;
1071 def : InstRW<[FXb, LSU, VecDF, Lat11, BeginGroup], (instregex "CZDT$")>;
1072 def : InstRW<[FXb, LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "CZXT$")>;
1073
1074 // Convert from / to packed
1075 def : InstRW<[LSU, VecDF, Lat11, BeginGroup], (instregex "CDPT$")>;
1076 def : InstRW<[LSU, LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "CXPT$")>;
1077 def : InstRW<[FXb, LSU, VecDF, Lat11, BeginGroup], (instregex "CPDT$")>;
1078 def : InstRW<[FXb, LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "CPXT$")>;
1079
1080 // Perform floating-point operation
1081 def : InstRW<[FXb, Lat30], (instregex "PFPO$")>;
1082
1083 //===----------------------------------------------------------------------===//
1084 // DFP: Unary arithmetic
1085 //===----------------------------------------------------------------------===//
1086
1087 // Load FP integer
1088 def : InstRW<[VecDF], (instregex "FIDTR$")>;
1089 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "FIXTR$")>;
1090
1091 // Extract biased exponent
1092 def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "EEDTR$")>;
1093 def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "EEXTR$")>;
1094
1095 // Extract significance
1096 def : InstRW<[FXb, VecDF, Lat12, BeginGroup], (instregex "ESDTR$")>;
1097 def : InstRW<[FXb, VecDF, VecDF, Lat15, BeginGroup], (instregex "ESXTR$")>;
1098
1099 //===----------------------------------------------------------------------===//
1100 // DFP: Binary arithmetic
1101 //===----------------------------------------------------------------------===//
1102
1103 // Addition
1104 def : InstRW<[VecDF], (instregex "ADTR(A)?$")>;
1105 def : InstRW<[VecDF2, VecDF2, Lat10, GroupAlone], (instregex "AXTR(A)?$")>;
1106
1107 // Subtraction
1108 def : InstRW<[VecDF], (instregex "SDTR(A)?$")>;
1109 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "SXTR(A)?$")>;
1110
1111 // Multiply
1112 def : InstRW<[VecDF, Lat30], (instregex "MDTR(A)?$")>;
1113 def : InstRW<[VecDF2, VecDF2, Lat30, GroupAlone], (instregex "MXTR(A)?$")>;
1114
1115 // Division
1116 def : InstRW<[VecDF, Lat30], (instregex "DDTR(A)?$")>;
1117 def : InstRW<[VecDF2, VecDF2, Lat30, GroupAlone], (instregex "DXTR(A)?$")>;
1118
1119 // Quantize
1120 def : InstRW<[VecDF], (instregex "QADTR$")>;
1121 def : InstRW<[VecDF2, VecDF2, Lat11, GroupAlone], (instregex "QAXTR$")>;
1122
1123 // Reround
1124 def : InstRW<[FXb, VecDF, Lat11, BeginGroup], (instregex "RRDTR$")>;
1125 def : InstRW<[FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "RRXTR$")>;
1126
1127 // Shift significand left/right
1128 def : InstRW<[LSU, VecDF, Lat11, GroupAlone], (instregex "S(L|R)DT$")>;
1129 def : InstRW<[LSU, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "S(L|R)XT$")>;
1130
1131 // Insert biased exponent
1132 def : InstRW<[FXb, VecDF, Lat11, BeginGroup], (instregex "IEDTR$")>;
1133 def : InstRW<[FXb, VecDF2, VecDF2, Lat15, GroupAlone], (instregex "IEXTR$")>;
1134
1135 //===----------------------------------------------------------------------===//
1136 // DFP: Comparisons
1137 //===----------------------------------------------------------------------===//
1138
1139 // Compare
1140 def : InstRW<[VecDF], (instregex "(K|C)DTR$")>;
1141 def : InstRW<[VecDF, VecDF, Lat11, GroupAlone], (instregex "(K|C)XTR$")>;
1142
1143 // Compare biased exponent
1144 def : InstRW<[VecDF], (instregex "CEDTR$")>;
1145 def : InstRW<[VecDF], (instregex "CEXTR$")>;
1146
1147 // Test Data Class/Group
1148 def : InstRW<[LSU, VecDF, Lat11], (instregex "TD(C|G)(E|D)T$")>;
1149 def : InstRW<[LSU, VecDF, VecDF, Lat15, GroupAlone], (instregex "TD(C|G)XT$")>;
1150
1151
1152 // --------------------------------- Vector --------------------------------- //
1153
1154 //===----------------------------------------------------------------------===//
1155 // Vector: Move instructions
1156 //===----------------------------------------------------------------------===//
1157
1158 def : InstRW<[FXb], (instregex "VLR(32|64)?$")>;
1159 def : InstRW<[FXb, Lat4], (instregex "VLGV(B|F|G|H)?$")>;
1160 def : InstRW<[FXb], (instregex "VLVG(B|F|G|H)?$")>;
1161 def : InstRW<[FXb, Lat2], (instregex "VLVGP(32)?$")>;
1162
1163 //===----------------------------------------------------------------------===//
1164 // Vector: Immediate instructions
1165 //===----------------------------------------------------------------------===//
1166
1167 def : InstRW<[VecXsPm], (instregex "VZERO$")>;
1168 def : InstRW<[VecXsPm], (instregex "VONE$")>;
1169 def : InstRW<[VecXsPm], (instregex "VGBM$")>;
1170 def : InstRW<[VecXsPm], (instregex "VGM(B|F|G|H)?$")>;
1171 def : InstRW<[VecXsPm], (instregex "VREPI(B|F|G|H)?$")>;
1172 def : InstRW<[VecXsPm], (instregex "VLEI(B|F|G|H)$")>;
1173
1174 //===----------------------------------------------------------------------===//
1175 // Vector: Loads
1176 //===----------------------------------------------------------------------===//
1177
1178 def : InstRW<[LSU], (instregex "VL(L|BB)?$")>;
1179 def : InstRW<[LSU], (instregex "VL(32|64)$")>;
1180 def : InstRW<[LSU], (instregex "VLLEZ(B|F|G|H|LF)?$")>;
1181 def : InstRW<[LSU], (instregex "VLREP(B|F|G|H)?$")>;
1182 def : InstRW<[VecXsPm, LSU, Lat7], (instregex "VLE(B|F|G|H)$")>;
1183 def : InstRW<[FXb, LSU, VecXsPm, Lat11, BeginGroup], (instregex "VGE(F|G)$")>;
1184 def : InstRW<[LSU, LSU, LSU, LSU, LSU, Lat10, GroupAlone],
1185               (instregex "VLM$")>;
1186 def : InstRW<[LSU, Lat5], (instregex "VLRL(R)?$")>;
1187
1188 //===----------------------------------------------------------------------===//
1189 // Vector: Stores
1190 //===----------------------------------------------------------------------===//
1191
1192 def : InstRW<[FXb, LSU, Lat8], (instregex "VST(L|32|64)?$")>;
1193 def : InstRW<[FXb, LSU, Lat8], (instregex "VSTE(F|G)$")>;
1194 def : InstRW<[FXb, LSU, VecXsPm, Lat11, BeginGroup], (instregex "VSTE(B|H)$")>;
1195 def : InstRW<[LSU, LSU, FXb, FXb, FXb, FXb, FXb, Lat20, GroupAlone],
1196               (instregex "VSTM$")>;
1197 def : InstRW<[FXb, FXb, LSU, Lat12, BeginGroup], (instregex "VSCE(F|G)$")>;
1198 def : InstRW<[FXb, LSU, Lat8], (instregex "VSTRL(R)?$")>;
1199
1200 //===----------------------------------------------------------------------===//
1201 // Vector: Selects and permutes
1202 //===----------------------------------------------------------------------===//
1203
1204 def : InstRW<[VecXsPm], (instregex "VMRH(B|F|G|H)?$")>;
1205 def : InstRW<[VecXsPm], (instregex "VMRL(B|F|G|H)?$")>;
1206 def : InstRW<[VecXsPm], (instregex "VPERM$")>;
1207 def : InstRW<[VecXsPm], (instregex "VPDI$")>;
1208 def : InstRW<[VecXsPm], (instregex "VBPERM$")>;
1209 def : InstRW<[VecXsPm], (instregex "VREP(B|F|G|H)?$")>;
1210 def : InstRW<[VecXsPm], (instregex "VSEL$")>;
1211
1212 //===----------------------------------------------------------------------===//
1213 // Vector: Widening and narrowing
1214 //===----------------------------------------------------------------------===//
1215
1216 def : InstRW<[VecXsPm], (instregex "VPK(F|G|H)?$")>;
1217 def : InstRW<[VecXsPm], (instregex "VPKS(F|G|H)?$")>;
1218 def : InstRW<[VecXsPm, Lat4], (instregex "VPKS(F|G|H)S$")>;
1219 def : InstRW<[VecXsPm], (instregex "VPKLS(F|G|H)?$")>;
1220 def : InstRW<[VecXsPm, Lat4], (instregex "VPKLS(F|G|H)S$")>;
1221 def : InstRW<[VecXsPm], (instregex "VSEG(B|F|H)?$")>;
1222 def : InstRW<[VecXsPm], (instregex "VUPH(B|F|H)?$")>;
1223 def : InstRW<[VecXsPm], (instregex "VUPL(B|F)?$")>;
1224 def : InstRW<[VecXsPm], (instregex "VUPLH(B|F|H|W)?$")>;
1225 def : InstRW<[VecXsPm], (instregex "VUPLL(B|F|H)?$")>;
1226
1227 //===----------------------------------------------------------------------===//
1228 // Vector: Integer arithmetic
1229 //===----------------------------------------------------------------------===//
1230
1231 def : InstRW<[VecXsPm], (instregex "VA(B|F|G|H|Q|C|CQ)?$")>;
1232 def : InstRW<[VecXsPm], (instregex "VACC(B|F|G|H|Q|C|CQ)?$")>;
1233 def : InstRW<[VecXsPm], (instregex "VAVG(B|F|G|H)?$")>;
1234 def : InstRW<[VecXsPm], (instregex "VAVGL(B|F|G|H)?$")>;
1235 def : InstRW<[VecXsPm], (instregex "VN(C|O|N|X)?$")>;
1236 def : InstRW<[VecXsPm], (instregex "VO(C)?$")>;
1237 def : InstRW<[VecMul], (instregex "VCKSM$")>;
1238 def : InstRW<[VecXsPm], (instregex "VCLZ(B|F|G|H)?$")>;
1239 def : InstRW<[VecXsPm], (instregex "VCTZ(B|F|G|H)?$")>;
1240 def : InstRW<[VecXsPm], (instregex "VX$")>;
1241 def : InstRW<[VecMul], (instregex "VGFM?$")>;
1242 def : InstRW<[VecMul], (instregex "VGFMA(B|F|G|H)?$")>;
1243 def : InstRW<[VecMul], (instregex "VGFM(B|F|G|H)$")>;
1244 def : InstRW<[VecXsPm], (instregex "VLC(B|F|G|H)?$")>;
1245 def : InstRW<[VecXsPm], (instregex "VLP(B|F|G|H)?$")>;
1246 def : InstRW<[VecXsPm], (instregex "VMX(B|F|G|H)?$")>;
1247 def : InstRW<[VecXsPm], (instregex "VMXL(B|F|G|H)?$")>;
1248 def : InstRW<[VecXsPm], (instregex "VMN(B|F|G|H)?$")>;
1249 def : InstRW<[VecXsPm], (instregex "VMNL(B|F|G|H)?$")>;
1250 def : InstRW<[VecMul], (instregex "VMAL(B|F)?$")>;
1251 def : InstRW<[VecMul], (instregex "VMALE(B|F|H)?$")>;
1252 def : InstRW<[VecMul], (instregex "VMALH(B|F|H|W)?$")>;
1253 def : InstRW<[VecMul], (instregex "VMALO(B|F|H)?$")>;
1254 def : InstRW<[VecMul], (instregex "VMAO(B|F|H)?$")>;
1255 def : InstRW<[VecMul], (instregex "VMAE(B|F|H)?$")>;
1256 def : InstRW<[VecMul], (instregex "VMAH(B|F|H)?$")>;
1257 def : InstRW<[VecMul], (instregex "VME(B|F|H)?$")>;
1258 def : InstRW<[VecMul], (instregex "VMH(B|F|H)?$")>;
1259 def : InstRW<[VecMul], (instregex "VML(B|F)?$")>;
1260 def : InstRW<[VecMul], (instregex "VMLE(B|F|H)?$")>;
1261 def : InstRW<[VecMul], (instregex "VMLH(B|F|H|W)?$")>;
1262 def : InstRW<[VecMul], (instregex "VMLO(B|F|H)?$")>;
1263 def : InstRW<[VecMul], (instregex "VMO(B|F|H)?$")>;
1264 def : InstRW<[VecBF2], (instregex "VMSL(G)?$")>;
1265
1266 def : InstRW<[VecXsPm], (instregex "VPOPCT(B|F|G|H)?$")>;
1267
1268 def : InstRW<[VecXsPm], (instregex "VERLL(B|F|G|H)?$")>;
1269 def : InstRW<[VecXsPm], (instregex "VERLLV(B|F|G|H)?$")>;
1270 def : InstRW<[VecXsPm], (instregex "VERIM(B|F|G|H)?$")>;
1271 def : InstRW<[VecXsPm], (instregex "VESL(B|F|G|H)?$")>;
1272 def : InstRW<[VecXsPm], (instregex "VESLV(B|F|G|H)?$")>;
1273 def : InstRW<[VecXsPm], (instregex "VESRA(B|F|G|H)?$")>;
1274 def : InstRW<[VecXsPm], (instregex "VESRAV(B|F|G|H)?$")>;
1275 def : InstRW<[VecXsPm], (instregex "VESRL(B|F|G|H)?$")>;
1276 def : InstRW<[VecXsPm], (instregex "VESRLV(B|F|G|H)?$")>;
1277
1278 def : InstRW<[VecXsPm], (instregex "VSL(DB)?$")>;
1279 def : InstRW<[VecXsPm, VecXsPm, Lat8], (instregex "VSLB$")>;
1280 def : InstRW<[VecXsPm], (instregex "VSR(A|L)$")>;
1281 def : InstRW<[VecXsPm, VecXsPm, Lat8], (instregex "VSR(A|L)B$")>;
1282
1283 def : InstRW<[VecXsPm], (instregex "VSB(I|IQ|CBI|CBIQ)?$")>;
1284 def : InstRW<[VecXsPm], (instregex "VSCBI(B|F|G|H|Q)?$")>;
1285 def : InstRW<[VecXsPm], (instregex "VS(F|G|H|Q)?$")>;
1286
1287 def : InstRW<[VecMul], (instregex "VSUM(B|H)?$")>;
1288 def : InstRW<[VecMul], (instregex "VSUMG(F|H)?$")>;
1289 def : InstRW<[VecMul], (instregex "VSUMQ(F|G)?$")>;
1290
1291 //===----------------------------------------------------------------------===//
1292 // Vector: Integer comparison
1293 //===----------------------------------------------------------------------===//
1294
1295 def : InstRW<[VecXsPm, Lat4], (instregex "VEC(B|F|G|H)?$")>;
1296 def : InstRW<[VecXsPm, Lat4], (instregex "VECL(B|F|G|H)?$")>;
1297 def : InstRW<[VecXsPm], (instregex "VCEQ(B|F|G|H)?$")>;
1298 def : InstRW<[VecXsPm, Lat4], (instregex "VCEQ(B|F|G|H)S$")>;
1299 def : InstRW<[VecXsPm], (instregex "VCH(B|F|G|H)?$")>;
1300 def : InstRW<[VecXsPm, Lat4], (instregex "VCH(B|F|G|H)S$")>;
1301 def : InstRW<[VecXsPm], (instregex "VCHL(B|F|G|H)?$")>;
1302 def : InstRW<[VecXsPm, Lat4], (instregex "VCHL(B|F|G|H)S$")>;
1303 def : InstRW<[VecStr, Lat5], (instregex "VTM$")>;
1304
1305 //===----------------------------------------------------------------------===//
1306 // Vector: Floating-point arithmetic
1307 //===----------------------------------------------------------------------===//
1308
1309 // Conversion and rounding
1310 def : InstRW<[VecBF], (instregex "VCD(L)?G$")>;
1311 def : InstRW<[VecBF], (instregex "VCD(L)?GB$")>;
1312 def : InstRW<[VecBF], (instregex "WCD(L)?GB$")>;
1313 def : InstRW<[VecBF], (instregex "VC(L)?GD$")>;
1314 def : InstRW<[VecBF], (instregex "VC(L)?GDB$")>;
1315 def : InstRW<[VecBF], (instregex "WC(L)?GDB$")>;
1316 def : InstRW<[VecBF], (instregex "VL(DE|ED)$")>;
1317 def : InstRW<[VecBF], (instregex "VL(DE|ED)B$")>;
1318 def : InstRW<[VecBF], (instregex "WL(DE|ED)B$")>;
1319 def : InstRW<[VecBF], (instregex "VFL(L|R)$")>;
1320 def : InstRW<[VecBF], (instregex "VFL(LS|RD)$")>;
1321 def : InstRW<[VecBF], (instregex "WFL(LS|RD)$")>;
1322 def : InstRW<[VecBF2], (instregex "WFLLD$")>;
1323 def : InstRW<[VecDF2, Lat10], (instregex "WFLRX$")>;
1324 def : InstRW<[VecBF2], (instregex "VFI$")>;
1325 def : InstRW<[VecBF], (instregex "VFIDB$")>;
1326 def : InstRW<[VecBF], (instregex "WFIDB$")>;
1327 def : InstRW<[VecBF2], (instregex "VFISB$")>;
1328 def : InstRW<[VecBF], (instregex "WFISB$")>;
1329 def : InstRW<[VecDF2, Lat10], (instregex "WFIXB$")>;
1330
1331 // Sign operations
1332 def : InstRW<[VecXsPm], (instregex "VFPSO$")>;
1333 def : InstRW<[VecXsPm], (instregex "(V|W)FPSODB$")>;
1334 def : InstRW<[VecXsPm], (instregex "(V|W)FPSOSB$")>;
1335 def : InstRW<[VecXsPm], (instregex "WFPSOXB$")>;
1336 def : InstRW<[VecXsPm], (instregex "(V|W)FL(C|N|P)DB$")>;
1337 def : InstRW<[VecXsPm], (instregex "(V|W)FL(C|N|P)SB$")>;
1338 def : InstRW<[VecXsPm], (instregex "WFL(C|N|P)XB$")>;
1339
1340 // Minimum / maximum
1341 def : InstRW<[VecXsPm], (instregex "VF(MAX|MIN)$")>;
1342 def : InstRW<[VecXsPm], (instregex "VF(MAX|MIN)DB$")>;
1343 def : InstRW<[VecXsPm], (instregex "WF(MAX|MIN)DB$")>;
1344 def : InstRW<[VecXsPm], (instregex "VF(MAX|MIN)SB$")>;
1345 def : InstRW<[VecXsPm], (instregex "WF(MAX|MIN)SB$")>;
1346 def : InstRW<[VecDFX], (instregex "WF(MAX|MIN)XB$")>;
1347
1348 // Test data class
1349 def : InstRW<[VecXsPm, Lat4], (instregex "VFTCI$")>;
1350 def : InstRW<[VecXsPm, Lat4], (instregex "(V|W)FTCIDB$")>;
1351 def : InstRW<[VecXsPm, Lat4], (instregex "(V|W)FTCISB$")>;
1352 def : InstRW<[VecDFX, Lat4], (instregex "WFTCIXB$")>;
1353
1354 // Add / subtract
1355 def : InstRW<[VecBF2], (instregex "VF(A|S)$")>;
1356 def : InstRW<[VecBF], (instregex "VF(A|S)DB$")>;
1357 def : InstRW<[VecBF], (instregex "WF(A|S)DB$")>;
1358 def : InstRW<[VecBF2], (instregex "VF(A|S)SB$")>;
1359 def : InstRW<[VecBF], (instregex "WF(A|S)SB$")>;
1360 def : InstRW<[VecDF2, Lat10], (instregex "WF(A|S)XB$")>;
1361
1362 // Multiply / multiply-and-add/subtract
1363 def : InstRW<[VecBF2], (instregex "VFM$")>;
1364 def : InstRW<[VecBF], (instregex "VFMDB$")>;
1365 def : InstRW<[VecBF], (instregex "WFMDB$")>;
1366 def : InstRW<[VecBF2], (instregex "VFMSB$")>;
1367 def : InstRW<[VecBF], (instregex "WFMSB$")>;
1368 def : InstRW<[VecDF2, Lat20], (instregex "WFMXB$")>;
1369 def : InstRW<[VecBF2], (instregex "VF(N)?M(A|S)$")>;
1370 def : InstRW<[VecBF], (instregex "VF(N)?M(A|S)DB$")>;
1371 def : InstRW<[VecBF], (instregex "WF(N)?M(A|S)DB$")>;
1372 def : InstRW<[VecBF2], (instregex "VF(N)?M(A|S)SB$")>;
1373 def : InstRW<[VecBF], (instregex "WF(N)?M(A|S)SB$")>;
1374 def : InstRW<[VecDF2, Lat20], (instregex "WF(N)?M(A|S)XB$")>;
1375
1376 // Divide / square root
1377 def : InstRW<[VecFPd], (instregex "VFD$")>;
1378 def : InstRW<[VecFPd], (instregex "(V|W)FDDB$")>;
1379 def : InstRW<[VecFPd], (instregex "(V|W)FDSB$")>;
1380 def : InstRW<[VecFPd], (instregex "WFDXB$")>;
1381 def : InstRW<[VecFPd], (instregex "VFSQ$")>;
1382 def : InstRW<[VecFPd], (instregex "(V|W)FSQDB$")>;
1383 def : InstRW<[VecFPd], (instregex "(V|W)FSQSB$")>;
1384 def : InstRW<[VecFPd], (instregex "WFSQXB$")>;
1385
1386 //===----------------------------------------------------------------------===//
1387 // Vector: Floating-point comparison
1388 //===----------------------------------------------------------------------===//
1389
1390 def : InstRW<[VecXsPm], (instregex "VF(C|K)(E|H|HE)$")>;
1391 def : InstRW<[VecXsPm], (instregex "VF(C|K)(E|H|HE)DB$")>;
1392 def : InstRW<[VecXsPm], (instregex "WF(C|K)(E|H|HE)DB$")>;
1393 def : InstRW<[VecXsPm], (instregex "VF(C|K)(E|H|HE)SB$")>;
1394 def : InstRW<[VecXsPm], (instregex "WF(C|K)(E|H|HE)SB$")>;
1395 def : InstRW<[VecDFX], (instregex "WF(C|K)(E|H|HE)XB$")>;
1396 def : InstRW<[VecXsPm, Lat4], (instregex "VF(C|K)(E|H|HE)DBS$")>;
1397 def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)(E|H|HE)DBS$")>;
1398 def : InstRW<[VecXsPm, Lat4], (instregex "VF(C|K)(E|H|HE)SBS$")>;
1399 def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)(E|H|HE)SBS$")>;
1400 def : InstRW<[VecDFX, Lat4], (instregex "WF(C|K)(E|H|HE)XBS$")>;
1401 def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)$")>;
1402 def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)DB$")>;
1403 def : InstRW<[VecXsPm, Lat4], (instregex "WF(C|K)SB$")>;
1404 def : InstRW<[VecDFX, Lat4], (instregex "WF(C|K)XB$")>;
1405
1406 //===----------------------------------------------------------------------===//
1407 // Vector: Floating-point insertion and extraction
1408 //===----------------------------------------------------------------------===//
1409
1410 def : InstRW<[FXb], (instregex "LEFR$")>;
1411 def : InstRW<[FXb, Lat4], (instregex "LFER$")>;
1412
1413 //===----------------------------------------------------------------------===//
1414 // Vector: String instructions
1415 //===----------------------------------------------------------------------===//
1416
1417 def : InstRW<[VecStr], (instregex "VFAE(B)?$")>;
1418 def : InstRW<[VecStr, Lat5], (instregex "VFAEBS$")>;
1419 def : InstRW<[VecStr], (instregex "VFAE(F|H)$")>;
1420 def : InstRW<[VecStr, Lat5], (instregex "VFAE(F|H)S$")>;
1421 def : InstRW<[VecStr], (instregex "VFAEZ(B|F|H)$")>;
1422 def : InstRW<[VecStr, Lat5], (instregex "VFAEZ(B|F|H)S$")>;
1423 def : InstRW<[VecStr], (instregex "VFEE(B|F|H|ZB|ZF|ZH)?$")>;
1424 def : InstRW<[VecStr, Lat5], (instregex "VFEE(B|F|H|ZB|ZF|ZH)S$")>;
1425 def : InstRW<[VecStr], (instregex "VFENE(B|F|H|ZB|ZF|ZH)?$")>;
1426 def : InstRW<[VecStr, Lat5], (instregex "VFENE(B|F|H|ZB|ZF|ZH)S$")>;
1427 def : InstRW<[VecStr], (instregex "VISTR(B|F|H)?$")>;
1428 def : InstRW<[VecStr, Lat5], (instregex "VISTR(B|F|H)S$")>;
1429 def : InstRW<[VecStr], (instregex "VSTRC(B|F|H)?$")>;
1430 def : InstRW<[VecStr, Lat5], (instregex "VSTRC(B|F|H)S$")>;
1431 def : InstRW<[VecStr], (instregex "VSTRCZ(B|F|H)$")>;
1432 def : InstRW<[VecStr, Lat5], (instregex "VSTRCZ(B|F|H)S$")>;
1433
1434 //===----------------------------------------------------------------------===//
1435 // Vector: Packed-decimal instructions
1436 //===----------------------------------------------------------------------===//
1437
1438 def : InstRW<[VecDF, VecDF, Lat10, GroupAlone], (instregex "VLIP$")>;
1439 def : InstRW<[VecDFX, LSU, Lat12, GroupAlone], (instregex "VPKZ$")>;
1440 def : InstRW<[VecDFX, FXb, LSU, Lat12, GroupAlone], (instregex "VUPKZ$")>;
1441 def : InstRW<[VecDF, VecDF, FXb, Lat20, GroupAlone], (instregex "VCVB(G)?$")>;
1442 def : InstRW<[VecDF, VecDF, FXb, Lat20, GroupAlone], (instregex "VCVD(G)?$")>;
1443 def : InstRW<[VecDFX], (instregex "V(A|S)P$")>;
1444 def : InstRW<[VecDF, VecDF, Lat30, GroupAlone], (instregex "VM(S)?P$")>;
1445 def : InstRW<[VecDF, VecDF, Lat30, GroupAlone], (instregex "V(D|R)P$")>;
1446 def : InstRW<[VecDFX, Lat30, GroupAlone], (instregex "VSDP$")>;
1447 def : InstRW<[VecDF, VecDF, Lat11], (instregex "VSRP$")>;
1448 def : InstRW<[VecDFX], (instregex "VPSOP$")>;
1449 def : InstRW<[VecDFX], (instregex "V(T|C)P$")>;
1450
1451
1452 // -------------------------------- System ---------------------------------- //
1453
1454 //===----------------------------------------------------------------------===//
1455 // System: Program-Status Word Instructions
1456 //===----------------------------------------------------------------------===//
1457
1458 def : InstRW<[FXb, Lat30], (instregex "EPSW$")>;
1459 def : InstRW<[FXb, LSU, Lat30], (instregex "LPSW(E)?$")>;
1460 def : InstRW<[FXa, Lat3, GroupAlone], (instregex "IPK$")>;
1461 def : InstRW<[LSU, EndGroup], (instregex "SPKA$")>;
1462 def : InstRW<[LSU, EndGroup], (instregex "SSM$")>;
1463 def : InstRW<[FXb, LSU, GroupAlone], (instregex "ST(N|O)SM$")>;
1464 def : InstRW<[FXa, Lat3], (instregex "IAC$")>;
1465 def : InstRW<[LSU, EndGroup], (instregex "SAC(F)?$")>;
1466
1467 //===----------------------------------------------------------------------===//
1468 // System: Control Register Instructions
1469 //===----------------------------------------------------------------------===//
1470
1471 def : InstRW<[FXb, LSU, Lat30], (instregex "LCTL(G)?$")>;
1472 def : InstRW<[LSU, Lat30], (instregex "STCT(L|G)$")>;
1473 def : InstRW<[LSU], (instregex "E(P|S)A(I)?R$")>;
1474 def : InstRW<[FXb, Lat30], (instregex "SSA(I)?R$")>;
1475 def : InstRW<[FXb, Lat30], (instregex "ESEA$")>;
1476
1477 //===----------------------------------------------------------------------===//
1478 // System: Prefix-Register Instructions
1479 //===----------------------------------------------------------------------===//
1480
1481 def : InstRW<[FXb, LSU, Lat30], (instregex "SPX$")>;
1482 def : InstRW<[FXb, LSU, Lat30], (instregex "STPX$")>;
1483
1484 //===----------------------------------------------------------------------===//
1485 // System: Storage-Key and Real Memory Instructions
1486 //===----------------------------------------------------------------------===//
1487
1488 def : InstRW<[FXb, Lat30], (instregex "ISKE$")>;
1489 def : InstRW<[FXb, Lat30], (instregex "IVSK$")>;
1490 def : InstRW<[FXb, Lat30], (instregex "SSKE(Opt)?$")>;
1491 def : InstRW<[FXb, Lat30], (instregex "RRB(E|M)$")>;
1492 def : InstRW<[FXb, Lat30], (instregex "IRBM$")>;
1493 def : InstRW<[FXb, Lat30], (instregex "PFMF$")>;
1494 def : InstRW<[FXb, Lat30], (instregex "TB$")>;
1495 def : InstRW<[FXb, LSU, Lat30], (instregex "PGIN$")>;
1496 def : InstRW<[FXb, LSU, Lat30], (instregex "PGOUT$")>;
1497
1498 //===----------------------------------------------------------------------===//
1499 // System: Dynamic-Address-Translation Instructions
1500 //===----------------------------------------------------------------------===//
1501
1502 def : InstRW<[FXb, LSU, Lat30], (instregex "IPTE(Opt)?(Opt)?$")>;
1503 def : InstRW<[FXb, Lat30], (instregex "IDTE(Opt)?$")>;
1504 def : InstRW<[FXb, Lat30], (instregex "CRDTE(Opt)?$")>;
1505 def : InstRW<[FXb, Lat30], (instregex "PTLB$")>;
1506 def : InstRW<[FXb, LSU, Lat30], (instregex "CSP(G)?$")>;
1507 def : InstRW<[FXb, LSU, Lat30], (instregex "LPTEA$")>;
1508 def : InstRW<[FXb, LSU, Lat30], (instregex "LRA(Y|G)?$")>;
1509 def : InstRW<[FXb, LSU, Lat30], (instregex "STRAG$")>;
1510 def : InstRW<[FXb, LSU, Lat30], (instregex "LURA(G)?$")>;
1511 def : InstRW<[FXb, LSU, Lat30], (instregex "STUR(A|G)$")>;
1512 def : InstRW<[FXb, LSU, Lat30], (instregex "TPROT$")>;
1513
1514 //===----------------------------------------------------------------------===//
1515 // System: Memory-move Instructions
1516 //===----------------------------------------------------------------------===//
1517
1518 def : InstRW<[FXa, FXa, FXb, LSU, Lat8, GroupAlone], (instregex "MVC(K|P|S)$")>;
1519 def : InstRW<[FXa, LSU, Lat6, GroupAlone], (instregex "MVC(S|D)K$")>;
1520 def : InstRW<[FXb, LSU, Lat30], (instregex "MVCOS$")>;
1521 def : InstRW<[LSU, Lat30, GroupAlone], (instregex "MVPG$")>;
1522
1523 //===----------------------------------------------------------------------===//
1524 // System: Address-Space Instructions
1525 //===----------------------------------------------------------------------===//
1526
1527 def : InstRW<[FXb, LSU, Lat30], (instregex "LASP$")>;
1528 def : InstRW<[LSU, GroupAlone], (instregex "PALB$")>;
1529 def : InstRW<[FXb, LSU, Lat30], (instregex "PC$")>;
1530 def : InstRW<[FXb, Lat30], (instregex "PR$")>;
1531 def : InstRW<[FXb, Lat30], (instregex "PT(I)?$")>;
1532 def : InstRW<[FXb, LSU, Lat30], (instregex "RP$")>;
1533 def : InstRW<[FXb, Lat30], (instregex "BS(G|A)$")>;
1534 def : InstRW<[FXb, Lat20], (instregex "TAR$")>;
1535
1536 //===----------------------------------------------------------------------===//
1537 // System: Linkage-Stack Instructions
1538 //===----------------------------------------------------------------------===//
1539
1540 def : InstRW<[FXb, Lat30, EndGroup], (instregex "BAKR$")>;
1541 def : InstRW<[FXb, Lat30], (instregex "EREG(G)?$")>;
1542 def : InstRW<[FXb, Lat30], (instregex "(E|M)STA$")>;
1543
1544 //===----------------------------------------------------------------------===//
1545 // System: Time-Related Instructions
1546 //===----------------------------------------------------------------------===//
1547
1548 def : InstRW<[FXb, Lat30], (instregex "PTFF$")>;
1549 def : InstRW<[FXb, LSU, Lat20], (instregex "SCK$")>;
1550 def : InstRW<[FXb, Lat30], (instregex "SCKPF$")>;
1551 def : InstRW<[FXb, LSU, Lat20], (instregex "SCKC$")>;
1552 def : InstRW<[LSU, LSU, GroupAlone], (instregex "SPT$")>;
1553 def : InstRW<[LSU, LSU, LSU, FXa, FXa, FXb, Lat9, GroupAlone],
1554              (instregex "STCK(F)?$")>;
1555 def : InstRW<[LSU, LSU, LSU, LSU, FXa, FXa, FXb, FXb, Lat11, GroupAlone],
1556              (instregex "STCKE$")>;
1557 def : InstRW<[FXb, LSU, Lat9], (instregex "STCKC$")>;
1558 def : InstRW<[LSU, LSU, FXb, Lat5, BeginGroup], (instregex "STPT$")>;
1559
1560 //===----------------------------------------------------------------------===//
1561 // System: CPU-Related Instructions
1562 //===----------------------------------------------------------------------===//
1563
1564 def : InstRW<[FXb, LSU, Lat30], (instregex "STAP$")>;
1565 def : InstRW<[FXb, LSU, Lat30], (instregex "STIDP$")>;
1566 def : InstRW<[FXb, LSU, Lat30], (instregex "STSI$")>;
1567 def : InstRW<[FXb, LSU, Lat30], (instregex "STFL(E)?$")>;
1568 def : InstRW<[FXb, LSU, Lat30], (instregex "ECAG$")>;
1569 def : InstRW<[FXa, LSU, Lat30], (instregex "ECTG$")>;
1570 def : InstRW<[FXb, Lat30], (instregex "PTF$")>;
1571 def : InstRW<[FXb, Lat30], (instregex "PCKMO$")>;
1572
1573 //===----------------------------------------------------------------------===//
1574 // System: Miscellaneous Instructions
1575 //===----------------------------------------------------------------------===//
1576
1577 def : InstRW<[FXb, Lat30], (instregex "SVC$")>;
1578 def : InstRW<[FXb, GroupAlone], (instregex "MC$")>;
1579 def : InstRW<[FXb, Lat30], (instregex "DIAG$")>;
1580 def : InstRW<[FXb], (instregex "TRAC(E|G)$")>;
1581 def : InstRW<[FXb, Lat30], (instregex "TRAP(2|4)$")>;
1582 def : InstRW<[FXb, Lat30], (instregex "SIGP$")>;
1583 def : InstRW<[FXb, LSU, Lat30], (instregex "SIGA$")>;
1584 def : InstRW<[FXb, LSU, Lat30], (instregex "SIE$")>;
1585
1586 //===----------------------------------------------------------------------===//
1587 // System: CPU-Measurement Facility Instructions
1588 //===----------------------------------------------------------------------===//
1589
1590 def : InstRW<[FXb], (instregex "LPP$")>;
1591 def : InstRW<[FXb, Lat30], (instregex "ECPGA$")>;
1592 def : InstRW<[FXb, Lat30], (instregex "E(C|P)CTR$")>;
1593 def : InstRW<[FXb, Lat30], (instregex "LCCTL$")>;
1594 def : InstRW<[FXb, LSU, Lat30], (instregex "L(P|S)CTL$")>;
1595 def : InstRW<[FXb, LSU, Lat30], (instregex "Q(S|CTR)I$")>;
1596 def : InstRW<[FXb, Lat30], (instregex "S(C|P)CTR$")>;
1597
1598 //===----------------------------------------------------------------------===//
1599 // System: I/O Instructions
1600 //===----------------------------------------------------------------------===//
1601
1602 def : InstRW<[FXb, Lat30], (instregex "(C|H|R|X)SCH$")>;
1603 def : InstRW<[FXb, LSU, Lat30], (instregex "(M|S|ST|T)SCH$")>;
1604 def : InstRW<[FXb, Lat30], (instregex "RCHP$")>;
1605 def : InstRW<[FXb, Lat30], (instregex "SCHM$")>;
1606 def : InstRW<[FXb, LSU, Lat30], (instregex "STC(PS|RW)$")>;
1607 def : InstRW<[FXb, LSU, Lat30], (instregex "TPI$")>;
1608 def : InstRW<[FXb, Lat30], (instregex "SAL$")>;
1609
1610 }
1611