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