xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td (revision 4c2d3b022a1d543dbbff75a0c53e8d3d7242216d)
10b57cec5SDimitry Andric//=- AArch64SchedExynosM3.td - Samsung Exynos M3 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 M3 to support
100b57cec5SDimitry Andric// instruction scheduling and other instruction cost heuristics.
110b57cec5SDimitry Andric//
120b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
130b57cec5SDimitry Andric
140b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
150b57cec5SDimitry Andric// The Exynos-M3 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 ExynosM3Model : SchedMachineModel {
200b57cec5SDimitry Andric  let IssueWidth            =   6; // Up to 6 uops per cycle.
210b57cec5SDimitry Andric  let MicroOpBufferSize     = 228; // ROB size.
220b57cec5SDimitry Andric  let LoopMicroOpBufferSize =  40; // 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,
30*4c2d3b02SDimitry Andric                                                    [HasMTE, HasCSSC]);
310b57cec5SDimitry Andric}
320b57cec5SDimitry Andric
330b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
340b57cec5SDimitry Andric// Define each kind of processor resource and number available on the Exynos-M3,
350b57cec5SDimitry Andric// which has 12 pipelines, each with its own queue with out-of-order dispatch.
360b57cec5SDimitry Andric
370b57cec5SDimitry Andriclet SchedModel = ExynosM3Model in {
380b57cec5SDimitry Andric
390b57cec5SDimitry Andricdef M3UnitA  : ProcResource<2>; // Simple integer
400b57cec5SDimitry Andricdef M3UnitC  : ProcResource<2>; // Simple and complex integer
410b57cec5SDimitry Andricdef M3UnitD  : ProcResource<1>; // Integer division (inside C0, serialized)
420b57cec5SDimitry Andricdef M3UnitB  : ProcResource<2>; // Branch
430b57cec5SDimitry Andricdef M3UnitL  : ProcResource<2>; // Load
440b57cec5SDimitry Andricdef M3UnitS  : ProcResource<1>; // Store
450b57cec5SDimitry Andricdef M3PipeF0 : ProcResource<1>; // FP #0
460b57cec5SDimitry Andriclet Super = M3PipeF0 in {
470b57cec5SDimitry Andric  def M3UnitFMAC0 : ProcResource<1>; // FP multiplication
480b57cec5SDimitry Andric  def M3UnitFADD0 : ProcResource<1>; // Simple FP
490b57cec5SDimitry Andric  def M3UnitFCVT0 : ProcResource<1>; // FP conversion
500b57cec5SDimitry Andric  def M3UnitFSQR  : ProcResource<2>; // FP square root (serialized)
510b57cec5SDimitry Andric  def M3UnitNALU0 : ProcResource<1>; // Simple vector
520b57cec5SDimitry Andric  def M3UnitNMSC  : ProcResource<1>; // FP and vector miscellanea
530b57cec5SDimitry Andric  def M3UnitNSHT0 : ProcResource<1>; // Vector shifting
540b57cec5SDimitry Andric  def M3UnitNSHF0 : ProcResource<1>; // Vector shuffling
550b57cec5SDimitry Andric}
560b57cec5SDimitry Andricdef M3PipeF1 : ProcResource<1>; // FP #1
570b57cec5SDimitry Andriclet Super = M3PipeF1 in {
580b57cec5SDimitry Andric  def M3UnitFMAC1 : ProcResource<1>; // FP multiplication
590b57cec5SDimitry Andric  def M3UnitFADD1 : ProcResource<1>; // Simple FP
600b57cec5SDimitry Andric  def M3UnitFDIV0 : ProcResource<2>; // FP division (serialized)
610b57cec5SDimitry Andric  def M3UnitFCVT1 : ProcResource<1>; // FP conversion
620b57cec5SDimitry Andric  def M3UnitFST0  : ProcResource<1>; // FP store
630b57cec5SDimitry Andric  def M3UnitNALU1 : ProcResource<1>; // Simple vector
640b57cec5SDimitry Andric  def M3UnitNCRY0 : ProcResource<1>; // Cryptographic
650b57cec5SDimitry Andric  def M3UnitNMUL  : ProcResource<1>; // Vector multiplication
660b57cec5SDimitry Andric  def M3UnitNSHT1 : ProcResource<1>; // Vector shifting
670b57cec5SDimitry Andric  def M3UnitNSHF1 : ProcResource<1>; // Vector shuffling
680b57cec5SDimitry Andric}
690b57cec5SDimitry Andricdef M3PipeF2 : ProcResource<1>; // FP #2
700b57cec5SDimitry Andriclet Super = M3PipeF2 in {
710b57cec5SDimitry Andric  def M3UnitFMAC2 : ProcResource<1>; // FP multiplication
720b57cec5SDimitry Andric  def M3UnitFADD2 : ProcResource<1>; // Simple FP
730b57cec5SDimitry Andric  def M3UnitFDIV1 : ProcResource<2>; // FP division (serialized)
740b57cec5SDimitry Andric  def M3UnitFST1  : ProcResource<1>; // FP store
750b57cec5SDimitry Andric  def M3UnitNALU2 : ProcResource<1>; // Simple vector
760b57cec5SDimitry Andric  def M3UnitNCRY1 : ProcResource<1>; // Cryptographic
770b57cec5SDimitry Andric  def M3UnitNSHT2 : ProcResource<1>; // Vector shifting
780b57cec5SDimitry Andric  def M3UnitNSHF2 : ProcResource<1>; // Vector shuffling
790b57cec5SDimitry Andric}
800b57cec5SDimitry Andric
810b57cec5SDimitry Andric
820b57cec5SDimitry Andricdef M3UnitALU  : ProcResGroup<[M3UnitA,
830b57cec5SDimitry Andric                               M3UnitC]>;
840b57cec5SDimitry Andricdef M3UnitFMAC : ProcResGroup<[M3UnitFMAC0,
850b57cec5SDimitry Andric                               M3UnitFMAC1,
860b57cec5SDimitry Andric                               M3UnitFMAC2]>;
870b57cec5SDimitry Andricdef M3UnitFADD : ProcResGroup<[M3UnitFADD0,
880b57cec5SDimitry Andric                               M3UnitFADD1,
890b57cec5SDimitry Andric                               M3UnitFADD2]>;
900b57cec5SDimitry Andricdef M3UnitFDIV : ProcResGroup<[M3UnitFDIV0,
910b57cec5SDimitry Andric                               M3UnitFDIV1]>;
920b57cec5SDimitry Andricdef M3UnitFCVT : ProcResGroup<[M3UnitFCVT0,
930b57cec5SDimitry Andric                               M3UnitFCVT1]>;
940b57cec5SDimitry Andricdef M3UnitFST  : ProcResGroup<[M3UnitFST0,
950b57cec5SDimitry Andric                               M3UnitFST1]>;
960b57cec5SDimitry Andricdef M3UnitNALU : ProcResGroup<[M3UnitNALU0,
970b57cec5SDimitry Andric                               M3UnitNALU1,
980b57cec5SDimitry Andric                               M3UnitNALU2]>;
990b57cec5SDimitry Andricdef M3UnitNCRY : ProcResGroup<[M3UnitNCRY0,
1000b57cec5SDimitry Andric                               M3UnitNCRY1]>;
1010b57cec5SDimitry Andricdef M3UnitNSHT : ProcResGroup<[M3UnitNSHT0,
1020b57cec5SDimitry Andric                               M3UnitNSHT1,
1030b57cec5SDimitry Andric                               M3UnitNSHT2]>;
1040b57cec5SDimitry Andricdef M3UnitNSHF : ProcResGroup<[M3UnitNSHF0,
1050b57cec5SDimitry Andric                               M3UnitNSHF1,
1060b57cec5SDimitry Andric                               M3UnitNSHF2]>;
1070b57cec5SDimitry Andric
1080b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
1090b57cec5SDimitry Andric// Coarse scheduling model.
1100b57cec5SDimitry Andric
1110b57cec5SDimitry Andricdef M3WriteZ0 : SchedWriteRes<[]> { let Latency = 0;
1120b57cec5SDimitry Andric                                    let NumMicroOps = 1; }
1130b57cec5SDimitry Andricdef M3WriteZ1 : SchedWriteRes<[]> { let Latency = 1;
1140b57cec5SDimitry Andric                                    let NumMicroOps = 0; }
1150b57cec5SDimitry Andric
1160b57cec5SDimitry Andricdef M3WriteA1 : SchedWriteRes<[M3UnitALU]> { let Latency = 1; }
1170b57cec5SDimitry Andricdef M3WriteAA : SchedWriteRes<[M3UnitALU]> { let Latency = 2;
1185f757f3fSDimitry Andric                                             let ReleaseAtCycles = [2]; }
1190b57cec5SDimitry Andricdef M3WriteAB : SchedWriteRes<[M3UnitALU,
1200b57cec5SDimitry Andric                               M3UnitC]>   { let Latency = 1;
1210b57cec5SDimitry Andric                                             let NumMicroOps = 2; }
1220b57cec5SDimitry Andricdef M3WriteAC : SchedWriteRes<[M3UnitALU,
1230b57cec5SDimitry Andric                               M3UnitALU,
1240b57cec5SDimitry Andric                               M3UnitC]>   { let Latency = 2;
1250b57cec5SDimitry Andric                                             let NumMicroOps = 3; }
1260b57cec5SDimitry Andricdef M3WriteAD : SchedWriteRes<[M3UnitALU,
1270b57cec5SDimitry Andric                               M3UnitC]>   { let Latency = 2;
1280b57cec5SDimitry Andric                                             let NumMicroOps = 2; }
1290b57cec5SDimitry Andricdef M3WriteC1 : SchedWriteRes<[M3UnitC]>   { let Latency = 1; }
1300b57cec5SDimitry Andricdef M3WriteC2 : SchedWriteRes<[M3UnitC]>   { let Latency = 2; }
1310b57cec5SDimitry Andricdef M3WriteAU : SchedWriteVariant<[SchedVar<IsCopyIdiomPred, [M3WriteZ0]>,
1320b57cec5SDimitry Andric                                   SchedVar<ExynosArithPred, [M3WriteA1]>,
1330b57cec5SDimitry Andric                                   SchedVar<ExynosLogicPred, [M3WriteA1]>,
1340b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,     [M3WriteAA]>]>;
1350b57cec5SDimitry Andricdef M3WriteAV : SchedWriteVariant<[SchedVar<IsCopyIdiomPred, [M3WriteZ0]>,
136480093f4SDimitry Andric                                   SchedVar<ExynosArithPred, [M3WriteA1]>,
1370b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,     [M3WriteAA]>]>;
1380b57cec5SDimitry Andricdef M3WriteAW : SchedWriteVariant<[SchedVar<IsZeroIdiomPred, [M3WriteZ0]>,
139480093f4SDimitry Andric                                   SchedVar<ExynosLogicPred, [M3WriteA1]>,
1400b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,     [M3WriteAA]>]>;
1410b57cec5SDimitry Andricdef M3WriteAX : SchedWriteVariant<[SchedVar<ExynosArithPred, [M3WriteA1]>,
1420b57cec5SDimitry Andric                                   SchedVar<ExynosLogicPred, [M3WriteA1]>,
1430b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,     [M3WriteAA]>]>;
14406c3fb27SDimitry Andricdef M3WriteAY : SchedWriteVariant<[SchedVar<IsRORImmIdiomPred, [M3WriteA1]>,
1450b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,       [M3WriteAA]>]>;
1460b57cec5SDimitry Andric
1470b57cec5SDimitry Andricdef M3WriteB1 : SchedWriteRes<[M3UnitB]> { let Latency = 1; }
1480b57cec5SDimitry Andricdef M3WriteBX : SchedWriteVariant<[SchedVar<ExynosBranchLinkLRPred, [M3WriteAC]>,
1490b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,            [M3WriteAB]>]>;
1500b57cec5SDimitry Andric
1510b57cec5SDimitry Andricdef M3WriteL4 : SchedWriteRes<[M3UnitL]> { let Latency = 4; }
1520b57cec5SDimitry Andricdef M3WriteL5 : SchedWriteRes<[M3UnitL]> { let Latency = 5; }
1530b57cec5SDimitry Andricdef M3WriteLA : SchedWriteRes<[M3UnitL,
1540b57cec5SDimitry Andric                               M3UnitL]> { let Latency = 5;
1550b57cec5SDimitry Andric                                           let NumMicroOps = 1; }
1560b57cec5SDimitry Andricdef M3WriteLB : SchedWriteRes<[M3UnitA,
1570b57cec5SDimitry Andric                               M3UnitL]> { let Latency = 5;
1580b57cec5SDimitry Andric                                           let NumMicroOps = 2; }
1590b57cec5SDimitry Andricdef M3WriteLC : SchedWriteRes<[M3UnitA,
1600b57cec5SDimitry Andric                               M3UnitL,
1610b57cec5SDimitry Andric                               M3UnitL]> { let Latency = 5;
1620b57cec5SDimitry Andric                                           let NumMicroOps = 2; }
1630b57cec5SDimitry Andricdef M3WriteLD : SchedWriteRes<[M3UnitA,
1640b57cec5SDimitry Andric                               M3UnitL]> { let Latency = 4;
1650b57cec5SDimitry Andric                                           let NumMicroOps = 2; }
1660b57cec5SDimitry Andricdef M3WriteLE : SchedWriteRes<[M3UnitA,
1670b57cec5SDimitry Andric                               M3UnitL]> { let Latency = 6;
1680b57cec5SDimitry Andric                                           let NumMicroOps = 2; }
1690b57cec5SDimitry Andricdef M3WriteLH : SchedWriteRes<[]>        { let Latency = 5;
1700b57cec5SDimitry Andric                                           let NumMicroOps = 0; }
1710b57cec5SDimitry Andricdef M3WriteLX : SchedWriteVariant<[SchedVar<ExynosScaledIdxPred, [M3WriteL5]>,
1720b57cec5SDimitry Andric                                   SchedVar<NoSchedPred,         [M3WriteL4]>]>;
173480093f4SDimitry Andricdef M3WriteLY : SchedWriteVariant<[SchedVar<ExynosScaledIdxPred, [M3WriteLE]>,
174480093f4SDimitry Andric                                   SchedVar<NoSchedPred,         [M3WriteL5]>]>;
1750b57cec5SDimitry Andric
1760b57cec5SDimitry Andricdef M3WriteS1 : SchedWriteRes<[M3UnitS]>   { let Latency = 1; }
1770b57cec5SDimitry Andricdef M3WriteSA : SchedWriteRes<[M3UnitA,
1780b57cec5SDimitry Andric                               M3UnitS,
1790b57cec5SDimitry Andric                               M3UnitFST]> { let Latency = 3;
1800b57cec5SDimitry Andric                                             let NumMicroOps = 2; }
1810b57cec5SDimitry Andricdef M3WriteSB : SchedWriteRes<[M3UnitA,
1820b57cec5SDimitry Andric                               M3UnitS]>   { let Latency = 2;
1830b57cec5SDimitry Andric                                             let NumMicroOps = 2; }
184480093f4SDimitry Andricdef M3WriteSC : SchedWriteRes<[M3UnitA,
185480093f4SDimitry Andric                               M3UnitS,
186480093f4SDimitry Andric                               M3UnitFST]> { let Latency = 1;
187480093f4SDimitry Andric                                             let NumMicroOps = 2; }
188480093f4SDimitry Andricdef M3WriteSY : SchedWriteVariant<[SchedVar<ExynosScaledIdxPred, [M3WriteSA]>,
189480093f4SDimitry Andric                                   SchedVar<NoSchedPred,         [WriteVST]>]>;
1900b57cec5SDimitry Andric
1910b57cec5SDimitry Andricdef M3ReadAdrBase : SchedReadVariant<[SchedVar<ExynosScaledIdxPred, [ReadDefault]>,
1920b57cec5SDimitry Andric                                      SchedVar<NoSchedPred,         [ReadDefault]>]>;
1930b57cec5SDimitry Andric
1940b57cec5SDimitry Andric// Branch instructions.
1950b57cec5SDimitry Andricdef : SchedAlias<WriteBr, M3WriteZ0>;
1960b57cec5SDimitry Andricdef : SchedAlias<WriteBrReg, M3WriteC1>;
1970b57cec5SDimitry Andric
1980b57cec5SDimitry Andric// Arithmetic and logical integer instructions.
1990b57cec5SDimitry Andricdef : SchedAlias<WriteI,     M3WriteA1>;
2000b57cec5SDimitry Andricdef : SchedAlias<WriteISReg, M3WriteA1>;
2010b57cec5SDimitry Andricdef : SchedAlias<WriteIEReg, M3WriteA1>;
2020b57cec5SDimitry Andricdef : SchedAlias<WriteIS,    M3WriteA1>;
2030b57cec5SDimitry Andric
2040b57cec5SDimitry Andric// Move instructions.
2050b57cec5SDimitry Andricdef : SchedAlias<WriteImm, M3WriteA1>;
2060b57cec5SDimitry Andric
2070b57cec5SDimitry Andric// Divide and multiply instructions.
2080b57cec5SDimitry Andricdef : WriteRes<WriteID32, [M3UnitC,
2090b57cec5SDimitry Andric                           M3UnitD]>  { let Latency = 12;
2105f757f3fSDimitry Andric                                        let ReleaseAtCycles = [1, 12]; }
2110b57cec5SDimitry Andricdef : WriteRes<WriteID64, [M3UnitC,
2120b57cec5SDimitry Andric                           M3UnitD]>  { let Latency = 21;
2135f757f3fSDimitry Andric                                        let ReleaseAtCycles = [1, 21]; }
2140b57cec5SDimitry Andricdef : WriteRes<WriteIM32, [M3UnitC]>  { let Latency = 3; }
2150b57cec5SDimitry Andricdef : WriteRes<WriteIM64, [M3UnitC]>  { let Latency = 4;
2165f757f3fSDimitry Andric                                        let ReleaseAtCycles = [2]; }
2170b57cec5SDimitry Andric
2180b57cec5SDimitry Andric// Miscellaneous instructions.
2190b57cec5SDimitry Andricdef : SchedAlias<WriteExtr, M3WriteAY>;
2200b57cec5SDimitry Andric
2210b57cec5SDimitry Andric// Addressing modes.
2220b57cec5SDimitry Andricdef : SchedAlias<WriteAdr,    M3WriteZ1>;
2230b57cec5SDimitry Andricdef : SchedAlias<ReadAdrBase, M3ReadAdrBase>;
2240b57cec5SDimitry Andric
2250b57cec5SDimitry Andric// Load instructions.
2260b57cec5SDimitry Andricdef : SchedAlias<WriteLD, M3WriteL4>;
2270b57cec5SDimitry Andricdef : WriteRes<WriteLDHi, []> { let Latency = 4;
2280b57cec5SDimitry Andric                                let NumMicroOps = 0; }
2290b57cec5SDimitry Andricdef : SchedAlias<WriteLDIdx, M3WriteLB>;
2300b57cec5SDimitry Andric
2310b57cec5SDimitry Andric// Store instructions.
2320b57cec5SDimitry Andricdef : SchedAlias<WriteST,    M3WriteS1>;
2330b57cec5SDimitry Andricdef : SchedAlias<WriteSTP,   M3WriteS1>;
2340b57cec5SDimitry Andricdef : SchedAlias<WriteSTX,   M3WriteS1>;
2350b57cec5SDimitry Andricdef : SchedAlias<WriteSTIdx, M3WriteSB>;
2360b57cec5SDimitry Andric
2370b57cec5SDimitry Andric// FP data instructions.
2380b57cec5SDimitry Andricdef : WriteRes<WriteF,    [M3UnitFADD]>  { let Latency = 2; }
2390b57cec5SDimitry Andricdef : WriteRes<WriteFCmp, [M3UnitNMSC]>  { let Latency = 2; }
2400b57cec5SDimitry Andricdef : WriteRes<WriteFDiv, [M3UnitFDIV]>  { let Latency = 12;
2415f757f3fSDimitry Andric                                           let ReleaseAtCycles = [12]; }
2420b57cec5SDimitry Andricdef : WriteRes<WriteFMul, [M3UnitFMAC]>  { let Latency = 4; }
2430b57cec5SDimitry Andric
2440b57cec5SDimitry Andric// FP miscellaneous instructions.
2450b57cec5SDimitry Andricdef : WriteRes<WriteFCvt,  [M3UnitFCVT]> { let Latency = 3; }
2460b57cec5SDimitry Andricdef : WriteRes<WriteFImm,  [M3UnitNALU]> { let Latency = 1; }
2470b57cec5SDimitry Andricdef : WriteRes<WriteFCopy, [M3UnitNALU]> { let Latency = 1; }
2480b57cec5SDimitry Andric
2490b57cec5SDimitry Andric// FP load instructions.
2500b57cec5SDimitry Andricdef : SchedAlias<WriteVLD, M3WriteL5>;
2510b57cec5SDimitry Andric
2520b57cec5SDimitry Andric// FP store instructions.
2530b57cec5SDimitry Andricdef : WriteRes<WriteVST, [M3UnitS,
2540b57cec5SDimitry Andric                          M3UnitFST]> { let Latency = 1;
2550b57cec5SDimitry Andric                                        let NumMicroOps = 1; }
2560b57cec5SDimitry Andric
2570b57cec5SDimitry Andric// ASIMD FP instructions.
258349cc55cSDimitry Andricdef : WriteRes<WriteVd, [M3UnitNALU]> { let Latency = 3; }
259349cc55cSDimitry Andricdef : WriteRes<WriteVq, [M3UnitNALU]> { let Latency = 3; }
2600b57cec5SDimitry Andric
2610b57cec5SDimitry Andric// Other miscellaneous instructions.
2620b57cec5SDimitry Andricdef : WriteRes<WriteAtomic,  []> { let Unsupported = 1; }
2630b57cec5SDimitry Andricdef : WriteRes<WriteBarrier, []> { let Latency = 1; }
2640b57cec5SDimitry Andricdef : WriteRes<WriteHint,    []> { let Latency = 1; }
2650b57cec5SDimitry Andricdef : WriteRes<WriteSys,     []> { let Latency = 1; }
2660b57cec5SDimitry Andric
2670b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
2680b57cec5SDimitry Andric// Generic fast forwarding.
2690b57cec5SDimitry Andric
2700b57cec5SDimitry Andric// TODO: Add FP register forwarding rules.
2710b57cec5SDimitry Andric
2720b57cec5SDimitry Andricdef : ReadAdvance<ReadI,       0>;
2730b57cec5SDimitry Andricdef : ReadAdvance<ReadISReg,   0>;
2740b57cec5SDimitry Andricdef : ReadAdvance<ReadIEReg,   0>;
2750b57cec5SDimitry Andricdef : ReadAdvance<ReadIM,      0>;
2760b57cec5SDimitry Andric// TODO: The forwarding for 32 bits actually saves 2 cycles.
2770b57cec5SDimitry Andricdef : ReadAdvance<ReadIMA,     3, [WriteIM32, WriteIM64]>;
2780b57cec5SDimitry Andricdef : ReadAdvance<ReadID,      0>;
2790b57cec5SDimitry Andricdef : ReadAdvance<ReadExtrHi,  0>;
2800b57cec5SDimitry Andricdef : ReadAdvance<ReadAdrBase, 0>;
2810b57cec5SDimitry Andricdef : ReadAdvance<ReadVLD,     0>;
282349cc55cSDimitry Andricdef : ReadAdvance<ReadST,      0>;
2830b57cec5SDimitry Andric
2840b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
2850b57cec5SDimitry Andric// Finer scheduling model.
2860b57cec5SDimitry Andric
2870b57cec5SDimitry Andricdef M3WriteNEONA   : SchedWriteRes<[M3UnitNSHF,
2880b57cec5SDimitry Andric                                    M3UnitFADD]>  { let Latency = 3;
2890b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2900b57cec5SDimitry Andricdef M3WriteNEONB   : SchedWriteRes<[M3UnitNALU,
2910b57cec5SDimitry Andric                                    M3UnitFST]>   { let Latency = 10;
2920b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2930b57cec5SDimitry Andricdef M3WriteNEOND   : SchedWriteRes<[M3UnitNSHF,
2940b57cec5SDimitry Andric                                    M3UnitFST]>   { let Latency = 6;
2950b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2960b57cec5SDimitry Andricdef M3WriteNEONH   : SchedWriteRes<[M3UnitNALU,
2970b57cec5SDimitry Andric                                    M3UnitS]>     { let Latency = 5;
2980b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
2990b57cec5SDimitry Andricdef M3WriteNEONI   : SchedWriteRes<[M3UnitNSHF,
3000b57cec5SDimitry Andric                                    M3UnitS]>     { let Latency = 5;
3010b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
3020b57cec5SDimitry Andricdef M3WriteNEONV   : SchedWriteRes<[M3UnitFDIV0,
3030b57cec5SDimitry Andric                                    M3UnitFDIV1]>  { let Latency = 7;
3040b57cec5SDimitry Andric                                                     let NumMicroOps = 2;
3055f757f3fSDimitry Andric                                                     let ReleaseAtCycles = [8, 8]; }
3060b57cec5SDimitry Andricdef M3WriteNEONW   : SchedWriteRes<[M3UnitFDIV0,
3070b57cec5SDimitry Andric                                    M3UnitFDIV1]>  { let Latency = 12;
3080b57cec5SDimitry Andric                                                     let NumMicroOps = 2;
3095f757f3fSDimitry Andric                                                     let ReleaseAtCycles = [13, 13]; }
3100b57cec5SDimitry Andricdef M3WriteNEONX   : SchedWriteRes<[M3UnitFSQR,
3110b57cec5SDimitry Andric                                    M3UnitFSQR]>  { let Latency = 18;
3120b57cec5SDimitry Andric                                                    let NumMicroOps = 2;
3135f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [19, 19]; }
3140b57cec5SDimitry Andricdef M3WriteNEONY   : SchedWriteRes<[M3UnitFSQR,
3150b57cec5SDimitry Andric                                    M3UnitFSQR]>  { let Latency = 25;
3160b57cec5SDimitry Andric                                                    let NumMicroOps = 2;
3175f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [26, 26]; }
3180b57cec5SDimitry Andricdef M3WriteNEONZ   : SchedWriteRes<[M3UnitNMSC,
3190b57cec5SDimitry Andric                                    M3UnitNMSC]>  { let Latency = 5;
3200b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
3210b57cec5SDimitry Andricdef M3WriteFADD2   : SchedWriteRes<[M3UnitFADD]>  { let Latency = 2; }
3220b57cec5SDimitry Andricdef M3WriteFCVT2   : SchedWriteRes<[M3UnitFCVT]>  { let Latency = 2; }
3230b57cec5SDimitry Andricdef M3WriteFCVT3   : SchedWriteRes<[M3UnitFCVT]>  { let Latency = 3; }
3240b57cec5SDimitry Andricdef M3WriteFCVT3A  : SchedWriteRes<[M3UnitFCVT0]> { let Latency = 3; }
3250b57cec5SDimitry Andricdef M3WriteFCVT4A  : SchedWriteRes<[M3UnitFCVT0]> { let Latency = 4; }
3260b57cec5SDimitry Andricdef M3WriteFCVT4   : SchedWriteRes<[M3UnitFCVT]>  { let Latency = 4; }
3270b57cec5SDimitry Andricdef M3WriteFDIV10  : SchedWriteRes<[M3UnitFDIV]>  { let Latency = 7;
3285f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [8]; }
3290b57cec5SDimitry Andricdef M3WriteFDIV12  : SchedWriteRes<[M3UnitFDIV]>  { let Latency = 12;
3305f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [13]; }
3310b57cec5SDimitry Andricdef M3WriteFMAC3   : SchedWriteRes<[M3UnitFMAC]>  { let Latency = 3; }
3320b57cec5SDimitry Andricdef M3WriteFMAC4   : SchedWriteRes<[M3UnitFMAC]>  { let Latency = 4; }
3330b57cec5SDimitry Andricdef M3WriteFMAC5   : SchedWriteRes<[M3UnitFMAC]>  { let Latency = 5; }
3340b57cec5SDimitry Andricdef M3WriteFSQR17  : SchedWriteRes<[M3UnitFSQR]>  { let Latency = 18;
3355f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [19]; }
3360b57cec5SDimitry Andricdef M3WriteFSQR25  : SchedWriteRes<[M3UnitFSQR]>  { let Latency = 25;
3375f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [26]; }
3380b57cec5SDimitry Andricdef M3WriteNALU1   : SchedWriteRes<[M3UnitNALU]>  { let Latency = 1; }
3390b57cec5SDimitry Andricdef M3WriteNCRY1A  : SchedWriteRes<[M3UnitNCRY0]> { let Latency = 1; }
3400b57cec5SDimitry Andricdef M3WriteNCRY3A  : SchedWriteRes<[M3UnitNCRY0]> { let Latency = 3; }
3410b57cec5SDimitry Andricdef M3WriteNCRY5A  : SchedWriteRes<[M3UnitNCRY]>  { let Latency = 5; }
3420b57cec5SDimitry Andricdef M3WriteNMSC1   : SchedWriteRes<[M3UnitNMSC]>  { let Latency = 1; }
3430b57cec5SDimitry Andricdef M3WriteNMSC2   : SchedWriteRes<[M3UnitNMSC]>  { let Latency = 2; }
3440b57cec5SDimitry Andricdef M3WriteNMSC3   : SchedWriteRes<[M3UnitNMSC]>  { let Latency = 3; }
3450b57cec5SDimitry Andricdef M3WriteNMUL3   : SchedWriteRes<[M3UnitNMUL]>  { let Latency = 3; }
3460b57cec5SDimitry Andricdef M3WriteNSHF1   : SchedWriteRes<[M3UnitNSHF]>  { let Latency = 1; }
3470b57cec5SDimitry Andricdef M3WriteNSHF3   : SchedWriteRes<[M3UnitNSHF]>  { let Latency = 3; }
3480b57cec5SDimitry Andricdef M3WriteNSHT1   : SchedWriteRes<[M3UnitNSHT]>  { let Latency = 1; }
3490b57cec5SDimitry Andricdef M3WriteNSHT2   : SchedWriteRes<[M3UnitNSHT]>  { let Latency = 2; }
3500b57cec5SDimitry Andricdef M3WriteNSHT3   : SchedWriteRes<[M3UnitNSHT]>  { let Latency = 3; }
3510b57cec5SDimitry Andricdef M3WriteVLDA    : SchedWriteRes<[M3UnitL,
3520b57cec5SDimitry Andric                                    M3UnitL]>     { let Latency = 5;
3530b57cec5SDimitry Andric                                                    let NumMicroOps = 2; }
3540b57cec5SDimitry Andricdef M3WriteVLDB    : SchedWriteRes<[M3UnitL,
3550b57cec5SDimitry Andric                                    M3UnitL,
3560b57cec5SDimitry Andric                                    M3UnitL]>     { let Latency = 6;
3570b57cec5SDimitry Andric                                                    let NumMicroOps = 3; }
3580b57cec5SDimitry Andricdef M3WriteVLDC    : SchedWriteRes<[M3UnitL,
3590b57cec5SDimitry Andric                                    M3UnitL,
3600b57cec5SDimitry Andric                                    M3UnitL,
3610b57cec5SDimitry Andric                                    M3UnitL]>     { let Latency = 6;
3620b57cec5SDimitry Andric                                                    let NumMicroOps = 4; }
3630b57cec5SDimitry Andricdef M3WriteVLDD    : SchedWriteRes<[M3UnitL,
3640b57cec5SDimitry Andric                                    M3UnitNALU]>  { let Latency = 7;
3650b57cec5SDimitry Andric                                                    let NumMicroOps = 2;
3665f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [2, 1]; }
3670b57cec5SDimitry Andricdef M3WriteVLDE    : SchedWriteRes<[M3UnitL,
3680b57cec5SDimitry Andric                                    M3UnitNALU]>  { let Latency = 6;
3690b57cec5SDimitry Andric                                                    let NumMicroOps = 2;
3705f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [2, 1]; }
3710b57cec5SDimitry Andricdef M3WriteVLDF    : SchedWriteRes<[M3UnitL,
3720b57cec5SDimitry Andric                                    M3UnitL]>     { let Latency = 10;
3730b57cec5SDimitry Andric                                                    let NumMicroOps = 2;
3745f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [5, 5]; }
3750b57cec5SDimitry Andricdef M3WriteVLDG    : SchedWriteRes<[M3UnitL,
3760b57cec5SDimitry Andric                                    M3UnitNALU,
3770b57cec5SDimitry Andric                                    M3UnitNALU]>  { let Latency = 7;
3780b57cec5SDimitry Andric                                                    let NumMicroOps = 3;
3795f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [2, 1, 1]; }
3800b57cec5SDimitry Andricdef M3WriteVLDH    : SchedWriteRes<[M3UnitL,
3810b57cec5SDimitry Andric                                    M3UnitNALU,
3820b57cec5SDimitry Andric                                    M3UnitNALU]>  { let Latency = 6;
3830b57cec5SDimitry Andric                                                    let NumMicroOps = 3;
3845f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [2, 1, 1]; }
3850b57cec5SDimitry Andricdef M3WriteVLDI    : SchedWriteRes<[M3UnitL,
3860b57cec5SDimitry Andric                                    M3UnitL,
3870b57cec5SDimitry Andric                                    M3UnitL]>     { let Latency = 12;
3880b57cec5SDimitry Andric                                                    let NumMicroOps = 3;
3895f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [6, 6, 6]; }
3900b57cec5SDimitry Andricdef M3WriteVLDJ    : SchedWriteRes<[M3UnitL,
3910b57cec5SDimitry Andric                                    M3UnitNALU,
3920b57cec5SDimitry Andric                                    M3UnitNALU,
3930b57cec5SDimitry Andric                                    M3UnitNALU]>  { let Latency = 7;
3940b57cec5SDimitry Andric                                                    let NumMicroOps = 4;
3955f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [2, 1, 1, 1]; }
3960b57cec5SDimitry Andricdef M3WriteVLDK    : SchedWriteRes<[M3UnitL,
3970b57cec5SDimitry Andric                                    M3UnitNALU,
3980b57cec5SDimitry Andric                                    M3UnitNALU,
3990b57cec5SDimitry Andric                                    M3UnitNALU,
4000b57cec5SDimitry Andric                                    M3UnitNALU]>  { let Latency = 9;
4010b57cec5SDimitry Andric                                                    let NumMicroOps = 5;
4025f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [4, 1, 1, 1, 1]; }
4030b57cec5SDimitry Andricdef M3WriteVLDL    : SchedWriteRes<[M3UnitL,
4040b57cec5SDimitry Andric                                    M3UnitNALU,
4050b57cec5SDimitry Andric                                    M3UnitNALU,
4060b57cec5SDimitry Andric                                    M3UnitL,
4070b57cec5SDimitry Andric                                    M3UnitNALU]>  { let Latency = 6;
4080b57cec5SDimitry Andric                                                    let NumMicroOps = 5;
4095f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [6, 1, 1, 6, 1]; }
4100b57cec5SDimitry Andricdef M3WriteVLDM    : SchedWriteRes<[M3UnitL,
4110b57cec5SDimitry Andric                                    M3UnitNALU,
4120b57cec5SDimitry Andric                                    M3UnitNALU,
4130b57cec5SDimitry Andric                                    M3UnitL,
4140b57cec5SDimitry Andric                                    M3UnitNALU,
4150b57cec5SDimitry Andric                                    M3UnitNALU]>  { let Latency = 7;
4160b57cec5SDimitry Andric                                                    let NumMicroOps = 6;
4175f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [6, 1, 1, 6, 1, 1]; }
4180b57cec5SDimitry Andricdef M3WriteVLDN    : SchedWriteRes<[M3UnitL,
4190b57cec5SDimitry Andric                                    M3UnitL,
4200b57cec5SDimitry Andric                                    M3UnitL,
4210b57cec5SDimitry Andric                                    M3UnitL]>     { let Latency = 14;
4220b57cec5SDimitry Andric                                                    let NumMicroOps = 4;
4235f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [6, 6, 6, 6]; }
4240b57cec5SDimitry Andricdef M3WriteVSTA    : WriteSequence<[WriteVST], 2>;
4250b57cec5SDimitry Andricdef M3WriteVSTB    : WriteSequence<[WriteVST], 3>;
4260b57cec5SDimitry Andricdef M3WriteVSTC    : WriteSequence<[WriteVST], 4>;
4270b57cec5SDimitry Andricdef M3WriteVSTD    : SchedWriteRes<[M3UnitS,
4280b57cec5SDimitry Andric                                    M3UnitFST,
4290b57cec5SDimitry Andric                                    M3UnitS,
4300b57cec5SDimitry Andric                                    M3UnitFST]>   { let Latency = 7;
4310b57cec5SDimitry Andric                                                    let NumMicroOps = 4;
4325f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [1, 3, 1, 3]; }
4330b57cec5SDimitry Andricdef M3WriteVSTE    : SchedWriteRes<[M3UnitS,
4340b57cec5SDimitry Andric                                    M3UnitFST,
4350b57cec5SDimitry Andric                                    M3UnitS,
4360b57cec5SDimitry Andric                                    M3UnitFST,
4370b57cec5SDimitry Andric                                    M3UnitS,
4380b57cec5SDimitry Andric                                    M3UnitFST]>   { let Latency = 8;
4390b57cec5SDimitry Andric                                                    let NumMicroOps = 6;
4405f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [1, 3, 1, 3, 1, 3]; }
4410b57cec5SDimitry Andricdef M3WriteVSTF    : SchedWriteRes<[M3UnitNALU,
4420b57cec5SDimitry Andric                                    M3UnitFST,
4430b57cec5SDimitry Andric                                    M3UnitFST,
4440b57cec5SDimitry Andric                                    M3UnitS,
4450b57cec5SDimitry Andric                                    M3UnitFST,
4460b57cec5SDimitry Andric                                    M3UnitS,
4470b57cec5SDimitry Andric                                    M3UnitFST]>   { let Latency = 15;
4480b57cec5SDimitry Andric                                                    let NumMicroOps = 7;
4495f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [1, 3, 3, 1, 3, 1, 3]; }
4500b57cec5SDimitry Andricdef M3WriteVSTG    : SchedWriteRes<[M3UnitNALU,
4510b57cec5SDimitry Andric                                    M3UnitFST,
4520b57cec5SDimitry Andric                                    M3UnitFST,
4530b57cec5SDimitry Andric                                    M3UnitS,
4540b57cec5SDimitry Andric                                    M3UnitFST,
4550b57cec5SDimitry Andric                                    M3UnitS,
4560b57cec5SDimitry Andric                                    M3UnitFST,
4570b57cec5SDimitry Andric                                    M3UnitS,
4580b57cec5SDimitry Andric                                    M3UnitFST]>   { let Latency = 16;
4590b57cec5SDimitry Andric                                                    let NumMicroOps = 9;
4605f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [1, 3, 3, 1, 3, 1, 3, 1, 3]; }
4610b57cec5SDimitry Andricdef M3WriteVSTH    : SchedWriteRes<[M3UnitNALU,
4620b57cec5SDimitry Andric                                    M3UnitFST,
4630b57cec5SDimitry Andric                                    M3UnitFST,
4640b57cec5SDimitry Andric                                    M3UnitS,
4650b57cec5SDimitry Andric                                    M3UnitFST]>   { let Latency = 14;
4660b57cec5SDimitry Andric                                                    let NumMicroOps = 5;
4675f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [1, 3, 3, 1, 3]; }
4680b57cec5SDimitry Andricdef M3WriteVSTI    : SchedWriteRes<[M3UnitNALU,
4690b57cec5SDimitry Andric                                    M3UnitFST,
4700b57cec5SDimitry Andric                                    M3UnitFST,
4710b57cec5SDimitry Andric                                    M3UnitS,
4720b57cec5SDimitry Andric                                    M3UnitFST,
4730b57cec5SDimitry Andric                                    M3UnitS,
4740b57cec5SDimitry Andric                                    M3UnitFST,
4750b57cec5SDimitry Andric                                    M3UnitS,
4760b57cec5SDimitry Andric                                    M3UnitFST]>   { let Latency = 17;
4770b57cec5SDimitry Andric                                                    let NumMicroOps = 9;
4785f757f3fSDimitry Andric                                                    let ReleaseAtCycles = [1, 3, 3, 1, 3, 1, 3, 1, 3]; }
4790b57cec5SDimitry Andric
4800b57cec5SDimitry Andric// Special cases.
4810b57cec5SDimitry Andricdef M3WriteAES     : SchedWriteRes<[M3UnitNCRY]>  { let Latency = 1; }
4820b57cec5SDimitry Andricdef M3WriteCOPY    : SchedWriteVariant<[SchedVar<ExynosFPPred, [M3WriteNALU1]>,
4830b57cec5SDimitry Andric                                        SchedVar<NoSchedPred,  [M3WriteZ0]>]>;
4840b57cec5SDimitry Andricdef M3WriteMOVI    : SchedWriteVariant<[SchedVar<IsZeroFPIdiomPred, [M3WriteZ0]>,
4850b57cec5SDimitry Andric                                        SchedVar<NoSchedPred,       [M3WriteNALU1]>]>;
4860b57cec5SDimitry Andric
4870b57cec5SDimitry Andric// Fast forwarding.
4880b57cec5SDimitry Andricdef M3ReadAES      : SchedReadAdvance<1, [M3WriteAES]>;
4890b57cec5SDimitry Andricdef M3ReadFMAC     : SchedReadAdvance<1, [M3WriteFMAC4,
4900b57cec5SDimitry Andric                                          M3WriteFMAC5]>;
4910b57cec5SDimitry Andricdef M3ReadNMUL     : SchedReadAdvance<1, [M3WriteNMUL3]>;
4920b57cec5SDimitry Andric
4930b57cec5SDimitry Andric// Branch instructions
4940b57cec5SDimitry Andricdef : InstRW<[M3WriteB1], (instrs Bcc)>;
4950b57cec5SDimitry Andricdef : InstRW<[M3WriteA1], (instrs BL)>;
4960b57cec5SDimitry Andricdef : InstRW<[M3WriteBX], (instrs BLR)>;
4970b57cec5SDimitry Andricdef : InstRW<[M3WriteC1], (instregex "^CBN?Z[WX]")>;
4980b57cec5SDimitry Andricdef : InstRW<[M3WriteAD], (instregex "^TBN?Z[WX]")>;
4990b57cec5SDimitry Andric
5000b57cec5SDimitry Andric// Arithmetic and logical integer instructions.
5010b57cec5SDimitry Andricdef : InstRW<[M3WriteAX], (instregex "^(ADD|AND|BIC|EON|EOR|ORN|SUB)[WX]rs$")>;
5020b57cec5SDimitry Andricdef : InstRW<[M3WriteAU], (instrs ORRWrs, ORRXrs)>;
5030b57cec5SDimitry Andricdef : InstRW<[M3WriteAX], (instregex "^(ADD|SUB)S?[WX]rx(64)?$")>;
5040b57cec5SDimitry Andricdef : InstRW<[M3WriteAX], (instregex "^(ADD|AND|BIC|SUB)S[WX]rs$")>;
5050b57cec5SDimitry Andricdef : InstRW<[M3WriteAV], (instrs ADDWri, ADDXri)>;
5060b57cec5SDimitry Andricdef : InstRW<[M3WriteAW], (instrs ORRWri, ORRXri)>;
5070b57cec5SDimitry Andric
5080b57cec5SDimitry Andric// Move instructions.
5090b57cec5SDimitry Andricdef : InstRW<[M3WriteCOPY], (instrs COPY)>;
5100b57cec5SDimitry Andricdef : InstRW<[M3WriteZ0],   (instrs ADR, ADRP)>;
5110b57cec5SDimitry Andricdef : InstRW<[M3WriteZ0],   (instregex "^MOV[NZ][WX]i")>;
5120b57cec5SDimitry Andric
5130b57cec5SDimitry Andric// Divide and multiply instructions.
5140b57cec5SDimitry Andric
5150b57cec5SDimitry Andric// Miscellaneous instructions.
5160b57cec5SDimitry Andric
5170b57cec5SDimitry Andric// Load instructions.
5180b57cec5SDimitry Andricdef : InstRW<[M3WriteLD,
5190b57cec5SDimitry Andric              WriteLDHi,
5200b57cec5SDimitry Andric              WriteAdr],    (instregex "^LDP(SW|W|X)(post|pre)")>;
5210b57cec5SDimitry Andricdef : InstRW<[M3WriteLB,
5220b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDR(BB|SBW|SBX|HH|SHW|SHX|SW|W|X)roW")>;
5230b57cec5SDimitry Andricdef : InstRW<[M3WriteLX,
5240b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDR(BB|SBW|SBX|HH|SHW|SHX|SW|W|X)roX")>;
5250b57cec5SDimitry Andricdef : InstRW<[M3WriteLB,
5260b57cec5SDimitry Andric              ReadAdrBase], (instrs PRFMroW)>;
5270b57cec5SDimitry Andricdef : InstRW<[M3WriteLX,
5280b57cec5SDimitry Andric              ReadAdrBase], (instrs PRFMroX)>;
5290b57cec5SDimitry Andric
5300b57cec5SDimitry Andric// Store instructions.
5310b57cec5SDimitry Andricdef : InstRW<[M3WriteSB,
5320b57cec5SDimitry Andric              ReadAdrBase], (instregex "^STR(BB|HH|W|X)roW")>;
5330b57cec5SDimitry Andricdef : InstRW<[WriteST,
5340b57cec5SDimitry Andric              ReadAdrBase], (instregex "^STR(BB|HH|W|X)roX")>;
5350b57cec5SDimitry Andric
5360b57cec5SDimitry Andric// FP data instructions.
5370b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1],  (instregex "^FABS[DS]r")>;
5380b57cec5SDimitry Andricdef : InstRW<[M3WriteFADD2],  (instregex "^F(ADD|SUB)[DS]rr")>;
5390b57cec5SDimitry Andricdef : InstRW<[M3WriteFDIV10], (instrs FDIVSrr)>;
5400b57cec5SDimitry Andricdef : InstRW<[M3WriteFDIV12], (instrs FDIVDrr)>;
5410b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC1],  (instregex "^F(MAX|MIN).+rr")>;
5420b57cec5SDimitry Andricdef : InstRW<[M3WriteFMAC3],  (instregex "^FN?MUL[DS]rr")>;
5430b57cec5SDimitry Andricdef : InstRW<[M3WriteFMAC4,
5440b57cec5SDimitry Andric              M3ReadFMAC],    (instregex "^FN?M(ADD|SUB)[DS]rrr")>;
5450b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1],  (instregex "^FNEG[DS]r")>;
5460b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT3A], (instregex "^FRINT.+r")>;
5470b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONH],  (instregex "^FCSEL[DS]rrr")>;
5480b57cec5SDimitry Andricdef : InstRW<[M3WriteFSQR17], (instrs FSQRTSr)>;
5490b57cec5SDimitry Andricdef : InstRW<[M3WriteFSQR25], (instrs FSQRTDr)>;
5500b57cec5SDimitry Andric
5510b57cec5SDimitry Andric// FP miscellaneous instructions.
5520b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT3],  (instregex "^FCVT[DHS][DHS]r")>;
5530b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT4A], (instregex "^[SU]CVTF[SU][XW][DHS]ri")>;
5540b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT3A], (instregex "^FCVT[AMNPZ][SU]U[XW][DHS]r")>;
5550b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT3A], (instregex "^FCVTZ[SU][dhs]")>;
5560b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1],  (instregex "^FMOV[DS][ir]")>;
5570b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT4],  (instregex "^[FU](RECP|RSQRT)Ev1")>;
5580b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC1],  (instregex "^FRECPXv1")>;
5590b57cec5SDimitry Andricdef : InstRW<[M3WriteFMAC4,
5600b57cec5SDimitry Andric              M3ReadFMAC],    (instregex "^F(RECP|RSQRT)S(16|32|64)")>;
5610b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1],  (instregex "^FMOV[WX][DS]r")>;
5620b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1],  (instregex "^FMOV[DS][WX]r")>;
5630b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONI],  (instregex "^FMOV(DX|XD)Highr")>;
5640b57cec5SDimitry Andric
5650b57cec5SDimitry Andric// FP load instructions.
5660b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "^LDR[DSQ]l")>;
5670b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "^LDUR[BDHSQ]i")>;
5680b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
5690b57cec5SDimitry Andric              WriteAdr],    (instregex "^LDR[BDHSQ](post|pre)")>;
5700b57cec5SDimitry Andricdef : InstRW<[WriteVLD],    (instregex "^LDR[BDHSQ]ui")>;
5710b57cec5SDimitry Andricdef : InstRW<[M3WriteLE,
5720b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDR[BDHS]roW")>;
5730b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
5740b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDR[BDHS]roX")>;
575480093f4SDimitry Andricdef : InstRW<[M3WriteLY,
5760b57cec5SDimitry Andric              ReadAdrBase], (instregex "^LDRQro[WX]")>;
5770b57cec5SDimitry Andricdef : InstRW<[WriteVLD,
5780b57cec5SDimitry Andric              M3WriteLH],   (instregex "^LDN?P[DS]i")>;
5790b57cec5SDimitry Andricdef : InstRW<[M3WriteLA,
5800b57cec5SDimitry Andric              M3WriteLH],   (instregex "^LDN?PQi")>;
5810b57cec5SDimitry Andricdef : InstRW<[M3WriteLB,
5820b57cec5SDimitry Andric              M3WriteLH,
5830b57cec5SDimitry Andric              WriteAdr],    (instregex "^LDP[DS](post|pre)")>;
5840b57cec5SDimitry Andricdef : InstRW<[M3WriteLC,
5850b57cec5SDimitry Andric              M3WriteLH,
5860b57cec5SDimitry Andric              WriteAdr],    (instregex "^LDPQ(post|pre)")>;
5870b57cec5SDimitry Andric
5880b57cec5SDimitry Andric// FP store instructions.
5890b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "^STUR[BDHSQ]i")>;
5900b57cec5SDimitry Andricdef : InstRW<[WriteVST,
5910b57cec5SDimitry Andric              WriteAdr],    (instregex "^STR[BDHSQ](post|pre)")>;
5920b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "^STR[BDHSQ]ui")>;
5930b57cec5SDimitry Andricdef : InstRW<[M3WriteSA,
5940b57cec5SDimitry Andric              ReadAdrBase], (instregex "^STR[BDHS]roW")>;
595480093f4SDimitry Andricdef : InstRW<[M3WriteSA,
596480093f4SDimitry Andric              ReadAdrBase], (instregex "^STRQroW")>;
5970b57cec5SDimitry Andricdef : InstRW<[WriteVST,
5980b57cec5SDimitry Andric              ReadAdrBase], (instregex "^STR[BDHS]roX")>;
599480093f4SDimitry Andricdef : InstRW<[M3WriteSY,
600480093f4SDimitry Andric              ReadAdrBase], (instregex "^STRQroX")>;
6010b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "^STN?P[DSQ]i")>;
6020b57cec5SDimitry Andricdef : InstRW<[WriteVST,
6030b57cec5SDimitry Andric              WriteAdr],    (instregex "^STP[DS](post|pre)")>;
604480093f4SDimitry Andricdef : InstRW<[M3WriteSC,
6050b57cec5SDimitry Andric              WriteAdr],    (instregex "^STPQ(post|pre)")>;
6060b57cec5SDimitry Andric
6070b57cec5SDimitry Andric// ASIMD instructions.
6080b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^[SU]ABAL?v")>;
6090b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC1], (instregex "^[SU]ABDL?v")>;
6100b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC1], (instregex "^((SQ)?ABS|SQNEG)v")>;
6110b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1], (instregex "^(ADD|NEG|SUB)v")>;
6120b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^[SU]?ADDL?Pv")>;
6130b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^[SU]H(ADD|SUB)v")>;
6140b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^[SU](ADD|SUB)[LW]V?v")>;
6150b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^R?(ADD|SUB)HN2?v")>;
6160b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^[SU]Q(ADD|SUB)v")>;
6170b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^(SU|US)QADDv")>;
6180b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^[SU]RHADDv")>;
6190b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC1], (instregex "^CM(EQ|GE|GT|HI|HS|LE|LT)v")>;
6200b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1], (instregex "^CMTSTv")>;
6210b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1], (instregex "^(AND|BIC|EOR|MVNI|NOT|ORN|ORR)v")>;
6220b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC1], (instregex "^[SU](MIN|MAX)v")>;
6230b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC2], (instregex "^[SU](MIN|MAX)Pv")>;
6240b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^[SU](MIN|MAX)Vv")>;
6250b57cec5SDimitry Andricdef : InstRW<[M3WriteNMUL3], (instregex "^(MUL|SQR?DMULH)v")>;
6260b57cec5SDimitry Andricdef : InstRW<[M3WriteNMUL3,
6270b57cec5SDimitry Andric              M3ReadNMUL],   (instregex "^ML[AS]v")>;
6280b57cec5SDimitry Andricdef : InstRW<[M3WriteNMUL3], (instregex "^[SU]ML[AS]Lv")>;
6290b57cec5SDimitry Andricdef : InstRW<[M3WriteNMUL3], (instregex "^SQDML[AS]L")>;
6300b57cec5SDimitry Andricdef : InstRW<[M3WriteNMUL3], (instregex "^(S|U|SQD)MULLv")>;
6310b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC3], (instregex "^[SU]ADALPv")>;
6320b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHT3], (instregex "^[SU]R?SRAv")>;
6330b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHT1], (instregex "^SHL[dv]")>;
6340b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHT1], (instregex "^[SU]SH[LR][dv]")>;
6350b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHT1], (instregex "^S[RS]I[dv]")>;
6360b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHT2], (instregex "^[SU]?SHLLv")>;
6370b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHT3], (instregex "^(([SU]Q)?R)?SHRU?N[bhsv]")>;
6380b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHT3], (instregex "^[SU]RSH[LR][dv]")>;
6390b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHT3], (instregex "^[SU]QR?SHLU?[bdhsv]")>;
6400b57cec5SDimitry Andric
6410b57cec5SDimitry Andric// ASIMD FP instructions.
6420b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1],  (instregex "^FABSv")>;
6430b57cec5SDimitry Andricdef : InstRW<[M3WriteFADD2],  (instregex "^F(ABD|ADD|SUB)v")>;
6440b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONA],  (instregex "^FADDP")>;
6450b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC1],  (instregex "^F(AC|CM)(EQ|GE|GT|LE|LT)v[^1]")>;
6460b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT3],  (instregex "^FCVT(L|N|XN)v")>;
6470b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT2],  (instregex "^FCVT[AMNPZ][SU]v")>;
6480b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT2],  (instregex "^[SU]CVTFv")>;
6490b57cec5SDimitry Andricdef : InstRW<[M3WriteFDIV10], (instrs FDIVv2f32)>;
6500b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONV],  (instrs FDIVv4f32)>;
6510b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONW],  (instrs FDIVv2f64)>;
6520b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC1],  (instregex "^F(MAX|MIN)(NM)?v")>;
6530b57cec5SDimitry Andricdef : InstRW<[M3WriteNMSC2],  (instregex "^F(MAX|MIN)(NM)?Pv")>;
6540b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONZ],  (instregex "^F(MAX|MIN)(NM)?Vv")>;
6550b57cec5SDimitry Andricdef : InstRW<[M3WriteFMAC3],  (instregex "^FMULX?v.[fi]")>;
6560b57cec5SDimitry Andricdef : InstRW<[M3WriteFMAC4,
6570b57cec5SDimitry Andric              M3ReadFMAC],    (instregex "^FML[AS]v.f")>;
6580b57cec5SDimitry Andricdef : InstRW<[M3WriteFMAC5,
6590b57cec5SDimitry Andric              M3ReadFMAC],    (instregex "^FML[AS]v.i")>;
6600b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1],  (instregex "^FNEGv")>;
6610b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT3A], (instregex "^FRINT[AIMNPXZ]v")>;
6620b57cec5SDimitry Andricdef : InstRW<[M3WriteFSQR17], (instrs FSQRTv2f32)>;
6630b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONX],  (instrs FSQRTv4f32)>;
6640b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONY],  (instrs FSQRTv2f64)>;
6650b57cec5SDimitry Andric
6660b57cec5SDimitry Andric// ASIMD miscellaneous instructions.
6670b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1], (instregex "^RBITv")>;
6685ffd83dbSDimitry Andricdef : InstRW<[M3WriteNALU1], (instregex "^(BIF|BIT|BSL|BSP)v")>;
6690b57cec5SDimitry Andricdef : InstRW<[M3WriteNEONB], (instregex "^DUPv.+gpr")>;
6700b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1], (instregex "^DUPv.+lane")>;
6710b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1], (instregex "^EXTv")>;
6720b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1], (instregex "^[SU]?Q?XTU?Nv")>;
67304eeddc0SDimitry Andricdef : InstRW<[M3WriteNSHF1], (instregex "^DUP(i8|i16|i32|i64)$")>;
6740b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1], (instregex "^INSv.+lane")>;
6750b57cec5SDimitry Andricdef : InstRW<[M3WriteMOVI],  (instregex "^MOVI")>;
6760b57cec5SDimitry Andricdef : InstRW<[M3WriteNALU1], (instregex "^FMOVv")>;
6770b57cec5SDimitry Andricdef : InstRW<[M3WriteFCVT4], (instregex "^[FU](RECP|RSQRT)Ev[248]")>;
6780b57cec5SDimitry Andricdef : InstRW<[M3WriteFMAC4,
6790b57cec5SDimitry Andric              M3ReadFMAC],   (instregex "^F(RECP|RSQRT)Sv")>;
6800b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1], (instregex "^REV(16|32|64)v")>;
6810b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1], (instregex "^TB[LX]v")>;
6820b57cec5SDimitry Andricdef : InstRW<[M3WriteNEOND], (instregex "^[SU]MOVv")>;
6830b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF3], (instregex "^INSv.+gpr")>;
6840b57cec5SDimitry Andricdef : InstRW<[M3WriteNSHF1], (instregex "^(TRN|UZP|ZIP)[12]v")>;
6850b57cec5SDimitry Andric
6860b57cec5SDimitry Andric// ASIMD load instructions.
6870b57cec5SDimitry Andricdef : InstRW<[M3WriteL5],   (instregex "LD1Onev(8b|4h|2s|1d)$")>;
6880b57cec5SDimitry Andricdef : InstRW<[M3WriteL5,
6890b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Onev(8b|4h|2s|1d)_POST")>;
6900b57cec5SDimitry Andricdef : InstRW<[M3WriteL5],   (instregex "LD1Onev(16b|8h|4s|2d)$")>;
6910b57cec5SDimitry Andricdef : InstRW<[M3WriteL5,
6920b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Onev(16b|8h|4s|2d)_POST")>;
6930b57cec5SDimitry Andric
6940b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDA], (instregex "LD1Twov(8b|4h|2s|1d)$")>;
6950b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDA,
6960b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Twov(8b|4h|2s|1d)_POST")>;
6970b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDA], (instregex "LD1Twov(16b|8h|4s|2d)$")>;
6980b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDA,
6990b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Twov(16b|8h|4s|2d)_POST")>;
7000b57cec5SDimitry Andric
7010b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDB], (instregex "LD1Threev(8b|4h|2s|1d)$")>;
7020b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDB,
7030b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Threev(8b|4h|2s|1d)_POST")>;
7040b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDB], (instregex "LD1Threev(16b|8h|4s|2d)$")>;
7050b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDB,
7060b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Threev(16b|8h|4s|2d)_POST")>;
7070b57cec5SDimitry Andric
7080b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDC], (instregex "LD1Fourv(8b|4h|2s|1d)$")>;
7090b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDC,
7100b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Fourv(8b|4h|2s|1d)_POST")>;
7110b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDC], (instregex "LD1Fourv(16b|8h|4s|2d)$")>;
7120b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDC,
7130b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Fourv(16b|8h|4s|2d)_POST")>;
7140b57cec5SDimitry Andric
7150b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDD], (instregex "LD1i(8|16|32)$")>;
7160b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDD,
7170b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1i(8|16|32)_POST")>;
7180b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDE], (instregex "LD1i(64)$")>;
7190b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDE,
7200b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1i(64)_POST")>;
7210b57cec5SDimitry Andric
7220b57cec5SDimitry Andricdef : InstRW<[M3WriteL5],   (instregex "LD1Rv(8b|4h|2s|1d)$")>;
7230b57cec5SDimitry Andricdef : InstRW<[M3WriteL5,
7240b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Rv(8b|4h|2s|1d)_POST")>;
7250b57cec5SDimitry Andricdef : InstRW<[M3WriteL5],   (instregex "LD1Rv(16b|8h|4s|2d)$")>;
7260b57cec5SDimitry Andricdef : InstRW<[M3WriteL5,
7270b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD1Rv(16b|8h|4s|2d)_POST")>;
7280b57cec5SDimitry Andric
7290b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDF], (instregex "LD2Twov(8b|4h|2s)$")>;
7300b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDF,
7310b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD2Twov(8b|4h|2s)_POST")>;
7320b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDF], (instregex "LD2Twov(16b|8h|4s|2d)$")>;
7330b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDF,
7340b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD2Twov(16b|8h|4s|2d)_POST")>;
7350b57cec5SDimitry Andric
7360b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDG], (instregex "LD2i(8|16|32)$")>;
7370b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDG,
7380b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD2i(8|16|32)_POST")>;
7390b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDH], (instregex "LD2i(64)$")>;
7400b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDH,
7410b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD2i(64)_POST")>;
7420b57cec5SDimitry Andric
7430b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDA], (instregex "LD2Rv(8b|4h|2s|1d)$")>;
7440b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDA,
7450b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD2Rv(8b|4h|2s|1d)_POST")>;
7460b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDA], (instregex "LD2Rv(16b|8h|4s|2d)$")>;
7470b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDA,
7480b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD2Rv(16b|8h|4s|2d)_POST")>;
7490b57cec5SDimitry Andric
7500b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDI], (instregex "LD3Threev(8b|4h|2s)$")>;
7510b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDI,
7520b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD3Threev(8b|4h|2s)_POST")>;
7530b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDI], (instregex "LD3Threev(16b|8h|4s|2d)$")>;
7540b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDI,
7550b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD3Threev(16b|8h|4s|2d)_POST")>;
7560b57cec5SDimitry Andric
7570b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDJ], (instregex "LD3i(8|16|32)$")>;
7580b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDJ,
7590b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD3i(8|16|32)_POST")>;
7600b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDL], (instregex "LD3i(64)$")>;
7610b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDL,
7620b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD3i(64)_POST")>;
7630b57cec5SDimitry Andric
7640b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDB], (instregex "LD3Rv(8b|4h|2s|1d)$")>;
7650b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDB,
7660b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD3Rv(8b|4h|2s|1d)_POST")>;
7670b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDB], (instregex "LD3Rv(16b|8h|4s|2d)$")>;
7680b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDB,
7690b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD3Rv(16b|8h|4s|2d)_POST")>;
7700b57cec5SDimitry Andric
7710b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDN], (instregex "LD4Fourv(8b|4h|2s)$")>;
7720b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDN,
7730b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD4Fourv(8b|4h|2s)_POST")>;
7740b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDN], (instregex "LD4Fourv(16b|8h|4s|2d)$")>;
7750b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDN,
7760b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD4Fourv(16b|8h|4s|2d)_POST")>;
7770b57cec5SDimitry Andric
7780b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDK], (instregex "LD4i(8|16|32)$")>;
7790b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDK,
7800b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD4i(8|16|32)_POST")>;
7810b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDM], (instregex "LD4i(64)$")>;
7820b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDM,
7830b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD4i(64)_POST")>;
7840b57cec5SDimitry Andric
7850b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDC], (instregex "LD4Rv(8b|4h|2s|1d)$")>;
7860b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDC,
7870b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD4Rv(8b|4h|2s|1d)_POST")>;
7880b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDC], (instregex "LD4Rv(16b|8h|4s|2d)$")>;
7890b57cec5SDimitry Andricdef : InstRW<[M3WriteVLDC,
7900b57cec5SDimitry Andric              M3WriteA1],   (instregex "LD4Rv(16b|8h|4s|2d)_POST")>;
7910b57cec5SDimitry Andric
7920b57cec5SDimitry Andric// ASIMD store instructions.
7930b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "ST1Onev(8b|4h|2s|1d)$")>;
7940b57cec5SDimitry Andricdef : InstRW<[WriteVST,
7950b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1Onev(8b|4h|2s|1d)_POST")>;
7960b57cec5SDimitry Andricdef : InstRW<[WriteVST],    (instregex "ST1Onev(16b|8h|4s|2d)$")>;
7970b57cec5SDimitry Andricdef : InstRW<[WriteVST,
7980b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1Onev(16b|8h|4s|2d)_POST")>;
7990b57cec5SDimitry Andric
8000b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTA], (instregex "ST1Twov(8b|4h|2s|1d)$")>;
8010b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTA,
8020b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1Twov(8b|4h|2s|1d)_POST")>;
8030b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTA], (instregex "ST1Twov(16b|8h|4s|2d)$")>;
8040b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTA,
8050b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1Twov(16b|8h|4s|2d)_POST")>;
8060b57cec5SDimitry Andric
8070b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTB], (instregex "ST1Threev(8b|4h|2s|1d)$")>;
8080b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTB,
8090b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1Threev(8b|4h|2s|1d)_POST")>;
8100b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTB], (instregex "ST1Threev(16b|8h|4s|2d)$")>;
8110b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTB,
8120b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1Threev(16b|8h|4s|2d)_POST")>;
8130b57cec5SDimitry Andric
8140b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTC], (instregex "ST1Fourv(8b|4h|2s|1d)$")>;
8150b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTC,
8160b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1Fourv(8b|4h|2s|1d)_POST")>;
8170b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTC], (instregex "ST1Fourv(16b|8h|4s|2d)$")>;
8180b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTC,
8190b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1Fourv(16b|8h|4s|2d)_POST")>;
8200b57cec5SDimitry Andric
8210b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTD], (instregex "ST1i(8|16|32|64)$")>;
8220b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTD,
8230b57cec5SDimitry Andric              WriteAdr],    (instregex "ST1i(8|16|32|64)_POST")>;
8240b57cec5SDimitry Andric
8250b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTD], (instregex "ST2Twov(8b|4h|2s)$")>;
8260b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTD,
8270b57cec5SDimitry Andric              WriteAdr],    (instregex "ST2Twov(8b|4h|2s)_POST")>;
8280b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTE], (instregex "ST2Twov(16b|8h|4s|2d)$")>;
8290b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTE,
8300b57cec5SDimitry Andric              WriteAdr],    (instregex "ST2Twov(16b|8h|4s|2d)_POST")>;
8310b57cec5SDimitry Andric
8320b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTD], (instregex "ST2i(8|16|32)$")>;
8330b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTD,
8340b57cec5SDimitry Andric              WriteAdr],    (instregex "ST2i(8|16|32)_POST")>;
8350b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTD], (instregex "ST2i(64)$")>;
8360b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTD,
8370b57cec5SDimitry Andric              WriteAdr],    (instregex "ST2i(64)_POST")>;
8380b57cec5SDimitry Andric
8390b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTF], (instregex "ST3Threev(8b|4h|2s)$")>;
8400b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTF,
8410b57cec5SDimitry Andric              WriteAdr],    (instregex "ST3Threev(8b|4h|2s)_POST")>;
8420b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTG], (instregex "ST3Threev(16b|8h|4s|2d)$")>;
8430b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTG,
8440b57cec5SDimitry Andric              WriteAdr],    (instregex "ST3Threev(16b|8h|4s|2d)_POST")>;
8450b57cec5SDimitry Andric
8460b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTH], (instregex "ST3i(8|16|32)$")>;
8470b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTH,
8480b57cec5SDimitry Andric              WriteAdr],    (instregex "ST3i(8|16|32)_POST")>;
8490b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTF], (instregex "ST3i(64)$")>;
8500b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTF,
8510b57cec5SDimitry Andric              WriteAdr],    (instregex "ST3i(64)_POST")>;
8520b57cec5SDimitry Andric
8530b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTF], (instregex "ST4Fourv(8b|4h|2s)$")>;
8540b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTF,
8550b57cec5SDimitry Andric              WriteAdr],    (instregex "ST4Fourv(8b|4h|2s)_POST")>;
8560b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTI], (instregex "ST4Fourv(16b|8h|4s|2d)$")>;
8570b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTI,
8580b57cec5SDimitry Andric              WriteAdr],    (instregex "ST4Fourv(16b|8h|4s|2d)_POST")>;
8590b57cec5SDimitry Andric
8600b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTF], (instregex "ST4i(8|16|32|64)$")>;
8610b57cec5SDimitry Andricdef : InstRW<[M3WriteVSTF,
8620b57cec5SDimitry Andric              WriteAdr],    (instregex "ST4i(8|16|32|64)_POST")>;
8630b57cec5SDimitry Andric
8640b57cec5SDimitry Andric// Cryptography instructions.
8650b57cec5SDimitry Andricdef : InstRW<[M3WriteAES],    (instregex "^AES[DE]")>;
8660b57cec5SDimitry Andricdef : InstRW<[M3WriteAES,
8670b57cec5SDimitry Andric              M3ReadAES],     (instregex "^AESI?MC")>;
8680b57cec5SDimitry Andric
8690b57cec5SDimitry Andricdef : InstRW<[M3WriteNCRY3A], (instregex "^PMULL?v")>;
8700b57cec5SDimitry Andric
8710b57cec5SDimitry Andricdef : InstRW<[M3WriteNCRY1A], (instregex "^SHA1([CHMP]|SU[01])")>;
8720b57cec5SDimitry Andricdef : InstRW<[M3WriteNCRY1A], (instregex "^SHA256SU0")>;
8730b57cec5SDimitry Andricdef : InstRW<[M3WriteNCRY5A], (instregex "^SHA256(H2?|SU1)")>;
8740b57cec5SDimitry Andric
8750b57cec5SDimitry Andric// CRC instructions.
8760b57cec5SDimitry Andricdef : InstRW<[M3WriteC2], (instregex "^CRC32")>;
8770b57cec5SDimitry Andric
8780b57cec5SDimitry Andric} // SchedModel = ExynosM3Model
879