xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td (revision e837bb5cfb2b3a734feb1fbe20b25dbe6d550a3c)
10b57cec5SDimitry Andric//=- AArch64SchedExynosM4.td - Samsung Exynos M4 Sched Defs --*- tablegen -*-=//
20b57cec5SDimitry Andric//
30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric//
70b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric//
90b57cec5SDimitry Andric// This file defines the machine model for the Samsung Exynos M4 to support
100b57cec5SDimitry Andric// instruction scheduling and other instruction cost heuristics.
110b57cec5SDimitry Andric//
120b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
130b57cec5SDimitry Andric
140b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
150b57cec5SDimitry Andric// The Exynos-M4 is an advanced superscalar microprocessor with a 6-wide
160b57cec5SDimitry Andric// in-order stage for decode and dispatch and a wider issue stage.
170b57cec5SDimitry Andric// The execution units and loads and stores are out-of-order.
180b57cec5SDimitry Andric
190b57cec5SDimitry Andricdef ExynosM4Model : SchedMachineModel {
200b57cec5SDimitry Andric  let IssueWidth            =   6; // Up to 6 uops per cycle.
210b57cec5SDimitry Andric  let MicroOpBufferSize     = 228; // ROB size.
220b57cec5SDimitry Andric  let LoopMicroOpBufferSize =  48; // Based on the instruction queue size.
230b57cec5SDimitry Andric  let LoadLatency           =   4; // Optimistic load cases.
240b57cec5SDimitry Andric  let MispredictPenalty     =  16; // Minimum branch misprediction penalty.
250b57cec5SDimitry Andric  let CompleteModel         =   1; // Use the default model otherwise.
260b57cec5SDimitry Andric
27*e837bb5cSDimitry Andric  list<Predicate> UnsupportedFeatures = !listconcat(SVEUnsupported.F,
28*e837bb5cSDimitry Andric                                                    PAUnsupported.F);
290b57cec5SDimitry Andric}
300b57cec5SDimitry Andric
310b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
320b57cec5SDimitry Andric// Define each kind of processor resource and number available on the Exynos-M4.
330b57cec5SDimitry Andric
340b57cec5SDimitry Andriclet SchedModel = ExynosM4Model in {
350b57cec5SDimitry Andric
360b57cec5SDimitry Andricdef M4UnitA  : ProcResource<2>; // Simple integer
370b57cec5SDimitry Andricdef M4UnitC  : ProcResource<2>; // Simple and complex integer
380b57cec5SDimitry Andriclet Super =  M4UnitC, BufferSize = 1 in
390b57cec5SDimitry Andricdef M4UnitD  : ProcResource<1>; // Integer division (inside C0, serialized)
400b57cec5SDimitry Andriclet Super =  M4UnitC in
410b57cec5SDimitry Andricdef M4UnitE  : ProcResource<1>; // CRC (inside C0)
420b57cec5SDimitry Andricdef M4UnitB  : ProcResource<2>; // Branch
430b57cec5SDimitry Andricdef M4UnitL0 : ProcResource<1>; // Load
440b57cec5SDimitry Andricdef M4UnitS0 : ProcResource<1>; // Store
450b57cec5SDimitry Andricdef M4PipeLS : ProcResource<1>; // Load/Store
460b57cec5SDimitry Andriclet Super = M4PipeLS in {
470b57cec5SDimitry Andric  def M4UnitL1 : ProcResource<1>;
480b57cec5SDimitry Andric  def M4UnitS1 : ProcResource<1>;
490b57cec5SDimitry Andric}
500b57cec5SDimitry Andricdef M4PipeF0 : ProcResource<1>; // FP #0
510b57cec5SDimitry Andriclet Super = M4PipeF0 in {
520b57cec5SDimitry Andric  def M4UnitFMAC0 : ProcResource<1>; // FP multiplication
530b57cec5SDimitry Andric  def M4UnitFADD0 : ProcResource<1>; // Simple FP
540b57cec5SDimitry Andric  def M4UnitFCVT0 : ProcResource<1>; // FP conversion
550b57cec5SDimitry Andric  def M4UnitNALU0 : ProcResource<1>; // Simple vector
560b57cec5SDimitry Andric  def M4UnitNHAD  : ProcResource<1>; // Horizontal vector
570b57cec5SDimitry Andric  def M4UnitNMSC  : ProcResource<1>; // FP and vector miscellanea
580b57cec5SDimitry Andric  def M4UnitNMUL0 : ProcResource<1>; // Vector multiplication
590b57cec5SDimitry Andric  def M4UnitNSHT0 : ProcResource<1>; // Vector shifting
600b57cec5SDimitry Andric  def M4UnitNSHF0 : ProcResource<1>; // Vector shuffling
610b57cec5SDimitry Andric  def M4UnitNCRY0 : ProcResource<1>; // Cryptographic
620b57cec5SDimitry Andric}
630b57cec5SDimitry Andricdef M4PipeF1 : ProcResource<1>; // FP #1
640b57cec5SDimitry Andriclet Super = M4PipeF1 in {
650b57cec5SDimitry Andric  def M4UnitFMAC1 : ProcResource<1>; // FP multiplication
660b57cec5SDimitry Andric  def M4UnitFADD1 : ProcResource<1>; // Simple FP
670b57cec5SDimitry Andric  def M4UnitFDIV0 : ProcResource<2>; // FP division (serialized)
680b57cec5SDimitry Andric  def M4UnitFSQR0 : ProcResource<2>; // FP square root (serialized)
690b57cec5SDimitry Andric  def M4UnitFST0  : ProcResource<1>; // FP store
700b57cec5SDimitry Andric  def M4UnitNALU1 : ProcResource<1>; // Simple vector
710b57cec5SDimitry Andric  def M4UnitNSHT1 : ProcResource<1>; // Vector shifting
720b57cec5SDimitry Andric  def M4UnitNSHF1 : ProcResource<1>; // Vector shuffling
730b57cec5SDimitry Andric}
740b57cec5SDimitry Andricdef M4PipeF2 : ProcResource<1>; // FP #2
750b57cec5SDimitry Andriclet Super = M4PipeF2 in {
760b57cec5SDimitry Andric  def M4UnitFMAC2 : ProcResource<1>; // FP multiplication
770b57cec5SDimitry Andric  def M4UnitFADD2 : ProcResource<1>; // Simple FP
780b57cec5SDimitry Andric  def M4UnitFCVT1 : ProcResource<1>; // FP conversion
790b57cec5SDimitry Andric  def M4UnitFDIV1 : ProcResource<2>; // FP division (serialized)
800b57cec5SDimitry Andric  def M4UnitFSQR1 : ProcResource<2>; // FP square root (serialized)
810b57cec5SDimitry Andric  def M4UnitFST1  : ProcResource<1>; // FP store
820b57cec5SDimitry Andric  def M4UnitNALU2 : ProcResource<1>; // Simple vector
830b57cec5SDimitry Andric  def M4UnitNMUL1 : ProcResource<1>; // Vector multiplication
840b57cec5SDimitry Andric  def M4UnitNSHT2 : ProcResource<1>; // Vector shifting
850b57cec5SDimitry Andric  def M4UnitNCRY1 : ProcResource<1>; // Cryptographic
860b57cec5SDimitry Andric}
870b57cec5SDimitry Andric
880b57cec5SDimitry Andricdef M4UnitALU   : ProcResGroup<[M4UnitA,
890b57cec5SDimitry Andric                                M4UnitC]>;
900b57cec5SDimitry Andricdef M4UnitL     : ProcResGroup<[M4UnitL0,
910b57cec5SDimitry Andric                                M4UnitL1]>;
920b57cec5SDimitry Andricdef M4UnitS     : ProcResGroup<[M4UnitS0,
930b57cec5SDimitry Andric                                M4UnitS1]>;
940b57cec5SDimitry Andricdef M4UnitFMAC  : ProcResGroup<[M4UnitFMAC0,
950b57cec5SDimitry Andric                                M4UnitFMAC1,
960b57cec5SDimitry Andric                                M4UnitFMAC2]>;
970b57cec5SDimitry Andricdef M4UnitFMACH : ProcResGroup<[M4UnitFMAC0,
980b57cec5SDimitry Andric                                M4UnitFMAC1]>;
990b57cec5SDimitry Andricdef M4UnitFADD  : ProcResGroup<[M4UnitFADD0,
1000b57cec5SDimitry Andric                                M4UnitFADD1,
1010b57cec5SDimitry Andric                                M4UnitFADD2]>;
1020b57cec5SDimitry Andricdef M4UnitFADDH : ProcResGroup<[M4UnitFADD0,
1030b57cec5SDimitry Andric                                M4UnitFADD1]>;
1040b57cec5SDimitry Andricdef M4UnitFCVT  : ProcResGroup<[M4UnitFCVT0,
1050b57cec5SDimitry Andric                                M4UnitFCVT1]>;
1060b57cec5SDimitry Andricdef M4UnitFCVTH : ProcResGroup<[M4UnitFCVT0]>;
1070b57cec5SDimitry Andricdef M4UnitFDIV  : ProcResGroup<[M4UnitFDIV0,
1080b57cec5SDimitry Andric                                M4UnitFDIV1]>;
1090b57cec5SDimitry Andricdef M4UnitFDIVH : ProcResGroup<[M4UnitFDIV0]>;
1100b57cec5SDimitry Andricdef M4UnitFSQR  : ProcResGroup<[M4UnitFSQR0,
1110b57cec5SDimitry Andric                                M4UnitFSQR1]>;
1120b57cec5SDimitry Andricdef M4UnitFSQRH : ProcResGroup<[M4UnitFSQR0]>;
1130b57cec5SDimitry Andricdef M4UnitFST   : ProcResGroup<[M4UnitFST0,
1140b57cec5SDimitry Andric                                M4UnitFST1]>;
1150b57cec5SDimitry Andricdef M4UnitNALU  : ProcResGroup<[M4UnitNALU0,
1160b57cec5SDimitry Andric                                M4UnitNALU1,
1170b57cec5SDimitry Andric                                M4UnitNALU2]>;
1180b57cec5SDimitry Andricdef M4UnitNALUH : ProcResGroup<[M4UnitNALU0,
1190b57cec5SDimitry Andric                                M4UnitNALU1]>;
1200b57cec5SDimitry Andricdef M4UnitNMUL  : ProcResGroup<[M4UnitNMUL0,
1210b57cec5SDimitry Andric                                M4UnitNMUL1]>;
1220b57cec5SDimitry Andricdef M4UnitNSHT  : ProcResGroup<[M4UnitNSHT0,
1230b57cec5SDimitry Andric                                M4UnitNSHT1,
1240b57cec5SDimitry Andric                                M4UnitNSHT2]>;
1250b57cec5SDimitry Andricdef M4UnitNSHF  : ProcResGroup<[M4UnitNSHF0,
1260b57cec5SDimitry Andric                                M4UnitNSHF1]>;
1270b57cec5SDimitry Andricdef M4UnitNSHFH : ProcResGroup<[M4UnitNSHF0]>;
1280b57cec5SDimitry Andricdef M4UnitNCRY  : ProcResGroup<[M4UnitNCRY0,
1290b57cec5SDimitry Andric                                M4UnitNCRY1]>;
1300b57cec5SDimitry Andric
1310b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
1320b57cec5SDimitry Andric// Resources details.
1330b57cec5SDimitry Andric
1340b57cec5SDimitry Andricdef M4WriteZ0 : SchedWriteRes<[]> { let Latency = 0; }
1350b57cec5SDimitry Andricdef M4WriteZ1 : SchedWriteRes<[]> { let Latency = 1;
1360b57cec5SDimitry Andric                                    let NumMicroOps = 0; }
1370b57cec5SDimitry Andricdef M4WriteZ4 : SchedWriteRes<[]> { let Latency = 4;
1380b57cec5SDimitry Andric                                    let NumMicroOps = 0; }
1390b57cec5SDimitry Andric
1400b57cec5SDimitry Andricdef M4WriteA1 : SchedWriteRes<[M4UnitALU]> { let Latency = 1; }
1410b57cec5SDimitry Andricdef M4WriteA2 : SchedWriteRes<[M4UnitALU]> { let Latency = 2; }
1420b57cec5SDimitry Andricdef M4WriteAA : SchedWriteRes<[M4UnitALU]> { let Latency = 2;
1430b57cec5SDimitry Andric                                             let ResourceCycles = [2]; }
1440b57cec5SDimitry Andricdef M4WriteAB : SchedWriteRes<[M4UnitALU,
1450b57cec5SDimitry Andric                               M4UnitC]>   { let Latency = 2;
1460b57cec5SDimitry Andric                                             let NumMicroOps = 2; }
1470b57cec5SDimitry Andricdef M4WriteAC : SchedWriteRes<[M4UnitALU,
1480b57cec5SDimitry Andric                               M4UnitALU,
1490b57cec5SDimitry Andric                               M4UnitC]>   { let Latency = 3;
1500b57cec5SDimitry Andric                                             let NumMicroOps = 3; }
1510b57cec5SDimitry Andricdef M4WriteAD : SchedWriteRes<[M4UnitALU,
1520b57cec5SDimitry Andric                               M4UnitC]>   { let Latency = 2;
1530b57cec5SDimitry Andric                                             let NumMicroOps = 2; }
1540b57cec5SDimitry Andricdef M4WriteAF : SchedWriteRes<[M4UnitALU]> { let Latency = 2;
1550b57cec5SDimitry Andric                                             let NumMicroOps = 2; }
1560b57cec5SDimitry Andricdef M4WriteAU : SchedWriteVariant<[SchedVar<IsCopyIdiomPred,   [M4WriteZ0]>,
1570b57cec5SDimitry Andric                                   SchedVar<ExynosArithPred,   [M4WriteA1]>,
1580b57cec5SDimitry Andric                                   SchedVar<ExynosLogicExPred, [M4WriteA1]>,
1590b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,       [M4WriteAA]>]>;
1600b57cec5SDimitry Andricdef M4WriteAV : SchedWriteVariant<[SchedVar<ExynosResetPred,   [M4WriteZ0]>,
161480093f4SDimitry Andric                                   SchedVar<ExynosArithPred,   [M4WriteA1]>,
162480093f4SDimitry Andric                                   SchedVar<ExynosLogicExPred, [M4WriteA1]>,
1630b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,       [M4WriteAA]>]>;
1640b57cec5SDimitry Andricdef M4WriteAX : SchedWriteVariant<[SchedVar<ExynosArithPred,   [M4WriteA1]>,
1650b57cec5SDimitry Andric                                   SchedVar<ExynosLogicExPred, [M4WriteA1]>,
1660b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,       [M4WriteAA]>]>;
1670b57cec5SDimitry Andricdef M4WriteAY : SchedWriteVariant<[SchedVar<ExynosRotateRightImmPred, [M4WriteA1]>,
1680b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,              [M4WriteAF]>]>;
1690b57cec5SDimitry Andric
1700b57cec5SDimitry Andricdef M4WriteB1 : SchedWriteRes<[M4UnitB]> { let Latency = 1; }
1710b57cec5SDimitry Andricdef M4WriteBX : SchedWriteVariant<[SchedVar<ExynosBranchLinkLRPred, [M4WriteAC]>,
1720b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,            [M4WriteAB]>]>;
1730b57cec5SDimitry Andric
1740b57cec5SDimitry Andricdef M4WriteC1 : SchedWriteRes<[M4UnitC]> { let Latency = 1; }
1750b57cec5SDimitry Andricdef M4WriteC3 : SchedWriteRes<[M4UnitC]> { let Latency = 3; }
1760b57cec5SDimitry Andricdef M4WriteCA : SchedWriteRes<[M4UnitC]> { let Latency = 4;
1770b57cec5SDimitry Andric                                           let ResourceCycles = [2]; }
1780b57cec5SDimitry Andric
179480093f4SDimitry Andricdef M4WriteD12 : SchedWriteRes<[M4UnitD]> { let Latency = 12;
180480093f4SDimitry Andric                                            let ResourceCycles = [12]; }
181480093f4SDimitry Andricdef M4WriteD21 : SchedWriteRes<[M4UnitD]> { let Latency = 21;
182480093f4SDimitry Andric                                            let ResourceCycles = [21]; }
1830b57cec5SDimitry Andric
1840b57cec5SDimitry Andricdef M4WriteE2 : SchedWriteRes<[M4UnitE]> { let Latency = 2; }
1850b57cec5SDimitry Andric
1860b57cec5SDimitry Andricdef M4WriteL4 : SchedWriteRes<[M4UnitL]> { let Latency = 4; }
1870b57cec5SDimitry Andricdef M4WriteL5 : SchedWriteRes<[M4UnitL]> { let Latency = 5; }
1880b57cec5SDimitry Andricdef M4WriteLA : SchedWriteRes<[M4UnitL,
1890b57cec5SDimitry Andric                               M4UnitL]> { let Latency = 5;
1900b57cec5SDimitry Andric                                           let NumMicroOps = 1; }
1910b57cec5SDimitry Andricdef M4WriteLB : SchedWriteRes<[M4UnitA,
1920b57cec5SDimitry Andric                               M4UnitL]> { let Latency = 5;
1930b57cec5SDimitry Andric                                           let NumMicroOps = 2; }
1940b57cec5SDimitry Andricdef M4WriteLC : SchedWriteRes<[M4UnitA,
1950b57cec5SDimitry Andric                               M4UnitL,
1960b57cec5SDimitry Andric                               M4UnitL]> { let Latency = 5;
1970b57cec5SDimitry Andric                                           let NumMicroOps = 2; }
1980b57cec5SDimitry Andricdef M4WriteLD : SchedWriteRes<[M4UnitA,
1990b57cec5SDimitry Andric                               M4UnitL]> { let Latency = 4;
2000b57cec5SDimitry Andric                                           let NumMicroOps = 2; }
2010b57cec5SDimitry Andricdef M4WriteLE : SchedWriteRes<[M4UnitA,
2020b57cec5SDimitry Andric                               M4UnitL]> { let Latency = 6;
2030b57cec5SDimitry Andric                                           let NumMicroOps = 2; }
2040b57cec5SDimitry Andricdef M4WriteLH : SchedWriteRes<[]>        { let Latency = 5;
2050b57cec5SDimitry Andric                                           let NumMicroOps = 0; }
206480093f4SDimitry Andricdef M4WriteLX : SchedWriteVariant<[SchedVar<ExynosScaledIdxPred, [M4WriteL5]>,
2070b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,         [M4WriteL4]>]>;
208480093f4SDimitry Andricdef M4WriteLY : SchedWriteVariant<[SchedVar<ExynosScaledIdxPred, [M4WriteLE]>,
209480093f4SDimitry Andric                                   SchedVar<NoSchedPred,         [M4WriteL5]>]>;
2100b57cec5SDimitry Andric
2110b57cec5SDimitry Andricdef M4WriteS1 : SchedWriteRes<[M4UnitS]>  { let Latency = 1; }
2120b57cec5SDimitry Andricdef M4WriteSA : SchedWriteRes<[M4UnitS0]> { let Latency = 3; }
2130b57cec5SDimitry Andricdef M4WriteSB : SchedWriteRes<[M4UnitA,
2140b57cec5SDimitry Andric                               M4UnitS]>  { let Latency = 2;
2150b57cec5SDimitry Andric                                            let NumMicroOps = 1; }
2160b57cec5SDimitry Andricdef M4WriteSX : SchedWriteVariant<[SchedVar<ExynosScaledIdxPred, [M4WriteSB]>,
2170b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,         [M4WriteS1]>]>;
2180b57cec5SDimitry Andric
2190b57cec5SDimitry Andricdef M4ReadAdrBase : SchedReadVariant<[SchedVar<
2200b57cec5SDimitry Andric                                        MCSchedPredicate<
2210b57cec5SDimitry Andric                                          CheckAny<
2220b57cec5SDimitry Andric                                            [ScaledIdxFn,
2230b57cec5SDimitry Andric                                             ExynosScaledIdxFn]>>, [ReadDefault]>,
2240b57cec5SDimitry Andric                                      SchedVar<NoSchedPred,        [ReadDefault]>]>;
2250b57cec5SDimitry Andric
2260b57cec5SDimitry Andricdef M4WriteNEONA   : SchedWriteRes<[M4UnitNSHF,
2270b57cec5SDimitry Andric                                    M4UnitFADD]>  { let Latency = 3;
2280b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2290b57cec5SDimitry Andricdef M4WriteNEONB   : SchedWriteRes<[M4UnitNALU,
2300b57cec5SDimitry Andric                                    M4UnitS0]>    { let Latency = 5;
2310b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2320b57cec5SDimitry Andricdef M4WriteNEOND   : SchedWriteRes<[M4UnitNSHF,
2330b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 6;
2340b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2350b57cec5SDimitry Andricdef M4WriteNEONH   : SchedWriteRes<[M4UnitNALU,
2360b57cec5SDimitry Andric                                    M4UnitS0]>    { let Latency = 5;
2370b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2380b57cec5SDimitry Andricdef M4WriteNEONI   : SchedWriteRes<[M4UnitNSHF,
2390b57cec5SDimitry Andric                                    M4UnitS0]>    { let Latency = 2;
2400b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2410b57cec5SDimitry Andricdef M4WriteNEONJ   : SchedWriteRes<[M4UnitNMSC,
2420b57cec5SDimitry Andric                                    M4UnitS0]>    { let Latency = 4; }
2430b57cec5SDimitry Andricdef M4WriteNEONK   : SchedWriteRes<[M4UnitNSHF,
2440b57cec5SDimitry Andric                                    M4UnitNMSC,
2450b57cec5SDimitry Andric                                    M4UnitS0]>    { let Latency = 5;
2460b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2470b57cec5SDimitry Andricdef M4WriteNEONL   : SchedWriteRes<[M4UnitNMUL]>  { let Latency = 3; }
2480b57cec5SDimitry Andricdef M4WriteNEONN   : SchedWriteRes<[M4UnitNMSC,
2490b57cec5SDimitry Andric                                    M4UnitNMSC]>  { let Latency = 5;
2500b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2510b57cec5SDimitry Andricdef M4WriteNEONO   : SchedWriteRes<[M4UnitNMSC,
2520b57cec5SDimitry Andric                                    M4UnitNMSC,
2530b57cec5SDimitry Andric                                    M4UnitNMSC]>  { let Latency = 8;
2540b57cec5SDimitry Andric                                                    let NumMicroOps = 3; }
2550b57cec5SDimitry Andricdef M4WriteNEONP   : SchedWriteRes<[M4UnitNSHF,
2560b57cec5SDimitry Andric                                    M4UnitNMSC]>  { let Latency = 4;
2570b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2580b57cec5SDimitry Andricdef M4WriteNEONQ   : SchedWriteRes<[M4UnitNMSC,
2590b57cec5SDimitry Andric                                    M4UnitC]>     { let Latency = 3;
2600b57cec5SDimitry Andric                                                    let NumMicroOps = 1; }
2610b57cec5SDimitry Andricdef M4WriteNEONR   : SchedWriteRes<[M4UnitFCVT0,
2620b57cec5SDimitry Andric                                    M4UnitS0]>    { let Latency = 4;
2630b57cec5SDimitry Andric                                                    let NumMicroOps = 1; }
2640b57cec5SDimitry Andricdef M4WriteNEONV   : SchedWriteRes<[M4UnitFDIV,
2650b57cec5SDimitry Andric                                    M4UnitFDIV]>  { let Latency = 7;
2660b57cec5SDimitry Andric                                                    let ResourceCycles = [6, 6]; }
2670b57cec5SDimitry Andricdef M4WriteNEONVH  : SchedWriteRes<[M4UnitFDIVH,
2680b57cec5SDimitry Andric                                    M4UnitFDIVH]> { let Latency = 7;
2690b57cec5SDimitry Andric                                                    let ResourceCycles = [6, 6]; }
2700b57cec5SDimitry Andricdef M4WriteNEONW   : SchedWriteRes<[M4UnitFDIV,
2710b57cec5SDimitry Andric                                    M4UnitFDIV]>  { let Latency = 12;
2720b57cec5SDimitry Andric                                                    let ResourceCycles = [9, 9]; }
2730b57cec5SDimitry Andricdef M4WriteNEONX   : SchedWriteRes<[M4UnitFSQR,
2740b57cec5SDimitry Andric                                    M4UnitFSQR]>  { let Latency = 8;
2750b57cec5SDimitry Andric                                                    let ResourceCycles = [7, 7]; }
2760b57cec5SDimitry Andricdef M4WriteNEONXH  : SchedWriteRes<[M4UnitFSQRH,
2770b57cec5SDimitry Andric                                    M4UnitFSQRH]> { let Latency = 7;
2780b57cec5SDimitry Andric                                                    let ResourceCycles = [6, 6]; }
2790b57cec5SDimitry Andricdef M4WriteNEONY   : SchedWriteRes<[M4UnitFSQR,
2800b57cec5SDimitry Andric                                    M4UnitFSQR]>  { let Latency = 12;
2810b57cec5SDimitry Andric                                                    let ResourceCycles = [9, 9]; }
2820b57cec5SDimitry Andricdef M4WriteNEONZ   : SchedWriteVariant<[SchedVar<ExynosQFormPred, [M4WriteNEONO]>,
2830b57cec5SDimitry Andric                                        SchedVar<NoSchedPred,     [M4WriteNEONN]>]>;
2840b57cec5SDimitry Andric
2850b57cec5SDimitry Andricdef M4WriteFADD2   : SchedWriteRes<[M4UnitFADD]>  { let Latency = 2; }
2860b57cec5SDimitry Andricdef M4WriteFADD2H  : SchedWriteRes<[M4UnitFADDH]> { let Latency = 2; }
2870b57cec5SDimitry Andric
2880b57cec5SDimitry Andricdef M4WriteFCVT2   : SchedWriteRes<[M4UnitFCVT]>  { let Latency = 2; }
2890b57cec5SDimitry Andricdef M4WriteFCVT2A  : SchedWriteRes<[M4UnitFCVT0]> { let Latency = 2; }
2900b57cec5SDimitry Andricdef M4WriteFCVT2H  : SchedWriteRes<[M4UnitFCVTH]> { let Latency = 2; }
2910b57cec5SDimitry Andricdef M4WriteFCVT3   : SchedWriteRes<[M4UnitFCVT]>  { let Latency = 3; }
2920b57cec5SDimitry Andricdef M4WriteFCVT3A  : SchedWriteRes<[M4UnitFCVT0]> { let Latency = 3; }
2930b57cec5SDimitry Andricdef M4WriteFCVT3H  : SchedWriteRes<[M4UnitFCVTH]> { let Latency = 3; }
2940b57cec5SDimitry Andricdef M4WriteFCVT4   : SchedWriteRes<[M4UnitFCVT]>  { let Latency = 4; }
2950b57cec5SDimitry Andricdef M4WriteFCVT4A  : SchedWriteRes<[M4UnitFCVT0]> { let Latency = 4; }
2960b57cec5SDimitry Andricdef M4WriteFCVT6A  : SchedWriteRes<[M4UnitFCVT0]> { let Latency = 6; }
2970b57cec5SDimitry Andric
2980b57cec5SDimitry Andricdef M4WriteFDIV7   : SchedWriteRes<[M4UnitFDIV]>  { let Latency = 7;
2990b57cec5SDimitry Andric                                                    let ResourceCycles = [6]; }
3000b57cec5SDimitry Andricdef M4WriteFDIV7H  : SchedWriteRes<[M4UnitFDIVH]> { let Latency = 7;
3010b57cec5SDimitry Andric                                                    let ResourceCycles = [6]; }
3020b57cec5SDimitry Andricdef M4WriteFDIV12  : SchedWriteRes<[M4UnitFDIV]>  { let Latency = 12;
3030b57cec5SDimitry Andric                                                    let ResourceCycles = [9]; }
3040b57cec5SDimitry Andric
3050b57cec5SDimitry Andricdef M4WriteFMAC2H  : SchedWriteRes<[M4UnitFMACH]> { let Latency = 2; }
3060b57cec5SDimitry Andricdef M4WriteFMAC3H  : SchedWriteRes<[M4UnitFMACH]> { let Latency = 3; }
3070b57cec5SDimitry Andricdef M4WriteFMAC3   : SchedWriteRes<[M4UnitFMAC]>  { let Latency = 3; }
3080b57cec5SDimitry Andricdef M4WriteFMAC4   : SchedWriteRes<[M4UnitFMAC]>  { let Latency = 4; }
3090b57cec5SDimitry Andricdef M4WriteFMAC4H  : SchedWriteRes<[M4UnitFMACH]> { let Latency = 4; }
3100b57cec5SDimitry Andricdef M4WriteFMAC5   : SchedWriteRes<[M4UnitFMAC]>  { let Latency = 5; }
3110b57cec5SDimitry Andric
3120b57cec5SDimitry Andricdef M4WriteFSQR7H  : SchedWriteRes<[M4UnitFSQRH]> { let Latency = 7;
3130b57cec5SDimitry Andric                                                    let ResourceCycles = [6]; }
3140b57cec5SDimitry Andricdef M4WriteFSQR8   : SchedWriteRes<[M4UnitFSQR]>  { let Latency = 8;
3150b57cec5SDimitry Andric                                                    let ResourceCycles = [7]; }
3160b57cec5SDimitry Andricdef M4WriteFSQR12  : SchedWriteRes<[M4UnitFSQR]>  { let Latency = 12;
3170b57cec5SDimitry Andric                                                    let ResourceCycles = [9]; }
3180b57cec5SDimitry Andric
3190b57cec5SDimitry Andricdef M4WriteNALU1   : SchedWriteRes<[M4UnitNALU]>  { let Latency = 1; }
3200b57cec5SDimitry Andricdef M4WriteNALU1H  : SchedWriteRes<[M4UnitNALUH]> { let Latency = 1; }
3210b57cec5SDimitry Andric
3220b57cec5SDimitry Andricdef M4WriteNCRY1   : SchedWriteRes<[M4UnitNCRY]>  { let Latency = 1; }
3230b57cec5SDimitry Andricdef M4WriteNCRY1A  : SchedWriteRes<[M4UnitNCRY0]> { let Latency = 1; }
3240b57cec5SDimitry Andricdef M4WriteNCRY3A  : SchedWriteRes<[M4UnitNCRY0]> { let Latency = 3; }
3250b57cec5SDimitry Andricdef M4WriteNCRY5A  : SchedWriteRes<[M4UnitNCRY]>  { let Latency = 5; }
3260b57cec5SDimitry Andric
3270b57cec5SDimitry Andricdef M4WriteNHAD1   : SchedWriteRes<[M4UnitNHAD]>  { let Latency = 1; }
3280b57cec5SDimitry Andricdef M4WriteNHAD3   : SchedWriteRes<[M4UnitNHAD]>  { let Latency = 3; }
3290b57cec5SDimitry Andric
3300b57cec5SDimitry Andricdef M4WriteNMSC1   : SchedWriteRes<[M4UnitNMSC]>  { let Latency = 1; }
3310b57cec5SDimitry Andricdef M4WriteNMSC2   : SchedWriteRes<[M4UnitNMSC]>  { let Latency = 2; }
3320b57cec5SDimitry Andricdef M4WriteNMSC3   : SchedWriteRes<[M4UnitNMSC]>  { let Latency = 3; }
3330b57cec5SDimitry Andric
3340b57cec5SDimitry Andricdef M4WriteNMUL3   : SchedWriteRes<[M4UnitNMUL]>  { let Latency = 3; }
3350b57cec5SDimitry Andric
3360b57cec5SDimitry Andricdef M4WriteNSHF1   : SchedWriteRes<[M4UnitNSHF]>  { let Latency = 1; }
3370b57cec5SDimitry Andricdef M4WriteNSHF1H  : SchedWriteRes<[M4UnitNSHFH]> { let Latency = 1; }
3380b57cec5SDimitry Andricdef M4WriteNSHF3   : SchedWriteRes<[M4UnitNSHF]>  { let Latency = 3; }
3390b57cec5SDimitry Andricdef M4WriteNSHFA   : SchedWriteRes<[M4UnitNSHF]>  { let Latency = 1;
3400b57cec5SDimitry Andric                                                    let ResourceCycles = [2]; }
3410b57cec5SDimitry Andricdef M4WriteNSHFB   : SchedWriteRes<[M4UnitNSHF]>  { let Latency = 2;
3420b57cec5SDimitry Andric                                                    let NumMicroOps = 2;
3430b57cec5SDimitry Andric                                                    let ResourceCycles = [2]; }
3440b57cec5SDimitry Andricdef M4WriteNSHFC   : SchedWriteRes<[M4UnitNSHF]>  { let Latency = 3;
3450b57cec5SDimitry Andric                                                    let NumMicroOps = 3;
3460b57cec5SDimitry Andric                                                    let ResourceCycles = [4]; }
3470b57cec5SDimitry Andricdef M4WriteNSHFD   : SchedWriteRes<[M4UnitNSHF]>  { let Latency = 4;
3480b57cec5SDimitry Andric                                                    let NumMicroOps = 4;
3490b57cec5SDimitry Andric                                                    let ResourceCycles = [4]; }
3500b57cec5SDimitry Andric
3510b57cec5SDimitry Andricdef M4WriteNSHT1   : SchedWriteRes<[M4UnitNSHT]>  { let Latency = 1; }
3520b57cec5SDimitry Andricdef M4WriteNSHT2   : SchedWriteRes<[M4UnitNSHT]>  { let Latency = 2; }
3530b57cec5SDimitry Andricdef M4WriteNSHT3   : SchedWriteRes<[M4UnitNSHT]>  { let Latency = 3; }
3540b57cec5SDimitry Andricdef M4WriteNSHT4A  : SchedWriteRes<[M4UnitNSHT1]> { let Latency = 4; }
3550b57cec5SDimitry Andric
3560b57cec5SDimitry Andricdef M4WriteVLDA    : SchedWriteRes<[M4UnitL,
3570b57cec5SDimitry Andric                                    M4UnitL]>     { let Latency = 5;
3580b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
3590b57cec5SDimitry Andricdef M4WriteVLDB    : SchedWriteRes<[M4UnitL,
3600b57cec5SDimitry Andric                                    M4UnitL,
3610b57cec5SDimitry Andric                                    M4UnitL]>     { let Latency = 6;
3620b57cec5SDimitry Andric                                                    let NumMicroOps = 3; }
3630b57cec5SDimitry Andricdef M4WriteVLDC    : SchedWriteRes<[M4UnitL,
3640b57cec5SDimitry Andric                                    M4UnitL,
3650b57cec5SDimitry Andric                                    M4UnitL,
3660b57cec5SDimitry Andric                                    M4UnitL]>     { let Latency = 6;
3670b57cec5SDimitry Andric                                                    let NumMicroOps = 4; }
3680b57cec5SDimitry Andricdef M4WriteVLDD    : SchedWriteRes<[M4UnitL,
3690b57cec5SDimitry Andric                                    M4UnitNSHF]>  { let Latency = 6;
3700b57cec5SDimitry Andric                                                    let NumMicroOps = 2;
3710b57cec5SDimitry Andric                                                    let ResourceCycles = [2, 1]; }
3720b57cec5SDimitry Andricdef M4WriteVLDF    : SchedWriteRes<[M4UnitL,
3730b57cec5SDimitry Andric                                    M4UnitL]>     { let Latency = 10;
3740b57cec5SDimitry Andric                                                    let NumMicroOps = 2;
3750b57cec5SDimitry Andric                                                    let ResourceCycles = [3, 3]; }
3760b57cec5SDimitry Andricdef M4WriteVLDG    : SchedWriteRes<[M4UnitL,
3770b57cec5SDimitry Andric                                    M4UnitNSHF,
3780b57cec5SDimitry Andric                                    M4UnitNSHF]>  { let Latency = 6;
3790b57cec5SDimitry Andric                                                    let NumMicroOps = 3;
3800b57cec5SDimitry Andric                                                    let ResourceCycles = [2, 1, 1]; }
3810b57cec5SDimitry Andricdef M4WriteVLDI    : SchedWriteRes<[M4UnitL,
3820b57cec5SDimitry Andric                                    M4UnitL,
3830b57cec5SDimitry Andric                                    M4UnitL]>     { let Latency = 12;
3840b57cec5SDimitry Andric                                                    let NumMicroOps = 3;
3850b57cec5SDimitry Andric                                                    let ResourceCycles = [3, 3, 3]; }
3860b57cec5SDimitry Andricdef M4WriteVLDJ    : SchedWriteRes<[M4UnitL,
3870b57cec5SDimitry Andric                                    M4UnitNSHF,
3880b57cec5SDimitry Andric                                    M4UnitNSHF,
3890b57cec5SDimitry Andric                                    M4UnitNSHF]>  { let Latency = 7;
3900b57cec5SDimitry Andric                                                    let NumMicroOps = 4;
3910b57cec5SDimitry Andric                                                    let ResourceCycles = [3, 1, 1, 1]; }
3920b57cec5SDimitry Andricdef M4WriteVLDK    : SchedWriteRes<[M4UnitL,
3930b57cec5SDimitry Andric                                    M4UnitNSHF,
3940b57cec5SDimitry Andric                                    M4UnitNSHF,
3950b57cec5SDimitry Andric                                    M4UnitNSHF,
3960b57cec5SDimitry Andric                                    M4UnitNSHF]>  { let Latency = 7;
3970b57cec5SDimitry Andric                                                    let NumMicroOps = 5;
3980b57cec5SDimitry Andric                                                    let ResourceCycles = [3, 1, 1, 1, 1]; }
3990b57cec5SDimitry Andricdef M4WriteVLDL    : SchedWriteRes<[M4UnitL,
4000b57cec5SDimitry Andric                                    M4UnitNSHF,
4010b57cec5SDimitry Andric                                    M4UnitNSHF,
4020b57cec5SDimitry Andric                                    M4UnitL,
4030b57cec5SDimitry Andric                                    M4UnitNSHF]>  { let Latency = 7;
4040b57cec5SDimitry Andric                                                    let NumMicroOps = 5;
4050b57cec5SDimitry Andric                                                    let ResourceCycles = [3, 1, 1, 6, 1]; }
4060b57cec5SDimitry Andricdef M4WriteVLDM    : SchedWriteRes<[M4UnitL,
4070b57cec5SDimitry Andric                                    M4UnitNSHF,
4080b57cec5SDimitry Andric                                    M4UnitNSHF,
4090b57cec5SDimitry Andric                                    M4UnitL,
4100b57cec5SDimitry Andric                                    M4UnitNSHF,
4110b57cec5SDimitry Andric                                    M4UnitNSHF]>  { let Latency = 7;
4120b57cec5SDimitry Andric                                                    let NumMicroOps = 6;
4130b57cec5SDimitry Andric                                                    let ResourceCycles = [3, 1, 1, 3, 1, 1]; }
4140b57cec5SDimitry Andricdef M4WriteVLDN    : SchedWriteRes<[M4UnitL,
4150b57cec5SDimitry Andric                                    M4UnitL,
4160b57cec5SDimitry Andric                                    M4UnitL,
4170b57cec5SDimitry Andric                                    M4UnitL]>     { let Latency = 14;
4180b57cec5SDimitry Andric                                                    let NumMicroOps = 4;
4190b57cec5SDimitry Andric                                                    let ResourceCycles = [3, 3, 3, 3]; }
4200b57cec5SDimitry Andric
4210b57cec5SDimitry Andricdef M4WriteVST1    : SchedWriteRes<[M4UnitS,
4220b57cec5SDimitry Andric                                    M4UnitFST]>  { let Latency = 1;
4230b57cec5SDimitry Andric                                                   let NumMicroOps = 1; }
4240b57cec5SDimitry Andricdef M4WriteVSTA    : WriteSequence<[WriteVST], 2>;
4250b57cec5SDimitry Andricdef M4WriteVSTB    : WriteSequence<[WriteVST], 3>;
4260b57cec5SDimitry Andricdef M4WriteVSTC    : WriteSequence<[WriteVST], 4>;
4270b57cec5SDimitry Andricdef M4WriteVSTD    : SchedWriteRes<[M4UnitS,
4280b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 2; }
4290b57cec5SDimitry Andricdef M4WriteVSTE    : SchedWriteRes<[M4UnitS,
4300b57cec5SDimitry Andric                                    M4UnitFST,
4310b57cec5SDimitry Andric                                    M4UnitS,
4320b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 2;
4330b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
4340b57cec5SDimitry Andricdef M4WriteVSTF    : SchedWriteRes<[M4UnitNSHF,
4350b57cec5SDimitry Andric                                    M4UnitS,
4360b57cec5SDimitry Andric                                    M4UnitFST,
4370b57cec5SDimitry Andric                                    M4UnitS,
4380b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 4;
4390b57cec5SDimitry Andric                                                    let NumMicroOps = 4;
4400b57cec5SDimitry Andric                                                    let ResourceCycles = [1, 2, 1, 2, 1]; }
4410b57cec5SDimitry Andricdef M4WriteVSTG    : SchedWriteRes<[M4UnitNSHF,
4420b57cec5SDimitry Andric                                    M4UnitNSHF,
4430b57cec5SDimitry Andric                                    M4UnitNSHF,
4440b57cec5SDimitry Andric                                    M4UnitS,
4450b57cec5SDimitry Andric                                    M4UnitFST,
4460b57cec5SDimitry Andric                                    M4UnitS,
4470b57cec5SDimitry Andric                                    M4UnitFST,
4480b57cec5SDimitry Andric                                    M4UnitS,
4490b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 5;
4500b57cec5SDimitry Andric                                                    let NumMicroOps = 6;
4510b57cec5SDimitry Andric                                                    let ResourceCycles = [1, 1, 1, 2, 1, 2, 1, 2, 1]; }
4520b57cec5SDimitry Andricdef M4WriteVSTI    : SchedWriteRes<[M4UnitNSHF,
4530b57cec5SDimitry Andric                                    M4UnitNSHF,
4540b57cec5SDimitry Andric                                    M4UnitNSHF,
4550b57cec5SDimitry Andric                                    M4UnitNSHF,
4560b57cec5SDimitry Andric                                    M4UnitS,
4570b57cec5SDimitry Andric                                    M4UnitFST,
4580b57cec5SDimitry Andric                                    M4UnitS,
4590b57cec5SDimitry Andric                                    M4UnitFST,
4600b57cec5SDimitry Andric                                    M4UnitS,
4610b57cec5SDimitry Andric                                    M4UnitFST,
4620b57cec5SDimitry Andric                                    M4UnitS,
4630b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 8;
4640b57cec5SDimitry Andric                                                    let NumMicroOps = 5;
4650b57cec5SDimitry Andric                                                    let ResourceCycles = [1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1]; }
4660b57cec5SDimitry Andricdef M4WriteVSTJ    : SchedWriteRes<[M4UnitA,
4670b57cec5SDimitry Andric                                    M4UnitS,
468480093f4SDimitry Andric                                    M4UnitFST,
469480093f4SDimitry Andric                                    M4UnitS,
4700b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 1;
4710b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
4720b57cec5SDimitry Andricdef M4WriteVSTK    : SchedWriteRes<[M4UnitA,
4730b57cec5SDimitry Andric                                    M4UnitS,
4740b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 3;
4750b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
4760b57cec5SDimitry Andricdef M4WriteVSTL    : SchedWriteRes<[M4UnitNSHF,
4770b57cec5SDimitry Andric                                    M4UnitNSHF,
4780b57cec5SDimitry Andric                                    M4UnitS,
4790b57cec5SDimitry Andric                                    M4UnitFST,
4800b57cec5SDimitry Andric                                    M4UnitS,
4810b57cec5SDimitry Andric                                    M4UnitFST]>   { let Latency = 4;
4820b57cec5SDimitry Andric                                                    let NumMicroOps = 4;
4830b57cec5SDimitry Andric                                                    let ResourceCycles = [1, 1, 2, 1, 2, 1]; }
484480093f4SDimitry Andricdef M4WriteVSTY    : SchedWriteVariant<[SchedVar<ExynosScaledIdxPred, [M4WriteVSTK]>,
485480093f4SDimitry Andric                                        SchedVar<NoSchedPred,         [WriteVST]>]>;
4860b57cec5SDimitry Andric
4870b57cec5SDimitry Andric// Special cases.
4880b57cec5SDimitry Andricdef M4WriteCOPY    : SchedWriteVariant<[SchedVar<ExynosFPPred, [M4WriteNALU1]>,
4890b57cec5SDimitry Andric                                        SchedVar<NoSchedPred,  [M4WriteZ0]>]>;
4900b57cec5SDimitry Andricdef M4WriteMOVI    : SchedWriteVariant<[SchedVar<IsZeroFPIdiomPred, [M4WriteZ0]>,
4910b57cec5SDimitry Andric                                        SchedVar<NoSchedPred,       [M4WriteNALU1]>]>;
4920b57cec5SDimitry Andric
4930b57cec5SDimitry Andric// Fast forwarding.
4940b57cec5SDimitry Andricdef M4ReadAESM1    : SchedReadAdvance<+1, [M4WriteNCRY1]>;
4950b57cec5SDimitry Andricdef M4ReadFMACM1   : SchedReadAdvance<+1, [M4WriteFMAC4,
4960b57cec5SDimitry Andric                                           M4WriteFMAC4H,
4970b57cec5SDimitry Andric                                           M4WriteFMAC5]>;
4980b57cec5SDimitry Andricdef M4ReadNMULM1   : SchedReadAdvance<+1, [M4WriteNMUL3]>;
4990b57cec5SDimitry Andricdef M4ReadNMULP2   : SchedReadAdvance<-2, [M4WriteNMUL3]>;
5000b57cec5SDimitry Andric
5010b57cec5SDimitry Andric
5020b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
5030b57cec5SDimitry Andric// Coarse scheduling model.
5040b57cec5SDimitry Andric
5050b57cec5SDimitry Andric// Branch instructions.
5060b57cec5SDimitry Andricdef : SchedAlias<WriteBr,    M4WriteZ0>;
5070b57cec5SDimitry Andricdef : SchedAlias<WriteBrReg, M4WriteC1>;
5080b57cec5SDimitry Andric
5090b57cec5SDimitry Andric// Arithmetic and logical integer instructions.
5100b57cec5SDimitry Andricdef : SchedAlias<WriteI,     M4WriteA1>;
5110b57cec5SDimitry Andricdef : SchedAlias<WriteIEReg, M4WriteAA>; // FIXME: M4WriteAX crashes TableGen.
5120b57cec5SDimitry Andricdef : SchedAlias<WriteISReg, M4WriteAA>; // FIXME: M4WriteAX crashes TableGen.
5130b57cec5SDimitry Andricdef : SchedAlias<WriteIS,    M4WriteA1>;
5140b57cec5SDimitry Andric
5150b57cec5SDimitry Andric// Move instructions.
5160b57cec5SDimitry Andricdef : SchedAlias<WriteImm, M4WriteA1>;
5170b57cec5SDimitry Andric
5180b57cec5SDimitry Andric// Divide and multiply instructions.
5190b57cec5SDimitry Andricdef : SchedAlias<WriteID32, M4WriteD12>;
5200b57cec5SDimitry Andricdef : SchedAlias<WriteID64, M4WriteD21>;
5210b57cec5SDimitry Andricdef : SchedAlias<WriteIM32, M4WriteC3>;
5220b57cec5SDimitry Andricdef : SchedAlias<WriteIM64, M4WriteCA>;
5230b57cec5SDimitry Andric
5240b57cec5SDimitry Andric// Miscellaneous instructions.
5250b57cec5SDimitry Andricdef : SchedAlias<WriteExtr, M4WriteAY>;
5260b57cec5SDimitry Andric
5270b57cec5SDimitry Andric// Addressing modes.
5280b57cec5SDimitry Andricdef : SchedAlias<WriteAdr,    M4WriteZ1>;
5290b57cec5SDimitry Andricdef : SchedAlias<ReadAdrBase, M4ReadAdrBase>;
5300b57cec5SDimitry Andric
5310b57cec5SDimitry Andric// Load instructions.
5320b57cec5SDimitry Andricdef : SchedAlias<WriteLD,    M4WriteL4>;
5330b57cec5SDimitry Andricdef : SchedAlias<WriteLDHi,  M4WriteZ4>;
5340b57cec5SDimitry Andricdef : SchedAlias<WriteLDIdx, M4WriteLX>;
5350b57cec5SDimitry Andric
5360b57cec5SDimitry Andric// Store instructions.
5370b57cec5SDimitry Andricdef : SchedAlias<WriteST,    M4WriteS1>;
5380b57cec5SDimitry Andricdef : SchedAlias<WriteSTP,   M4WriteS1>;
5390b57cec5SDimitry Andricdef : SchedAlias<WriteSTX,   M4WriteS1>;
5400b57cec5SDimitry Andricdef : SchedAlias<WriteSTIdx, M4WriteSX>;
5410b57cec5SDimitry Andric
5420b57cec5SDimitry Andric// FP data instructions.
5430b57cec5SDimitry Andricdef : SchedAlias<WriteF,    M4WriteFADD2>;
5440b57cec5SDimitry Andricdef : SchedAlias<WriteFCmp, M4WriteNMSC2>;
5450b57cec5SDimitry Andricdef : SchedAlias<WriteFDiv, M4WriteFDIV12>;
5460b57cec5SDimitry Andricdef : SchedAlias<WriteFMul, M4WriteFMAC3>;
5470b57cec5SDimitry Andric
5480b57cec5SDimitry Andric// FP miscellaneous instructions.
5490b57cec5SDimitry Andricdef : SchedAlias<WriteFCvt,  M4WriteFCVT2>;
5500b57cec5SDimitry Andricdef : SchedAlias<WriteFImm,  M4WriteNALU1>;
551480093f4SDimitry Andricdef : SchedAlias<WriteFCopy, M4WriteNALU1>;
5520b57cec5SDimitry Andric
5530b57cec5SDimitry Andric// FP load instructions.
5540b57cec5SDimitry Andricdef : SchedAlias<WriteVLD, M4WriteL5>;
5550b57cec5SDimitry Andric
5560b57cec5SDimitry Andric// FP store instructions.
5570b57cec5SDimitry Andricdef : SchedAlias<WriteVST, M4WriteVST1>;
5580b57cec5SDimitry Andric
5590b57cec5SDimitry Andric// ASIMD FP instructions.
5600b57cec5SDimitry Andricdef : SchedAlias<WriteV, M4WriteNALU1>;
5610b57cec5SDimitry Andric
5620b57cec5SDimitry Andric// Other miscellaneous instructions.
5630b57cec5SDimitry Andricdef : WriteRes<WriteAtomic,  []> { let Unsupported = 1; }
5640b57cec5SDimitry Andricdef : WriteRes<WriteBarrier, []> { let Latency = 1; }
5650b57cec5SDimitry Andricdef : WriteRes<WriteHint,    []> { let Latency = 1; }
5660b57cec5SDimitry Andricdef : WriteRes<WriteSys,     []> { let Latency = 1; }
5670b57cec5SDimitry Andric
5680b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
5690b57cec5SDimitry Andric// Generic fast forwarding.
5700b57cec5SDimitry Andric
5710b57cec5SDimitry Andric// TODO: Add FP register forwarding rules.
5720b57cec5SDimitry Andric
5730b57cec5SDimitry Andricdef : ReadAdvance<ReadI,       0>;
5740b57cec5SDimitry Andricdef : ReadAdvance<ReadISReg,   0>;
5750b57cec5SDimitry Andricdef : ReadAdvance<ReadIEReg,   0>;
5760b57cec5SDimitry Andricdef : ReadAdvance<ReadIM,      0>;
5770b57cec5SDimitry Andric// TODO: The forwarding for 32 bits actually saves 2 cycles.
5780b57cec5SDimitry Andricdef : ReadAdvance<ReadIMA,     3, [WriteIM32, WriteIM64]>;
5790b57cec5SDimitry Andricdef : ReadAdvance<ReadID,      0>;
5800b57cec5SDimitry Andricdef : ReadAdvance<ReadExtrHi,  0>;
5810b57cec5SDimitry Andricdef : ReadAdvance<ReadAdrBase, 0>;
5820b57cec5SDimitry Andricdef : ReadAdvance<ReadVLD,     0>;
5830b57cec5SDimitry Andric
5840b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
5850b57cec5SDimitry Andric// Finer scheduling model.
5860b57cec5SDimitry Andric
5870b57cec5SDimitry Andric// Branch instructions
5880b57cec5SDimitry Andricdef : InstRW<[M4WriteB1], (instrs Bcc)>;
5890b57cec5SDimitry Andricdef : InstRW<[M4WriteAF], (instrs BL)>;
5900b57cec5SDimitry Andricdef : InstRW<[M4WriteBX], (instrs BLR)>;
5910b57cec5SDimitry Andricdef : InstRW<[M4WriteC1], (instregex "^CBN?Z[WX]")>;
5920b57cec5SDimitry Andricdef : InstRW<[M4WriteAD], (instregex "^TBN?Z[WX]")>;
5930b57cec5SDimitry Andric
5940b57cec5SDimitry Andric// Arithmetic and logical integer instructions.
5950b57cec5SDimitry Andricdef : InstRW<[M4WriteAX], (instregex "^(ADD|AND|BIC|EON|EOR|ORN|SUB)[WX]rs$")>;
5960b57cec5SDimitry Andricdef : InstRW<[M4WriteAU], (instrs ORRWrs, ORRXrs)>;
5970b57cec5SDimitry Andricdef : InstRW<[M4WriteAX], (instregex "^(ADD|AND|BIC|SUB)S[WX]rs$")>;
5980b57cec5SDimitry Andricdef : InstRW<[M4WriteAX], (instregex "^(ADD|SUB)S?[WX]rx(64)?$")>;
5990b57cec5SDimitry Andricdef : InstRW<[M4WriteAV], (instrs ADDWri, ADDXri, ORRWri, ORRXri)>;
6000b57cec5SDimitry Andric
6010b57cec5SDimitry Andric// Move instructions.
6020b57cec5SDimitry Andricdef : InstRW<[M4WriteCOPY], (instrs COPY)>;
6030b57cec5SDimitry Andricdef : InstRW<[M4WriteZ0],   (instrs ADR, ADRP)>;
6040b57cec5SDimitry Andricdef : InstRW<[M4WriteZ0],   (instregex "^MOV[NZ][WX]i")>;
6050b57cec5SDimitry Andric
6060b57cec5SDimitry Andric// Divide and multiply instructions.
6070b57cec5SDimitry Andric
6080b57cec5SDimitry Andric// Miscellaneous instructions.
6090b57cec5SDimitry Andric
6100b57cec5SDimitry Andric// Load instructions.
6110b57cec5SDimitry Andricdef : InstRW<[M4WriteLD,
6120b57cec5SDimitry Andric              WriteLDHi,
6130b57cec5SDimitry Andric              WriteAdr],    (instregex "^LDP(SW|W|X)(post|pre)")>;
6140b57cec5SDimitry Andricdef : InstRW<[M4WriteL5,
6150b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDR(BB|SBW|SBX|HH|SHW|SHX|SW|W|X)roW")>;
6160b57cec5SDimitry Andricdef : InstRW<[WriteLDIdx,
6170b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDR(BB|SBW|SBX|HH|SHW|SHX|SW|W|X)roX")>;
6180b57cec5SDimitry Andricdef : InstRW<[M4WriteL5,
6190b57cec5SDimitry Andric              ReadAdrBase], (instrs PRFMroW)>;
6200b57cec5SDimitry Andricdef : InstRW<[WriteLDIdx,
6210b57cec5SDimitry Andric              ReadAdrBase], (instrs PRFMroX)>;
6220b57cec5SDimitry Andric
6230b57cec5SDimitry Andric// Store instructions.
6240b57cec5SDimitry Andricdef : InstRW<[M4WriteSB,
6250b57cec5SDimitry Andric              ReadAdrBase], (instregex "^STR(BB|HH|W|X)roW")>;
6260b57cec5SDimitry Andricdef : InstRW<[WriteST,
6270b57cec5SDimitry Andric              ReadAdrBase], (instregex "^STR(BB|HH|W|X)roX")>;
6280b57cec5SDimitry Andric
6290b57cec5SDimitry Andric// FP data instructions.
6300b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1H], (instrs FABSHr)>;
6310b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1],  (instregex "^FABS[SD]r")>;
6320b57cec5SDimitry Andricdef : InstRW<[M4WriteFADD2H], (instregex "^F(ADD|SUB)Hrr")>;
6330b57cec5SDimitry Andricdef : InstRW<[M4WriteFADD2],  (instregex "^F(ADD|SUB)[SD]rr")>;
6340b57cec5SDimitry Andricdef : InstRW<[M4WriteFADD2H], (instregex "^FADDPv.i16")>;
6350b57cec5SDimitry Andricdef : InstRW<[M4WriteFADD2],  (instregex "^FADDPv.i(32|64)")>;
6360b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONQ],  (instregex "^FCCMPE?[HSD]rr")>;
6370b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC2],  (instregex "^FCMPE?[HSD]r[ir]")>;
6380b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^F(AC|CM)(EQ|GE|GT|LE|LT)(16|32|64|v1)")>;
6390b57cec5SDimitry Andricdef : InstRW<[M4WriteFDIV7H], (instrs FDIVHrr)>;
6400b57cec5SDimitry Andricdef : InstRW<[M4WriteFDIV7],  (instrs FDIVSrr)>;
6410b57cec5SDimitry Andricdef : InstRW<[M4WriteFDIV12], (instrs FDIVDrr)>;
6420b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^F(MAX|MIN)(NM)?[HSD]rr")>;
6430b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC3H], (instregex "^FN?MULHrr")>;
6440b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC3],  (instregex "^FN?MUL[SD]rr")>;
6450b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC3H], (instrs FMULX16)>;
6460b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC3],  (instregex "^FMULX(32|64)")>;
6470b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC4H,
6480b57cec5SDimitry Andric              M4ReadFMACM1],  (instregex "^FN?M(ADD|SUB)Hrrr")>;
6490b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC4,
6500b57cec5SDimitry Andric              M4ReadFMACM1],  (instregex "^FN?M(ADD|SUB)[SD]rrr")>;
6510b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1H], (instrs FNEGHr)>;
6520b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^FNEG[SD]r")>;
6530b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT3A], (instregex "^FRINT.+r")>;
6540b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONH],  (instregex "^FCSEL[HSD]rrr")>;
6550b57cec5SDimitry Andricdef : InstRW<[M4WriteFSQR7H], (instrs FSQRTHr)>;
6560b57cec5SDimitry Andricdef : InstRW<[M4WriteFSQR8],  (instrs FSQRTSr)>;
6570b57cec5SDimitry Andricdef : InstRW<[M4WriteFSQR12], (instrs FSQRTDr)>;
6580b57cec5SDimitry Andric
6590b57cec5SDimitry Andric// FP miscellaneous instructions.
6600b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT2H], (instregex "^FCVTH[SD]r")>;
6610b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT2H], (instregex "^FCVT[SD]Hr")>;
6620b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT2],  (instregex "^FCVT[SD][SD]r")>;
6630b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT6A], (instregex "^[SU]CVTF[SU][XW][HSD]ri")>;
6640b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONR],  (instregex "^FCVT[AMNPZ][SU][SU][XW][HSD]r")>;
6650b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^FMOV[HSD][ir]")>;
6660b57cec5SDimitry Andricdef : InstRW<[M4WriteSA],     (instregex "^FMOV[WX][HSD]r")>;
6670b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONJ],  (instregex "^FMOV[HSD][WX]r")>;
6680b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONI],  (instregex "^FMOVXDHighr")>;
6690b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONK],  (instregex "^FMOVDXHighr")>;
6700b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT3H], (instregex "^F(RECP|RSQRT)Ev1f16")>;
6710b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT3],  (instregex "^F(RECP|RSQRT)Ev1i(32|64)")>;
6720b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^FRECPXv1")>;
6730b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC4H], (instregex "^F(RECP|RSQRT)S16")>;
6740b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC4],  (instregex "^F(RECP|RSQRT)S(32|64)")>;
6750b57cec5SDimitry Andric
6760b57cec5SDimitry Andric// FP load instructions.
6770b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "^LDR[SDQ]l")>;
6780b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "^LDUR[BHSDQ]i")>;
6790b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
6800b57cec5SDimitry Andric              WriteAdr],    (instregex "^LDR[BHSDQ](post|pre)")>;
6810b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "^LDR[BHSDQ]ui")>;
6820b57cec5SDimitry Andricdef : InstRW<[M4WriteLE,
6830b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDR[BHSDQ]roW")>;
6840b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
6850b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDR[BHSD]roX")>;
686480093f4SDimitry Andricdef : InstRW<[M4WriteLY,
6870b57cec5SDimitry Andric              ReadAdrBase], (instrs LDRQroX)>;
6880b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
6890b57cec5SDimitry Andric              M4WriteLH],   (instregex "^LDN?P[SD]i")>;
6900b57cec5SDimitry Andricdef : InstRW<[M4WriteLA,
6910b57cec5SDimitry Andric              M4WriteLH],   (instregex "^LDN?PQi")>;
6920b57cec5SDimitry Andricdef : InstRW<[M4WriteL5,
6930b57cec5SDimitry Andric              M4WriteLH,
6940b57cec5SDimitry Andric              WriteAdr],    (instregex "^LDP[SD]post")>;
6950b57cec5SDimitry Andricdef : InstRW<[M4WriteLB,
6960b57cec5SDimitry Andric              M4WriteLH,
6970b57cec5SDimitry Andric              WriteAdr],    (instrs LDPQpost)>;
6980b57cec5SDimitry Andricdef : InstRW<[M4WriteLB,
6990b57cec5SDimitry Andric              M4WriteLH,
7000b57cec5SDimitry Andric              WriteAdr],    (instregex "^LDP[SD]pre")>;
7010b57cec5SDimitry Andricdef : InstRW<[M4WriteLC,
7020b57cec5SDimitry Andric              M4WriteLH,
7030b57cec5SDimitry Andric              WriteAdr],    (instrs LDPQpre)>;
7040b57cec5SDimitry Andric
7050b57cec5SDimitry Andric// FP store instructions.
7060b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "^STUR[BHSDQ]i")>;
7070b57cec5SDimitry Andricdef : InstRW<[WriteVST,
7080b57cec5SDimitry Andric              WriteAdr],    (instregex "^STR[BHSDQ](post|pre)")>;
7090b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "^STR[BHSDQ]ui")>;
710480093f4SDimitry Andricdef : InstRW<[M4WriteVSTK,
7110b57cec5SDimitry Andric              ReadAdrBase], (instregex "^STR[BHSD]roW")>;
7120b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTK,
7130b57cec5SDimitry Andric              ReadAdrBase], (instrs STRQroW)>;
7140b57cec5SDimitry Andricdef : InstRW<[WriteVST,
7150b57cec5SDimitry Andric              ReadAdrBase], (instregex "^STR[BHSD]roX")>;
716480093f4SDimitry Andricdef : InstRW<[M4WriteVSTY,
7170b57cec5SDimitry Andric              ReadAdrBase], (instrs STRQroX)>;
7180b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "^STN?P[SD]i")>;
719480093f4SDimitry Andricdef : InstRW<[M4WriteVSTJ], (instregex "^STN?PQi")>;
7200b57cec5SDimitry Andricdef : InstRW<[WriteVST,
7210b57cec5SDimitry Andric              WriteAdr],    (instregex "^STP[SD](post|pre)")>;
7220b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTJ,
7230b57cec5SDimitry Andric              WriteAdr],    (instregex "^STPQ(post|pre)")>;
7240b57cec5SDimitry Andric
7250b57cec5SDimitry Andric// ASIMD instructions.
7260b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD1],  (instregex "^[SU]ABDL?v")>;
7270b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU]ABAL?v")>;
7280b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^ABSv")>;
7290b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^(ADD|NEG|SUB)v")>;
7300b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU]?ADDL?Pv")>;
7310b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU]H(ADD|SUB)v")>;
7320b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU](ADD|SUB)[LW]v")>;
7330b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^R?(ADD|SUB)HN2?v")>;
7340b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU]Q(ADD|SUB)v")>;
7350b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^(SU|US)QADDv")>;
7360b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU]RHADDv")>;
7370b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^SQ(ABS|NEG)v")>;
7380b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU]?ADDL?Vv")>;
7390b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^CM(EQ|GE|GT|HI|HS|LE|LT)v")>;
7400b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^CMTSTv")>;
7410b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^(AND|BIC|EOR|NOT|ORN|ORR)v")>;
7420b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^[SU](MIN|MAX)v")>;
7430b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC2],  (instregex "^[SU](MIN|MAX)Pv")>;
7440b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU](MIN|MAX)Vv")>;
7450b57cec5SDimitry Andricdef : InstRW<[M4WriteNMUL3,
7460b57cec5SDimitry Andric              M4ReadNMULM1],  (instregex "^ML[AS]v")>;
7470b57cec5SDimitry Andricdef : InstRW<[M4WriteNMUL3,
7480b57cec5SDimitry Andric              M4ReadNMULM1],  (instregex "^(SQR?D)?MULH?v")>;
7490b57cec5SDimitry Andricdef : InstRW<[M4WriteNMUL3,
7500b57cec5SDimitry Andric              M4ReadNMULM1],  (instregex "^SQRDML[AS]H")>;
7510b57cec5SDimitry Andricdef : InstRW<[M4WriteNMUL3,
7520b57cec5SDimitry Andric              M4ReadNMULM1],  (instregex "^(S|U|SQD)ML[AS]L(v1(i32|i64)|v2i32|v4i16|v8i8)")>;
7530b57cec5SDimitry Andricdef : InstRW<[M4WriteNMUL3,
7540b57cec5SDimitry Andric              M4ReadNMULP2],  (instregex "^(S|U|SQD)ML[AS]L(v4i32|v8i16|v16i8)")>;
7550b57cec5SDimitry Andricdef : InstRW<[M4WriteNMUL3,
7560b57cec5SDimitry Andric              M4ReadNMULM1],  (instregex "^(S|U|SQD)MULL(v1(i32|i64)|v2i32|v4i16|v8i8)")>;
7570b57cec5SDimitry Andricdef : InstRW<[M4WriteNMUL3,
7580b57cec5SDimitry Andric              M4ReadNMULP2],  (instregex "^(S|U|SQD)MULL(v4i32|v8i16|v16i8)")>;
7590b57cec5SDimitry Andricdef : InstRW<[M4WriteNMUL3],  (instregex "^[SU]DOT(lane)?v")>;
7600b57cec5SDimitry Andricdef : InstRW<[M4WriteNHAD3],  (instregex "^[SU]ADALPv")>;
7610b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT4A], (instregex "^[SU]R?SRA[dv]")>;
7620b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT1],  (instregex "^SHL[dv]")>;
7630b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT1],  (instregex "^S[LR]I[dv]")>;
7640b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT1],  (instregex "^[SU]SH[LR][dv]")>;
7650b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT2],  (instregex "^[SU]?SHLLv")>;
7660b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT4A], (instregex "^[SU]?Q?R?SHRU?N[bhsv]")>;
7670b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT4A], (instregex "^[SU]RSH[LR][dv]")>;
7680b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT4A], (instregex "^[SU]QR?SHLU?[bhsdv]")>;
7690b57cec5SDimitry Andric
7700b57cec5SDimitry Andric// ASIMD FP instructions.
7710b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1H], (instregex "^FABSv.f16")>;
7720b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1],  (instregex "^FABSv.f(32|64)")>;
7730b57cec5SDimitry Andricdef : InstRW<[M4WriteFADD2H], (instregex "^F(ABD|ADD|SUB)v.f16")>;
7740b57cec5SDimitry Andricdef : InstRW<[M4WriteFADD2],  (instregex "^F(ABD|ADD|SUB)v.f(32|64)")>;
7750b57cec5SDimitry Andricdef : InstRW<[M4WriteFADD2H], (instregex "^FADDPv.f16")>;
7760b57cec5SDimitry Andricdef : InstRW<[M4WriteFADD2],  (instregex "^FADDPv.f(32|64)")>;
7770b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^F(AC|CM)(EQ|GE|GT|LE|LT)v[^1]")>;
7780b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT2],  (instregex "^FCVT(L|N|XN)v")>;
7790b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT2A], (instregex "^FCVT[AMNPZ][SU]v")>;
7800b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT2H], (instregex "^[SU]CVTFv.[fi]16")>;
7810b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT2],  (instregex "^[SU]CVTFv.[fi](32|64)")>;
7820b57cec5SDimitry Andricdef : InstRW<[M4WriteFDIV7H], (instrs FDIVv4f16)>;
7830b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONVH], (instrs FDIVv8f16)>;
7840b57cec5SDimitry Andricdef : InstRW<[M4WriteFDIV7],  (instrs FDIVv2f32)>;
7850b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONV],  (instrs FDIVv4f32)>;
7860b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONW],  (instrs FDIVv2f64)>;
7870b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC1],  (instregex "^F(MAX|MIN)(NM)?v")>;
7880b57cec5SDimitry Andricdef : InstRW<[M4WriteNMSC2],  (instregex "^F(MAX|MIN)(NM)?Pv")>;
7890b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONZ],  (instregex "^F(MAX|MIN)(NM)?Vv")>;
7900b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC2H], (instregex "^FMULX?v.[fi]16")>;
7910b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC3],  (instregex "^FMULX?v.[fi](32|64)")>;
7920b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC4H,
7930b57cec5SDimitry Andric              M4ReadFMACM1],  (instregex "^FML[AS]v.[fi]16")>;
7940b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC4,
7950b57cec5SDimitry Andric              M4ReadFMACM1],  (instregex "^FML[AS]v.[fi](32|64)")>;
7960b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1H], (instregex "^FNEGv.f16")>;
7970b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^FNEGv.f(32|64)")>;
7980b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT3A], (instregex "^FRINT[AIMNPXZ]v")>;
7990b57cec5SDimitry Andricdef : InstRW<[M4WriteFSQR7H], (instrs FSQRTv4f16)>;
8000b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONXH], (instrs FSQRTv8f16)>;
8010b57cec5SDimitry Andricdef : InstRW<[M4WriteFSQR8],  (instrs FSQRTv2f32)>;
8020b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONX],  (instrs FSQRTv4f32)>;
8030b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONY],  (instrs FSQRTv2f64)>;
8040b57cec5SDimitry Andric
8050b57cec5SDimitry Andric// ASIMD miscellaneous instructions.
8060b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^RBITv")>;
8070b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^(BIF|BIT|BSL)v")>;
8080b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^CL[STZ]v")>;
8090b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONB],  (instregex "^DUPv.+gpr")>;
8100b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1],  (instregex "^CPY")>;
8110b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1],  (instregex "^DUPv.+lane")>;
8120b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1],  (instregex "^EXTv")>;
8130b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT4A], (instregex "^XTNv")>;
8140b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHT4A], (instregex "^[SU]?QXTU?Nv")>;
8150b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONB],  (instregex "^INSv.+gpr")>;
8160b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1],  (instregex "^INSv.+lane")>;
8170b57cec5SDimitry Andricdef : InstRW<[M4WriteMOVI],   (instregex "^(MOV|MVN)I")>;
8180b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1H], (instregex "^FMOVv.f16")>;
8190b57cec5SDimitry Andricdef : InstRW<[M4WriteNALU1],  (instregex "^FMOVv.f(32|64)")>;
8200b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT3H], (instregex "^F(RECP|RSQRT)Ev[248]f16")>;
8210b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT3],  (instregex "^F(RECP|RSQRT)Ev[248]f(32|64)")>;
8220b57cec5SDimitry Andricdef : InstRW<[M4WriteFCVT3],  (instregex "^U(RECP|RSQRT)Ev[24]i32")>;
8230b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC4H], (instregex "^F(RECP|RSQRT)Sv.f16")>;
8240b57cec5SDimitry Andricdef : InstRW<[M4WriteFMAC4],  (instregex "^F(RECP|RSQRT)Sv.f(32|64)")>;
8250b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1],  (instregex "^REV(16|32|64)v")>;
8260b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHFA],  (instregex "^TB[LX]v(8|16)i8One")>;
8270b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHFB],  (instregex "^TB[LX]v(8|16)i8Two")>;
8280b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHFC],  (instregex "^TB[LX]v(8|16)i8Three")>;
8290b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHFD],  (instregex "^TB[LX]v(8|16)i8Four")>;
8300b57cec5SDimitry Andricdef : InstRW<[M4WriteNEONP],  (instregex "^[SU]MOVv")>;
8310b57cec5SDimitry Andricdef : InstRW<[M4WriteNSHF1],  (instregex "^(TRN|UZP|ZIP)[12]v")>;
8320b57cec5SDimitry Andric
8330b57cec5SDimitry Andric// ASIMD load instructions.
8340b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "LD1Onev(8b|4h|2s|1d)$")>;
8350b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
8360b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Onev(8b|4h|2s|1d)_POST$")>;
8370b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "LD1Onev(16b|8h|4s|2d)$")>;
8380b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
8390b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Onev(16b|8h|4s|2d)_POST$")>;
8400b57cec5SDimitry Andric
8410b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDA], (instregex "LD1Twov(8b|4h|2s|1d)$")>;
8420b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDA,
8430b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Twov(8b|4h|2s|1d)_POST$")>;
8440b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDA], (instregex "LD1Twov(16b|8h|4s|2d)$")>;
8450b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDA,
8460b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Twov(16b|8h|4s|2d)_POST$")>;
8470b57cec5SDimitry Andric
8480b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDB], (instregex "LD1Threev(8b|4h|2s|1d)$")>;
8490b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDB,
8500b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Threev(8b|4h|2s|1d)_POST$")>;
8510b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDB], (instregex "LD1Threev(16b|8h|4s|2d)$")>;
8520b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDB,
8530b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Threev(16b|8h|4s|2d)_POST$")>;
8540b57cec5SDimitry Andric
8550b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDC], (instregex "LD1Fourv(8b|4h|2s|1d)$")>;
8560b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDC,
8570b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Fourv(8b|4h|2s|1d)_POST$")>;
8580b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDC], (instregex "LD1Fourv(16b|8h|4s|2d)$")>;
8590b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDC,
8600b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Fourv(16b|8h|4s|2d)_POST$")>;
8610b57cec5SDimitry Andric
8620b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDD], (instregex "LD1i(8|16|32|64)$")>;
8630b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDD,
8640b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1i(8|16|32|64)_POST$")>;
8650b57cec5SDimitry Andric
8660b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "LD1Rv(8b|4h|2s|1d)$")>;
8670b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
8680b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Rv(8b|4h|2s|1d)_POST$")>;
8690b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "LD1Rv(16b|8h|4s|2d)$")>;
8700b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
8710b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD1Rv(16b|8h|4s|2d)_POST$")>;
8720b57cec5SDimitry Andric
8730b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDF], (instregex "LD2Twov(8b|4h|2s)$")>;
8740b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDF,
8750b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD2Twov(8b|4h|2s)_POST$")>;
8760b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDF], (instregex "LD2Twov(16b|8h|4s|2d)$")>;
8770b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDF,
8780b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD2Twov(16b|8h|4s|2d)_POST$")>;
8790b57cec5SDimitry Andric
8800b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDG], (instregex "LD2i(8|16|32|64)$")>;
8810b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDG,
8820b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD2i(8|16|32|64)_POST$")>;
8830b57cec5SDimitry Andric
8840b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDA], (instregex "LD2Rv(8b|4h|2s|1d)$")>;
8850b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDA,
8860b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD2Rv(8b|4h|2s|1d)_POST$")>;
8870b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDA], (instregex "LD2Rv(16b|8h|4s|2d)$")>;
8880b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDA,
8890b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD2Rv(16b|8h|4s|2d)_POST$")>;
8900b57cec5SDimitry Andric
8910b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDI], (instregex "LD3Threev(8b|4h|2s)$")>;
8920b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDI,
8930b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD3Threev(8b|4h|2s)_POST$")>;
8940b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDI], (instregex "LD3Threev(16b|8h|4s|2d)$")>;
8950b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDI,
8960b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD3Threev(16b|8h|4s|2d)_POST$")>;
8970b57cec5SDimitry Andric
8980b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDJ], (instregex "LD3i(8|16|32)$")>;
8990b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDJ,
9000b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD3i(8|16|32)_POST$")>;
9010b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDL], (instregex "LD3i64$")>;
9020b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDL,
9030b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD3i64_POST$")>;
9040b57cec5SDimitry Andric
9050b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDB], (instregex "LD3Rv(8b|4h|2s|1d)$")>;
9060b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDB,
9070b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD3Rv(8b|4h|2s|1d)_POST$")>;
9080b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDB], (instregex "LD3Rv(16b|8h|4s|2d)$")>;
9090b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDB,
9100b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD3Rv(16b|8h|4s|2d)_POST$")>;
9110b57cec5SDimitry Andric
9120b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDN], (instregex "LD4Fourv(8b|4h|2s)$")>;
9130b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDN,
9140b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD4Fourv(8b|4h|2s)_POST$")>;
9150b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDN], (instregex "LD4Fourv(16b|8h|4s|2d)$")>;
9160b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDN,
9170b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD4Fourv(16b|8h|4s|2d)_POST$")>;
9180b57cec5SDimitry Andric
9190b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDK], (instregex "LD4i(8|16|32)$")>;
9200b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDK,
9210b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD4i(8|16|32)_POST$")>;
9220b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDM], (instregex "LD4i64$")>;
9230b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDM,
9240b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD4i64_POST$")>;
9250b57cec5SDimitry Andric
9260b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDC], (instregex "LD4Rv(8b|4h|2s|1d)$")>;
9270b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDC,
9280b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD4Rv(8b|4h|2s|1d)_POST$")>;
9290b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDC], (instregex "LD4Rv(16b|8h|4s|2d)$")>;
9300b57cec5SDimitry Andricdef : InstRW<[M4WriteVLDC,
9310b57cec5SDimitry Andric              M4WriteA1],   (instregex "LD4Rv(16b|8h|4s|2d)_POST$")>;
9320b57cec5SDimitry Andric
9330b57cec5SDimitry Andric// ASIMD store instructions.
9340b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "ST1Onev(8b|4h|2s|1d)$")>;
9350b57cec5SDimitry Andricdef : InstRW<[WriteVST,
9360b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1Onev(8b|4h|2s|1d)_POST$")>;
9370b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "ST1Onev(16b|8h|4s|2d)$")>;
9380b57cec5SDimitry Andricdef : InstRW<[WriteVST,
9390b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1Onev(16b|8h|4s|2d)_POST$")>;
9400b57cec5SDimitry Andric
9410b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTA], (instregex "ST1Twov(8b|4h|2s|1d)$")>;
9420b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTA,
9430b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1Twov(8b|4h|2s|1d)_POST$")>;
9440b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTA], (instregex "ST1Twov(16b|8h|4s|2d)$")>;
9450b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTA,
9460b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1Twov(16b|8h|4s|2d)_POST$")>;
9470b57cec5SDimitry Andric
9480b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTB], (instregex "ST1Threev(8b|4h|2s|1d)$")>;
9490b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTB,
9500b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1Threev(8b|4h|2s|1d)_POST$")>;
9510b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTB], (instregex "ST1Threev(16b|8h|4s|2d)$")>;
9520b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTB,
9530b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1Threev(16b|8h|4s|2d)_POST$")>;
9540b57cec5SDimitry Andric
9550b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTC], (instregex "ST1Fourv(8b|4h|2s|1d)$")>;
9560b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTC,
9570b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1Fourv(8b|4h|2s|1d)_POST$")>;
9580b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTC], (instregex "ST1Fourv(16b|8h|4s|2d)$")>;
9590b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTC,
9600b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1Fourv(16b|8h|4s|2d)_POST$")>;
9610b57cec5SDimitry Andric
9620b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "ST1i(8|16|32|64)$")>;
9630b57cec5SDimitry Andricdef : InstRW<[WriteVST,
9640b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST1i(8|16|32|64)_POST$")>;
9650b57cec5SDimitry Andric
9660b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTD], (instregex "ST2Twov(8b|4h|2s)$")>;
9670b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTD,
9680b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST2Twov(8b|4h|2s)_POST$")>;
9690b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTE], (instregex "ST2Twov(16b|8h|4s|2d)$")>;
9700b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTE,
9710b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST2Twov(16b|8h|4s|2d)_POST$")>;
9720b57cec5SDimitry Andric
9730b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTD], (instregex "ST2i(8|16|32|64)$")>;
9740b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTD,
9750b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST2i(8|16|32|64)_POST$")>;
9760b57cec5SDimitry Andric
9770b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTF], (instregex "ST3Threev(8b|4h|2s)$")>;
9780b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTF,
9790b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST3Threev(8b|4h|2s)_POST$")>;
9800b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTG], (instregex "ST3Threev(16b|8h|4s|2d)$")>;
9810b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTG,
9820b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST3Threev(16b|8h|4s|2d)_POST$")>;
9830b57cec5SDimitry Andric
9840b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTE], (instregex "ST3i(8|16|32|64)$")>;
9850b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTE,
9860b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST3i(8|16|32|64)_POST$")>;
9870b57cec5SDimitry Andric
9880b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTL], (instregex "ST4Fourv(8b|4h|2s)$")>;
9890b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTL,
9900b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST4Fourv(8b|4h|2s)_POST$")>;
9910b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTI], (instregex "ST4Fourv(16b|8h|4s|2d)$")>;
9920b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTI,
9930b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST4Fourv(16b|8h|4s|2d)_POST$")>;
9940b57cec5SDimitry Andric
9950b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTE], (instregex "ST4i(8|16|32|64)$")>;
9960b57cec5SDimitry Andricdef : InstRW<[M4WriteVSTE,
9970b57cec5SDimitry Andric              M4WriteA1],   (instregex "ST4i(8|16|32|64)_POST$")>;
9980b57cec5SDimitry Andric
9990b57cec5SDimitry Andric// Cryptography instructions.
10000b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY1],  (instregex "^AES[DE]")>;
10010b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY1,
10020b57cec5SDimitry Andric              M4ReadAESM1],   (instregex "^AESI?MC")>;
10030b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY1A], (instregex "^PMULv")>;
10040b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY1A], (instregex "^PMULLv(1|8)i")>;
10050b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY3A], (instregex "^PMULLv(2|16)i")>;
10060b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY1A], (instregex "^SHA1([CHMP]|SU[01])")>;
10070b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY1A], (instrs SHA256SU0rr)>;
10080b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY5A], (instrs SHA256SU1rrr)>;
10090b57cec5SDimitry Andricdef : InstRW<[M4WriteNCRY5A], (instrs SHA256H2rrr)>;
10100b57cec5SDimitry Andric
10110b57cec5SDimitry Andric// CRC instructions.
10120b57cec5SDimitry Andricdef : InstRW<[M4WriteE2], (instregex "^CRC32C?[BHWX]rr$")>;
10130b57cec5SDimitry Andric
10140b57cec5SDimitry Andric} // SchedModel = ExynosM4Model
1015