xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedA64FX.td (revision 4c2d3b022a1d543dbbff75a0c53e8d3d7242216d)
1e8d8bef9SDimitry Andric//=- AArch64SchedA64FX.td - Fujitsu A64FX Scheduling Defs -*- tablegen -*-=//
2e8d8bef9SDimitry Andric//
3e8d8bef9SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4e8d8bef9SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
5e8d8bef9SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e8d8bef9SDimitry Andric//
7e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
8e8d8bef9SDimitry Andric//
9e8d8bef9SDimitry Andric// This file defines the scheduling model for the Fujitsu A64FX processors.
10e8d8bef9SDimitry Andric//
11e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
12e8d8bef9SDimitry Andric
13e8d8bef9SDimitry Andricdef A64FXModel : SchedMachineModel {
14e8d8bef9SDimitry Andric  let IssueWidth            =   6; // 6 micro-ops dispatched at a time.
15e8d8bef9SDimitry Andric  let MicroOpBufferSize     = 180; // 180 entries in micro-op re-order buffer.
16e8d8bef9SDimitry Andric  let LoadLatency           =   5; // Optimistic load latency.
17e8d8bef9SDimitry Andric  let MispredictPenalty     =  12; // Extra cycles for mispredicted branch.
18e8d8bef9SDimitry Andric  // Determined via a mix of micro-arch details and experimentation.
19e8d8bef9SDimitry Andric  let LoopMicroOpBufferSize = 128;
20e8d8bef9SDimitry Andric  let PostRAScheduler       =   1; // Using PostRA sched.
21bdd1243dSDimitry Andric  let CompleteModel         =   1;
22e8d8bef9SDimitry Andric
23cb14a3feSDimitry Andric  list<Predicate> UnsupportedFeatures = !listconcat(SMEUnsupported.F, SVEUnsupported.F,
24cb14a3feSDimitry Andric                                                    [HasMTE, HasMatMulInt8, HasBF16,
25*4c2d3b02SDimitry Andric                                                    HasPAuth, HasPAuthLR, HasCPA,
26*4c2d3b02SDimitry Andric                                                    HasCSSC]);
27e8d8bef9SDimitry Andric  let FullInstRWOverlapCheck = 0;
28e8d8bef9SDimitry Andric}
29e8d8bef9SDimitry Andric
30e8d8bef9SDimitry Andriclet SchedModel = A64FXModel in {
31e8d8bef9SDimitry Andric
32e8d8bef9SDimitry Andric// Define the issue ports.
33e8d8bef9SDimitry Andric
34e8d8bef9SDimitry Andric// A64FXIP*
35e8d8bef9SDimitry Andric
36e8d8bef9SDimitry Andric// Port 0
37e8d8bef9SDimitry Andricdef A64FXIPFLA : ProcResource<1>;
38e8d8bef9SDimitry Andric
39e8d8bef9SDimitry Andric// Port 1
40e8d8bef9SDimitry Andricdef A64FXIPPR : ProcResource<1>;
41e8d8bef9SDimitry Andric
42e8d8bef9SDimitry Andric// Port 2
43e8d8bef9SDimitry Andricdef A64FXIPEXA : ProcResource<1>;
44e8d8bef9SDimitry Andric
45e8d8bef9SDimitry Andric// Port 3
46e8d8bef9SDimitry Andricdef A64FXIPFLB : ProcResource<1>;
47e8d8bef9SDimitry Andric
48e8d8bef9SDimitry Andric// Port 4
49e8d8bef9SDimitry Andricdef A64FXIPEXB : ProcResource<1>;
50e8d8bef9SDimitry Andric
51e8d8bef9SDimitry Andric// Port 5
52e8d8bef9SDimitry Andricdef A64FXIPEAGA : ProcResource<1>;
53e8d8bef9SDimitry Andric
54e8d8bef9SDimitry Andric// Port 6
55e8d8bef9SDimitry Andricdef A64FXIPEAGB : ProcResource<1>;
56e8d8bef9SDimitry Andric
57e8d8bef9SDimitry Andric// Port 7
58e8d8bef9SDimitry Andricdef A64FXIPBR : ProcResource<1>;
59e8d8bef9SDimitry Andric
60e8d8bef9SDimitry Andric// Define groups for the functional units on each issue port.  Each group
61e8d8bef9SDimitry Andric// created will be used by a WriteRes later on.
62e8d8bef9SDimitry Andric
63e8d8bef9SDimitry Andricdef A64FXGI7 : ProcResGroup<[A64FXIPBR]>;
64e8d8bef9SDimitry Andric
65e8d8bef9SDimitry Andricdef A64FXGI0 : ProcResGroup<[A64FXIPFLA]>;
66e8d8bef9SDimitry Andric
67e8d8bef9SDimitry Andricdef A64FXGI1 : ProcResGroup<[A64FXIPPR]>;
68e8d8bef9SDimitry Andric
69e8d8bef9SDimitry Andricdef A64FXGI2 : ProcResGroup<[A64FXIPEXA]>;
70e8d8bef9SDimitry Andric
71e8d8bef9SDimitry Andricdef A64FXGI3 : ProcResGroup<[A64FXIPFLB]>;
72e8d8bef9SDimitry Andric
73e8d8bef9SDimitry Andricdef A64FXGI4 : ProcResGroup<[A64FXIPEXB]>;
74e8d8bef9SDimitry Andric
75e8d8bef9SDimitry Andricdef A64FXGI5 : ProcResGroup<[A64FXIPEAGA]>;
76e8d8bef9SDimitry Andric
77e8d8bef9SDimitry Andricdef A64FXGI6 : ProcResGroup<[A64FXIPEAGB]>;
78e8d8bef9SDimitry Andric
79e8d8bef9SDimitry Andricdef A64FXGI03 : ProcResGroup<[A64FXIPFLA, A64FXIPFLB]>;
80e8d8bef9SDimitry Andric
81e8d8bef9SDimitry Andricdef A64FXGI01 : ProcResGroup<[A64FXIPFLA, A64FXIPPR]>;
82e8d8bef9SDimitry Andric
83e8d8bef9SDimitry Andricdef A64FXGI24 : ProcResGroup<[A64FXIPEXA, A64FXIPEXB]>;
84e8d8bef9SDimitry Andric
85bdd1243dSDimitry Andricdef A64FXGI56 : ProcResGroup<[A64FXIPEAGA, A64FXIPEAGB]>;
86e8d8bef9SDimitry Andric
87e8d8bef9SDimitry Andricdef A64FXGI056 : ProcResGroup<[A64FXIPFLA, A64FXIPEAGA, A64FXIPEAGB]>;
88e8d8bef9SDimitry Andric
89e8d8bef9SDimitry Andricdef A64FXGI2456 : ProcResGroup<[A64FXIPEXA, A64FXIPEXB, A64FXIPEAGA, A64FXIPEAGB]>;
90e8d8bef9SDimitry Andric
91e8d8bef9SDimitry Andricdef A64FXAny : ProcResGroup<[A64FXIPFLA, A64FXIPPR, A64FXIPEXA, A64FXIPFLB,
92bdd1243dSDimitry Andric                             A64FXIPEXB, A64FXIPEAGA, A64FXIPEAGB, A64FXIPBR]>;
93e8d8bef9SDimitry Andric
94e8d8bef9SDimitry Andricdef A64FXWrite_1Cyc_GI7 : SchedWriteRes<[A64FXGI7]> {
95e8d8bef9SDimitry Andric  let Latency = 1;
96e8d8bef9SDimitry Andric}
97e8d8bef9SDimitry Andric
98e8d8bef9SDimitry Andricdef A64FXWrite_2Cyc_GI0 : SchedWriteRes<[A64FXGI0]> {
99e8d8bef9SDimitry Andric  let Latency = 2;
100e8d8bef9SDimitry Andric}
101e8d8bef9SDimitry Andric
102e8d8bef9SDimitry Andricdef A64FXWrite_4Cyc_GI0 : SchedWriteRes<[A64FXGI0]> {
103e8d8bef9SDimitry Andric  let Latency = 4;
104e8d8bef9SDimitry Andric}
105e8d8bef9SDimitry Andric
106e8d8bef9SDimitry Andricdef A64FXWrite_6Cyc_GI0 : SchedWriteRes<[A64FXGI0]> {
107e8d8bef9SDimitry Andric  let Latency = 6;
108e8d8bef9SDimitry Andric}
109e8d8bef9SDimitry Andric
110e8d8bef9SDimitry Andricdef A64FXWrite_8Cyc_GI0 : SchedWriteRes<[A64FXGI0]> {
111e8d8bef9SDimitry Andric  let Latency = 8;
112e8d8bef9SDimitry Andric}
113e8d8bef9SDimitry Andric
114e8d8bef9SDimitry Andricdef A64FXWrite_9Cyc_GI0 : SchedWriteRes<[A64FXGI0]> {
115e8d8bef9SDimitry Andric  let Latency = 9;
116e8d8bef9SDimitry Andric}
117e8d8bef9SDimitry Andric
118e8d8bef9SDimitry Andricdef A64FXWrite_3Cyc_GI1 : SchedWriteRes<[A64FXGI1]> {
119e8d8bef9SDimitry Andric  let Latency = 3;
120e8d8bef9SDimitry Andric}
121e8d8bef9SDimitry Andric
122e8d8bef9SDimitry Andricdef A64FXWrite_5Cyc_GI2 : SchedWriteRes<[A64FXGI2]> {
123e8d8bef9SDimitry Andric  let Latency = 5;
124e8d8bef9SDimitry Andric}
125e8d8bef9SDimitry Andric
126e8d8bef9SDimitry Andricdef A64FXWrite_4Cyc_GI3 : SchedWriteRes<[A64FXGI3]> {
127e8d8bef9SDimitry Andric  let Latency = 4;
128e8d8bef9SDimitry Andric}
129e8d8bef9SDimitry Andric
130e8d8bef9SDimitry Andricdef A64FXWrite_6Cyc_GI3 : SchedWriteRes<[A64FXGI3]> {
131e8d8bef9SDimitry Andric  let Latency = 6;
132e8d8bef9SDimitry Andric}
133e8d8bef9SDimitry Andric
134e8d8bef9SDimitry Andricdef A64FXWrite_4Cyc_GI03 : SchedWriteRes<[A64FXGI03]> {
135e8d8bef9SDimitry Andric  let Latency = 4;
136e8d8bef9SDimitry Andric}
137e8d8bef9SDimitry Andric
138e8d8bef9SDimitry Andricdef A64FXWrite_8Cyc_GI03 : SchedWriteRes<[A64FXGI03]> {
139e8d8bef9SDimitry Andric  let Latency = 8;
140e8d8bef9SDimitry Andric}
141e8d8bef9SDimitry Andric
142e8d8bef9SDimitry Andricdef A64FXWrite_9Cyc_GI03 : SchedWriteRes<[A64FXGI03]> {
143e8d8bef9SDimitry Andric  let Latency = 9;
144e8d8bef9SDimitry Andric}
145e8d8bef9SDimitry Andric
146e8d8bef9SDimitry Andricdef A64FXWrite_10Cyc_GI4 : SchedWriteRes<[A64FXGI4]> {
147e8d8bef9SDimitry Andric  let Latency = 10;
148e8d8bef9SDimitry Andric}
149e8d8bef9SDimitry Andric
150e8d8bef9SDimitry Andricdef A64FXWrite_12Cyc_GI4 : SchedWriteRes<[A64FXGI4]> {
151e8d8bef9SDimitry Andric  let Latency = 12;
152e8d8bef9SDimitry Andric}
153e8d8bef9SDimitry Andric
154e8d8bef9SDimitry Andricdef A64FXWrite_20Cyc_GI4 : SchedWriteRes<[A64FXGI4]> {
155e8d8bef9SDimitry Andric  let Latency = 20;
156e8d8bef9SDimitry Andric}
157e8d8bef9SDimitry Andric
158e8d8bef9SDimitry Andricdef A64FXWrite_5Cyc_GI5 : SchedWriteRes<[A64FXGI5]> {
159e8d8bef9SDimitry Andric  let Latency = 5;
160e8d8bef9SDimitry Andric}
161e8d8bef9SDimitry Andric
162e8d8bef9SDimitry Andricdef A64FXWrite_11Cyc_GI5 : SchedWriteRes<[A64FXGI5]> {
163e8d8bef9SDimitry Andric  let Latency = 11;
164e8d8bef9SDimitry Andric}
165e8d8bef9SDimitry Andric
166e8d8bef9SDimitry Andricdef A64FXWrite_5Cyc_GI6 : SchedWriteRes<[A64FXGI6]> {
167e8d8bef9SDimitry Andric  let Latency = 5;
168e8d8bef9SDimitry Andric}
169e8d8bef9SDimitry Andric
170e8d8bef9SDimitry Andricdef A64FXWrite_1Cyc_GI24 : SchedWriteRes<[A64FXGI24]> {
171e8d8bef9SDimitry Andric  let Latency = 1;
172e8d8bef9SDimitry Andric}
173e8d8bef9SDimitry Andric
174e8d8bef9SDimitry Andricdef A64FXWrite_2Cyc_GI24 : SchedWriteRes<[A64FXGI24]> {
175e8d8bef9SDimitry Andric  let Latency = 2;
176e8d8bef9SDimitry Andric}
177e8d8bef9SDimitry Andric
178e8d8bef9SDimitry Andricdef A64FXWrite_4Cyc_NGI24 : SchedWriteRes<[A64FXGI24]> {
179e8d8bef9SDimitry Andric  let Latency = 4;
180e8d8bef9SDimitry Andric  let NumMicroOps = 4;
181e8d8bef9SDimitry Andric}
182e8d8bef9SDimitry Andric
183e8d8bef9SDimitry Andricdef A64FXWrite_1Cyc_GI56 : SchedWriteRes<[A64FXGI56]> {
184e8d8bef9SDimitry Andric  let Latency = 1;
185e8d8bef9SDimitry Andric}
186e8d8bef9SDimitry Andric
187e8d8bef9SDimitry Andricdef A64FXWrite_5Cyc_GI56 : SchedWriteRes<[A64FXGI56]> {
188e8d8bef9SDimitry Andric  let Latency = 5;
189e8d8bef9SDimitry Andric}
190e8d8bef9SDimitry Andric
191e8d8bef9SDimitry Andricdef A64FXWrite_8Cyc_GI56 : SchedWriteRes<[A64FXGI56]> {
192e8d8bef9SDimitry Andric  let Latency = 8;
193e8d8bef9SDimitry Andric}
194e8d8bef9SDimitry Andric
195e8d8bef9SDimitry Andricdef A64FXWrite_11Cyc_GI56 : SchedWriteRes<[A64FXGI56]> {
196e8d8bef9SDimitry Andric  let Latency = 11;
197e8d8bef9SDimitry Andric}
198e8d8bef9SDimitry Andric
199e8d8bef9SDimitry Andricdef A64FXWrite_LDNP: SchedWriteRes<[A64FXGI56]> {
200e8d8bef9SDimitry Andric  let Latency = 5;
201e8d8bef9SDimitry Andric  let NumMicroOps = 2;
202e8d8bef9SDimitry Andric}
203e8d8bef9SDimitry Andric
204e8d8bef9SDimitry Andricdef A64FXWrite_LDP01: SchedWriteRes<[A64FXGI2456]> {
205e8d8bef9SDimitry Andric  let Latency = 5;
206e8d8bef9SDimitry Andric  let NumMicroOps = 3;
207e8d8bef9SDimitry Andric}
208e8d8bef9SDimitry Andric
209e8d8bef9SDimitry Andricdef A64FXWrite_LDR01: SchedWriteRes<[A64FXGI2456]> {
210e8d8bef9SDimitry Andric  let Latency = 5;
211e8d8bef9SDimitry Andric  let NumMicroOps = 2;
212e8d8bef9SDimitry Andric}
213e8d8bef9SDimitry Andric
214e8d8bef9SDimitry Andricdef A64FXWrite_LD102: SchedWriteRes<[A64FXGI56]> {
215e8d8bef9SDimitry Andric  let Latency = 8;
216e8d8bef9SDimitry Andric  let NumMicroOps = 2;
217e8d8bef9SDimitry Andric}
218e8d8bef9SDimitry Andric
219e8d8bef9SDimitry Andricdef A64FXWrite_LD103: SchedWriteRes<[A64FXGI56]> {
220e8d8bef9SDimitry Andric  let Latency = 11;
221e8d8bef9SDimitry Andric  let NumMicroOps = 2;
222e8d8bef9SDimitry Andric
223e8d8bef9SDimitry Andric}
224e8d8bef9SDimitry Andric
225e8d8bef9SDimitry Andricdef A64FXWrite_LD104: SchedWriteRes<[A64FXGI56]> {
226e8d8bef9SDimitry Andric  let Latency = 8;
227e8d8bef9SDimitry Andric  let NumMicroOps = 3;
228e8d8bef9SDimitry Andric}
229e8d8bef9SDimitry Andric
230e8d8bef9SDimitry Andricdef A64FXWrite_LD105: SchedWriteRes<[A64FXGI56]> {
231e8d8bef9SDimitry Andric  let Latency = 11;
232e8d8bef9SDimitry Andric  let NumMicroOps = 3;
233e8d8bef9SDimitry Andric}
234e8d8bef9SDimitry Andric
235e8d8bef9SDimitry Andricdef A64FXWrite_LD106: SchedWriteRes<[A64FXGI56]> {
236e8d8bef9SDimitry Andric  let Latency = 8;
237e8d8bef9SDimitry Andric  let NumMicroOps = 4;
238e8d8bef9SDimitry Andric}
239e8d8bef9SDimitry Andric
240e8d8bef9SDimitry Andricdef A64FXWrite_LD107: SchedWriteRes<[A64FXGI56]> {
241e8d8bef9SDimitry Andric  let Latency = 11;
242e8d8bef9SDimitry Andric  let NumMicroOps = 4;
243e8d8bef9SDimitry Andric}
244e8d8bef9SDimitry Andric
245e8d8bef9SDimitry Andricdef A64FXWrite_LD108: SchedWriteRes<[A64FXGI56]> {
246e8d8bef9SDimitry Andric  let Latency = 8;
247e8d8bef9SDimitry Andric  let NumMicroOps = 2;
248e8d8bef9SDimitry Andric}
249e8d8bef9SDimitry Andric
250e8d8bef9SDimitry Andricdef A64FXWrite_LD109: SchedWriteRes<[A64FXGI56]> {
251e8d8bef9SDimitry Andric  let Latency = 11;
252e8d8bef9SDimitry Andric  let NumMicroOps = 2;
253e8d8bef9SDimitry Andric}
254e8d8bef9SDimitry Andric
255e8d8bef9SDimitry Andricdef A64FXWrite_LD110: SchedWriteRes<[A64FXGI56]> {
256e8d8bef9SDimitry Andric  let Latency = 8;
257e8d8bef9SDimitry Andric  let NumMicroOps = 3;
258e8d8bef9SDimitry Andric}
259e8d8bef9SDimitry Andric
260e8d8bef9SDimitry Andricdef A64FXWrite_LD111: SchedWriteRes<[A64FXGI56]> {
261e8d8bef9SDimitry Andric  let Latency = 11;
262e8d8bef9SDimitry Andric  let NumMicroOps = 3;
263e8d8bef9SDimitry Andric}
264e8d8bef9SDimitry Andric
265e8d8bef9SDimitry Andricdef A64FXWrite_LD112: SchedWriteRes<[A64FXGI56]> {
266e8d8bef9SDimitry Andric  let Latency = 8;
267e8d8bef9SDimitry Andric  let NumMicroOps = 4;
268e8d8bef9SDimitry Andric}
269e8d8bef9SDimitry Andric
270e8d8bef9SDimitry Andricdef A64FXWrite_LD113: SchedWriteRes<[A64FXGI56]> {
271e8d8bef9SDimitry Andric  let Latency = 11;
272e8d8bef9SDimitry Andric  let NumMicroOps = 4;
273e8d8bef9SDimitry Andric}
274e8d8bef9SDimitry Andric
275e8d8bef9SDimitry Andricdef A64FXWrite_LD114: SchedWriteRes<[A64FXGI56]> {
276e8d8bef9SDimitry Andric  let Latency = 8;
277e8d8bef9SDimitry Andric  let NumMicroOps = 5;
278e8d8bef9SDimitry Andric}
279e8d8bef9SDimitry Andric
280e8d8bef9SDimitry Andricdef A64FXWrite_LD115: SchedWriteRes<[A64FXGI56]> {
281e8d8bef9SDimitry Andric  let Latency = 11;
282e8d8bef9SDimitry Andric  let NumMicroOps = 5;
283e8d8bef9SDimitry Andric}
284e8d8bef9SDimitry Andric
285e8d8bef9SDimitry Andricdef A64FXWrite_LD1I0: SchedWriteRes<[A64FXGI056]> {
286e8d8bef9SDimitry Andric  let Latency = 8;
287e8d8bef9SDimitry Andric  let NumMicroOps = 2;
288e8d8bef9SDimitry Andric}
289e8d8bef9SDimitry Andric
290e8d8bef9SDimitry Andricdef A64FXWrite_LD1I1: SchedWriteRes<[A64FXGI056]> {
291e8d8bef9SDimitry Andric  let Latency = 8;
292e8d8bef9SDimitry Andric  let NumMicroOps = 3;
293e8d8bef9SDimitry Andric}
294e8d8bef9SDimitry Andric
295e8d8bef9SDimitry Andricdef A64FXWrite_LD2I0: SchedWriteRes<[A64FXGI056]> {
296e8d8bef9SDimitry Andric  let Latency = 8;
297e8d8bef9SDimitry Andric  let NumMicroOps = 4;
298e8d8bef9SDimitry Andric}
299e8d8bef9SDimitry Andric
300e8d8bef9SDimitry Andricdef A64FXWrite_LD2I1: SchedWriteRes<[A64FXGI056]> {
301e8d8bef9SDimitry Andric  let Latency = 8;
302e8d8bef9SDimitry Andric  let NumMicroOps = 5;
303e8d8bef9SDimitry Andric}
304e8d8bef9SDimitry Andric
305e8d8bef9SDimitry Andricdef A64FXWrite_LD3I0: SchedWriteRes<[A64FXGI056]> {
306e8d8bef9SDimitry Andric  let Latency = 8;
307e8d8bef9SDimitry Andric  let NumMicroOps = 6;
308e8d8bef9SDimitry Andric}
309e8d8bef9SDimitry Andric
310e8d8bef9SDimitry Andricdef A64FXWrite_LD3I1: SchedWriteRes<[A64FXGI056]> {
311e8d8bef9SDimitry Andric  let Latency = 8;
312e8d8bef9SDimitry Andric  let NumMicroOps = 7;
313e8d8bef9SDimitry Andric}
314e8d8bef9SDimitry Andric
315e8d8bef9SDimitry Andricdef A64FXWrite_LD4I0: SchedWriteRes<[A64FXGI056]> {
316e8d8bef9SDimitry Andric  let Latency = 8;
317e8d8bef9SDimitry Andric  let NumMicroOps = 8;
318e8d8bef9SDimitry Andric}
319e8d8bef9SDimitry Andric
320e8d8bef9SDimitry Andricdef A64FXWrite_LD4I1: SchedWriteRes<[A64FXGI056]> {
321e8d8bef9SDimitry Andric  let Latency = 8;
322e8d8bef9SDimitry Andric  let NumMicroOps = 9;
323e8d8bef9SDimitry Andric}
324e8d8bef9SDimitry Andric
325e8d8bef9SDimitry Andricdef A64FXWrite_1Cyc_GI2456 : SchedWriteRes<[A64FXGI2456]> {
326e8d8bef9SDimitry Andric  let Latency = 1;
327e8d8bef9SDimitry Andric}
328e8d8bef9SDimitry Andric
329e8d8bef9SDimitry Andricdef A64FXWrite_FMOV_GV : SchedWriteRes<[A64FXGI03]> {
330e8d8bef9SDimitry Andric  let Latency = 10;
331e8d8bef9SDimitry Andric}
332e8d8bef9SDimitry Andric
333e8d8bef9SDimitry Andricdef A64FXWrite_FMOV_VG14 : SchedWriteRes<[A64FXGI03]> {
334e8d8bef9SDimitry Andric  let Latency = 14;
335e8d8bef9SDimitry Andric}
336e8d8bef9SDimitry Andric
337e8d8bef9SDimitry Andricdef A64FXWrite_ADDLV : SchedWriteRes<[A64FXGI03]> {
338e8d8bef9SDimitry Andric  let Latency = 12;
339e8d8bef9SDimitry Andric}
340e8d8bef9SDimitry Andric
341e8d8bef9SDimitry Andricdef A64FXWrite_MULLE : SchedWriteRes<[A64FXGI03]> {
342e8d8bef9SDimitry Andric  let Latency = 14;
343e8d8bef9SDimitry Andric}
344e8d8bef9SDimitry Andric
345e8d8bef9SDimitry Andricdef A64FXWrite_MULLV : SchedWriteRes<[A64FXGI03]> {
346e8d8bef9SDimitry Andric  let Latency = 14;
347e8d8bef9SDimitry Andric}
348e8d8bef9SDimitry Andric
349e8d8bef9SDimitry Andricdef A64FXWrite_MADDL : SchedWriteRes<[A64FXGI03]> {
350e8d8bef9SDimitry Andric  let Latency = 6;
351e8d8bef9SDimitry Andric}
352e8d8bef9SDimitry Andric
353e8d8bef9SDimitry Andricdef A64FXWrite_ABA : SchedWriteRes<[A64FXGI03]> {
354e8d8bef9SDimitry Andric  let Latency = 8;
355e8d8bef9SDimitry Andric}
356e8d8bef9SDimitry Andric
357e8d8bef9SDimitry Andricdef A64FXWrite_ABAL : SchedWriteRes<[A64FXGI03]> {
358e8d8bef9SDimitry Andric  let Latency = 10;
359e8d8bef9SDimitry Andric}
360e8d8bef9SDimitry Andric
361e8d8bef9SDimitry Andricdef A64FXWrite_ADDLV1 : SchedWriteRes<[A64FXGI03]> {
362e8d8bef9SDimitry Andric  let Latency = 12;
363e8d8bef9SDimitry Andric  let NumMicroOps = 6;
364e8d8bef9SDimitry Andric}
365e8d8bef9SDimitry Andric
366e8d8bef9SDimitry Andricdef A64FXWrite_MINMAXV : SchedWriteRes<[A64FXGI03]> {
367e8d8bef9SDimitry Andric  let Latency = 14;
368e8d8bef9SDimitry Andric  let NumMicroOps = 6;
369e8d8bef9SDimitry Andric}
370e8d8bef9SDimitry Andric
371e8d8bef9SDimitry Andricdef A64FXWrite_SQRDMULH : SchedWriteRes<[A64FXGI03]> {
372e8d8bef9SDimitry Andric  let Latency = 9;
373e8d8bef9SDimitry Andric}
374e8d8bef9SDimitry Andric
375e8d8bef9SDimitry Andricdef A64FXWrite_PMUL : SchedWriteRes<[A64FXGI03]> {
376e8d8bef9SDimitry Andric  let Latency = 8;
377e8d8bef9SDimitry Andric}
378e8d8bef9SDimitry Andric
379e8d8bef9SDimitry Andric
380e8d8bef9SDimitry Andricdef A64FXWrite_SRSRAV : SchedWriteRes<[A64FXGI03]> {
381e8d8bef9SDimitry Andric  let Latency = 8;
382e8d8bef9SDimitry Andric  let NumMicroOps = 3;
383e8d8bef9SDimitry Andric}
384e8d8bef9SDimitry Andric
385e8d8bef9SDimitry Andricdef A64FXWrite_SSRAV : SchedWriteRes<[A64FXGI03]> {
386e8d8bef9SDimitry Andric  let Latency = 8;
387e8d8bef9SDimitry Andric  let NumMicroOps = 2;
388e8d8bef9SDimitry Andric}
389e8d8bef9SDimitry Andric
390e8d8bef9SDimitry Andricdef A64FXWrite_RSHRN : SchedWriteRes<[A64FXGI03]> {
391e8d8bef9SDimitry Andric  let Latency = 10;
392e8d8bef9SDimitry Andric  let NumMicroOps = 3;
393e8d8bef9SDimitry Andric}
394e8d8bef9SDimitry Andric
395e8d8bef9SDimitry Andricdef A64FXWrite_SHRN : SchedWriteRes<[A64FXGI03]> {
396e8d8bef9SDimitry Andric  let Latency = 10;
397e8d8bef9SDimitry Andric  let NumMicroOps = 2;
398e8d8bef9SDimitry Andric}
399e8d8bef9SDimitry Andric
400e8d8bef9SDimitry Andric
401e8d8bef9SDimitry Andricdef A64FXWrite_ADDP : SchedWriteRes<[A64FXGI03]> {
402e8d8bef9SDimitry Andric  let Latency = 10;
403e8d8bef9SDimitry Andric  let NumMicroOps = 3;
404e8d8bef9SDimitry Andric}
405e8d8bef9SDimitry Andric
406e8d8bef9SDimitry Andricdef A64FXWrite_FMULXE : SchedWriteRes<[A64FXGI03]> {
407e8d8bef9SDimitry Andric  let Latency = 15;
408e8d8bef9SDimitry Andric  let NumMicroOps = 2;
409e8d8bef9SDimitry Andric}
410e8d8bef9SDimitry Andric
411e8d8bef9SDimitry Andricdef A64FXWrite_FADDPV : SchedWriteRes<[A64FXGI03]> {
412e8d8bef9SDimitry Andric  let Latency = 15;
413e8d8bef9SDimitry Andric  let NumMicroOps = 3;
414e8d8bef9SDimitry Andric}
415e8d8bef9SDimitry Andric
416e8d8bef9SDimitry Andricdef A64FXWrite_SADALP : SchedWriteRes<[A64FXGI03]> {
417e8d8bef9SDimitry Andric  let Latency = 10;
418e8d8bef9SDimitry Andric  let NumMicroOps = 3;
419e8d8bef9SDimitry Andric}
420e8d8bef9SDimitry Andric
421e8d8bef9SDimitry Andricdef A64FXWrite_SADDLP : SchedWriteRes<[A64FXGI03]> {
422e8d8bef9SDimitry Andric  let Latency = 10;
423e8d8bef9SDimitry Andric  let NumMicroOps = 2;
424e8d8bef9SDimitry Andric}
425e8d8bef9SDimitry Andric
426e8d8bef9SDimitry Andricdef A64FXWrite_FCVTXNV : SchedWriteRes<[A64FXGI03]> {
427e8d8bef9SDimitry Andric  let Latency = 15;
428e8d8bef9SDimitry Andric  let NumMicroOps = 2;
429e8d8bef9SDimitry Andric}
430e8d8bef9SDimitry Andric
431e8d8bef9SDimitry Andricdef A64FXWrite_FMAXVVH : SchedWriteRes<[A64FXGI03]> {
432e8d8bef9SDimitry Andric  let Latency = 14;
433e8d8bef9SDimitry Andric  let NumMicroOps = 7;
434e8d8bef9SDimitry Andric}
435e8d8bef9SDimitry Andric
436e8d8bef9SDimitry Andricdef A64FXWrite_BIF : SchedWriteRes<[A64FXGI03]> {
437e8d8bef9SDimitry Andric  let Latency = 5;
438e8d8bef9SDimitry Andric}
439e8d8bef9SDimitry Andric
440e8d8bef9SDimitry Andricdef A64FXWrite_DUPGENERAL : SchedWriteRes<[A64FXGI03]> {
441e8d8bef9SDimitry Andric  let Latency = 10;
442e8d8bef9SDimitry Andric}
443e8d8bef9SDimitry Andric
444e8d8bef9SDimitry Andricdef A64FXWrite_SHA00 : SchedWriteRes<[A64FXGI0]> {
445e8d8bef9SDimitry Andric  let Latency = 9;
446e8d8bef9SDimitry Andric}
447e8d8bef9SDimitry Andric
448e8d8bef9SDimitry Andricdef A64FXWrite_SHA01 : SchedWriteRes<[A64FXGI0]> {
449e8d8bef9SDimitry Andric  let Latency = 12;
450e8d8bef9SDimitry Andric}
451e8d8bef9SDimitry Andric
452e8d8bef9SDimitry Andricdef A64FXWrite_SMOV : SchedWriteRes<[A64FXGI03]> {
453e8d8bef9SDimitry Andric  let Latency = 25;
454e8d8bef9SDimitry Andric}
455e8d8bef9SDimitry Andric
456e8d8bef9SDimitry Andricdef A64FXWrite_TBX1 : SchedWriteRes<[A64FXGI03]> {
457e8d8bef9SDimitry Andric  let Latency = 10;
458e8d8bef9SDimitry Andric  let NumMicroOps = 3;
459e8d8bef9SDimitry Andric}
460e8d8bef9SDimitry Andric
461e8d8bef9SDimitry Andricdef A64FXWrite_TBX2 : SchedWriteRes<[A64FXGI03]> {
462e8d8bef9SDimitry Andric  let Latency = 10;
463e8d8bef9SDimitry Andric  let NumMicroOps = 5;
464e8d8bef9SDimitry Andric}
465e8d8bef9SDimitry Andric
466e8d8bef9SDimitry Andricdef A64FXWrite_TBX3 : SchedWriteRes<[A64FXGI03]> {
467e8d8bef9SDimitry Andric  let Latency = 10;
468e8d8bef9SDimitry Andric  let NumMicroOps = 7;
469e8d8bef9SDimitry Andric}
470e8d8bef9SDimitry Andric
471e8d8bef9SDimitry Andricdef A64FXWrite_TBX4 : SchedWriteRes<[A64FXGI03]> {
472e8d8bef9SDimitry Andric  let Latency = 10;
473e8d8bef9SDimitry Andric  let NumMicroOps = 9;
474e8d8bef9SDimitry Andric}
475e8d8bef9SDimitry Andric
476e8d8bef9SDimitry Andricdef A64FXWrite_PREF0: SchedWriteRes<[A64FXGI56]> {
477e8d8bef9SDimitry Andric  let Latency = 0;
478e8d8bef9SDimitry Andric}
479e8d8bef9SDimitry Andric
480e8d8bef9SDimitry Andricdef A64FXWrite_PREF1: SchedWriteRes<[A64FXGI56]> {
481e8d8bef9SDimitry Andric  let Latency = 0;
482e8d8bef9SDimitry Andric}
483e8d8bef9SDimitry Andric
484e8d8bef9SDimitry Andricdef A64FXWrite_SWP: SchedWriteRes<[A64FXGI56]> {
485e8d8bef9SDimitry Andric  let Latency = 0;
486e8d8bef9SDimitry Andric}
487e8d8bef9SDimitry Andric
488e8d8bef9SDimitry Andricdef A64FXWrite_STUR: SchedWriteRes<[A64FXGI56]> {
489e8d8bef9SDimitry Andric  let Latency = 0;
490e8d8bef9SDimitry Andric}
491e8d8bef9SDimitry Andric
492e8d8bef9SDimitry Andricdef A64FXWrite_STNP: SchedWriteRes<[A64FXGI56]> {
493e8d8bef9SDimitry Andric  let Latency = 0;
494e8d8bef9SDimitry Andric}
495e8d8bef9SDimitry Andric
496e8d8bef9SDimitry Andricdef A64FXWrite_STP01: SchedWriteRes<[A64FXGI56]> {
497e8d8bef9SDimitry Andric  let Latency = 0;
498e8d8bef9SDimitry Andric}
499e8d8bef9SDimitry Andric
500e8d8bef9SDimitry Andricdef A64FXWrite_ST10: SchedWriteRes<[A64FXGI56]> {
501e8d8bef9SDimitry Andric  let Latency = 0;
502e8d8bef9SDimitry Andric}
503e8d8bef9SDimitry Andric
504e8d8bef9SDimitry Andricdef A64FXWrite_ST11: SchedWriteRes<[A64FXGI56]> {
505e8d8bef9SDimitry Andric  let Latency = 0;
506e8d8bef9SDimitry Andric}
507e8d8bef9SDimitry Andric
508e8d8bef9SDimitry Andricdef A64FXWrite_ST12: SchedWriteRes<[A64FXGI56]> {
509e8d8bef9SDimitry Andric  let Latency = 0;
510e8d8bef9SDimitry Andric}
511e8d8bef9SDimitry Andric
512e8d8bef9SDimitry Andricdef A64FXWrite_ST13: SchedWriteRes<[A64FXGI56]> {
513e8d8bef9SDimitry Andric  let Latency = 0;
514e8d8bef9SDimitry Andric}
515e8d8bef9SDimitry Andric
516e8d8bef9SDimitry Andricdef A64FXWrite_ST14: SchedWriteRes<[A64FXGI56]> {
517e8d8bef9SDimitry Andric  let Latency = 1;
518e8d8bef9SDimitry Andric}
519e8d8bef9SDimitry Andric
520e8d8bef9SDimitry Andricdef A64FXWrite_ST15: SchedWriteRes<[A64FXGI56]> {
521e8d8bef9SDimitry Andric  let Latency = 1;
522e8d8bef9SDimitry Andric}
523e8d8bef9SDimitry Andric
524e8d8bef9SDimitry Andricdef A64FXWrite_ST16: SchedWriteRes<[A64FXGI56]> {
525e8d8bef9SDimitry Andric  let Latency = 1;
526e8d8bef9SDimitry Andric}
527e8d8bef9SDimitry Andric
528e8d8bef9SDimitry Andricdef A64FXWrite_ST17: SchedWriteRes<[A64FXGI56]> {
529e8d8bef9SDimitry Andric  let Latency = 1;
530e8d8bef9SDimitry Andric}
531e8d8bef9SDimitry Andric
532e8d8bef9SDimitry Andricdef A64FXWrite_CAS: SchedWriteRes<[A64FXGI56]> {
533e8d8bef9SDimitry Andric  let Latency = 7;
534e8d8bef9SDimitry Andric}
535e8d8bef9SDimitry Andric
536e8d8bef9SDimitry Andric// Define commonly used read types.
537e8d8bef9SDimitry Andric
538e8d8bef9SDimitry Andric// No forwarding is provided for these types.
539e8d8bef9SDimitry Andricdef : ReadAdvance<ReadI,       0>;
540e8d8bef9SDimitry Andricdef : ReadAdvance<ReadISReg,   0>;
541e8d8bef9SDimitry Andricdef : ReadAdvance<ReadIEReg,   0>;
542e8d8bef9SDimitry Andricdef : ReadAdvance<ReadIM,      0>;
543e8d8bef9SDimitry Andricdef : ReadAdvance<ReadIMA,     0>;
544e8d8bef9SDimitry Andricdef : ReadAdvance<ReadID,      0>;
545e8d8bef9SDimitry Andricdef : ReadAdvance<ReadExtrHi,  0>;
546e8d8bef9SDimitry Andricdef : ReadAdvance<ReadAdrBase, 0>;
547349cc55cSDimitry Andricdef : ReadAdvance<ReadST,      0>;
548e8d8bef9SDimitry Andricdef : ReadAdvance<ReadVLD,     0>;
549e8d8bef9SDimitry Andric
550e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
551e8d8bef9SDimitry Andric// 3. Instruction Tables.
552e8d8bef9SDimitry Andric
553e8d8bef9SDimitry Andric//---
554e8d8bef9SDimitry Andric// 3.1 Branch Instructions
555e8d8bef9SDimitry Andric//---
556e8d8bef9SDimitry Andric
557e8d8bef9SDimitry Andric// Branch, immed
558e8d8bef9SDimitry Andric// Branch and link, immed
559e8d8bef9SDimitry Andric// Compare and branch
560e8d8bef9SDimitry Andricdef : WriteRes<WriteBr,      [A64FXGI7]> {
561e8d8bef9SDimitry Andric  let Latency = 1;
562e8d8bef9SDimitry Andric}
563e8d8bef9SDimitry Andric
564e8d8bef9SDimitry Andric// Branch, register
565e8d8bef9SDimitry Andric// Branch and link, register != LR
566e8d8bef9SDimitry Andric// Branch and link, register = LR
567e8d8bef9SDimitry Andricdef : WriteRes<WriteBrReg,   [A64FXGI7]> {
568e8d8bef9SDimitry Andric  let Latency = 1;
569e8d8bef9SDimitry Andric}
570e8d8bef9SDimitry Andric
571e8d8bef9SDimitry Andricdef : WriteRes<WriteSys,     []> { let Latency = 1; }
572e8d8bef9SDimitry Andricdef : WriteRes<WriteBarrier, []> { let Latency = 1; }
573e8d8bef9SDimitry Andricdef : WriteRes<WriteHint,    []> { let Latency = 1; }
574e8d8bef9SDimitry Andric
575e8d8bef9SDimitry Andricdef : WriteRes<WriteAtomic,  []> {
576e8d8bef9SDimitry Andric  let Latency = 4;
577e8d8bef9SDimitry Andric}
578e8d8bef9SDimitry Andric
579e8d8bef9SDimitry Andric//---
580e8d8bef9SDimitry Andric// Branch
581e8d8bef9SDimitry Andric//---
582e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI7], (instrs B, BL, BR, BLR)>;
583e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI7], (instrs RET)>;
584e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI7], (instregex "^B..$")>;
585e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI7],
586e8d8bef9SDimitry Andric            (instregex "^CBZ", "^CBNZ", "^TBZ", "^TBNZ")>;
587e8d8bef9SDimitry Andric
588e8d8bef9SDimitry Andric//---
589e8d8bef9SDimitry Andric// 3.2 Arithmetic and Logical Instructions
590e8d8bef9SDimitry Andric// 3.3 Move and Shift Instructions
591e8d8bef9SDimitry Andric//---
592e8d8bef9SDimitry Andric
593e8d8bef9SDimitry Andric// ALU, basic
594e8d8bef9SDimitry Andric// Conditional compare
595e8d8bef9SDimitry Andric// Conditional select
596e8d8bef9SDimitry Andric// Address generation
597e8d8bef9SDimitry Andricdef : WriteRes<WriteI,       [A64FXGI2456]> {
598e8d8bef9SDimitry Andric  let Latency = 1;
599e8d8bef9SDimitry Andric}
600e8d8bef9SDimitry Andric
601e8d8bef9SDimitry Andricdef : InstRW<[WriteI],
602e8d8bef9SDimitry Andric            (instregex "ADD?(W|X)r(i|r|s|x)",   "ADDS?(W|X)r(i|r|s|x)(64)?",
603e8d8bef9SDimitry Andric                       "AND?(W|X)r(i|r|s|x)",   "ANDS?(W|X)r(i|r|s|x)",
604e8d8bef9SDimitry Andric                       "ADC(W|X)r",
605e8d8bef9SDimitry Andric                       "BIC?(W|X)r(i|r|s|x)",   "BICS?(W|X)r(i|r|s|x)",
606e8d8bef9SDimitry Andric                       "EON?(W|X)r(i|r|s|x)",   "ORN?(W|X)r(i|r|s|x)",
607e8d8bef9SDimitry Andric                       "ORR?(W|X)r(i|r|s|x)",   "SUB?(W|X)r(i|r|s|x)",
608e8d8bef9SDimitry Andric                       "SUBS?(W|X)r(i|r|s|x)",  "SBC(W|X)r",
609e8d8bef9SDimitry Andric                       "SBCS(W|X)r",            "CCMN(W|X)(i|r)",
610e8d8bef9SDimitry Andric                       "CCMP(W|X)(i|r)",        "CSEL(W|X)r",
611e8d8bef9SDimitry Andric                       "CSINC(W|X)r",           "CSINV(W|X)r",
612e8d8bef9SDimitry Andric                       "CSNEG(W|X)r")>;
613e8d8bef9SDimitry Andric
614e8d8bef9SDimitry Andricdef : InstRW<[WriteI], (instrs COPY)>;
615e8d8bef9SDimitry Andric
616e8d8bef9SDimitry Andric// ALU, extend and/or shift
617e8d8bef9SDimitry Andricdef : WriteRes<WriteISReg,   [A64FXGI2456]> {
618e8d8bef9SDimitry Andric  let Latency = 2;
619e8d8bef9SDimitry Andric}
620e8d8bef9SDimitry Andric
621e8d8bef9SDimitry Andricdef : InstRW<[WriteISReg],
622e8d8bef9SDimitry Andric            (instregex "ADD?(W|X)r(i|r|s|x)",   "ADDS?(W|X)r(i|r|s|x)(64)?",
623e8d8bef9SDimitry Andric                       "AND?(W|X)r(i|r|s|x)",   "ANDS?(W|X)r(i|r|s|x)",
624e8d8bef9SDimitry Andric                       "ADC(W|X)r",
625e8d8bef9SDimitry Andric                       "BIC?(W|X)r(i|r|s|x)",   "BICS?(W|X)r(i|r|s|x)",
626e8d8bef9SDimitry Andric                       "EON?(W|X)r(i|r|s|x)",   "ORN?(W|X)r(i|r|s|x)",
627e8d8bef9SDimitry Andric                       "ORR?(W|X)r(i|r|s|x)",   "SUB?(W|X)r(i|r|s|x)",
628e8d8bef9SDimitry Andric                       "SUBS?(W|X)r(i|r|s|x)",  "SBC(W|X)r",
629e8d8bef9SDimitry Andric                       "SBCS(W|X)r",            "CCMN(W|X)(i|r)",
630e8d8bef9SDimitry Andric                       "CCMP(W|X)(i|r)",        "CSEL(W|X)r",
631e8d8bef9SDimitry Andric                       "CSINC(W|X)r",           "CSINV(W|X)r",
632e8d8bef9SDimitry Andric                       "CSNEG(W|X)r")>;
633e8d8bef9SDimitry Andric
634e8d8bef9SDimitry Andricdef : WriteRes<WriteIEReg,   [A64FXGI2456]> {
635e8d8bef9SDimitry Andric  let Latency = 1;
636e8d8bef9SDimitry Andric}
637e8d8bef9SDimitry Andric
638e8d8bef9SDimitry Andricdef : InstRW<[WriteIEReg],
639e8d8bef9SDimitry Andric            (instregex "ADD?(W|X)r(i|r|s|x)",   "ADDS?(W|X)r(i|r|s|x)(64)?",
640e8d8bef9SDimitry Andric                       "AND?(W|X)r(i|r|s|x)",   "ANDS?(W|X)r(i|r|s|x)",
641e8d8bef9SDimitry Andric                       "ADC(W|X)r",
642e8d8bef9SDimitry Andric                       "BIC?(W|X)r(i|r|s|x)",   "BICS?(W|X)r(i|r|s|x)",
643e8d8bef9SDimitry Andric                       "EON?(W|X)r(i|r|s|x)",   "ORN?(W|X)r(i|r|s|x)",
644e8d8bef9SDimitry Andric                       "ORR?(W|X)r(i|r|s|x)",   "SUB?(W|X)r(i|r|s|x)",
645e8d8bef9SDimitry Andric                       "SUBS?(W|X)r(i|r|s|x)",  "SBC(W|X)r",
646e8d8bef9SDimitry Andric                       "SBCS(W|X)r",            "CCMN(W|X)(i|r)",
647e8d8bef9SDimitry Andric                       "CCMP(W|X)(i|r)",        "CSEL(W|X)r",
648e8d8bef9SDimitry Andric                       "CSINC(W|X)r",           "CSINV(W|X)r",
649e8d8bef9SDimitry Andric                       "CSNEG(W|X)r")>;
650e8d8bef9SDimitry Andric
651e8d8bef9SDimitry Andric// Move immed
652e8d8bef9SDimitry Andricdef : WriteRes<WriteImm,     [A64FXGI2456]> {
653e8d8bef9SDimitry Andric  let Latency = 1;
654e8d8bef9SDimitry Andric}
655e8d8bef9SDimitry Andric
656e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI2456],
657e8d8bef9SDimitry Andric            (instrs MOVKWi, MOVKXi, MOVNWi, MOVNXi, MOVZWi, MOVZXi)>;
658e8d8bef9SDimitry Andric
659e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_2Cyc_GI24],
660e8d8bef9SDimitry Andric            (instrs ASRVWr, ASRVXr, LSLVWr, LSLVXr, RORVWr, RORVXr)>;
661e8d8bef9SDimitry Andric
662e8d8bef9SDimitry Andric// Variable shift
663e8d8bef9SDimitry Andricdef : WriteRes<WriteIS,      [A64FXGI2456]> {
664e8d8bef9SDimitry Andric  let Latency = 1;
665e8d8bef9SDimitry Andric}
666e8d8bef9SDimitry Andric
667e8d8bef9SDimitry Andric//---
668e8d8bef9SDimitry Andric// 3.4 Divide and Multiply Instructions
669e8d8bef9SDimitry Andric//---
670e8d8bef9SDimitry Andric
671e8d8bef9SDimitry Andric// Divide, W-form
672e8d8bef9SDimitry Andricdef : WriteRes<WriteID32,    [A64FXGI4]> {
673e8d8bef9SDimitry Andric  let Latency = 39;
6745f757f3fSDimitry Andric  let ReleaseAtCycles = [39];
675e8d8bef9SDimitry Andric}
676e8d8bef9SDimitry Andric
677e8d8bef9SDimitry Andric// Divide, X-form
678e8d8bef9SDimitry Andricdef : WriteRes<WriteID64,    [A64FXGI4]> {
679e8d8bef9SDimitry Andric  let Latency = 23;
6805f757f3fSDimitry Andric  let ReleaseAtCycles = [23];
681e8d8bef9SDimitry Andric}
682e8d8bef9SDimitry Andric
683e8d8bef9SDimitry Andric// Multiply accumulate, W-form
684e8d8bef9SDimitry Andricdef : WriteRes<WriteIM32,    [A64FXGI2456]> {
685e8d8bef9SDimitry Andric  let Latency = 5;
686e8d8bef9SDimitry Andric}
687e8d8bef9SDimitry Andric
688e8d8bef9SDimitry Andric// Multiply accumulate, X-form
689e8d8bef9SDimitry Andricdef : WriteRes<WriteIM64,    [A64FXGI2456]> {
690e8d8bef9SDimitry Andric  let Latency = 5;
691e8d8bef9SDimitry Andric}
692e8d8bef9SDimitry Andric
693e8d8bef9SDimitry Andricdef : InstRW<[WriteIM32], (instrs MADDWrrr, MSUBWrrr)>;
694e8d8bef9SDimitry Andricdef : InstRW<[WriteIM32], (instrs MADDXrrr, MSUBXrrr)>;
695e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_MADDL],
696e8d8bef9SDimitry Andric            (instregex "(S|U)(MADDL|MSUBL)rrr")>;
697e8d8bef9SDimitry Andric
698e8d8bef9SDimitry Andricdef : InstRW<[WriteID32], (instrs SDIVWr, UDIVWr)>;
699e8d8bef9SDimitry Andricdef : InstRW<[WriteID64], (instrs SDIVXr, UDIVXr)>;
700e8d8bef9SDimitry Andric
701e8d8bef9SDimitry Andric// Bitfield extract, two reg
702e8d8bef9SDimitry Andricdef : WriteRes<WriteExtr,    [A64FXGI2456]> {
703e8d8bef9SDimitry Andric  let Latency = 1;
704e8d8bef9SDimitry Andric}
705e8d8bef9SDimitry Andric
706e8d8bef9SDimitry Andric// Multiply high
707e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI2], (instrs SMULHrr, UMULHrr)>;
708e8d8bef9SDimitry Andric
709e8d8bef9SDimitry Andric// Miscellaneous Data-Processing Instructions
710e8d8bef9SDimitry Andric// Bitfield extract
711e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_2Cyc_GI24], (instrs EXTRWrri, EXTRXrri)>;
712e8d8bef9SDimitry Andric
713e8d8bef9SDimitry Andric// Bitifield move - basic
714e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI24],
715e8d8bef9SDimitry Andric            (instrs SBFMWri, SBFMXri, UBFMWri, UBFMXri)>;
716e8d8bef9SDimitry Andric
717e8d8bef9SDimitry Andric// Bitfield move, insert
718e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_NGI24], (instregex "^BFM")>;
719e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI24], (instregex "(S|U)?BFM.*")>;
720e8d8bef9SDimitry Andric
721e8d8bef9SDimitry Andric// Count leading
722e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_2Cyc_GI0], (instregex "^CLS(W|X)r$",
723e8d8bef9SDimitry Andric                                               "^CLZ(W|X)r$")>;
724e8d8bef9SDimitry Andric
725e8d8bef9SDimitry Andric// Reverse bits
726e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instrs RBITWr, RBITXr)>;
727e8d8bef9SDimitry Andric
728e8d8bef9SDimitry Andric// Cryptography Extensions
729e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI0], (instregex "^AES[DE]")>;
730e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI0], (instregex "^AESI?MC")>;
731e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI0], (instregex "^PMULL")>;
732e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SHA00], (instregex "^SHA1SU0")>;
733e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI0], (instregex "^SHA1(H|SU1)")>;
734e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SHA01], (instregex "^SHA1[CMP]")>;
735e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI0], (instregex "^SHA256SU0")>;
736e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI0], (instregex "^SHA256SU1")>;
737e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SHA01], (instregex "^SHA256(H|H2)")>;
738e8d8bef9SDimitry Andric
739e8d8bef9SDimitry Andric// CRC Instructions
740e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_10Cyc_GI4], (instrs CRC32Brr, CRC32Hrr)>;
741e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_12Cyc_GI4], (instrs CRC32Wrr)>;
742e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_20Cyc_GI4], (instrs CRC32Xrr)>;
743e8d8bef9SDimitry Andric
744e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_10Cyc_GI4], (instrs CRC32CBrr, CRC32CHrr)>;
745e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_12Cyc_GI4], (instrs CRC32CWrr)>;
746e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_20Cyc_GI4], (instrs CRC32CXrr)>;
747e8d8bef9SDimitry Andric
748e8d8bef9SDimitry Andric// Reverse bits/bytes
749e8d8bef9SDimitry Andric// NOTE: Handled by WriteI.
750e8d8bef9SDimitry Andric
751e8d8bef9SDimitry Andric//---
752e8d8bef9SDimitry Andric// 3.6 Load Instructions
753e8d8bef9SDimitry Andric// 3.10 FP Load Instructions
754e8d8bef9SDimitry Andric//---
755e8d8bef9SDimitry Andric
756e8d8bef9SDimitry Andric// Load register, literal
757e8d8bef9SDimitry Andric// Load register, unscaled immed
758e8d8bef9SDimitry Andric// Load register, immed unprivileged
759e8d8bef9SDimitry Andric// Load register, unsigned immed
760e8d8bef9SDimitry Andricdef : WriteRes<WriteLD,      [A64FXGI56]> {
761e8d8bef9SDimitry Andric  let Latency = 4;
762e8d8bef9SDimitry Andric}
763e8d8bef9SDimitry Andric
764e8d8bef9SDimitry Andric// Load register, immed post-index
765e8d8bef9SDimitry Andric// NOTE: Handled by WriteLD, WriteI.
766e8d8bef9SDimitry Andric// Load register, immed pre-index
767e8d8bef9SDimitry Andric// NOTE: Handled by WriteLD, WriteAdr.
768e8d8bef9SDimitry Andricdef : WriteRes<WriteAdr,     [A64FXGI2456]> {
769e8d8bef9SDimitry Andric  let Latency = 1;
770e8d8bef9SDimitry Andric}
771e8d8bef9SDimitry Andric
772e8d8bef9SDimitry Andric// Load pair, immed offset, normal
773e8d8bef9SDimitry Andric// Load pair, immed offset, signed words, base != SP
774e8d8bef9SDimitry Andric// Load pair, immed offset signed words, base = SP
775e8d8bef9SDimitry Andric// LDP only breaks into *one* LS micro-op.  Thus
776e8d8bef9SDimitry Andric// the resources are handled by WriteLD.
777e8d8bef9SDimitry Andricdef : WriteRes<WriteLDHi,    []> {
778e8d8bef9SDimitry Andric  let Latency = 5;
779e8d8bef9SDimitry Andric}
780e8d8bef9SDimitry Andric
781e8d8bef9SDimitry Andric// Load register offset, basic
782e8d8bef9SDimitry Andric// Load register, register offset, scale by 4/8
783e8d8bef9SDimitry Andric// Load register, register offset, scale by 2
784e8d8bef9SDimitry Andric// Load register offset, extend
785e8d8bef9SDimitry Andric// Load register, register offset, extend, scale by 4/8
786e8d8bef9SDimitry Andric// Load register, register offset, extend, scale by 2
787e8d8bef9SDimitry Andricdef A64FXWriteLDIdx : SchedWriteVariant<[
788e8d8bef9SDimitry Andric  SchedVar<ScaledIdxPred, [A64FXWrite_1Cyc_GI56]>,
789e8d8bef9SDimitry Andric  SchedVar<NoSchedPred,   [A64FXWrite_1Cyc_GI56]>]>;
790e8d8bef9SDimitry Andricdef : SchedAlias<WriteLDIdx, A64FXWriteLDIdx>;
791e8d8bef9SDimitry Andric
792e8d8bef9SDimitry Andricdef A64FXReadAdrBase : SchedReadVariant<[
793e8d8bef9SDimitry Andric  SchedVar<ScaledIdxPred, [ReadDefault]>,
794e8d8bef9SDimitry Andric  SchedVar<NoSchedPred,   [ReadDefault]>]>;
795e8d8bef9SDimitry Andricdef : SchedAlias<ReadAdrBase, A64FXReadAdrBase>;
796e8d8bef9SDimitry Andric
797e8d8bef9SDimitry Andric// Load pair, immed pre-index, normal
798e8d8bef9SDimitry Andric// Load pair, immed pre-index, signed words
799e8d8bef9SDimitry Andric// Load pair, immed post-index, normal
800e8d8bef9SDimitry Andric// Load pair, immed post-index, signed words
801e8d8bef9SDimitry Andric// NOTE: Handled by WriteLD, WriteLDHi, WriteAdr.
802e8d8bef9SDimitry Andric
803e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDNPDi)>;
804e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDNPQi)>;
805e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDNPSi)>;
806e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDNPWi)>;
807e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDNPXi)>;
808e8d8bef9SDimitry Andric
809e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDPDi)>;
810e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDPQi)>;
811e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDPSi)>;
812e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDPSWi)>;
813e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDPWi)>;
814e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDNP, WriteLDHi], (instrs LDPXi)>;
815e8d8bef9SDimitry Andric
816e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDRBui)>;
817e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDRDui)>;
818e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDRHui)>;
819e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDRQui)>;
820e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDRSui)>;
821e8d8bef9SDimitry Andric
822e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI6], (instrs LDRDl)>;
823e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI6], (instrs LDRQl)>;
824e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI6], (instrs LDRWl)>;
825e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI6], (instrs LDRXl)>;
826e8d8bef9SDimitry Andric
827e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRBi)>;
828e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRHi)>;
829e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRWi)>;
830e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRXi)>;
831e8d8bef9SDimitry Andric
832e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRSBWi)>;
833e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRSBXi)>;
834e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRSHWi)>;
835e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRSHXi)>;
836e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDTRSWi)>;
837e8d8bef9SDimitry Andric
838e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
839e8d8bef9SDimitry Andric            (instrs LDPDpre)>;
840e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
841e8d8bef9SDimitry Andric            (instrs LDPQpre)>;
842e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
843e8d8bef9SDimitry Andric            (instrs LDPSpre)>;
844e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
845e8d8bef9SDimitry Andric            (instrs LDPWpre)>;
846e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
847e8d8bef9SDimitry Andric            (instrs LDPWpre)>;
848e8d8bef9SDimitry Andric
849e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRBpre)>;
850e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRDpre)>;
851e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRHpre)>;
852e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRQpre)>;
853e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSpre)>;
854e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRWpre)>;
855e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRXpre)>;
856e8d8bef9SDimitry Andric
857e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSBWpre)>;
858e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSBXpre)>;
859e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSBWpost)>;
860e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSBXpost)>;
861e8d8bef9SDimitry Andric
862e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSHWpre)>;
863e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSHXpre)>;
864e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSHWpost)>;
865e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSHXpost)>;
866e8d8bef9SDimitry Andric
867e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRBBpre)>;
868e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRBBpost)>;
869e8d8bef9SDimitry Andric
870e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRHHpre)>;
871e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRHHpost)>;
872e8d8bef9SDimitry Andric
873e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
874e8d8bef9SDimitry Andric            (instrs LDPDpost)>;
875e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
876e8d8bef9SDimitry Andric            (instrs LDPQpost)>;
877e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
878e8d8bef9SDimitry Andric            (instrs LDPSpost)>;
879e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
880e8d8bef9SDimitry Andric            (instrs LDPWpost)>;
881e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
882e8d8bef9SDimitry Andric            (instrs LDPXpost)>;
883e8d8bef9SDimitry Andric
884e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRBpost)>;
885e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRDpost)>;
886e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRHpost)>;
887e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRQpost)>;
888e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRSpost)>;
889e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRWpost)>;
890e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRXpost)>;
891e8d8bef9SDimitry Andric
892e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
893e8d8bef9SDimitry Andric            (instrs LDPDpre)>;
894e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
895e8d8bef9SDimitry Andric            (instrs LDPQpre)>;
896e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
897e8d8bef9SDimitry Andric            (instrs LDPSpre)>;
898e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
899e8d8bef9SDimitry Andric            (instrs LDPWpre)>;
900e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
901e8d8bef9SDimitry Andric            (instrs LDPXpre)>;
902e8d8bef9SDimitry Andric
903e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRBpre)>;
904e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRDpre)>;
905e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRHpre)>;
906e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRQpre)>;
907e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRSpre)>;
908e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRWpre)>;
909e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteAdr], (instrs LDRXpre)>;
910e8d8bef9SDimitry Andric
911e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
912e8d8bef9SDimitry Andric            (instrs LDPDpost)>;
913e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
914e8d8bef9SDimitry Andric            (instrs LDPQpost)>;
915e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
916e8d8bef9SDimitry Andric            (instrs LDPSpost)>;
917e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
918e8d8bef9SDimitry Andric            (instrs LDPWpost)>;
919e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDP01, WriteLDHi, WriteAdr],
920e8d8bef9SDimitry Andric            (instrs LDPXpost)>;
921e8d8bef9SDimitry Andric
922e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRBpost)>;
923e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRDpost)>;
924e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRHpost)>;
925e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRQpost)>;
926e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRSpost)>;
927e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRWpost)>;
928e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LDR01, WriteI], (instrs LDRXpost)>;
929e8d8bef9SDimitry Andric
930e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRBroW)>;
931e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRDroW)>;
932e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRHroW)>;
933e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRHHroW)>;
934e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRQroW)>;
935e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRSroW)>;
936e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRSHWroW)>;
937e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRSHXroW)>;
938e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRWroW)>;
939e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRXroW)>;
940e8d8bef9SDimitry Andric
941e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRBroX)>;
942e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRDroX)>;
943e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRHHroX)>;
944e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRHroX)>;
945e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRQroX)>;
946e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRSroX)>;
947e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRSHWroX)>;
948e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRSHXroX)>;
949e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRWroX)>;
950e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase], (instrs LDRXroX)>;
951e8d8bef9SDimitry Andric
952e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
953e8d8bef9SDimitry Andric            (instrs LDRBroW)>;
954e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
955e8d8bef9SDimitry Andric            (instrs LDRBroW)>;
956e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
957e8d8bef9SDimitry Andric             (instrs LDRDroW)>;
958e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
959e8d8bef9SDimitry Andric            (instrs LDRHroW)>;
960e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
961e8d8bef9SDimitry Andric            (instrs LDRHHroW)>;
962e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
963e8d8bef9SDimitry Andric            (instrs LDRQroW)>;
964e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
965e8d8bef9SDimitry Andric            (instrs LDRSroW)>;
966e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
967e8d8bef9SDimitry Andric            (instrs LDRSHWroW)>;
968e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
969e8d8bef9SDimitry Andric            (instrs LDRSHXroW)>;
970e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
971e8d8bef9SDimitry Andric            (instrs LDRWroW)>;
972e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
973e8d8bef9SDimitry Andric            (instrs LDRXroW)>;
974e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
975e8d8bef9SDimitry Andric            (instrs LDRBroX)>;
976e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
977e8d8bef9SDimitry Andric            (instrs LDRDroX)>;
978e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
979e8d8bef9SDimitry Andric            (instrs LDRHroX)>;
980e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
981e8d8bef9SDimitry Andric            (instrs LDRHHroX)>;
982e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
983e8d8bef9SDimitry Andric            (instrs LDRQroX)>;
984e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
985e8d8bef9SDimitry Andric            (instrs LDRSroX)>;
986e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
987e8d8bef9SDimitry Andric            (instrs LDRSHWroX)>;
988e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
989e8d8bef9SDimitry Andric            (instrs LDRSHXroX)>;
990e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
991e8d8bef9SDimitry Andric            (instrs LDRWroX)>;
992e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56, ReadAdrBase],
993e8d8bef9SDimitry Andric            (instrs LDRXroX)>;
994e8d8bef9SDimitry Andric
995e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURBi)>;
996e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURBBi)>;
997e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURDi)>;
998e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURHi)>;
999e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURHHi)>;
1000e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURQi)>;
1001e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURSi)>;
1002e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURXi)>;
1003e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURSBWi)>;
1004e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURSBXi)>;
1005e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURSHWi)>;
1006e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURSHXi)>;
1007e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI56], (instrs LDURSWi)>;
1008e8d8bef9SDimitry Andric
1009e8d8bef9SDimitry Andric//---
1010e8d8bef9SDimitry Andric// Prefetch
1011e8d8bef9SDimitry Andric//---
1012e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_PREF0], (instrs PRFMl)>;
1013e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_PREF1], (instrs PRFUMi)>;
1014e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_PREF1], (instrs PRFMui)>;
1015e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_PREF1], (instrs PRFMroW)>;
1016e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_PREF1], (instrs PRFMroX)>;
1017e8d8bef9SDimitry Andric
1018e8d8bef9SDimitry Andric//--
1019e8d8bef9SDimitry Andric// 3.7 Store Instructions
1020e8d8bef9SDimitry Andric// 3.11 FP Store Instructions
1021e8d8bef9SDimitry Andric//--
1022e8d8bef9SDimitry Andric
1023e8d8bef9SDimitry Andric// Store register, unscaled immed
1024e8d8bef9SDimitry Andric// Store register, immed unprivileged
1025e8d8bef9SDimitry Andric// Store register, unsigned immed
1026e8d8bef9SDimitry Andricdef : WriteRes<WriteST,      [A64FXGI56]> {
1027e8d8bef9SDimitry Andric  let Latency = 1;
1028e8d8bef9SDimitry Andric}
1029e8d8bef9SDimitry Andric
1030e8d8bef9SDimitry Andric// Store register, immed post-index
1031e8d8bef9SDimitry Andric// NOTE: Handled by WriteAdr, WriteST, ReadAdrBase
1032e8d8bef9SDimitry Andric
1033e8d8bef9SDimitry Andric// Store register, immed pre-index
1034e8d8bef9SDimitry Andric// NOTE: Handled by WriteAdr, WriteST
1035e8d8bef9SDimitry Andric
1036e8d8bef9SDimitry Andric// Store register, register offset, basic
1037e8d8bef9SDimitry Andric// Store register, register offset, scaled by 4/8
1038e8d8bef9SDimitry Andric// Store register, register offset, scaled by 2
1039e8d8bef9SDimitry Andric// Store register, register offset, extend
1040e8d8bef9SDimitry Andric// Store register, register offset, extend, scale by 4/8
1041e8d8bef9SDimitry Andric// Store register, register offset, extend, scale by 1
1042e8d8bef9SDimitry Andricdef : WriteRes<WriteSTIdx, [A64FXGI56, A64FXGI2456]> {
1043e8d8bef9SDimitry Andric  let Latency = 1;
1044e8d8bef9SDimitry Andric}
1045e8d8bef9SDimitry Andric
1046e8d8bef9SDimitry Andric// Store pair, immed offset, W-form
1047e8d8bef9SDimitry Andric// Store pair, immed offset, X-form
1048e8d8bef9SDimitry Andricdef : WriteRes<WriteSTP,     [A64FXGI56]> {
1049e8d8bef9SDimitry Andric  let Latency = 1;
1050e8d8bef9SDimitry Andric}
1051e8d8bef9SDimitry Andric
1052e8d8bef9SDimitry Andric// Store pair, immed post-index, W-form
1053e8d8bef9SDimitry Andric// Store pair, immed post-index, X-form
1054e8d8bef9SDimitry Andric// Store pair, immed pre-index, W-form
1055e8d8bef9SDimitry Andric// Store pair, immed pre-index, X-form
1056e8d8bef9SDimitry Andric// NOTE: Handled by WriteAdr, WriteSTP.
1057e8d8bef9SDimitry Andric
1058e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURBi)>;
1059e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURBBi)>;
1060e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURDi)>;
1061e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURHi)>;
1062e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURHHi)>;
1063e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURQi)>;
1064e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURSi)>;
1065e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURWi)>;
1066e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STURXi)>;
1067e8d8bef9SDimitry Andric
1068e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STUR], (instrs STTRBi)>;
1069e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STUR], (instrs STTRHi)>;
1070e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STUR], (instrs STTRWi)>;
1071e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STUR], (instrs STTRXi)>;
1072e8d8bef9SDimitry Andric
1073e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STNP], (instrs STNPDi)>;
1074e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STNP], (instrs STNPQi)>;
1075e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STNP], (instrs STNPXi)>;
1076e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STNP], (instrs STNPWi)>;
1077e8d8bef9SDimitry Andric
1078e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STNP], (instrs STPDi)>;
1079e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STNP], (instrs STPQi)>;
1080e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STNP], (instrs STPXi)>;
1081e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STNP], (instrs STPWi)>;
1082e8d8bef9SDimitry Andric
1083e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRBui)>;
1084e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRBui)>;
1085e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRDui)>;
1086e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRDui)>;
1087e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRHui)>;
1088e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRHui)>;
1089e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRQui)>;
1090e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRQui)>;
1091e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRXui)>;
1092e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRXui)>;
1093e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRWui)>;
1094e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR], (instrs STRWui)>;
1095e8d8bef9SDimitry Andric
1096e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1097e8d8bef9SDimitry Andric            (instrs STPDpre, STPDpost)>;
1098e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1099e8d8bef9SDimitry Andric            (instrs STPDpre, STPDpost)>;
1100e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1101e8d8bef9SDimitry Andric            (instrs STPDpre, STPDpost)>;
1102e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1103e8d8bef9SDimitry Andric            (instrs STPDpre, STPDpost)>;
1104e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1105e8d8bef9SDimitry Andric            (instrs STPQpre, STPQpost)>;
1106e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1107e8d8bef9SDimitry Andric            (instrs STPQpre, STPQpost)>;
1108e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1109e8d8bef9SDimitry Andric            (instrs STPQpre, STPQpost)>;
1110e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1111e8d8bef9SDimitry Andric            (instrs STPQpre, STPQpost)>;
1112e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1113e8d8bef9SDimitry Andric            (instrs STPSpre, STPSpost)>;
1114e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1115e8d8bef9SDimitry Andric            (instrs STPSpre, STPSpost)>;
1116e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1117e8d8bef9SDimitry Andric            (instrs STPSpre, STPSpost)>;
1118e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1119e8d8bef9SDimitry Andric            (instrs STPSpre, STPSpost)>;
1120e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1121e8d8bef9SDimitry Andric            (instrs STPWpre, STPWpost)>;
1122e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1123e8d8bef9SDimitry Andric            (instrs STPWpre, STPWpost)>;
1124e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1125e8d8bef9SDimitry Andric            (instrs STPWpre, STPWpost)>;
1126e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1127e8d8bef9SDimitry Andric            (instrs STPWpre, STPWpost)>;
1128e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1129e8d8bef9SDimitry Andric            (instrs STPXpre, STPXpost)>;
1130e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1131e8d8bef9SDimitry Andric            (instrs STPXpre, STPXpost)>;
1132e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01],
1133e8d8bef9SDimitry Andric            (instrs STPXpre, STPXpost)>;
1134e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STP01, ReadAdrBase],
1135e8d8bef9SDimitry Andric            (instrs STPXpre, STPXpost)>;
1136e8d8bef9SDimitry Andric
1137e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1138e8d8bef9SDimitry Andric            (instrs STRBpre, STRBpost)>;
1139e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1140e8d8bef9SDimitry Andric            (instrs STRBpre, STRBpost)>;
1141e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1142e8d8bef9SDimitry Andric            (instrs STRBpre, STRBpost)>;
1143e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1144e8d8bef9SDimitry Andric            (instrs STRBpre, STRBpost)>;
1145e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1146e8d8bef9SDimitry Andric            (instrs STRBBpre, STRBBpost)>;
1147e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1148e8d8bef9SDimitry Andric            (instrs STRBBpre, STRBBpost)>;
1149e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1150e8d8bef9SDimitry Andric            (instrs STRBBpre, STRBBpost)>;
1151e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1152e8d8bef9SDimitry Andric            (instrs STRBBpre, STRBBpost)>;
1153e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1154e8d8bef9SDimitry Andric            (instrs STRDpre, STRDpost)>;
1155e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1156e8d8bef9SDimitry Andric            (instrs STRDpre, STRDpost)>;
1157e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1158e8d8bef9SDimitry Andric            (instrs STRDpre, STRDpost)>;
1159e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1160e8d8bef9SDimitry Andric            (instrs STRDpre, STRDpost)>;
1161e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1162e8d8bef9SDimitry Andric            (instrs STRHpre, STRHpost)>;
1163e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1164e8d8bef9SDimitry Andric            (instrs STRHpre, STRHpost)>;
1165e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1166e8d8bef9SDimitry Andric            (instrs STRHpre, STRHpost)>;
1167e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1168e8d8bef9SDimitry Andric            (instrs STRHpre, STRHpost)>;
1169e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1170e8d8bef9SDimitry Andric            (instrs STRHHpre, STRHHpost)>;
1171e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1172e8d8bef9SDimitry Andric            (instrs STRHHpre, STRHHpost)>;
1173e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1174e8d8bef9SDimitry Andric            (instrs STRHHpre, STRHHpost)>;
1175e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1176e8d8bef9SDimitry Andric            (instrs STRHHpre, STRHHpost)>;
1177e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1178e8d8bef9SDimitry Andric            (instrs STRQpre, STRQpost)>;
1179e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1180e8d8bef9SDimitry Andric            (instrs STRQpre, STRQpost)>;
1181e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1182e8d8bef9SDimitry Andric            (instrs STRQpre, STRQpost)>;
1183e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1184e8d8bef9SDimitry Andric            (instrs STRQpre, STRQpost)>;
1185e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1186e8d8bef9SDimitry Andric            (instrs STRSpre, STRSpost)>;
1187e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1188e8d8bef9SDimitry Andric            (instrs STRSpre, STRSpost)>;
1189e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1190e8d8bef9SDimitry Andric            (instrs STRSpre, STRSpost)>;
1191e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1192e8d8bef9SDimitry Andric            (instrs STRSpre, STRSpost)>;
1193e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1194e8d8bef9SDimitry Andric            (instrs STRWpre, STRWpost)>;
1195e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1196e8d8bef9SDimitry Andric            (instrs STRWpre, STRWpost)>;
1197e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1198e8d8bef9SDimitry Andric            (instrs STRWpre, STRWpost)>;
1199e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1200e8d8bef9SDimitry Andric            (instrs STRWpre, STRWpost)>;
1201e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1202e8d8bef9SDimitry Andric            (instrs STRXpre, STRXpost)>;
1203e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1204e8d8bef9SDimitry Andric            (instrs STRXpre, STRXpost)>;
1205e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01],
1206e8d8bef9SDimitry Andric            (instrs STRXpre, STRXpost)>;
1207e8d8bef9SDimitry Andricdef : InstRW<[WriteAdr, A64FXWrite_STP01, ReadAdrBase],
1208e8d8bef9SDimitry Andric            (instrs STRXpre, STRXpost)>;
1209e8d8bef9SDimitry Andric
1210e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1211e8d8bef9SDimitry Andric            (instrs STRBroW, STRBroX)>;
1212e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1213e8d8bef9SDimitry Andric            (instrs STRBroW, STRBroX)>;
1214e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1215e8d8bef9SDimitry Andric            (instrs STRBBroW, STRBBroX)>;
1216e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1217e8d8bef9SDimitry Andric            (instrs STRBBroW, STRBBroX)>;
1218e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1219e8d8bef9SDimitry Andric            (instrs STRDroW, STRDroX)>;
1220e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1221e8d8bef9SDimitry Andric            (instrs STRDroW, STRDroX)>;
1222e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1223e8d8bef9SDimitry Andric            (instrs STRHroW, STRHroX)>;
1224e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1225e8d8bef9SDimitry Andric            (instrs STRHroW, STRHroX)>;
1226e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1227e8d8bef9SDimitry Andric            (instrs STRHHroW, STRHHroX)>;
1228e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1229e8d8bef9SDimitry Andric            (instrs STRHHroW, STRHHroX)>;
1230e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1231e8d8bef9SDimitry Andric            (instrs STRQroW, STRQroX)>;
1232e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1233e8d8bef9SDimitry Andric            (instrs STRQroW, STRQroX)>;
1234e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1235e8d8bef9SDimitry Andric            (instrs STRSroW, STRSroX)>;
1236e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1237e8d8bef9SDimitry Andric            (instrs STRSroW, STRSroX)>;
1238e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1239e8d8bef9SDimitry Andric            (instrs STRWroW, STRWroX)>;
1240e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1241e8d8bef9SDimitry Andric            (instrs STRWroW, STRWroX)>;
1242e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1243e8d8bef9SDimitry Andric            (instrs STRXroW, STRXroX)>;
1244e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, ReadAdrBase],
1245e8d8bef9SDimitry Andric            (instrs STRXroW, STRXroX)>;
1246e8d8bef9SDimitry Andric
1247e8d8bef9SDimitry Andric//---
1248e8d8bef9SDimitry Andric// 3.8 FP Data Processing Instructions
1249e8d8bef9SDimitry Andric//---
1250e8d8bef9SDimitry Andric
1251e8d8bef9SDimitry Andric// FP absolute value
1252e8d8bef9SDimitry Andric// FP min/max
1253e8d8bef9SDimitry Andric// FP negate
1254e8d8bef9SDimitry Andricdef : WriteRes<WriteF,       [A64FXGI03]> {
1255e8d8bef9SDimitry Andric  let Latency = 4;
12565f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
1257e8d8bef9SDimitry Andric}
1258e8d8bef9SDimitry Andric
1259e8d8bef9SDimitry Andric// FP arithmetic
1260e8d8bef9SDimitry Andric
1261e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instrs FADDDrr, FADDHrr)>;
1262e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instrs FSUBDrr, FSUBHrr)>;
1263e8d8bef9SDimitry Andric
1264e8d8bef9SDimitry Andric// FP compare
1265e8d8bef9SDimitry Andricdef : WriteRes<WriteFCmp,    [A64FXGI03]> {
1266e8d8bef9SDimitry Andric  let Latency = 4;
12675f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
1268e8d8bef9SDimitry Andric}
1269e8d8bef9SDimitry Andric
1270e8d8bef9SDimitry Andric// FP Div, Sqrt
1271e8d8bef9SDimitry Andricdef : WriteRes<WriteFDiv, [A64FXGI0]> {
1272e8d8bef9SDimitry Andric  let Latency = 43;
1273e8d8bef9SDimitry Andric}
1274e8d8bef9SDimitry Andric
1275e8d8bef9SDimitry Andricdef A64FXXWriteFDiv : SchedWriteRes<[A64FXGI0]> {
1276e8d8bef9SDimitry Andric  let Latency = 38;
1277e8d8bef9SDimitry Andric}
1278e8d8bef9SDimitry Andric
1279e8d8bef9SDimitry Andricdef A64FXXWriteFDivSP : SchedWriteRes<[A64FXGI0]> {
1280e8d8bef9SDimitry Andric  let Latency = 29;
1281e8d8bef9SDimitry Andric}
1282e8d8bef9SDimitry Andric
1283e8d8bef9SDimitry Andricdef A64FXXWriteFDivDP : SchedWriteRes<[A64FXGI0]> {
1284e8d8bef9SDimitry Andric  let Latency = 43;
1285e8d8bef9SDimitry Andric}
1286e8d8bef9SDimitry Andric
1287e8d8bef9SDimitry Andricdef A64FXXWriteFSqrtSP : SchedWriteRes<[A64FXGI0]> {
1288e8d8bef9SDimitry Andric  let Latency = 29;
1289e8d8bef9SDimitry Andric}
1290e8d8bef9SDimitry Andric
1291e8d8bef9SDimitry Andricdef A64FXXWriteFSqrtDP : SchedWriteRes<[A64FXGI0]> {
1292e8d8bef9SDimitry Andric  let Latency = 43;
1293e8d8bef9SDimitry Andric}
1294e8d8bef9SDimitry Andric
1295e8d8bef9SDimitry Andric// FP divide, S-form
1296e8d8bef9SDimitry Andric// FP square root, S-form
1297e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivSP], (instrs FDIVSrr)>;
1298e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFSqrtSP], (instrs FSQRTSr)>;
1299e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivSP], (instregex "^FDIVv.*32$")>;
1300e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFSqrtSP], (instregex "^.*SQRT.*32$")>;
1301e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivSP], (instregex "^FDIVSrr")>;
1302e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFSqrtSP], (instregex "^FSQRTSr")>;
1303e8d8bef9SDimitry Andric
1304e8d8bef9SDimitry Andric// FP divide, D-form
1305e8d8bef9SDimitry Andric// FP square root, D-form
1306e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivDP], (instrs FDIVDrr)>;
1307e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFSqrtDP], (instrs FSQRTDr)>;
1308e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivDP], (instregex "^FDIVv.*64$")>;
1309e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFSqrtDP], (instregex "^.*SQRT.*64$")>;
1310e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivDP], (instregex "^FDIVDrr")>;
1311e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFSqrtDP], (instregex "^FSQRTDr")>;
1312e8d8bef9SDimitry Andric
1313e8d8bef9SDimitry Andric// FP round to integral
1314e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03],
1315e8d8bef9SDimitry Andric            (instregex "^FRINT(A|I|M|N|P|X|Z)(Sr|Dr)")>;
1316e8d8bef9SDimitry Andric
1317e8d8bef9SDimitry Andric// FP select
1318e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instregex "^FCSEL")>;
1319e8d8bef9SDimitry Andric
1320e8d8bef9SDimitry Andric//---
1321e8d8bef9SDimitry Andric// 3.9 FP Miscellaneous Instructions
1322e8d8bef9SDimitry Andric//---
1323e8d8bef9SDimitry Andric
1324e8d8bef9SDimitry Andric// FP convert, from vec to vec reg
1325e8d8bef9SDimitry Andric// FP convert, from gen to vec reg
1326e8d8bef9SDimitry Andric// FP convert, from vec to gen reg
1327e8d8bef9SDimitry Andricdef : WriteRes<WriteFCvt, [A64FXGI03]> {
1328e8d8bef9SDimitry Andric  let Latency = 9;
13295f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
1330e8d8bef9SDimitry Andric}
1331e8d8bef9SDimitry Andric
1332e8d8bef9SDimitry Andric// FP move, immed
1333e8d8bef9SDimitry Andric// FP move, register
1334e8d8bef9SDimitry Andricdef : WriteRes<WriteFImm, [A64FXGI0]> {
1335e8d8bef9SDimitry Andric  let Latency = 4;
13365f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
1337e8d8bef9SDimitry Andric}
1338e8d8bef9SDimitry Andric
1339e8d8bef9SDimitry Andric// FP transfer, from gen to vec reg
1340e8d8bef9SDimitry Andric// FP transfer, from vec to gen reg
1341e8d8bef9SDimitry Andricdef : WriteRes<WriteFCopy, [A64FXGI0]> {
1342e8d8bef9SDimitry Andric  let Latency = 4;
13435f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
1344e8d8bef9SDimitry Andric}
1345e8d8bef9SDimitry Andric
1346e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FMOV_GV], (instrs FMOVXDHighr)>;
1347e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FMOV_VG14], (instrs FMOVDXHighr)>;
1348e8d8bef9SDimitry Andric
1349e8d8bef9SDimitry Andric//---
1350e8d8bef9SDimitry Andric// 3.12 ASIMD Integer Instructions
1351e8d8bef9SDimitry Andric//---
1352e8d8bef9SDimitry Andric
1353e8d8bef9SDimitry Andric// ASIMD absolute diff, D-form
1354e8d8bef9SDimitry Andric// ASIMD absolute diff, Q-form
1355e8d8bef9SDimitry Andric// ASIMD absolute diff accum, D-form
1356e8d8bef9SDimitry Andric// ASIMD absolute diff accum, Q-form
1357e8d8bef9SDimitry Andric// ASIMD absolute diff accum long
1358e8d8bef9SDimitry Andric// ASIMD absolute diff long
1359e8d8bef9SDimitry Andric// ASIMD arith, basic
1360e8d8bef9SDimitry Andric// ASIMD arith, complex
1361e8d8bef9SDimitry Andric// ASIMD compare
1362e8d8bef9SDimitry Andric// ASIMD logical (AND, BIC, EOR)
1363e8d8bef9SDimitry Andric// ASIMD max/min, basic
1364e8d8bef9SDimitry Andric// ASIMD max/min, reduce, 4H/4S
1365e8d8bef9SDimitry Andric// ASIMD max/min, reduce, 8B/8H
1366e8d8bef9SDimitry Andric// ASIMD max/min, reduce, 16B
1367e8d8bef9SDimitry Andric// ASIMD multiply, D-form
1368e8d8bef9SDimitry Andric// ASIMD multiply, Q-form
1369e8d8bef9SDimitry Andric// ASIMD multiply accumulate long
1370e8d8bef9SDimitry Andric// ASIMD multiply accumulate saturating long
1371e8d8bef9SDimitry Andric// ASIMD multiply long
1372e8d8bef9SDimitry Andric// ASIMD pairwise add and accumulate
1373e8d8bef9SDimitry Andric// ASIMD shift accumulate
1374e8d8bef9SDimitry Andric// ASIMD shift by immed, basic
1375e8d8bef9SDimitry Andric// ASIMD shift by immed and insert, basic, D-form
1376e8d8bef9SDimitry Andric// ASIMD shift by immed and insert, basic, Q-form
1377e8d8bef9SDimitry Andric// ASIMD shift by immed, complex
1378e8d8bef9SDimitry Andric// ASIMD shift by register, basic, D-form
1379e8d8bef9SDimitry Andric// ASIMD shift by register, basic, Q-form
1380e8d8bef9SDimitry Andric// ASIMD shift by register, complex, D-form
1381e8d8bef9SDimitry Andric// ASIMD shift by register, complex, Q-form
1382349cc55cSDimitry Andricdef : WriteRes<WriteVd, [A64FXGI03]> {
1383349cc55cSDimitry Andric  let Latency = 4;
1384349cc55cSDimitry Andric}
1385349cc55cSDimitry Andricdef : WriteRes<WriteVq, [A64FXGI03]> {
1386e8d8bef9SDimitry Andric  let Latency = 4;
1387e8d8bef9SDimitry Andric}
1388e8d8bef9SDimitry Andric
1389e8d8bef9SDimitry Andric// ASIMD arith, reduce, 4H/4S
1390e8d8bef9SDimitry Andric// ASIMD arith, reduce, 8B/8H
1391e8d8bef9SDimitry Andric// ASIMD arith, reduce, 16B
1392e8d8bef9SDimitry Andric
1393e8d8bef9SDimitry Andric// ASIMD logical (MVN (alias for NOT), ORN, ORR)
1394e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1395e8d8bef9SDimitry Andric            (instregex "^ANDv", "^BICv", "^EORv", "^ORRv", "^ORNv", "^NOTv")>;
1396e8d8bef9SDimitry Andric
1397e8d8bef9SDimitry Andric// ASIMD arith, reduce
1398e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ADDLV],
1399e8d8bef9SDimitry Andric            (instregex "^ADDVv", "^SADDLVv", "^UADDLVv")>;
1400e8d8bef9SDimitry Andric
1401e8d8bef9SDimitry Andric// ASIMD polynomial (8x8) multiply long
1402e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_MULLE], (instregex "^(S|U|SQD)MULL")>;
1403e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_MULLV],
1404e8d8bef9SDimitry Andric            (instregex "(S|U|SQD)(MLAL|MLSL|MULL)v.*")>;
1405e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI03], (instregex "^PMULL(v8i8|v16i8)")>;
1406e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI03], (instregex "^PMULL(v1i64|v2i64)")>;
1407e8d8bef9SDimitry Andric
1408e8d8bef9SDimitry Andric// ASIMD absolute diff accum, D-form
1409e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ABA],
1410e8d8bef9SDimitry Andric            (instregex "^[SU]ABA(v8i8|v4i16|v2i32)$")>;
1411e8d8bef9SDimitry Andric// ASIMD absolute diff accum, Q-form
1412e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ABA],
1413e8d8bef9SDimitry Andric            (instregex "^[SU]ABA(v16i8|v8i16|v4i32)$")>;
1414e8d8bef9SDimitry Andric// ASIMD absolute diff accum long
1415e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ABAL],
1416e8d8bef9SDimitry Andric            (instregex "^[SU]ABAL")>;
1417e8d8bef9SDimitry Andric// ASIMD arith, reduce, 4H/4S
1418e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ADDLV1],
1419e8d8bef9SDimitry Andric            (instregex "^[SU]?ADDL?V(v8i8|v4i16|v2i32)v$")>;
1420e8d8bef9SDimitry Andric// ASIMD arith, reduce, 8B
1421e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ADDLV1],
1422e8d8bef9SDimitry Andric            (instregex "^[SU]?ADDL?V(v8i16|v4i32)v$")>;
1423e8d8bef9SDimitry Andric// ASIMD arith, reduce, 16B/16H
1424e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ADDLV1],
1425e8d8bef9SDimitry Andric            (instregex "^[SU]?ADDL?Vv16i8v$")>;
1426e8d8bef9SDimitry Andric// ASIMD max/min, reduce, 4H/4S
1427e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_MINMAXV],
1428e8d8bef9SDimitry Andric            (instregex "^[SU](MIN|MAX)V(v4i16|v4i32)v$")>;
1429e8d8bef9SDimitry Andric// ASIMD max/min, reduce, 8B/8H
1430e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_MINMAXV],
1431e8d8bef9SDimitry Andric            (instregex "^[SU](MIN|MAX)V(v8i8|v8i16)v$")>;
1432e8d8bef9SDimitry Andric// ASIMD max/min, reduce, 16B/16H
1433e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_MINMAXV],
1434e8d8bef9SDimitry Andric            (instregex "^[SU](MIN|MAX)Vv16i8v$")>;
1435e8d8bef9SDimitry Andric// ASIMD multiply, D-form
1436e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_PMUL],
1437e8d8bef9SDimitry Andric            (instregex "^(P?MUL|SQR?DMUL)" #
1438e8d8bef9SDimitry Andric                       "(v8i8|v4i16|v2i32|v1i8|v1i16|v1i32|v1i64)" #
1439e8d8bef9SDimitry Andric                       "(_indexed)?$")>;
1440e8d8bef9SDimitry Andric
1441e8d8bef9SDimitry Andric// ASIMD multiply, Q-form
1442e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_PMUL],
1443e8d8bef9SDimitry Andric            (instregex "^(P?MUL)(v16i8|v8i16|v4i32)(_indexed)?$")>;
1444e8d8bef9SDimitry Andric
1445e8d8bef9SDimitry Andric// ASIMD multiply, Q-form
1446e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SQRDMULH],
1447e8d8bef9SDimitry Andric            (instregex "^(SQR?DMULH)(v16i8|v8i16|v4i32)(_indexed)?$")>;
1448e8d8bef9SDimitry Andric
1449e8d8bef9SDimitry Andric// ASIMD multiply accumulate, D-form
1450e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03],
1451e8d8bef9SDimitry Andric            (instregex "^ML[AS](v8i8|v4i16|v2i32)(_indexed)?$")>;
1452e8d8bef9SDimitry Andric// ASIMD multiply accumulate, Q-form
1453e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03],
1454e8d8bef9SDimitry Andric            (instregex "^ML[AS](v16i8|v8i16|v4i32)(_indexed)?$")>;
1455e8d8bef9SDimitry Andric// ASIMD shift accumulate
1456e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SRSRAV],
1457e8d8bef9SDimitry Andric            (instregex "SRSRAv", "URSRAv")>;
1458e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SSRAV],
1459e8d8bef9SDimitry Andric            (instregex "SSRAv", "USRAv")>;
1460e8d8bef9SDimitry Andric
1461e8d8bef9SDimitry Andric// ASIMD shift by immed, basic
1462e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_RSHRN],
1463e8d8bef9SDimitry Andric            (instregex "RSHRNv", "SQRSHRNv", "SQRSHRUNv", "UQRSHRNv")>;
1464e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SHRN],
1465e8d8bef9SDimitry Andric            (instregex "SHRNv", "SQSHRNv", "SQSHRUNv", "UQSHRNv")>;
1466e8d8bef9SDimitry Andric
1467e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3],
1468e8d8bef9SDimitry Andric            (instregex "SQXTNv", "SQXTUNv", "UQXTNv")>;
1469e8d8bef9SDimitry Andric
1470e8d8bef9SDimitry Andric// ASIMD shift by immed, complex
1471e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ABA], (instregex "^[SU]?(Q|R){1,2}SHR")>;
1472e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3], (instregex "^SQSHLU")>;
1473e8d8bef9SDimitry Andric// ASIMD shift by register, basic, Q-form
1474e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3],
1475e8d8bef9SDimitry Andric            (instregex "^[SU]SHL(v16i8|v8i16|v4i32|v2i64)")>;
1476e8d8bef9SDimitry Andric// ASIMD shift by register, complex, D-form
1477e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3],
1478e8d8bef9SDimitry Andric            (instregex "^[SU][QR]{1,2}SHL" #
1479e8d8bef9SDimitry Andric                       "(v1i8|v1i16|v1i32|v1i64|v8i8|v4i16|v2i32|b|d|h|s)")>;
1480e8d8bef9SDimitry Andric// ASIMD shift by register, complex, Q-form
1481e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3],
1482e8d8bef9SDimitry Andric            (instregex "^[SU][QR]{1,2}SHL(v16i8|v8i16|v4i32|v2i64)")>;
1483e8d8bef9SDimitry Andric
1484e8d8bef9SDimitry Andric// ASIMD Arithmetic
1485e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1486e8d8bef9SDimitry Andric            (instregex "(ADD|SUB)(v8i8|v4i16|v2i32|v1i64)")>;
1487e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1488e8d8bef9SDimitry Andric            (instregex "(ADD|SUB)(v16i8|v8i16|v4i32|v2i64)")>;
1489e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SHRN], (instregex "(ADD|SUB)HNv.*")>;
1490e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_RSHRN], (instregex "(RADD|RSUB)HNv.*")>;
1491e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1492e8d8bef9SDimitry Andric            (instregex "^SQADD", "^SQNEG", "^SQSUB", "^SRHADD",
1493e8d8bef9SDimitry Andric                       "^SUQADD", "^UQADD", "^UQSUB", "^URHADD", "^USQADD")>;
1494e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ADDP],
1495e8d8bef9SDimitry Andric            (instregex "ADDP(v16i8|v8i16|v4i32|v2i64)")>;
1496e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1497e8d8bef9SDimitry Andric            (instregex "((AND|ORN|EOR|EON)S?(Xr[rsi]|v16i8|v8i16|v4i32)|" #
1498e8d8bef9SDimitry Andric                       "(ORR|BIC)S?(Xr[rs]|v16i8|v8i16|v4i32))")>;
1499e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI0],
1500e8d8bef9SDimitry Andric            (instregex "(CLS|CLZ|CNT)(v4i32|v8i16|v16i8)")>;
1501e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SADALP], (instregex "^SADALP", "^UADALP")>;
1502e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SADDLP], (instregex "^SADDLPv", "^UADDLPv")>;
1503e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ADDLV1], (instregex "^SADDLV", "^UADDLV")>;
1504e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_MINMAXV],
1505e8d8bef9SDimitry Andric             (instregex "^ADDVv", "^SMAXVv", "^UMAXVv", "^SMINVv", "^UMINVv")>;
1506e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ABA],
1507e8d8bef9SDimitry Andric             (instregex "^SABAv", "^UABAv", "^SABALv", "^UABALv")>;
1508e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1509e8d8bef9SDimitry Andric            (instregex "^SQADDv", "^SQSUBv", "^UQADDv", "^UQSUBv")>;
1510e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instregex "^SUQADDv", "^USQADDv")>;
1511e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SHRN],
1512e8d8bef9SDimitry Andric            (instregex "^ADDHNv", "^SUBHNv")>;
1513e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_RSHRN],
1514e8d8bef9SDimitry Andric            (instregex "^RADDHNv", "^RSUBHNv")>;
1515e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1516e8d8bef9SDimitry Andric            (instregex "^SQABS", "^SQADD", "^SQNEG", "^SQSUB",
1517e8d8bef9SDimitry Andric                       "^SRHADD", "^SUQADD", "^UQADD", "^UQSUB",
1518e8d8bef9SDimitry Andric                      "^URHADD", "^USQADD")>;
1519e8d8bef9SDimitry Andric
1520e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1521e8d8bef9SDimitry Andric            (instregex "^CMEQv", "^CMGEv", "^CMGTv",
1522e8d8bef9SDimitry Andric                       "^CMLEv", "^CMLTv", "^CMHIv", "^CMHSv")>;
1523e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_MINMAXV],
1524e8d8bef9SDimitry Andric            (instregex "^SMAXv", "^SMINv", "^UMAXv", "^UMINv")>;
1525e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ADDP],
1526e8d8bef9SDimitry Andric            (instregex "^SMAXPv", "^SMINPv", "^UMAXPv", "^UMINPv")>;
1527e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1528e8d8bef9SDimitry Andric            (instregex "^SABDv", "^UABDv")>;
1529e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX1],
1530e8d8bef9SDimitry Andric            (instregex "^SABDLv", "^UABDLv")>;
1531e8d8bef9SDimitry Andric
1532e8d8bef9SDimitry Andric//---
1533e8d8bef9SDimitry Andric// 3.13 ASIMD Floating-point Instructions
1534e8d8bef9SDimitry Andric//---
1535e8d8bef9SDimitry Andric
1536bdd1243dSDimitry Andricdef : WriteRes<WriteFMul, [A64FXGI03]> {
1537bdd1243dSDimitry Andric  let Latency = 9;
1538bdd1243dSDimitry Andric}
1539bdd1243dSDimitry Andric
1540e8d8bef9SDimitry Andric// ASIMD FP absolute value
1541e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instregex "^FABSv")>;
1542e8d8bef9SDimitry Andric
1543e8d8bef9SDimitry Andric// ASIMD FP arith, normal, D-form
1544e8d8bef9SDimitry Andric// ASIMD FP arith, normal, Q-form
1545e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03],
1546e8d8bef9SDimitry Andric            (instregex "^FABDv", "^FADDv", "^FSUBv")>;
1547e8d8bef9SDimitry Andric
1548e8d8bef9SDimitry Andric// ASIMD FP arith, pairwise, D-form
1549e8d8bef9SDimitry Andric// ASIMD FP arith, pairwise, Q-form
1550e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FADDPV], (instregex "^FADDPv")>;
1551e8d8bef9SDimitry Andric
1552e8d8bef9SDimitry Andric// ASIMD FP compare, D-form
1553e8d8bef9SDimitry Andric// ASIMD FP compare, Q-form
1554e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instregex "^FACGEv", "^FACGTv")>;
1555e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instregex "^FCMEQv", "^FCMGEv",
1556e8d8bef9SDimitry Andric                                                 "^FCMGTv", "^FCMLEv",
1557e8d8bef9SDimitry Andric                                                 "^FCMLTv")>;
1558e8d8bef9SDimitry Andric// ASIMD FP round, D-form
1559e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03],
1560e8d8bef9SDimitry Andric            (instregex "^FRINT[AIMNPXZ](v2f32)")>;
1561e8d8bef9SDimitry Andric// ASIMD FP round, Q-form
1562e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03],
1563e8d8bef9SDimitry Andric            (instregex "^FRINT[AIMNPXZ](v4f32|v2f64)")>;
1564e8d8bef9SDimitry Andric
1565e8d8bef9SDimitry Andric// ASIMD FP convert, long
1566e8d8bef9SDimitry Andric// ASIMD FP convert, narrow
1567e8d8bef9SDimitry Andric// ASIMD FP convert, other, D-form
1568e8d8bef9SDimitry Andric// ASIMD FP convert, other, Q-form
1569e8d8bef9SDimitry Andric
1570e8d8bef9SDimitry Andric// ASIMD FP convert, long and narrow
1571e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FCVTXNV], (instregex "^FCVT(L|N|XN)v")>;
1572e8d8bef9SDimitry Andric// ASIMD FP convert, other, D-form
1573e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FCVTXNV],
1574e8d8bef9SDimitry Andric      (instregex "^[FVSU]CVT([AMNPZ][SU])?(_Int)?(v2f32|v1i32|v2i32|v1i64)")>;
1575e8d8bef9SDimitry Andric// ASIMD FP convert, other, Q-form
1576e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FCVTXNV],
1577e8d8bef9SDimitry Andric      (instregex "^[FVSU]CVT([AMNPZ][SU])?(_Int)?(v4f32|v2f64|v4i32|v2i64)")>;
1578e8d8bef9SDimitry Andric
1579e8d8bef9SDimitry Andric// ASIMD FP divide, D-form, F32
1580e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivSP], (instrs FDIVv2f32)>;
1581e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivSP], (instregex "FDIVv2f32")>;
1582e8d8bef9SDimitry Andric
1583e8d8bef9SDimitry Andric// ASIMD FP divide, Q-form, F32
1584e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDiv], (instrs FDIVv4f32)>;
1585e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDiv], (instregex "FDIVv4f32")>;
1586e8d8bef9SDimitry Andric
1587e8d8bef9SDimitry Andric// ASIMD FP divide, Q-form, F64
1588e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivDP], (instrs FDIVv2f64)>;
1589e8d8bef9SDimitry Andricdef : InstRW<[A64FXXWriteFDivDP], (instregex "FDIVv2f64")>;
1590e8d8bef9SDimitry Andric
1591e8d8bef9SDimitry Andric// ASIMD FP max/min, normal, D-form
1592e8d8bef9SDimitry Andric// ASIMD FP max/min, normal, Q-form
1593e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI0], (instregex "^FMAXv", "^FMAXNMv",
1594e8d8bef9SDimitry Andric                                               "^FMINv", "^FMINNMv")>;
1595e8d8bef9SDimitry Andric
1596e8d8bef9SDimitry Andric// ASIMD FP max/min, pairwise, D-form
1597e8d8bef9SDimitry Andric// ASIMD FP max/min, pairwise, Q-form
1598e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ADDP], (instregex "^FMAXPv", "^FMAXNMPv",
1599e8d8bef9SDimitry Andric                                           "^FMINPv", "^FMINNMPv")>;
1600e8d8bef9SDimitry Andric
1601e8d8bef9SDimitry Andric// ASIMD FP max/min, reduce
1602e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FMAXVVH], (instregex "^FMAXVv", "^FMAXNMVv",
1603e8d8bef9SDimitry Andric                                              "^FMINVv", "^FMINNMVv")>;
1604e8d8bef9SDimitry Andric
1605e8d8bef9SDimitry Andric// ASIMD FP multiply, D-form, FZ
1606e8d8bef9SDimitry Andric// ASIMD FP multiply, D-form, no FZ
1607e8d8bef9SDimitry Andric// ASIMD FP multiply, Q-form, FZ
1608e8d8bef9SDimitry Andric// ASIMD FP multiply, Q-form, no FZ
1609e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03], (instregex "^FMULv", "^FMULXv")>;
1610e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FMULXE],
1611e8d8bef9SDimitry Andric            (instregex "^FMULX?(v2f32|v1i32|v2i32|v1i64|32|64)")>;
1612e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FMULXE],
1613e8d8bef9SDimitry Andric            (instregex "^FMULX?(v4f32|v2f64|v4i32|v2i64)")>;
1614e8d8bef9SDimitry Andric
1615e8d8bef9SDimitry Andric// ASIMD FP multiply accumulate, Dform, FZ
1616e8d8bef9SDimitry Andric// ASIMD FP multiply accumulate, Dform, no FZ
1617e8d8bef9SDimitry Andric// ASIMD FP multiply accumulate, Qform, FZ
1618e8d8bef9SDimitry Andric// ASIMD FP multiply accumulate, Qform, no FZ
1619e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03], (instregex "^FMLAv", "^FMLSv")>;
1620e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FMULXE],
1621e8d8bef9SDimitry Andric            (instregex "^FML[AS](v2f32|v1i32|v2i32|v1i64)")>;
1622e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_FMULXE],
1623e8d8bef9SDimitry Andric            (instregex "^FML[AS](v4f32|v2f64|v4i32|v2i64)")>;
1624e8d8bef9SDimitry Andric
1625e8d8bef9SDimitry Andric// ASIMD FP negate
1626e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03], (instregex "^FNEGv")>;
1627e8d8bef9SDimitry Andric
1628e8d8bef9SDimitry Andric//--
1629e8d8bef9SDimitry Andric// 3.14 ASIMD Miscellaneous Instructions
1630e8d8bef9SDimitry Andric//--
1631e8d8bef9SDimitry Andric
1632e8d8bef9SDimitry Andric// ASIMD bit reverse
1633e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI2456], (instregex "^RBITv")>;
1634e8d8bef9SDimitry Andric
1635e8d8bef9SDimitry Andric// ASIMD bitwise insert, D-form
1636e8d8bef9SDimitry Andric// ASIMD bitwise insert, Q-form
1637e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_BIF],
1638e8d8bef9SDimitry Andric            (instregex "^BIFv", "^BITv", "^BSLv")>;
1639e8d8bef9SDimitry Andric
1640e8d8bef9SDimitry Andric// ASIMD count, D-form
1641e8d8bef9SDimitry Andric// ASIMD count, Q-form
1642e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI0],
1643e8d8bef9SDimitry Andric            (instregex "^CLSv", "^CLZv", "^CNTv")>;
1644e8d8bef9SDimitry Andric
1645e8d8bef9SDimitry Andric// ASIMD duplicate, gen reg
1646e8d8bef9SDimitry Andric// ASIMD duplicate, element
1647e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_DUPGENERAL], (instregex "^DUPv")>;
164804eeddc0SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0], (instregex "^DUP(i8|i16|i32|i64)$")>;
1649e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0], (instregex "^DUPv.+gpr")>;
1650e8d8bef9SDimitry Andric
1651e8d8bef9SDimitry Andric// ASIMD extract
1652e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0], (instregex "^EXTv")>;
1653e8d8bef9SDimitry Andric
1654e8d8bef9SDimitry Andric// ASIMD extract narrow
1655e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3], (instregex "^XTNv")>;
1656e8d8bef9SDimitry Andric
1657e8d8bef9SDimitry Andric// ASIMD extract narrow, saturating
1658e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3],
1659e8d8bef9SDimitry Andric            (instregex "^SQXTNv", "^SQXTUNv", "^UQXTNv")>;
1660e8d8bef9SDimitry Andric
1661e8d8bef9SDimitry Andric// ASIMD insert, element to element
1662e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0], (instregex "^INSv")>;
1663e8d8bef9SDimitry Andric
1664e8d8bef9SDimitry Andric// ASIMD transfer, element to gen reg
1665e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SMOV], (instregex "^[SU]MOVv")>;
1666e8d8bef9SDimitry Andric
1667e8d8bef9SDimitry Andric// ASIMD move, integer immed
1668e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI0], (instregex "^MOVIv")>;
1669e8d8bef9SDimitry Andric
1670e8d8bef9SDimitry Andric// ASIMD move, FP immed
1671e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI0], (instregex "^FMOVv")>;
1672e8d8bef9SDimitry Andric
1673e8d8bef9SDimitry Andric// ASIMD table lookup, D-form
1674e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3], (instregex "^TBLv8i8One")>;
1675e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX1], (instregex "^TBLv8i8Two")>;
1676e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX2], (instregex "^TBLv8i8Three")>;
1677e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX3], (instregex "^TBLv8i8Four")>;
1678e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX1], (instregex "^TBXv8i8One")>;
1679e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX2], (instregex "^TBXv8i8Two")>;
1680e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX3], (instregex "^TBXv8i8Three")>;
1681e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX4], (instregex "^TBXv8i8Four")>;
1682e8d8bef9SDimitry Andric
1683e8d8bef9SDimitry Andric// ASIMD table lookup, Q-form
1684e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI3], (instregex "^TBLv16i8One")>;
1685e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX1], (instregex "^TBLv16i8Two")>;
1686e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX2], (instregex "^TBLv16i8Three")>;
1687e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX3], (instregex "^TBLv16i8Four")>;
1688e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX1], (instregex "^TBXv16i8One")>;
1689e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX2], (instregex "^TBXv16i8Two")>;
1690e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX3], (instregex "^TBXv16i8Three")>;
1691e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_TBX4], (instregex "^TBXv16i8Four")>;
1692e8d8bef9SDimitry Andric
1693e8d8bef9SDimitry Andric// ASIMD unzip/zip
1694e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0],
1695e8d8bef9SDimitry Andric            (instregex "^UZP1", "^UZP2", "^ZIP1", "^ZIP2")>;
1696e8d8bef9SDimitry Andric
1697e8d8bef9SDimitry Andric// ASIMD reciprocal estimate, D-form
1698e8d8bef9SDimitry Andric// ASIMD reciprocal estimate, Q-form
1699e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1700e8d8bef9SDimitry Andric            (instregex "^FRECPEv", "^FRECPXv", "^URECPEv",
1701e8d8bef9SDimitry Andric                       "^FRSQRTEv", "^URSQRTEv")>;
1702e8d8bef9SDimitry Andric
1703e8d8bef9SDimitry Andric// ASIMD reciprocal step, D-form, FZ
1704e8d8bef9SDimitry Andric// ASIMD reciprocal step, D-form, no FZ
1705e8d8bef9SDimitry Andric// ASIMD reciprocal step, Q-form, FZ
1706e8d8bef9SDimitry Andric// ASIMD reciprocal step, Q-form, no FZ
1707e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI0], (instregex "^FRECPSv", "^FRSQRTSv")>;
1708e8d8bef9SDimitry Andric
1709e8d8bef9SDimitry Andric// ASIMD reverse
1710e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
1711e8d8bef9SDimitry Andric            (instregex "^REV16v", "^REV32v", "^REV64v")>;
1712e8d8bef9SDimitry Andric
1713e8d8bef9SDimitry Andric// ASIMD table lookup, D-form
1714e8d8bef9SDimitry Andric// ASIMD table lookup, Q-form
1715e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0], (instregex "^TBLv", "^TBXv")>;
1716e8d8bef9SDimitry Andric
1717e8d8bef9SDimitry Andric// ASIMD transfer, element to word or word
1718e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SMOV], (instregex "^[SU]MOVv")>;
1719e8d8bef9SDimitry Andric
1720e8d8bef9SDimitry Andric// ASIMD transfer, element to gen reg
1721e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SMOV], (instregex "(S|U)MOVv.*")>;
1722e8d8bef9SDimitry Andric
1723e8d8bef9SDimitry Andric// ASIMD transfer gen reg to element
1724e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0], (instregex "^INSv")>;
1725e8d8bef9SDimitry Andric
1726e8d8bef9SDimitry Andric// ASIMD transpose
1727e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0], (instregex "^TRN1v", "^TRN2v",
1728e8d8bef9SDimitry Andric                                                 "^UZP1v", "^UZP2v")>;
1729e8d8bef9SDimitry Andric
1730e8d8bef9SDimitry Andric// ASIMD unzip/zip
1731e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0], (instregex "^ZIP1v", "^ZIP2v")>;
1732e8d8bef9SDimitry Andric
1733e8d8bef9SDimitry Andric//--
1734e8d8bef9SDimitry Andric// 3.15 ASIMD Load Instructions
1735e8d8bef9SDimitry Andric//--
1736e8d8bef9SDimitry Andric
1737e8d8bef9SDimitry Andric// ASIMD load, 1 element, multiple, 1 reg, D-form
1738e8d8bef9SDimitry Andric// ASIMD load, 1 element, multiple, 1 reg, Q-form
1739e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI56],
1740e8d8bef9SDimitry Andric            (instregex "^LD1Onev(8b|4h|2s|1d|2d)$")>;
1741e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_11Cyc_GI56],
1742e8d8bef9SDimitry Andric            (instregex "^LD1Onev(16b|8h|4s)$")>;
1743e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD108, WriteAdr],
1744e8d8bef9SDimitry Andric            (instregex "^LD1Onev(8b|4h|2s|1d|2d)_POST$")>;
1745e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD109, WriteAdr],
1746e8d8bef9SDimitry Andric            (instregex "^LD1Onev(16b|8h|4s)_POST$")>;
1747e8d8bef9SDimitry Andric
1748e8d8bef9SDimitry Andric// ASIMD load, 1 element, multiple, 2 reg, D-form
1749e8d8bef9SDimitry Andric// ASIMD load, 1 element, multiple, 2 reg, Q-form
1750e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD102],
1751e8d8bef9SDimitry Andric            (instregex "^LD1Twov(8b|4h|2s|1d|2d)$")>;
1752e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD103],
1753e8d8bef9SDimitry Andric            (instregex "^LD1Twov(16b|8h|4s)$")>;
1754e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD110, WriteAdr],
1755e8d8bef9SDimitry Andric            (instregex "^LD1Twov(8b|4h|2s|1d|2d)_POST$")>;
1756e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD111, WriteAdr],
1757e8d8bef9SDimitry Andric            (instregex "^LD1Twov(16b|8h|4s)_POST$")>;
1758e8d8bef9SDimitry Andric
1759e8d8bef9SDimitry Andric// ASIMD load, 1 element, multiple, 3 reg, D-form
1760e8d8bef9SDimitry Andric// ASIMD load, 1 element, multiple, 3 reg, Q-form
1761e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD104],
1762e8d8bef9SDimitry Andric            (instregex "^LD1Threev(8b|4h|2s|1d|2d)$")>;
1763e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD105],
1764e8d8bef9SDimitry Andric            (instregex "^LD1Threev(16b|8h|4s)$")>;
1765e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD112, WriteAdr],
1766e8d8bef9SDimitry Andric            (instregex "^LD1Threev(8b|4h|2s|1d|2d)_POST$")>;
1767e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD113, WriteAdr],
1768e8d8bef9SDimitry Andric            (instregex "^LD1Threev(16b|8h|4s)_POST$")>;
1769e8d8bef9SDimitry Andric
1770e8d8bef9SDimitry Andric// ASIMD load, 1 element, multiple, 4 reg, D-form
1771e8d8bef9SDimitry Andric// ASIMD load, 1 element, multiple, 4 reg, Q-form
1772e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD106],
1773e8d8bef9SDimitry Andric            (instregex "^LD1Fourv(8b|4h|2s|1d|2d)$")>;
1774e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD107],
1775e8d8bef9SDimitry Andric            (instregex "^LD1Fourv(16b|8h|4s)$")>;
1776e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD114, WriteAdr],
1777e8d8bef9SDimitry Andric            (instregex "^LD1Fourv(8b|4h|2s|1d|2d)_POST$")>;
1778e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD115, WriteAdr],
1779e8d8bef9SDimitry Andric            (instregex "^LD1Fourv(16b|8h|4s)_POST$")>;
1780e8d8bef9SDimitry Andric
1781e8d8bef9SDimitry Andric// ASIMD load, 1 element, one lane, B/H/S
1782e8d8bef9SDimitry Andric// ASIMD load, 1 element, one lane, D
1783e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD1I0], (instregex "^LD1i(8|16|32|64)$")>;
1784e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD1I1, WriteAdr],
1785e8d8bef9SDimitry Andric            (instregex "^LD1i(8|16|32|64)_POST$")>;
1786e8d8bef9SDimitry Andric
1787e8d8bef9SDimitry Andric// ASIMD load, 1 element, all lanes, D-form, B/H/S
1788e8d8bef9SDimitry Andric// ASIMD load, 1 element, all lanes, D-form, D
1789e8d8bef9SDimitry Andric// ASIMD load, 1 element, all lanes, Q-form
1790e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_8Cyc_GI03],
1791e8d8bef9SDimitry Andric            (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1792e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD108, WriteAdr],
1793e8d8bef9SDimitry Andric            (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1794e8d8bef9SDimitry Andric
1795e8d8bef9SDimitry Andric// ASIMD load, 2 element, multiple, D-form, B/H/S
1796e8d8bef9SDimitry Andric// ASIMD load, 2 element, multiple, Q-form, D
1797e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD103],
1798e8d8bef9SDimitry Andric            (instregex "^LD2Twov(8b|4h|2s|16b|8h|4s|2d)$")>;
1799e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD111, WriteAdr],
1800e8d8bef9SDimitry Andric            (instregex "^LD2Twov(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1801e8d8bef9SDimitry Andric
1802e8d8bef9SDimitry Andric// ASIMD load, 2 element, one lane, B/H
1803e8d8bef9SDimitry Andric// ASIMD load, 2 element, one lane, S
1804e8d8bef9SDimitry Andric// ASIMD load, 2 element, one lane, D
1805e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD2I0], (instregex "^LD2i(8|16|32|64)$")>;
1806e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD2I1, WriteAdr],
1807e8d8bef9SDimitry Andric            (instregex "^LD2i(8|16|32|64)_POST$")>;
1808e8d8bef9SDimitry Andric
1809e8d8bef9SDimitry Andric// ASIMD load, 2 element, all lanes, D-form, B/H/S
1810e8d8bef9SDimitry Andric// ASIMD load, 2 element, all lanes, D-form, D
1811e8d8bef9SDimitry Andric// ASIMD load, 2 element, all lanes, Q-form
1812e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD102],
1813e8d8bef9SDimitry Andric            (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1814e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD110, WriteAdr],
1815e8d8bef9SDimitry Andric            (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1816e8d8bef9SDimitry Andric
1817e8d8bef9SDimitry Andric// ASIMD load, 3 element, multiple, D-form, B/H/S
1818e8d8bef9SDimitry Andric// ASIMD load, 3 element, multiple, Q-form, B/H/S
1819e8d8bef9SDimitry Andric// ASIMD load, 3 element, multiple, Q-form, D
1820e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD105],
1821e8d8bef9SDimitry Andric            (instregex "^LD3Threev(8b|4h|2s|16b|8h|4s|2d)$")>;
1822e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD113, WriteAdr],
1823e8d8bef9SDimitry Andric            (instregex "^LD3Threev(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1824e8d8bef9SDimitry Andric
1825e8d8bef9SDimitry Andric// ASIMD load, 3 element, one lone, B/H
1826e8d8bef9SDimitry Andric// ASIMD load, 3 element, one lane, S
1827e8d8bef9SDimitry Andric// ASIMD load, 3 element, one lane, D
1828e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD3I0], (instregex "^LD3i(8|16|32|64)$")>;
1829e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD3I1, WriteAdr],
1830e8d8bef9SDimitry Andric            (instregex "^LD3i(8|16|32|64)_POST$")>;
1831e8d8bef9SDimitry Andric
1832e8d8bef9SDimitry Andric// ASIMD load, 3 element, all lanes, D-form, B/H/S
1833e8d8bef9SDimitry Andric// ASIMD load, 3 element, all lanes, D-form, D
1834e8d8bef9SDimitry Andric// ASIMD load, 3 element, all lanes, Q-form, B/H/S
1835e8d8bef9SDimitry Andric// ASIMD load, 3 element, all lanes, Q-form, D
1836e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD104],
1837e8d8bef9SDimitry Andric            (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1838e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD112, WriteAdr],
1839e8d8bef9SDimitry Andric            (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1840e8d8bef9SDimitry Andric
1841e8d8bef9SDimitry Andric// ASIMD load, 4 element, multiple, D-form, B/H/S
1842e8d8bef9SDimitry Andric// ASIMD load, 4 element, multiple, Q-form, B/H/S
1843e8d8bef9SDimitry Andric// ASIMD load, 4 element, multiple, Q-form, D
1844e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD107],
1845e8d8bef9SDimitry Andric            (instregex "^LD4Fourv(8b|4h|2s|16b|8h|4s|2d)$")>;
1846e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD115, WriteAdr],
1847e8d8bef9SDimitry Andric            (instregex "^LD4Fourv(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1848e8d8bef9SDimitry Andric
1849e8d8bef9SDimitry Andric// ASIMD load, 4 element, one lane, B/H
1850e8d8bef9SDimitry Andric// ASIMD load, 4 element, one lane, S
1851e8d8bef9SDimitry Andric// ASIMD load, 4 element, one lane, D
1852e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD4I0], (instregex "^LD4i(8|16|32|64)$")>;
1853e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD4I1, WriteAdr],
1854e8d8bef9SDimitry Andric            (instregex "^LD4i(8|16|32|64)_POST$")>;
1855e8d8bef9SDimitry Andric
1856e8d8bef9SDimitry Andric// ASIMD load, 4 element, all lanes, D-form, B/H/S
1857e8d8bef9SDimitry Andric// ASIMD load, 4 element, all lanes, D-form, D
1858e8d8bef9SDimitry Andric// ASIMD load, 4 element, all lanes, Q-form, B/H/S
1859e8d8bef9SDimitry Andric// ASIMD load, 4 element, all lanes, Q-form, D
1860e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD106],
1861e8d8bef9SDimitry Andric            (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1862e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_LD114, WriteAdr],
1863e8d8bef9SDimitry Andric            (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1864e8d8bef9SDimitry Andric
1865e8d8bef9SDimitry Andric//--
1866e8d8bef9SDimitry Andric// 3.16 ASIMD Store Instructions
1867e8d8bef9SDimitry Andric//--
1868e8d8bef9SDimitry Andric
1869e8d8bef9SDimitry Andric// ASIMD store, 1 element, multiple, 1 reg, D-form
1870e8d8bef9SDimitry Andric// ASIMD store, 1 element, multiple, 1 reg, Q-form
1871e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST10],
1872e8d8bef9SDimitry Andric            (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1873e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST14, WriteAdr],
1874e8d8bef9SDimitry Andric            (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1875e8d8bef9SDimitry Andric
1876e8d8bef9SDimitry Andric// ASIMD store, 1 element, multiple, 2 reg, D-form
1877e8d8bef9SDimitry Andric// ASIMD store, 1 element, multiple, 2 reg, Q-form
1878e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST11],
1879e8d8bef9SDimitry Andric            (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1880e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST15, WriteAdr],
1881e8d8bef9SDimitry Andric            (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1882e8d8bef9SDimitry Andric
1883e8d8bef9SDimitry Andric// ASIMD store, 1 element, multiple, 3 reg, D-form
1884e8d8bef9SDimitry Andric// ASIMD store, 1 element, multiple, 3 reg, Q-form
1885e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST12],
1886e8d8bef9SDimitry Andric            (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1887e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST16, WriteAdr],
1888e8d8bef9SDimitry Andric            (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1889e8d8bef9SDimitry Andric
1890e8d8bef9SDimitry Andric// ASIMD store, 1 element, multiple, 4 reg, D-form
1891e8d8bef9SDimitry Andric// ASIMD store, 1 element, multiple, 4 reg, Q-form
1892e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST13],
1893e8d8bef9SDimitry Andric            (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1894e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST17, WriteAdr],
1895e8d8bef9SDimitry Andric            (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1896e8d8bef9SDimitry Andric
1897e8d8bef9SDimitry Andric// ASIMD store, 1 element, one lane, B/H/S
1898e8d8bef9SDimitry Andric// ASIMD store, 1 element, one lane, D
1899e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST10],
1900e8d8bef9SDimitry Andric            (instregex "^ST1i(8|16|32|64)$")>;
1901e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST14, WriteAdr],
1902e8d8bef9SDimitry Andric            (instregex "^ST1i(8|16|32|64)_POST$")>;
1903e8d8bef9SDimitry Andric
1904e8d8bef9SDimitry Andric// ASIMD store, 2 element, multiple, D-form, B/H/S
1905e8d8bef9SDimitry Andric// ASIMD store, 2 element, multiple, Q-form, B/H/S
1906e8d8bef9SDimitry Andric// ASIMD store, 2 element, multiple, Q-form, D
1907e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST11],
1908e8d8bef9SDimitry Andric            (instregex "^ST2Twov(8b|4h|2s|16b|8h|4s|2d)$")>;
1909e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST15, WriteAdr],
1910e8d8bef9SDimitry Andric            (instregex "^ST2Twov(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1911e8d8bef9SDimitry Andric
1912e8d8bef9SDimitry Andric// ASIMD store, 2 element, one lane, B/H/S
1913e8d8bef9SDimitry Andric// ASIMD store, 2 element, one lane, D
1914e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST11],
1915e8d8bef9SDimitry Andric            (instregex "^ST2i(8|16|32|64)$")>;
1916e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST15, WriteAdr],
1917e8d8bef9SDimitry Andric            (instregex "^ST2i(8|16|32|64)_POST$")>;
1918e8d8bef9SDimitry Andric
1919e8d8bef9SDimitry Andric// ASIMD store, 3 element, multiple, D-form, B/H/S
1920e8d8bef9SDimitry Andric// ASIMD store, 3 element, multiple, Q-form, B/H/S
1921e8d8bef9SDimitry Andric// ASIMD store, 3 element, multiple, Q-form, D
1922e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST12],
1923e8d8bef9SDimitry Andric            (instregex "^ST3Threev(8b|4h|2s|16b|8h|4s|2d)$")>;
1924e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST16, WriteAdr],
1925e8d8bef9SDimitry Andric            (instregex "^ST3Threev(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1926e8d8bef9SDimitry Andric
1927e8d8bef9SDimitry Andric// ASIMD store, 3 element, one lane, B/H
1928e8d8bef9SDimitry Andric// ASIMD store, 3 element, one lane, S
1929e8d8bef9SDimitry Andric// ASIMD store, 3 element, one lane, D
1930e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST12], (instregex "^ST3i(8|16|32|64)$")>;
1931e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST16, WriteAdr],
1932e8d8bef9SDimitry Andric            (instregex "^ST3i(8|16|32|64)_POST$")>;
1933e8d8bef9SDimitry Andric
1934e8d8bef9SDimitry Andric// ASIMD store, 4 element, multiple, D-form, B/H/S
1935e8d8bef9SDimitry Andric// ASIMD store, 4 element, multiple, Q-form, B/H/S
1936e8d8bef9SDimitry Andric// ASIMD store, 4 element, multiple, Q-form, D
1937e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST13],
1938e8d8bef9SDimitry Andric            (instregex "^ST4Fourv(8b|4h|2s|16b|8h|4s|2d)$")>;
1939e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST17, WriteAdr],
1940e8d8bef9SDimitry Andric            (instregex "^ST4Fourv(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1941e8d8bef9SDimitry Andric
1942e8d8bef9SDimitry Andric// ASIMD store, 4 element, one lane, B/H
1943e8d8bef9SDimitry Andric// ASIMD store, 4 element, one lane, S
1944e8d8bef9SDimitry Andric// ASIMD store, 4 element, one lane, D
1945e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST13], (instregex "^ST4i(8|16|32|64)$")>;
1946e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_ST17, WriteAdr],
1947e8d8bef9SDimitry Andric            (instregex "^ST4i(8|16|32|64)_POST$")>;
1948e8d8bef9SDimitry Andric
1949e8d8bef9SDimitry Andric// V8.1a Atomics (LSE)
1950e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_CAS, WriteAtomic],
1951e8d8bef9SDimitry Andric            (instrs CASB, CASH, CASW, CASX)>;
1952e8d8bef9SDimitry Andric
1953e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_CAS, WriteAtomic],
1954e8d8bef9SDimitry Andric            (instrs CASAB, CASAH, CASAW, CASAX)>;
1955e8d8bef9SDimitry Andric
1956e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_CAS, WriteAtomic],
1957e8d8bef9SDimitry Andric            (instrs CASLB, CASLH, CASLW, CASLX)>;
1958e8d8bef9SDimitry Andric
1959e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_CAS, WriteAtomic],
1960e8d8bef9SDimitry Andric            (instrs CASALB, CASALH, CASALW, CASALX)>;
1961e8d8bef9SDimitry Andric
1962e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1963e8d8bef9SDimitry Andric            (instrs LDLARB, LDLARH, LDLARW, LDLARX)>;
1964e8d8bef9SDimitry Andric
1965e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1966e8d8bef9SDimitry Andric            (instrs LDADDB, LDADDH, LDADDW, LDADDX)>;
1967e8d8bef9SDimitry Andric
1968e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1969e8d8bef9SDimitry Andric            (instrs LDADDAB, LDADDAH, LDADDAW, LDADDAX)>;
1970e8d8bef9SDimitry Andric
1971e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1972e8d8bef9SDimitry Andric            (instrs LDADDLB, LDADDLH, LDADDLW, LDADDLX)>;
1973e8d8bef9SDimitry Andric
1974e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1975e8d8bef9SDimitry Andric            (instrs LDADDALB, LDADDALH, LDADDALW, LDADDALX)>;
1976e8d8bef9SDimitry Andric
1977e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1978e8d8bef9SDimitry Andric            (instrs LDCLRB, LDCLRH, LDCLRW, LDCLRX)>;
1979e8d8bef9SDimitry Andric
1980e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1981e8d8bef9SDimitry Andric            (instrs LDCLRAB, LDCLRAH, LDCLRAW, LDCLRAX)>;
1982e8d8bef9SDimitry Andric
1983e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1984e8d8bef9SDimitry Andric            (instrs LDCLRLB, LDCLRLH, LDCLRLW, LDCLRLX)>;
1985e8d8bef9SDimitry Andric
1986e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1987e8d8bef9SDimitry Andric            (instrs LDCLRALB, LDCLRALH, LDCLRALW, LDCLRALX)>;
1988e8d8bef9SDimitry Andric
1989e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1990e8d8bef9SDimitry Andric            (instrs LDEORB, LDEORH, LDEORW, LDEORX)>;
1991e8d8bef9SDimitry Andric
1992e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1993e8d8bef9SDimitry Andric            (instrs LDEORAB, LDEORAH, LDEORAW, LDEORAX)>;
1994e8d8bef9SDimitry Andric
1995e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1996e8d8bef9SDimitry Andric            (instrs LDEORLB, LDEORLH, LDEORLW, LDEORLX)>;
1997e8d8bef9SDimitry Andric
1998e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
1999e8d8bef9SDimitry Andric            (instrs LDEORALB, LDEORALH, LDEORALW, LDEORALX)>;
2000e8d8bef9SDimitry Andric
2001e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
2002e8d8bef9SDimitry Andric            (instrs LDSETB, LDSETH, LDSETW, LDSETX)>;
2003e8d8bef9SDimitry Andric
2004e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
2005e8d8bef9SDimitry Andric            (instrs LDSETAB, LDSETAH, LDSETAW, LDSETAX)>;
2006e8d8bef9SDimitry Andric
2007e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
2008e8d8bef9SDimitry Andric            (instrs LDSETLB, LDSETLH, LDSETLW, LDSETLX)>;
2009e8d8bef9SDimitry Andric
2010e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
2011e8d8bef9SDimitry Andric            (instrs LDSETALB, LDSETALH, LDSETALW, LDSETALX)>;
2012e8d8bef9SDimitry Andric
2013e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
2014e8d8bef9SDimitry Andric            (instrs LDSMAXB, LDSMAXH, LDSMAXW, LDSMAXX,
2015e8d8bef9SDimitry Andric             LDSMAXAB, LDSMAXAH, LDSMAXAW, LDSMAXAX,
2016e8d8bef9SDimitry Andric             LDSMAXLB, LDSMAXLH, LDSMAXLW, LDSMAXLX,
2017e8d8bef9SDimitry Andric             LDSMAXALB, LDSMAXALH, LDSMAXALW, LDSMAXALX)>;
2018e8d8bef9SDimitry Andric
2019e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
2020e8d8bef9SDimitry Andric            (instrs LDSMINB, LDSMINH, LDSMINW, LDSMINX,
2021e8d8bef9SDimitry Andric             LDSMINAB, LDSMINAH, LDSMINAW, LDSMINAX,
2022e8d8bef9SDimitry Andric             LDSMINLB, LDSMINLH, LDSMINLW, LDSMINLX,
2023e8d8bef9SDimitry Andric             LDSMINALB, LDSMINALH, LDSMINALW, LDSMINALX)>;
2024e8d8bef9SDimitry Andric
2025e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
2026e8d8bef9SDimitry Andric            (instrs LDUMAXB, LDUMAXH, LDUMAXW, LDUMAXX,
2027e8d8bef9SDimitry Andric             LDUMAXAB, LDUMAXAH, LDUMAXAW, LDUMAXAX,
2028e8d8bef9SDimitry Andric             LDUMAXLB, LDUMAXLH, LDUMAXLW, LDUMAXLX,
2029e8d8bef9SDimitry Andric             LDUMAXALB, LDUMAXALH, LDUMAXALW, LDUMAXALX)>;
2030e8d8bef9SDimitry Andric
2031e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_5Cyc_GI5, WriteAtomic],
2032e8d8bef9SDimitry Andric            (instrs LDUMINB, LDUMINH, LDUMINW, LDUMINX,
2033e8d8bef9SDimitry Andric             LDUMINAB, LDUMINAH, LDUMINAW, LDUMINAX,
2034e8d8bef9SDimitry Andric             LDUMINLB, LDUMINLH, LDUMINLW, LDUMINLX,
2035e8d8bef9SDimitry Andric             LDUMINALB, LDUMINALH, LDUMINALW, LDUMINALX)>;
2036e8d8bef9SDimitry Andric
2037e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SWP, WriteAtomic],
2038e8d8bef9SDimitry Andric            (instrs SWPB, SWPH, SWPW, SWPX)>;
2039e8d8bef9SDimitry Andric
2040e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SWP, WriteAtomic],
2041e8d8bef9SDimitry Andric            (instrs SWPAB, SWPAH, SWPAW, SWPAX)>;
2042e8d8bef9SDimitry Andric
2043e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SWP, WriteAtomic],
2044e8d8bef9SDimitry Andric            (instrs SWPLB, SWPLH, SWPLW, SWPLX)>;
2045e8d8bef9SDimitry Andric
2046e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_SWP, WriteAtomic],
2047e8d8bef9SDimitry Andric            (instrs SWPALB, SWPALH, SWPALW, SWPALX)>;
2048e8d8bef9SDimitry Andric
2049e8d8bef9SDimitry Andricdef : InstRW<[A64FXWrite_STUR, WriteAtomic],
2050e8d8bef9SDimitry Andric            (instrs STLLRB, STLLRH, STLLRW, STLLRX)>;
2051e8d8bef9SDimitry Andric
2052bdd1243dSDimitry Andric// SVE instructions
2053e8d8bef9SDimitry Andric
2054bdd1243dSDimitry Andric// The modeling method for SVE instructions is more accurate than others.
2055bdd1243dSDimitry Andric// TODO: modify the model of other instructions similarly.
2056e8d8bef9SDimitry Andric
2057bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI0],
2058bdd1243dSDimitry Andric            (instregex "^AND_ZI", "^CL[SZ]_Z", "^CPY_ZP[mz]I", "^DUP_ZZ?I", "^DUPM_Z",
2059bdd1243dSDimitry Andric                       "^EOR_ZI", "^ORR_ZI", "^FCM(EQ|GT|GE|LT|LE|NE|UO)_P",
2060bdd1243dSDimitry Andric                       "^FCPY_Z", "^F(MAX|MIN).*I_", "^NEG_Z", "^[SU](MAX|MIN)_ZI",
2061bdd1243dSDimitry Andric                       "^SUBR?_ZI")>;
2062e8d8bef9SDimitry Andric
2063bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_6Cyc_GI0],
2064bdd1243dSDimitry Andric            (instregex "^CLAST[AB]_[VZ]", "^COMPACT_Z", "^CPY_ZPmV", "^DUP_ZR",
2065bdd1243dSDimitry Andric                       "^EXT_Z", "^FDUP_Z", "^INSR_ZV", "^LAST[AB]_V", "^REV_Z",
2066bdd1243dSDimitry Andric                       "^SPLICE_Z", "^[SU]UNPK(HI|LO)_Z", "^TBL_Z", "^TRN[12]_Z")>;
2067e8d8bef9SDimitry Andric
2068bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI0],
2069bdd1243dSDimitry Andric            (instregex "^F(ADD|SUBR?)_.*I_", "^FRECPS_Z", "^FRSQRTS_Z",
2070bdd1243dSDimitry Andric                       "^INDEX_II_[SD]", "^MUL_ZI")>;
2071e8d8bef9SDimitry Andric
2072bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI3],
2073bdd1243dSDimitry Andric            (instregex "^CNT_Z")>;
2074e8d8bef9SDimitry Andric
2075bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_4Cyc_GI03],
2076bdd1243dSDimitry Andric            (instregex "^ABS_Z", "^ADD_Z", "^AND_Z[^I]", "^ASRR?_(WIDE_)?Z",
2077bdd1243dSDimitry Andric                       "^BIC_Z", "^ADR_[SU]XTW_Z", "^CNOT_Z", "^DEC[BHWD]_Z",
2078bdd1243dSDimitry Andric                       "^EOR_Z[^I]", "^INC[BHWD]_Z", "^ORR_Z[^I]", "^FABS_Z",
2079bdd1243dSDimitry Andric                       "^FACG[ET]_P", "^FEXPA_Z", "^F(MAX|MIN)[^V]*Z_",
2080bdd1243dSDimitry Andric                       "^FNEG_Z", "^FRECP[EX]_Z", "^FRSQRTE_Z", "^FTSSEL_Z",
2081bdd1243dSDimitry Andric                       "^LS[LR]R?(_WIDE)?_Z", "^NOT_Z", "^RBIT_Z", "^REV[BHW]_Z", "^SABD_Z",
2082bdd1243dSDimitry Andric                       "^SEL_Z", "^[SU](MAX|MIN)_ZP", "^[SU]Q(INC|DEC)[^P]_Z",
2083bdd1243dSDimitry Andric                       "^SUBR?_Z[^I]", "^[SU]XT._Z", "^UABD_Z")>;
2084e8d8bef9SDimitry Andric
2085bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_9Cyc_GI03      ],
2086bdd1243dSDimitry Andric            (instregex "^FABD_Z", "^F(ADD|SUBR?)_.*Z_", "^FN?(MAD|MLA|MLS|MSB)_ZP",
2087bdd1243dSDimitry Andric                       "^FMUL_(ZP|ZZZ_)", "^FMULX_Z", "^FCVT(ZS|ZU)?_Z",
2088bdd1243dSDimitry Andric                       "^FRINT._Z", "^FSCALE_Z", "^FTMAD_Z", "^FTSMUL_Z",
2089bdd1243dSDimitry Andric                       "^MAD_Z", "^MLA_Z", "^MLS_Z", "^MSB_Z", "^MUL_ZP",
2090bdd1243dSDimitry Andric                       "^[SU]CVTF_Z", "^[SU]DOT_ZZZ_", "^[SU]MULH_Z")>;
2091e8d8bef9SDimitry Andric
2092bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_3Cyc_GI1],
2093bdd1243dSDimitry Andric            (instregex "^ANDS?_P", "^BICS?_P", "^BRK.*_P", "^EORS?_P", "^ORRS?_P",
2094bdd1243dSDimitry Andric                       "^NANDS?_P", "^NORS?_P", "^ORNS?_P", "^PFALSE", "^PNEXT",
2095bdd1243dSDimitry Andric                       "^PFIRST", "^PTEST", "^PTRUES?", "^PUNPK(HI|LO)",
2096bdd1243dSDimitry Andric                       "^RDFFRS?", "^REV_P", "^SEL_P", "^TRN[12]_P")>;
2097e8d8bef9SDimitry Andric
2098bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_1Cyc_GI24],
2099bdd1243dSDimitry Andric            (instregex "^ADD[PV]L", "^CNT[BHWD]_X", "^DEC[BHWD]_X", "^INC[BHWD]_X",
2100bdd1243dSDimitry Andric                       "^RDVLI")>;
2101e8d8bef9SDimitry Andric
2102bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_11Cyc_GI5],
2103bdd1243dSDimitry Andric            (instregex "^LDR_[PZ]XI")>;
2104e8d8bef9SDimitry Andric
2105bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_11Cyc_GI56],
2106bdd1243dSDimitry Andric            (instregex "^LD(NF|FF|NT)?1R?S?[BHSWDQ]")>;
2107e8d8bef9SDimitry Andric
2108bdd1243dSDimitry Andricdef A64FXWrite_None : SchedWriteRes<[]> {
2109bdd1243dSDimitry Andric}
2110bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_None], (instregex "^SETFFR", "^MOVPRFX")>;
2111e8d8bef9SDimitry Andric
2112bdd1243dSDimitry Andricdef A64FXWrite_FMAIndexed : SchedWriteRes<[A64FXGI03]> {
2113bdd1243dSDimitry Andric  let Latency = 15;
2114bdd1243dSDimitry Andric  let NumMicroOps = 2;
21155f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
2116bdd1243dSDimitry Andric}
2117bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FMAIndexed], (instregex "^F(MLA|MLS|MUL)_ZZZI")>;
2118e8d8bef9SDimitry Andric
2119bdd1243dSDimitry Andricdef A64FXWrite_ADR_LSL_Z : SchedWriteRes<[A64FXGI0]> {
2120bdd1243dSDimitry Andric  let Latency = 5;
2121bdd1243dSDimitry Andric  let NumMicroOps = 2;
21225f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
2123bdd1243dSDimitry Andric}
2124bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ADR_LSL_Z], (instregex "^ADR_LSL_Z")>;
2125e8d8bef9SDimitry Andric
2126bdd1243dSDimitry Andricdef A64FXWrite_ASRD : SchedWriteRes<[A64FXGI0, A64FXGI01]> {
2127bdd1243dSDimitry Andric  let Latency = 8;
2128bdd1243dSDimitry Andric  let NumMicroOps = 2;
2129bdd1243dSDimitry Andric}
2130bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ASRD], (instregex "^ASRD_Z")>;
2131e8d8bef9SDimitry Andric
2132bdd1243dSDimitry Andricdef A64FXWrite_Reduction4CycB : SchedWriteRes<[A64FXGI03]> {
2133bdd1243dSDimitry Andric  let Latency = 46;
2134bdd1243dSDimitry Andric  let NumMicroOps = 10;
21355f757f3fSDimitry Andric  let ReleaseAtCycles = [10];
2136bdd1243dSDimitry Andric}
2137bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_Reduction4CycB],
2138bdd1243dSDimitry Andric      (instregex "^(AND|EOR|OR|SADD|SMAX|SMIN|UADD|UMAX|UMIN)V_VPZ_B")>;
2139e8d8bef9SDimitry Andric
2140bdd1243dSDimitry Andricdef A64FXWrite_Reduction4CycH : SchedWriteRes<[A64FXGI03]> {
2141bdd1243dSDimitry Andric  let Latency = 42;
2142bdd1243dSDimitry Andric  let NumMicroOps = 9;
21435f757f3fSDimitry Andric  let ReleaseAtCycles = [9];
2144bdd1243dSDimitry Andric}
2145bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_Reduction4CycH],
2146bdd1243dSDimitry Andric      (instregex "^(AND|EOR|OR|SADD|SMAX|SMIN|UADD|UMAX|UMIN)V_VPZ_H")>;
2147e8d8bef9SDimitry Andric
2148bdd1243dSDimitry Andricdef A64FXWrite_Reduction4CycS : SchedWriteRes<[A64FXGI03]> {
2149bdd1243dSDimitry Andric  let Latency = 38;
2150bdd1243dSDimitry Andric  let NumMicroOps = 8;
21515f757f3fSDimitry Andric  let ReleaseAtCycles = [8];
2152bdd1243dSDimitry Andric}
2153bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_Reduction4CycS],
2154bdd1243dSDimitry Andric      (instregex "^(AND|EOR|OR|SADD|SMAX|SMIN|UADD|UMAX|UMIN)V_VPZ_S")>;
2155e8d8bef9SDimitry Andric
2156bdd1243dSDimitry Andricdef A64FXWrite_Reduction4CycD : SchedWriteRes<[A64FXGI03]> {
2157bdd1243dSDimitry Andric  let Latency = 34;
2158bdd1243dSDimitry Andric  let NumMicroOps = 7;
21595f757f3fSDimitry Andric  let ReleaseAtCycles = [7];
2160bdd1243dSDimitry Andric}
2161bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_Reduction4CycD],
2162bdd1243dSDimitry Andric      (instregex "^(AND|EOR|OR|SADD|SMAX|SMIN|UADD|UMAX|UMIN)V_VPZ_D")>;
2163e8d8bef9SDimitry Andric
2164bdd1243dSDimitry Andricdef A64FXWrite_CLAST_R : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2165bdd1243dSDimitry Andric  let Latency = 29;
2166bdd1243dSDimitry Andric}
2167bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_CLAST_R], (instregex "^CLAST[AB]_R")>;
2168e8d8bef9SDimitry Andric
2169bdd1243dSDimitry Andricdef A64FXWrite_CMP : SchedWriteRes<[A64FXGI0, A64FXGI1]> {
2170bdd1243dSDimitry Andric  let Latency = 4;
2171bdd1243dSDimitry Andric}
2172bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_CMP], (instregex "^CMP.*_P")>;
2173e8d8bef9SDimitry Andric
2174bdd1243dSDimitry Andricdef A64FXWrite_CNTP : SchedWriteRes<[A64FXGI1, A64FXGI2]> {
2175bdd1243dSDimitry Andric  let Latency = 6;
2176bdd1243dSDimitry Andric}
2177bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_CNTP], (instregex "^CNTP_X")>;
2178e8d8bef9SDimitry Andric
2179bdd1243dSDimitry Andricdef A64FXWrite_CPYScalar : SchedWriteRes<[A64FXGI0, A64FXGI2]> {
2180bdd1243dSDimitry Andric  let Latency = 8;
2181bdd1243dSDimitry Andric}
2182bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_CPYScalar], (instregex "^CPY_ZPmR")>;
2183e8d8bef9SDimitry Andric
2184bdd1243dSDimitry Andricdef A64FXWrite_CTERM : SchedWriteRes<[A64FXGI24]> {
2185bdd1243dSDimitry Andric  let Latency = 2;
21865f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
2187bdd1243dSDimitry Andric}
2188bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_CTERM], (instregex "^CTERM")>;
2189e8d8bef9SDimitry Andric
2190bdd1243dSDimitry Andricdef A64FXWrite_INCPScalar : SchedWriteRes<[A64FXGI1, A64FXGI2, A64FXGI4]> {
2191bdd1243dSDimitry Andric  let Latency = 7;
2192bdd1243dSDimitry Andric  let NumMicroOps = 2;
2193bdd1243dSDimitry Andric}
2194bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_INCPScalar], (instregex "^DECP_X", "^INCP_X")>;
2195e8d8bef9SDimitry Andric
2196bdd1243dSDimitry Andricdef A64FXWrite_INCPVector : SchedWriteRes<[A64FXGI0, A64FXGI1]> {
2197bdd1243dSDimitry Andric  let Latency = 12;
2198bdd1243dSDimitry Andric}
2199bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_INCPVector], (instregex "^DECP_Z", "^INCP_Z")>;
2200e8d8bef9SDimitry Andric
2201bdd1243dSDimitry Andricdef A64FXWrite_FADDVH : SchedWriteRes<[A64FXGI03]> {
2202bdd1243dSDimitry Andric  let Latency = 75;
2203bdd1243dSDimitry Andric  let NumMicroOps = 11;
22045f757f3fSDimitry Andric  let ReleaseAtCycles = [11];
2205bdd1243dSDimitry Andric}
2206bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FADDVH], (instrs FADDV_VPZ_H)>;
2207e8d8bef9SDimitry Andric
2208bdd1243dSDimitry Andricdef A64FXWrite_FADDVS : SchedWriteRes<[A64FXGI03]> {
2209bdd1243dSDimitry Andric  let Latency = 60;
2210bdd1243dSDimitry Andric  let NumMicroOps = 9;
22115f757f3fSDimitry Andric  let ReleaseAtCycles = [9];
2212bdd1243dSDimitry Andric}
2213bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FADDVS], (instrs FADDV_VPZ_S)>;
2214e8d8bef9SDimitry Andric
2215bdd1243dSDimitry Andricdef A64FXWrite_FADDVD : SchedWriteRes<[A64FXGI03]> {
2216bdd1243dSDimitry Andric  let Latency = 45;
2217bdd1243dSDimitry Andric  let NumMicroOps = 7;
22185f757f3fSDimitry Andric  let ReleaseAtCycles = [7];
2219bdd1243dSDimitry Andric}
2220bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FADDVD], (instrs FADDV_VPZ_D)>;
2221e8d8bef9SDimitry Andric
2222bdd1243dSDimitry Andricdef A64FXWrite_FADDAH : SchedWriteRes<[A64FXGI03]> {
2223bdd1243dSDimitry Andric  let Latency = 468;
2224bdd1243dSDimitry Andric  let NumMicroOps = 63;
22255f757f3fSDimitry Andric  let ReleaseAtCycles = [63];
2226bdd1243dSDimitry Andric}
2227bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FADDAH], (instrs FADDA_VPZ_H)>;
2228e8d8bef9SDimitry Andric
2229bdd1243dSDimitry Andricdef A64FXWrite_FADDAS : SchedWriteRes<[A64FXGI03]> {
2230bdd1243dSDimitry Andric  let Latency = 228;
2231bdd1243dSDimitry Andric  let NumMicroOps = 31;
22325f757f3fSDimitry Andric  let ReleaseAtCycles = [31];
2233bdd1243dSDimitry Andric}
2234bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FADDAS], (instrs FADDA_VPZ_S)>;
2235e8d8bef9SDimitry Andric
2236bdd1243dSDimitry Andricdef A64FXWrite_FADDAD : SchedWriteRes<[A64FXGI03]> {
2237bdd1243dSDimitry Andric  let Latency = 108;
2238bdd1243dSDimitry Andric  let NumMicroOps = 15;
22395f757f3fSDimitry Andric  let ReleaseAtCycles = [15];
2240bdd1243dSDimitry Andric}
2241bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FADDAD], (instrs FADDA_VPZ_D)>;
2242e8d8bef9SDimitry Andric
2243bdd1243dSDimitry Andricdef A64FXWrite_FCADDZ : SchedWriteRes<[A64FXGI0, A64FXGI3]> {
2244bdd1243dSDimitry Andric  let Latency = 15;
2245bdd1243dSDimitry Andric  let NumMicroOps = 2;
2246bdd1243dSDimitry Andric}
2247bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FCADDZ], (instregex "^FCADD_Z")>;
2248e8d8bef9SDimitry Andric
2249bdd1243dSDimitry Andricdef A64FXWrite_FCMLAZ : SchedWriteRes<[A64FXGI03]> {
2250bdd1243dSDimitry Andric  let Latency = 15;
2251bdd1243dSDimitry Andric  let NumMicroOps = 3;
22525f757f3fSDimitry Andric  let ReleaseAtCycles = [3];
2253bdd1243dSDimitry Andric}
2254bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FCMLAZ], (instregex "^FCMLA_Z")>;
2255e8d8bef9SDimitry Andric
2256bdd1243dSDimitry Andricdef A64FXWrite_FDIVH : SchedWriteRes<[A64FXGI0]> {
2257bdd1243dSDimitry Andric  let Latency = 134;
22585f757f3fSDimitry Andric  let ReleaseAtCycles = [134];
2259bdd1243dSDimitry Andric}
2260bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FDIVH], (instregex "^F(DIVR?|SQRT)_Z.*_H")>;
2261e8d8bef9SDimitry Andric
2262bdd1243dSDimitry Andricdef A64FXWrite_FDIVS : SchedWriteRes<[A64FXGI0]> {
2263bdd1243dSDimitry Andric  let Latency = 98;
22645f757f3fSDimitry Andric  let ReleaseAtCycles = [98];
2265bdd1243dSDimitry Andric}
2266bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FDIVS], (instregex "^F(DIVR?|SQRT)_Z.*_S")>;
2267e8d8bef9SDimitry Andric
2268bdd1243dSDimitry Andricdef A64FXWrite_FDIVD : SchedWriteRes<[A64FXGI0]> {
2269bdd1243dSDimitry Andric  let Latency = 154;
22705f757f3fSDimitry Andric  let ReleaseAtCycles = [154];
2271bdd1243dSDimitry Andric}
2272bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FDIVD], (instregex "^F(DIVR?|SQRT)_Z.*_D")>;
2273e8d8bef9SDimitry Andric
2274bdd1243dSDimitry Andricdef A64FXWrite_FMAXVH : SchedWriteRes<[A64FXGI03]> {
2275bdd1243dSDimitry Andric  let Latency = 54;
2276bdd1243dSDimitry Andric  let NumMicroOps = 11;
22775f757f3fSDimitry Andric  let ReleaseAtCycles = [11];
2278bdd1243dSDimitry Andric}
2279bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FMAXVH], (instregex "^F(MAX|MIN)(NM)?V_VPZ_H")>;
2280e8d8bef9SDimitry Andric
2281bdd1243dSDimitry Andricdef A64FXWrite_FMAXVS : SchedWriteRes<[A64FXGI03]> {
2282bdd1243dSDimitry Andric  let Latency = 44;
2283bdd1243dSDimitry Andric  let NumMicroOps = 9;
22845f757f3fSDimitry Andric  let ReleaseAtCycles = [9];
2285bdd1243dSDimitry Andric}
2286bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FMAXVS], (instregex "^F(MAX|MIN)(NM)?V_VPZ_S")>;
2287e8d8bef9SDimitry Andric
2288bdd1243dSDimitry Andricdef A64FXWrite_FMAXVD : SchedWriteRes<[A64FXGI03]> {
2289bdd1243dSDimitry Andric  let Latency = 34;
2290bdd1243dSDimitry Andric  let NumMicroOps = 7;
22915f757f3fSDimitry Andric  let ReleaseAtCycles = [7];
2292bdd1243dSDimitry Andric}
2293bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_FMAXVH], (instregex "^F(MAX|MIN)(NM)?V_VPZ_D")>;
2294e8d8bef9SDimitry Andric
2295bdd1243dSDimitry Andricdef A64FXWrite_INDEX_RI_BH : SchedWriteRes<[A64FXGI0, A64FXGI2]> {
2296bdd1243dSDimitry Andric  let Latency = 17;
2297bdd1243dSDimitry Andric  let NumMicroOps = 2;
22985f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 2];
2299bdd1243dSDimitry Andric}
2300bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_INDEX_RI_BH], (instregex "^INDEX_(RI|IR)_[BH]")>;
2301e8d8bef9SDimitry Andric
2302bdd1243dSDimitry Andricdef A64FXWrite_INDEX_RI_SD : SchedWriteRes<[A64FXGI0, A64FXGI2]> {
2303bdd1243dSDimitry Andric  let Latency = 13;
2304bdd1243dSDimitry Andric  let NumMicroOps = 1;
2305bdd1243dSDimitry Andric}
2306bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_INDEX_RI_SD], (instregex "^INDEX_(RI|IR)_[SD]")>;
2307e8d8bef9SDimitry Andric
2308bdd1243dSDimitry Andricdef A64FXWrite_INDEX_II_BH : SchedWriteRes<[A64FXGI0]> {
2309bdd1243dSDimitry Andric  let Latency = 13;
2310bdd1243dSDimitry Andric  let NumMicroOps = 2;
23115f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
2312bdd1243dSDimitry Andric}
2313bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_INDEX_II_BH], (instregex "^INDEX_II_[BH]")>;
2314e8d8bef9SDimitry Andric
2315bdd1243dSDimitry Andricdef A64FXWrite_INDEX_RR_BH : SchedWriteRes<[A64FXGI0, A64FXGI2, A64FXGI3]> {
2316bdd1243dSDimitry Andric  let Latency = 17;
2317bdd1243dSDimitry Andric  let NumMicroOps = 3;
23185f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 2, 1];
2319bdd1243dSDimitry Andric}
2320bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_INDEX_RR_BH], (instregex "^INDEX_RR_[BH]")>;
2321e8d8bef9SDimitry Andric
2322bdd1243dSDimitry Andricdef A64FXWrite_INDEX_RR_SD : SchedWriteRes<[A64FXGI0, A64FXGI2]> {
2323bdd1243dSDimitry Andric  let Latency = 17;
2324bdd1243dSDimitry Andric  let NumMicroOps = 2;
23255f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 1];
2326bdd1243dSDimitry Andric}
2327bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_INDEX_RR_SD], (instregex "^INDEX_RR_[SD]")>;
2328e8d8bef9SDimitry Andric
2329bdd1243dSDimitry Andricdef A64FXWrite_INSR_ZR : SchedWriteRes<[A64FXGI0, A64FXGI2]> {
2330bdd1243dSDimitry Andric  let Latency = 10;
2331bdd1243dSDimitry Andric}
2332bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_INSR_ZR], (instregex "^INSR_ZR")>;
2333e8d8bef9SDimitry Andric
2334bdd1243dSDimitry Andricdef A64FXWrite_LAST_R : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2335bdd1243dSDimitry Andric  let Latency = 25;
2336bdd1243dSDimitry Andric}
2337bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_CLAST_R], (instregex "^LAST[AB]_R")>;
2338e8d8bef9SDimitry Andric
2339bdd1243dSDimitry Andricdef A64FXWrite_GLD_S_ZI : SchedWriteRes<[A64FXGI0, A64FXGI5, A64FXGI6]> {
2340bdd1243dSDimitry Andric  let Latency = 19;
23415f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 4, 4];
2342bdd1243dSDimitry Andric}
2343bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_GLD_S_ZI],
2344bdd1243dSDimitry Andric      (instregex "^GLD(FF)?1W_IMM", "^GLD(FF)?1S?[BHW]_S_IMM")>;
2345e8d8bef9SDimitry Andric
2346bdd1243dSDimitry Andricdef A64FXWrite_GLD_D_ZI : SchedWriteRes<[A64FXGI0, A64FXGI5, A64FXGI6]> {
2347bdd1243dSDimitry Andric  let Latency = 16;
23485f757f3fSDimitry Andric  let ReleaseAtCycles = [1, 2, 2];
2349bdd1243dSDimitry Andric}
2350bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_GLD_D_ZI],
2351bdd1243dSDimitry Andric      (instregex "^GLD(FF)?1D_IMM", "^GLD(FF)?1S?[BHW]_D_IMM")>;
2352e8d8bef9SDimitry Andric
2353bdd1243dSDimitry Andricdef A64FXWrite_GLD_S_RZ : SchedWriteRes<[A64FXGI0, A64FXGI2, A64FXGI5, A64FXGI6]> {
2354bdd1243dSDimitry Andric  let Latency = 23;
23555f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 1, 4, 4];
2356bdd1243dSDimitry Andric}
2357bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_GLD_S_RZ],
2358bdd1243dSDimitry Andric      (instregex "^GLD(FF)?1W_[^DI]", "^GLD(FF)?1S?[BHW]_S_[^I]")>;
2359e8d8bef9SDimitry Andric
2360bdd1243dSDimitry Andricdef A64FXWrite_GLD_D_RZ : SchedWriteRes<[A64FXGI0, A64FXGI2, A64FXGI5, A64FXGI6]> {
2361bdd1243dSDimitry Andric  let Latency = 20;
23625f757f3fSDimitry Andric  let ReleaseAtCycles = [1, 1, 2, 2];
2363bdd1243dSDimitry Andric}
2364bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_GLD_D_RZ],
2365bdd1243dSDimitry Andric      (instregex "^GLD(FF)?1D_[^I]", "^GLD(FF)?1D$", "^GLD(FF)?1S?[BHW]_D_[^I]",
2366bdd1243dSDimitry Andric                 "^GLD(FF)?1S?[BHW]_D$")>;
2367e8d8bef9SDimitry Andric
2368bdd1243dSDimitry Andricdef A64FXWrite_LD2_BH : SchedWriteRes<[A64FXGI56]> {
2369bdd1243dSDimitry Andric  let Latency = 15;
2370bdd1243dSDimitry Andric  let NumMicroOps = 3;
23715f757f3fSDimitry Andric  let ReleaseAtCycles = [9];
2372bdd1243dSDimitry Andric}
2373bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD2_BH], (instregex "^LD2[BH]")>;
2374e8d8bef9SDimitry Andric
2375bdd1243dSDimitry Andricdef A64FXWrite_LD2_WD_IMM : SchedWriteRes<[A64FXGI56]> {
2376bdd1243dSDimitry Andric  let Latency = 11;
2377bdd1243dSDimitry Andric  let NumMicroOps = 2;
23785f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
2379bdd1243dSDimitry Andric}
2380bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD2_WD_IMM], (instregex "^LD2[WD]_IMM")>;
2381e8d8bef9SDimitry Andric
2382bdd1243dSDimitry Andricdef A64FXWrite_LD2_WD : SchedWriteRes<[A64FXGI56]> {
2383bdd1243dSDimitry Andric  let Latency = 12;
2384bdd1243dSDimitry Andric  let NumMicroOps = 3;
23855f757f3fSDimitry Andric  let ReleaseAtCycles = [3];
2386bdd1243dSDimitry Andric}
2387bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD2_WD], (instregex "^LD2[WD]$")>;
2388e8d8bef9SDimitry Andric
2389bdd1243dSDimitry Andricdef A64FXWrite_LD3_BH : SchedWriteRes<[A64FXGI56]> {
2390bdd1243dSDimitry Andric  let Latency = 15;
2391bdd1243dSDimitry Andric  let NumMicroOps = 4;
23925f757f3fSDimitry Andric  let ReleaseAtCycles = [13];
2393bdd1243dSDimitry Andric}
2394bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD3_BH], (instregex "^LD3[BH]")>;
2395e8d8bef9SDimitry Andric
2396bdd1243dSDimitry Andricdef A64FXWrite_LD3_WD_IMM : SchedWriteRes<[A64FXGI56]> {
2397bdd1243dSDimitry Andric  let Latency = 11;
2398bdd1243dSDimitry Andric  let NumMicroOps = 3;
23995f757f3fSDimitry Andric  let ReleaseAtCycles = [3];
2400bdd1243dSDimitry Andric}
2401bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD3_WD_IMM], (instregex "^LD3[WD]_IMM")>;
2402e8d8bef9SDimitry Andric
2403bdd1243dSDimitry Andricdef A64FXWrite_LD3_WD : SchedWriteRes<[A64FXGI56]> {
2404bdd1243dSDimitry Andric  let Latency = 12;
2405bdd1243dSDimitry Andric  let NumMicroOps = 4;
24065f757f3fSDimitry Andric  let ReleaseAtCycles = [4];
2407bdd1243dSDimitry Andric}
2408bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD3_WD], (instregex "^LD3[WD]$")>;
2409e8d8bef9SDimitry Andric
2410bdd1243dSDimitry Andricdef A64FXWrite_LD4_BH : SchedWriteRes<[A64FXGI56]> {
2411bdd1243dSDimitry Andric  let Latency = 15;
2412bdd1243dSDimitry Andric  let NumMicroOps = 5;
24135f757f3fSDimitry Andric  let ReleaseAtCycles = [17];
2414bdd1243dSDimitry Andric}
2415bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD4_BH], (instregex "^LD4[BH]")>;
2416e8d8bef9SDimitry Andric
2417bdd1243dSDimitry Andricdef A64FXWrite_LD4_WD_IMM : SchedWriteRes<[A64FXGI56]> {
2418bdd1243dSDimitry Andric  let Latency = 11;
2419bdd1243dSDimitry Andric  let NumMicroOps = 4;
24205f757f3fSDimitry Andric  let ReleaseAtCycles = [4];
2421bdd1243dSDimitry Andric}
2422bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD4_WD_IMM], (instregex "^LD4[WD]_IMM")>;
2423e8d8bef9SDimitry Andric
2424bdd1243dSDimitry Andricdef A64FXWrite_LD4_WD : SchedWriteRes<[A64FXGI56]> {
2425bdd1243dSDimitry Andric  let Latency = 12;
2426bdd1243dSDimitry Andric  let NumMicroOps = 5;
24275f757f3fSDimitry Andric  let ReleaseAtCycles = [5];
2428bdd1243dSDimitry Andric}
2429bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_LD4_WD], (instregex "^LD4[WD]$")>;
2430e8d8bef9SDimitry Andric
2431bdd1243dSDimitry Andricdef A64FXWrite_PRF : SchedWriteRes<[A64FXGI56]> {
2432bdd1243dSDimitry Andric}
2433bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_PRF], (instregex "^PRF._PR")>;
2434e8d8bef9SDimitry Andric
2435bdd1243dSDimitry Andricdef A64FXWrite_PRF_W_RZ : SchedWriteRes<[A64FXGI0, A64FXGI2, A64FXGI56]> {
24365f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 1, 4];
2437bdd1243dSDimitry Andric}
2438bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_PRF_W_RZ], (instregex "^PRF._S_[^P]")>;
2439e8d8bef9SDimitry Andric
2440bdd1243dSDimitry Andricdef A64FXWrite_PRF_W_ZI : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
24415f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 4];
2442bdd1243dSDimitry Andric}
2443bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_PRF_W_ZI], (instregex "^PRF._S_PZI")>;
2444e8d8bef9SDimitry Andric
2445bdd1243dSDimitry Andricdef A64FXWrite_PRF_D_RZ : SchedWriteRes<[A64FXGI0, A64FXGI2, A64FXGI56]> {
24465f757f3fSDimitry Andric  let ReleaseAtCycles = [1, 1, 2];
2447bdd1243dSDimitry Andric}
2448bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_PRF_D_RZ], (instregex "^PRF._D_[^P]")>;
2449e8d8bef9SDimitry Andric
2450bdd1243dSDimitry Andricdef A64FXWrite_PRF_D_ZI : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
24515f757f3fSDimitry Andric  let ReleaseAtCycles = [1, 2];
2452bdd1243dSDimitry Andric}
2453bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_PRF_D_ZI], (instregex "^PRF._D_PZI")>;
2454e8d8bef9SDimitry Andric
2455bdd1243dSDimitry Andricdef A64FXWrite_SDIV_S : SchedWriteRes<[A64FXGI0]> {
2456bdd1243dSDimitry Andric  let Latency = 114;
24575f757f3fSDimitry Andric  let ReleaseAtCycles = [114];
2458bdd1243dSDimitry Andric}
2459bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SDIV_S], (instregex "^[SU]DIVR?.*_S")>;
2460e8d8bef9SDimitry Andric
2461bdd1243dSDimitry Andricdef A64FXWrite_SDIV_D : SchedWriteRes<[A64FXGI0]> {
2462bdd1243dSDimitry Andric  let Latency = 178;
24635f757f3fSDimitry Andric  let ReleaseAtCycles = [178];
2464bdd1243dSDimitry Andric}
2465bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SDIV_D], (instregex "^[SU]DIVR?.*_D")>;
2466e8d8bef9SDimitry Andric
2467bdd1243dSDimitry Andricdef A64FXWrite_SDOT_I : SchedWriteRes<[A64FXGI0, A64FXGI3]> {
2468bdd1243dSDimitry Andric  let Latency = 15;
2469bdd1243dSDimitry Andric  let NumMicroOps = 2;
2470bdd1243dSDimitry Andric}
2471bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SDOT_I], (instregex "^[SU]DOT_ZZZI")>;
2472e8d8bef9SDimitry Andric
2473bdd1243dSDimitry Andricdef A64FXWrite_SQINC_Scalar : SchedWriteRes<[A64FXGI24]> {
2474bdd1243dSDimitry Andric  let Latency = 2;
24755f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
2476bdd1243dSDimitry Andric}
2477bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SQINC_Scalar], (instregex "^[SU]Q(INC|DEC)[BHWD]_[WX]")>;
2478e8d8bef9SDimitry Andric
2479bdd1243dSDimitry Andricdef A64FXWrite_SQINCP_X : SchedWriteRes<[A64FXGI24, A64FXGI3]> {
2480bdd1243dSDimitry Andric  let Latency = 6;
2481bdd1243dSDimitry Andric  let NumMicroOps = 2;
24825f757f3fSDimitry Andric  let ReleaseAtCycles = [3, 1];
2483bdd1243dSDimitry Andric}
2484bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SQINCP_X], (instregex "^[SU]Q(INC|DEC)P_[WX]")>;
2485e8d8bef9SDimitry Andric
2486bdd1243dSDimitry Andricdef A64FXWrite_SQINCP_Z : SchedWriteRes<[A64FXGI24, A64FXGI3]> {
2487bdd1243dSDimitry Andric  let Latency = 12;
2488bdd1243dSDimitry Andric}
2489bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SQINCP_Z], (instregex "^[SU]Q(INC|DEC)P_Z")>;
2490e8d8bef9SDimitry Andric
2491bdd1243dSDimitry Andricdef A64FXWrite_ST1 : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2492bdd1243dSDimitry Andric  let Latency = 11;
2493bdd1243dSDimitry Andric}
2494bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST1], (instregex "^ST(NT)?1[BHWD]")>;
2495e8d8bef9SDimitry Andric
2496bdd1243dSDimitry Andricdef A64FXWrite_SST1_W_RZ : SchedWriteRes<[A64FXGI0, A64FXGI2, A64FXGI5, A64FXGI6]> {
2497bdd1243dSDimitry Andric  let Latency = 20;
2498bdd1243dSDimitry Andric  let NumMicroOps = 8;
24995f757f3fSDimitry Andric  let ReleaseAtCycles = [8, 8, 8, 8];
2500bdd1243dSDimitry Andric}
2501bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SST1_W_RZ],
2502bdd1243dSDimitry Andric      (instregex "^SST1[BH]_S(_[^I]|$)", "^SST1W(_[^ID]|$)")>;
2503e8d8bef9SDimitry Andric
2504bdd1243dSDimitry Andricdef A64FXWrite_SST1_D_RZ : SchedWriteRes<[A64FXGI0, A64FXGI2, A64FXGI5, A64FXGI6]> {
2505bdd1243dSDimitry Andric  let Latency = 20;
2506bdd1243dSDimitry Andric  let NumMicroOps = 4;
25075f757f3fSDimitry Andric  let ReleaseAtCycles = [4, 4, 4, 4];
2508bdd1243dSDimitry Andric}
2509bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SST1_D_RZ],
2510bdd1243dSDimitry Andric      (instregex "^SST1[BHW]_D(_[^I]|$)", "^SST1D(_[^I]|$)")>;
2511e8d8bef9SDimitry Andric
2512bdd1243dSDimitry Andricdef A64FXWrite_SST1_W_ZI : SchedWriteRes<[A64FXGI0, A64FXGI5, A64FXGI6]> {
2513bdd1243dSDimitry Andric  let Latency = 16;
2514bdd1243dSDimitry Andric  let NumMicroOps = 8;
25155f757f3fSDimitry Andric  let ReleaseAtCycles = [12, 8, 8];
2516bdd1243dSDimitry Andric}
2517bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SST1_W_ZI],
2518bdd1243dSDimitry Andric      (instregex "^SST1[BH]_S_I", "^SST1W_I")>;
2519e8d8bef9SDimitry Andric
2520bdd1243dSDimitry Andricdef A64FXWrite_SST1_D_ZI : SchedWriteRes<[A64FXGI0, A64FXGI5, A64FXGI6]> {
2521bdd1243dSDimitry Andric  let Latency = 16;
2522bdd1243dSDimitry Andric  let NumMicroOps = 4;
25235f757f3fSDimitry Andric  let ReleaseAtCycles = [4, 4, 4];
2524bdd1243dSDimitry Andric}
2525bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_SST1_D_ZI],
2526bdd1243dSDimitry Andric      (instregex "^SST1[BHW]_D_I", "^SST1D_I")>;
2527e8d8bef9SDimitry Andric
2528bdd1243dSDimitry Andricdef A64FXWrite_ST2_BH : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2529bdd1243dSDimitry Andric  let Latency = 12;
2530bdd1243dSDimitry Andric  let NumMicroOps = 3;
25315f757f3fSDimitry Andric  let ReleaseAtCycles = [8, 9];
2532bdd1243dSDimitry Andric}
2533bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST2_BH], (instregex "^ST2[BH]")>;
2534e8d8bef9SDimitry Andric
2535bdd1243dSDimitry Andricdef A64FXWrite_ST2_WD_RI : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2536bdd1243dSDimitry Andric  let Latency = 11;
2537bdd1243dSDimitry Andric  let NumMicroOps = 2;
25385f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 2];
2539bdd1243dSDimitry Andric}
2540bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST2_WD_RI], (instregex "^ST2[WD]$")>;
2541e8d8bef9SDimitry Andric
2542bdd1243dSDimitry Andricdef A64FXWrite_ST2_WD_RR : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2543bdd1243dSDimitry Andric  let Latency = 12;
2544bdd1243dSDimitry Andric  let NumMicroOps = 3;
25455f757f3fSDimitry Andric  let ReleaseAtCycles = [2, 3];
2546bdd1243dSDimitry Andric}
2547bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST2_WD_RR], (instregex "^ST2[WD]_I")>;
2548e8d8bef9SDimitry Andric
2549bdd1243dSDimitry Andricdef A64FXWrite_ST3_BH : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2550bdd1243dSDimitry Andric  let Latency = 15;
2551bdd1243dSDimitry Andric  let NumMicroOps = 4;
25525f757f3fSDimitry Andric  let ReleaseAtCycles = [12, 13];
2553bdd1243dSDimitry Andric}
2554bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST3_BH], (instregex "^ST3[BH]")>;
2555e8d8bef9SDimitry Andric
2556bdd1243dSDimitry Andricdef A64FXWrite_ST3_WD_RI : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2557bdd1243dSDimitry Andric  let Latency = 11;
2558bdd1243dSDimitry Andric  let NumMicroOps = 3;
25595f757f3fSDimitry Andric  let ReleaseAtCycles = [3, 3];
2560bdd1243dSDimitry Andric}
2561bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST3_WD_RI], (instregex "^ST3[WD]$")>;
2562e8d8bef9SDimitry Andric
2563bdd1243dSDimitry Andricdef A64FXWrite_ST3_WD_RR : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2564bdd1243dSDimitry Andric  let Latency = 12;
2565bdd1243dSDimitry Andric  let NumMicroOps = 4;
25665f757f3fSDimitry Andric  let ReleaseAtCycles = [3, 4];
2567bdd1243dSDimitry Andric}
2568bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST3_WD_RR], (instregex "^ST3[WD]_I")>;
2569e8d8bef9SDimitry Andric
2570bdd1243dSDimitry Andricdef A64FXWrite_ST4_BH : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2571bdd1243dSDimitry Andric  let Latency = 15;
2572bdd1243dSDimitry Andric  let NumMicroOps = 5;
25735f757f3fSDimitry Andric  let ReleaseAtCycles = [16, 17];
2574bdd1243dSDimitry Andric}
2575bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST4_BH], (instregex "^ST4[BH]")>;
2576e8d8bef9SDimitry Andric
2577bdd1243dSDimitry Andricdef A64FXWrite_ST4_WD_RI : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2578bdd1243dSDimitry Andric  let Latency = 11;
2579bdd1243dSDimitry Andric  let NumMicroOps = 4;
25805f757f3fSDimitry Andric  let ReleaseAtCycles = [4, 4];
2581bdd1243dSDimitry Andric}
2582bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST4_WD_RI], (instregex "^ST4[WD]$")>;
2583e8d8bef9SDimitry Andric
2584bdd1243dSDimitry Andricdef A64FXWrite_ST4_WD_RR : SchedWriteRes<[A64FXGI0, A64FXGI56]> {
2585bdd1243dSDimitry Andric  let Latency = 12;
2586bdd1243dSDimitry Andric  let NumMicroOps = 5;
25875f757f3fSDimitry Andric  let ReleaseAtCycles = [4, 5];
2588bdd1243dSDimitry Andric}
2589bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_ST4_WD_RR], (instregex "^ST4[WD]_I")>;
2590e8d8bef9SDimitry Andric
2591bdd1243dSDimitry Andricdef A64FXWrite_STR_P : SchedWriteRes<[A64FXGI3, A64FXGI5]> {
2592bdd1243dSDimitry Andric  let Latency = 11;
2593bdd1243dSDimitry Andric}
2594bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_STR_P], (instrs STR_PXI)>;
2595e8d8bef9SDimitry Andric
2596bdd1243dSDimitry Andricdef A64FXWrite_STR_Z : SchedWriteRes<[A64FXGI0, A64FXGI5]> {
2597bdd1243dSDimitry Andric  let Latency = 11;
2598bdd1243dSDimitry Andric}
2599bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_STR_Z], (instrs STR_ZXI)>;
2600e8d8bef9SDimitry Andric
2601bdd1243dSDimitry Andricdef A64FXWrite_WHILE : SchedWriteRes<[A64FXGI3, A64FXGI5]> {
2602bdd1243dSDimitry Andric  let Latency = 4;
2603bdd1243dSDimitry Andric}
2604bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_WHILE], (instregex "^WHILEL._P")>;
2605e8d8bef9SDimitry Andric
2606bdd1243dSDimitry Andricdef A64FXWrite_WRFFR : SchedWriteRes<[A64FXGI3, A64FXGI5]> {
2607bdd1243dSDimitry Andric  let Latency = 3;
2608bdd1243dSDimitry Andric  let NumMicroOps = 2;
2609bdd1243dSDimitry Andric}
2610bdd1243dSDimitry Andricdef : InstRW<[A64FXWrite_WRFFR], (instrs WRFFR)>;
2611e8d8bef9SDimitry Andric
2612e8d8bef9SDimitry Andric} // SchedModel = A64FXModel
2613