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