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