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