xref: /freebsd/contrib/llvm-project/llvm/lib/Target/X86/X86ScheduleSLM.td (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
10b57cec5SDimitry Andric//=- X86ScheduleSLM.td - X86 Silvermont Scheduling -----------*- 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 Intel Silvermont to support
100b57cec5SDimitry Andric// instruction scheduling and other instruction cost heuristics.
110b57cec5SDimitry Andric//
120b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
130b57cec5SDimitry Andric
140b57cec5SDimitry Andricdef SLMModel : SchedMachineModel {
150b57cec5SDimitry Andric  // All x86 instructions are modeled as a single micro-op, and SLM can decode 2
160b57cec5SDimitry Andric  // instructions per cycle.
170b57cec5SDimitry Andric  let IssueWidth = 2;
180b57cec5SDimitry Andric  let MicroOpBufferSize = 32; // Based on the reorder buffer.
190b57cec5SDimitry Andric  let LoadLatency = 3;
200b57cec5SDimitry Andric  let MispredictPenalty = 10;
210b57cec5SDimitry Andric  let PostRAScheduler = 1;
220b57cec5SDimitry Andric
230b57cec5SDimitry Andric  // For small loops, expand by a small factor to hide the backedge cost.
240b57cec5SDimitry Andric  let LoopMicroOpBufferSize = 10;
250b57cec5SDimitry Andric
260b57cec5SDimitry Andric  // FIXME: SSE4 is unimplemented. This flag is set to allow
270b57cec5SDimitry Andric  // the scheduler to assign a default model to unrecognized opcodes.
280b57cec5SDimitry Andric  let CompleteModel = 0;
290b57cec5SDimitry Andric}
300b57cec5SDimitry Andric
310b57cec5SDimitry Andriclet SchedModel = SLMModel in {
320b57cec5SDimitry Andric
330b57cec5SDimitry Andric// Silvermont has 5 reservation stations for micro-ops
340b57cec5SDimitry Andricdef SLM_IEC_RSV0 : ProcResource<1>;
350b57cec5SDimitry Andricdef SLM_IEC_RSV1 : ProcResource<1>;
360b57cec5SDimitry Andricdef SLM_FPC_RSV0 : ProcResource<1> { let BufferSize = 1; }
370b57cec5SDimitry Andricdef SLM_FPC_RSV1 : ProcResource<1> { let BufferSize = 1; }
380b57cec5SDimitry Andricdef SLM_MEC_RSV  : ProcResource<1>;
390b57cec5SDimitry Andric
400b57cec5SDimitry Andric// Many micro-ops are capable of issuing on multiple ports.
410b57cec5SDimitry Andricdef SLM_IEC_RSV01  : ProcResGroup<[SLM_IEC_RSV0, SLM_IEC_RSV1]>;
420b57cec5SDimitry Andricdef SLM_FPC_RSV01  : ProcResGroup<[SLM_FPC_RSV0, SLM_FPC_RSV1]>;
430b57cec5SDimitry Andric
440b57cec5SDimitry Andricdef SLMDivider      : ProcResource<1>;
450b57cec5SDimitry Andricdef SLMFPMultiplier : ProcResource<1>;
460b57cec5SDimitry Andricdef SLMFPDivider    : ProcResource<1>;
470b57cec5SDimitry Andric
480b57cec5SDimitry Andric// Loads are 3 cycles, so ReadAfterLd registers needn't be available until 3
490b57cec5SDimitry Andric// cycles after the memory operand.
500b57cec5SDimitry Andricdef : ReadAdvance<ReadAfterLd, 3>;
510b57cec5SDimitry Andricdef : ReadAdvance<ReadAfterVecLd, 3>;
520b57cec5SDimitry Andricdef : ReadAdvance<ReadAfterVecXLd, 3>;
530b57cec5SDimitry Andricdef : ReadAdvance<ReadAfterVecYLd, 3>;
540b57cec5SDimitry Andric
550b57cec5SDimitry Andricdef : ReadAdvance<ReadInt2Fpu, 0>;
560b57cec5SDimitry Andric
570b57cec5SDimitry Andric// Many SchedWrites are defined in pairs with and without a folded load.
580b57cec5SDimitry Andric// Instructions with folded loads are usually micro-fused, so they only appear
590b57cec5SDimitry Andric// as two micro-ops when queued in the reservation station.
600b57cec5SDimitry Andric// This multiclass defines the resource usage for variants with and without
610b57cec5SDimitry Andric// folded loads.
620b57cec5SDimitry Andricmulticlass SLMWriteResPair<X86FoldableSchedWrite SchedRW,
630b57cec5SDimitry Andric                           list<ProcResourceKind> ExePorts,
640b57cec5SDimitry Andric                           int Lat, list<int> Res = [1], int UOps = 1,
65349cc55cSDimitry Andric                           int LoadUOps = 0, int LoadLat = 3> {
660b57cec5SDimitry Andric  // Register variant is using a single cycle on ExePort.
670b57cec5SDimitry Andric  def : WriteRes<SchedRW, ExePorts> {
680b57cec5SDimitry Andric    let Latency = Lat;
69*5f757f3fSDimitry Andric    let ReleaseAtCycles = Res;
700b57cec5SDimitry Andric    let NumMicroOps = UOps;
710b57cec5SDimitry Andric  }
720b57cec5SDimitry Andric
730b57cec5SDimitry Andric  // Memory variant also uses a cycle on MEC_RSV and adds LoadLat cycles to
740b57cec5SDimitry Andric  // the latency (default = 3).
750b57cec5SDimitry Andric  def : WriteRes<SchedRW.Folded, !listconcat([SLM_MEC_RSV], ExePorts)> {
760b57cec5SDimitry Andric    let Latency = !add(Lat, LoadLat);
77*5f757f3fSDimitry Andric    let ReleaseAtCycles = !listconcat([1], Res);
78349cc55cSDimitry Andric    let NumMicroOps = !add(UOps, LoadUOps);
790b57cec5SDimitry Andric  }
800b57cec5SDimitry Andric}
810b57cec5SDimitry Andric
82349cc55cSDimitry Andric// A folded store needs a cycle on MEC_RSV for the store data (using the same uop),
83349cc55cSDimitry Andric// but it does not need an extra port cycle to recompute the address.
84349cc55cSDimitry Andricdef : WriteRes<WriteRMW, [SLM_MEC_RSV]> { let NumMicroOps = 0; }
850b57cec5SDimitry Andric
860b57cec5SDimitry Andricdef : WriteRes<WriteStore,   [SLM_IEC_RSV01, SLM_MEC_RSV]>;
870b57cec5SDimitry Andricdef : WriteRes<WriteStoreNT, [SLM_IEC_RSV01, SLM_MEC_RSV]>;
880b57cec5SDimitry Andricdef : WriteRes<WriteLoad,    [SLM_MEC_RSV]> { let Latency = 3; }
890b57cec5SDimitry Andricdef : WriteRes<WriteMove,    [SLM_IEC_RSV01]>;
900b57cec5SDimitry Andricdef : WriteRes<WriteZero,    []>;
91fe6060f1SDimitry Andricdefm : X86WriteResUnsupported<WriteVecMaskedGatherWriteback>;
920b57cec5SDimitry Andric
930b57cec5SDimitry Andric// Load/store MXCSR.
94bdd1243dSDimitry Andricdefm : X86WriteRes<WriteSTMXCSR, [SLM_MEC_RSV], 12,[11], 4>;
95bdd1243dSDimitry Andricdefm : X86WriteRes<WriteLDMXCSR, [SLM_MEC_RSV], 10, [8], 5>;
960b57cec5SDimitry Andric
970b57cec5SDimitry Andric// Treat misc copies as a move.
980b57cec5SDimitry Andricdef : InstRW<[WriteMove], (instrs COPY)>;
990b57cec5SDimitry Andric
1000b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteALU,    [SLM_IEC_RSV01], 1>;
1010b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteADC,    [SLM_IEC_RSV01], 1>;
1020b57cec5SDimitry Andric
103349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIMul8,     [SLM_IEC_RSV1],  5, [5], 3>;
104349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIMul16,    [SLM_IEC_RSV1],  5, [5], 4, 1>;
105349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIMul16Imm, [SLM_IEC_RSV1],  4, [4], 2, 1>;
106349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIMul16Reg, [SLM_IEC_RSV1],  4, [4], 2, 1>;
107349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIMul32,    [SLM_IEC_RSV1],  5, [5], 3, 1>;
1080b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteIMul32Imm, [SLM_IEC_RSV1],  3>;
1090b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteIMul32Reg, [SLM_IEC_RSV1],  3>;
110349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIMul64,    [SLM_IEC_RSV1],  7, [7], 3>;
111349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIMul64Imm, [SLM_IEC_RSV1],  5, [2]>;
112349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIMul64Reg, [SLM_IEC_RSV1],  5, [2]>;
113349cc55cSDimitry Andricdefm : X86WriteResUnsupported<WriteIMulH>;
114349cc55cSDimitry Andricdefm : X86WriteResUnsupported<WriteIMulHLd>;
115349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteMULX32>;
116349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteMULX64>;
1170b57cec5SDimitry Andric
1180b57cec5SDimitry Andricdefm : X86WriteRes<WriteBSWAP32, [SLM_IEC_RSV01], 1, [1], 1>;
1190b57cec5SDimitry Andricdefm : X86WriteRes<WriteBSWAP64, [SLM_IEC_RSV01], 1, [1], 1>;
120bdd1243dSDimitry Andricdefm : X86WriteRes<WriteCMPXCHG, [SLM_IEC_RSV01], 6, [6], 5>;
121bdd1243dSDimitry Andricdefm : X86WriteRes<WriteCMPXCHGRMW, [SLM_IEC_RSV01, SLM_MEC_RSV], 10, [6, 2], 8>;
122bdd1243dSDimitry Andricdefm : X86WriteRes<WriteXCHG,    [SLM_IEC_RSV01], 3, [3], 3>;
1230b57cec5SDimitry Andric
1240b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteShift,    [SLM_IEC_RSV0],  1>;
1250b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteShiftCL,  [SLM_IEC_RSV0],  1>;
1260b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteRotate,   [SLM_IEC_RSV0],  1>;
1270b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteRotateCL, [SLM_IEC_RSV0],  1>;
1280b57cec5SDimitry Andric
1290b57cec5SDimitry Andricdefm : X86WriteRes<WriteSHDrri, [SLM_IEC_RSV0],  1, [1], 1>;
1300b57cec5SDimitry Andricdefm : X86WriteRes<WriteSHDrrcl,[SLM_IEC_RSV0],  1, [1], 1>;
1310b57cec5SDimitry Andricdefm : X86WriteRes<WriteSHDmri, [SLM_MEC_RSV, SLM_IEC_RSV0], 4, [2, 1], 2>;
1320b57cec5SDimitry Andricdefm : X86WriteRes<WriteSHDmrcl,[SLM_MEC_RSV, SLM_IEC_RSV0], 4, [2, 1], 2>;
1330b57cec5SDimitry Andric
1340b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteJump,   [SLM_IEC_RSV1],  1>;
1350b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteCRC32,  [SLM_IEC_RSV1],  3>;
1360b57cec5SDimitry Andric
1370b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteCMOV,  [SLM_IEC_RSV01], 2, [2]>;
1380b57cec5SDimitry Andricdefm : X86WriteRes<WriteFCMOV, [SLM_FPC_RSV1], 3, [1], 1>; // x87 conditional move.
1390b57cec5SDimitry Andricdef  : WriteRes<WriteSETCC, [SLM_IEC_RSV01]>;
1400b57cec5SDimitry Andricdef  : WriteRes<WriteSETCCStore, [SLM_IEC_RSV01, SLM_MEC_RSV]> {
1410b57cec5SDimitry Andric  // FIXME Latency and NumMicrOps?
142*5f757f3fSDimitry Andric  let ReleaseAtCycles = [2,1];
1430b57cec5SDimitry Andric}
1440b57cec5SDimitry Andricdefm : X86WriteRes<WriteLAHFSAHF,        [SLM_IEC_RSV01], 1, [1], 1>;
145349cc55cSDimitry Andricdefm : X86WriteRes<WriteBitTest,         [SLM_IEC_RSV0, SLM_IEC_RSV1], 1, [1,1], 1>;
146349cc55cSDimitry Andricdefm : X86WriteRes<WriteBitTestImmLd,    [SLM_IEC_RSV0, SLM_IEC_RSV1, SLM_MEC_RSV], 4, [1,1,1], 1>;
147349cc55cSDimitry Andricdefm : X86WriteRes<WriteBitTestRegLd,    [SLM_IEC_RSV0, SLM_IEC_RSV1, SLM_MEC_RSV], 4, [1,1,1], 7>;
148349cc55cSDimitry Andricdefm : X86WriteRes<WriteBitTestSet,      [SLM_IEC_RSV0, SLM_IEC_RSV1], 1, [1,1], 1>;
149349cc55cSDimitry Andricdefm : X86WriteRes<WriteBitTestSetImmLd, [SLM_IEC_RSV0, SLM_IEC_RSV1, SLM_MEC_RSV], 3, [1,1,1], 1>;
150bdd1243dSDimitry Andricdefm : X86WriteRes<WriteBitTestSetRegLd, [SLM_IEC_RSV0, SLM_IEC_RSV1, SLM_MEC_RSV], 3, [1,1,1], 8>;
1510b57cec5SDimitry Andric
1520b57cec5SDimitry Andric// This is for simple LEAs with one or two input operands.
1530b57cec5SDimitry Andric// The complex ones can only execute on port 1, and they require two cycles on
1540b57cec5SDimitry Andric// the port to read all inputs. We don't model that.
1550b57cec5SDimitry Andricdef : WriteRes<WriteLEA, [SLM_IEC_RSV1]>;
1560b57cec5SDimitry Andric
1570b57cec5SDimitry Andric// Bit counts.
158349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteBSF, [SLM_IEC_RSV0, SLM_IEC_RSV1], 10, [10,10], 10>;
159349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteBSR, [SLM_IEC_RSV0, SLM_IEC_RSV1], 10, [10,10], 10>;
1600b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteLZCNT,          [SLM_IEC_RSV0], 3>;
1610b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteTZCNT,          [SLM_IEC_RSV0], 3>;
1620b57cec5SDimitry Andricdefm : SLMWriteResPair<WritePOPCNT,         [SLM_IEC_RSV0], 3>;
1630b57cec5SDimitry Andric
1640b57cec5SDimitry Andric// BMI1 BEXTR/BLS, BMI2 BZHI
1650b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteBEXTR>;
1660b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteBLS>;
1670b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteBZHI>;
1680b57cec5SDimitry Andric
169349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteDiv8,   [SLM_IEC_RSV01, SLMDivider], 25, [1,25], 1, 0, 4>;
170349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteDiv16,  [SLM_IEC_RSV01, SLMDivider], 25, [1,25], 1, 0, 4>;
171349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteDiv32,  [SLM_IEC_RSV01, SLMDivider], 25, [1,25], 1, 0, 4>;
172349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteDiv64,  [SLM_IEC_RSV01, SLMDivider], 25, [1,25], 1, 0, 4>;
173349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIDiv8,  [SLM_IEC_RSV01, SLMDivider], 25, [1,25], 1, 0, 4>;
174349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIDiv16, [SLM_IEC_RSV01, SLMDivider], 25, [1,25], 1, 0, 4>;
175349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIDiv32, [SLM_IEC_RSV01, SLMDivider], 25, [1,25], 1, 0, 4>;
176349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteIDiv64, [SLM_IEC_RSV01, SLMDivider], 25, [1,25], 1, 0, 4>;
1770b57cec5SDimitry Andric
1780b57cec5SDimitry Andric// Scalar and vector floating point.
1790b57cec5SDimitry Andricdefm : X86WriteRes<WriteFLD0,       [SLM_FPC_RSV01], 1, [1], 1>;
1800b57cec5SDimitry Andricdefm : X86WriteRes<WriteFLD1,       [SLM_FPC_RSV01], 1, [1], 1>;
1810b57cec5SDimitry Andricdefm : X86WriteRes<WriteFLDC,       [SLM_FPC_RSV01], 1, [2], 2>;
1820b57cec5SDimitry Andricdef  : WriteRes<WriteFLoad,         [SLM_MEC_RSV]> { let Latency = 3; }
1830b57cec5SDimitry Andricdef  : WriteRes<WriteFLoadX,        [SLM_MEC_RSV]> { let Latency = 3; }
184bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteFLoadY>;
1850b57cec5SDimitry Andricdef  : WriteRes<WriteFMaskedLoad,   [SLM_MEC_RSV]> { let Latency = 3; }
186bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteFMaskedLoadY>;
1870b57cec5SDimitry Andricdef  : WriteRes<WriteFStore,        [SLM_MEC_RSV]>;
1880b57cec5SDimitry Andricdef  : WriteRes<WriteFStoreX,       [SLM_MEC_RSV]>;
189bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteFStoreY>;
1900b57cec5SDimitry Andricdef  : WriteRes<WriteFStoreNT,      [SLM_MEC_RSV]>;
1910b57cec5SDimitry Andricdef  : WriteRes<WriteFStoreNTX,     [SLM_MEC_RSV]>;
192bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteFStoreNTY>;
1938bcb0991SDimitry Andric
1948bcb0991SDimitry Andricdef  : WriteRes<WriteFMaskedStore32,    [SLM_MEC_RSV]>;
195bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteFMaskedStore32Y>;
1968bcb0991SDimitry Andricdef  : WriteRes<WriteFMaskedStore64,    [SLM_MEC_RSV]>;
197bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteFMaskedStore64Y>;
1988bcb0991SDimitry Andric
1990b57cec5SDimitry Andricdef  : WriteRes<WriteFMove,         [SLM_FPC_RSV01]>;
2000b57cec5SDimitry Andricdef  : WriteRes<WriteFMoveX,        [SLM_FPC_RSV01]>;
201bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteFMoveY>;
20204eeddc0SDimitry Andricdefm : X86WriteResUnsupported<WriteFMoveZ>;
2030b57cec5SDimitry Andricdefm : X86WriteRes<WriteEMMS,       [SLM_FPC_RSV01], 10, [10], 9>;
2040b57cec5SDimitry Andric
2050b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFAdd,     [SLM_FPC_RSV1], 3>;
2060b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFAddX,    [SLM_FPC_RSV1], 3>;
207bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFAddY>;
2080b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFAddZ>;
2090b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFAdd64,   [SLM_FPC_RSV1], 3>;
210480093f4SDimitry Andricdefm : SLMWriteResPair<WriteFAdd64X,  [SLM_FPC_RSV1], 4, [2]>;
211bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFAdd64Y>;
2120b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFAdd64Z>;
2130b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFCmp,     [SLM_FPC_RSV1], 3>;
2140b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFCmpX,    [SLM_FPC_RSV1], 3>;
215bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFCmpY>;
2160b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFCmpZ>;
2170b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFCmp64,   [SLM_FPC_RSV1], 3>;
2180b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFCmp64X,  [SLM_FPC_RSV1], 3>;
219bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFCmp64Y>;
2200b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFCmp64Z>;
2210b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFCom,     [SLM_FPC_RSV1], 3>;
2225ffd83dbSDimitry Andricdefm : SLMWriteResPair<WriteFComX,    [SLM_FPC_RSV1], 3>;
2230b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFMul,     [SLM_FPC_RSV0, SLMFPMultiplier], 5, [1,2]>;
2240b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFMulX,    [SLM_FPC_RSV0, SLMFPMultiplier], 5, [1,2]>;
225bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFMulY>;
2260b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFMulZ>;
2270b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFMul64,   [SLM_FPC_RSV0, SLMFPMultiplier], 5, [1,2]>;
228480093f4SDimitry Andricdefm : SLMWriteResPair<WriteFMul64X,  [SLM_FPC_RSV0, SLMFPMultiplier], 7, [1,4]>;
229bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFMul64Y>;
2300b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFMul64Z>;
231fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFMA>;
232fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFMAX>;
233fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFMAY>;
234fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFMAZ>;
2350b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFDiv,     [SLM_FPC_RSV0, SLMFPDivider], 19, [1,17]>;
236349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFDivX,    [SLM_FPC_RSV0, SLMFPDivider], 39, [1,39], 6, 1>;
237349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFDivY>;
2380b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFDivZ>;
2390b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFDiv64,   [SLM_FPC_RSV0, SLMFPDivider], 34, [1,32]>;
240349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFDiv64X,  [SLM_FPC_RSV0, SLMFPDivider], 69, [1,69], 6, 1>;
241349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFDiv64Y>;
2420b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFDiv64Z>;
243349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFRcp,     [SLM_FPC_RSV0], 4>;
244349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFRcpX,    [SLM_FPC_RSV0], 9, [8], 5, 1>;
245349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFRcpY>;
2460b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFRcpZ>;
247349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFRsqrt,   [SLM_FPC_RSV0], 4>;
248349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFRsqrtX,  [SLM_FPC_RSV0], 9, [8], 5, 1>;
249349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFRsqrtY>;
2500b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFRsqrtZ>;
251349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFSqrt,    [SLM_FPC_RSV0, SLMFPDivider], 20, [1,20]>;
252349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFSqrtX,   [SLM_FPC_RSV0, SLMFPDivider], 41, [1,40], 5, 1>;
253349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFSqrtY>;
2540b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFSqrtZ>;
255349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFSqrt64,  [SLM_FPC_RSV0, SLMFPDivider], 35, [1,35]>;
256349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFSqrt64X, [SLM_FPC_RSV0, SLMFPDivider], 71, [1,70], 5, 1>;
257349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFSqrt64Y>;
2580b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFSqrt64Z>;
2590b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFSqrt80,  [SLM_FPC_RSV0,SLMFPDivider], 40, [1,40]>;
260349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteDPPD,   [SLM_FPC_RSV1], 12,  [8], 5, 1>;
261349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteDPPS,   [SLM_FPC_RSV1], 15, [12], 9, 1>;
262349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteDPPSY>;
2630b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFSign,  [SLM_FPC_RSV01], 1>;
2640b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFRnd,   [SLM_FPC_RSV1], 3>;
265bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFRndY>;
2660b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFRndZ>;
2670b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFLogic, [SLM_FPC_RSV01], 1>;
268bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFLogicY>;
2690b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFLogicZ>;
2700b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFTest,  [SLM_FPC_RSV01], 1>;
271bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFTestY>;
2720b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFTestZ>;
2730b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFShuffle,  [SLM_FPC_RSV0], 1>;
274bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFShuffleY>;
2750b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFShuffleZ>;
2760b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFVarShuffle, [SLM_FPC_RSV0],  1>;
277bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFVarShuffleY>;
2780b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFVarShuffleZ>;
2790b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteFBlend,  [SLM_FPC_RSV0],  1>;
280fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFBlendY>;
281fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFBlendZ>;
282349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFVarBlend, [SLM_FPC_RSV0], 4, [4], 2, 1>;
283fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFVarBlendY>;
284fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFVarBlendZ>;
285fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFShuffle256>;
286fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFVarShuffle256>;
2870b57cec5SDimitry Andric
2880b57cec5SDimitry Andric// Conversion between integer and float.
289fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtSS2I,   [SLM_FPC_RSV0], 5>;
290fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtPS2I,   [SLM_FPC_RSV0], 5, [2]>;
291bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPS2IY>;
2920b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPS2IZ>;
293fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtSD2I,   [SLM_FPC_RSV0], 5>;
294fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtPD2I,   [SLM_FPC_RSV0], 5, [2]>;
295bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPD2IY>;
2960b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPD2IZ>;
2970b57cec5SDimitry Andric
298fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtI2SS,   [SLM_FPC_RSV0], 5, [2]>;
299fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtI2PS,   [SLM_FPC_RSV0], 5, [2]>;
300bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtI2PSY>;
3010b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtI2PSZ>;
302fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtI2SD,   [SLM_FPC_RSV0], 5, [2]>;
303fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtI2PD,   [SLM_FPC_RSV0], 5, [2]>;
304bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtI2PDY>;
3050b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtI2PDZ>;
3060b57cec5SDimitry Andric
307fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtSS2SD,  [SLM_FPC_RSV0], 4, [2]>;
308fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtPS2PD,  [SLM_FPC_RSV0], 5, [2]>;
309bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPS2PDY>;
3100b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPS2PDZ>;
311fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtSD2SS,  [SLM_FPC_RSV0], 4, [2]>;
312fe6060f1SDimitry Andricdefm : SLMWriteResPair<WriteCvtPD2PS,  [SLM_FPC_RSV0], 5, [2]>;
313bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPD2PSY>;
3140b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPD2PSZ>;
3150b57cec5SDimitry Andric
316fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPH2PS>;
317fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPH2PSY>;
318fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteCvtPH2PSZ>;
319fe6060f1SDimitry Andric
320fe6060f1SDimitry Andricdefm : X86WriteResUnsupported<WriteCvtPS2PH>;
321fe6060f1SDimitry Andricdefm : X86WriteResUnsupported<WriteCvtPS2PHY>;
322fe6060f1SDimitry Andricdefm : X86WriteResUnsupported<WriteCvtPS2PHZ>;
323fe6060f1SDimitry Andricdefm : X86WriteResUnsupported<WriteCvtPS2PHSt>;
324fe6060f1SDimitry Andricdefm : X86WriteResUnsupported<WriteCvtPS2PHYSt>;
325fe6060f1SDimitry Andricdefm : X86WriteResUnsupported<WriteCvtPS2PHZSt>;
326fe6060f1SDimitry Andric
3270b57cec5SDimitry Andric// Vector integer operations.
3280b57cec5SDimitry Andricdef  : WriteRes<WriteVecLoad,         [SLM_MEC_RSV]> { let Latency = 3; }
3290b57cec5SDimitry Andricdef  : WriteRes<WriteVecLoadX,        [SLM_MEC_RSV]> { let Latency = 3; }
330bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecLoadY>;
3310b57cec5SDimitry Andricdef  : WriteRes<WriteVecLoadNT,       [SLM_MEC_RSV]> { let Latency = 3; }
332bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecLoadNTY>;
3330b57cec5SDimitry Andricdef  : WriteRes<WriteVecMaskedLoad,   [SLM_MEC_RSV]> { let Latency = 3; }
334bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecMaskedLoadY>;
3350b57cec5SDimitry Andricdef  : WriteRes<WriteVecStore,        [SLM_MEC_RSV]>;
3360b57cec5SDimitry Andricdef  : WriteRes<WriteVecStoreX,       [SLM_MEC_RSV]>;
337bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecStoreY>;
3380b57cec5SDimitry Andricdef  : WriteRes<WriteVecStoreNT,      [SLM_MEC_RSV]>;
339bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecStoreNTY>;
3405ffd83dbSDimitry Andricdef  : WriteRes<WriteVecMaskedStore32,    [SLM_MEC_RSV]>;
341bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecMaskedStore32Y>;
3425ffd83dbSDimitry Andricdef  : WriteRes<WriteVecMaskedStore64,    [SLM_MEC_RSV]>;
343bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecMaskedStore64Y>;
3440b57cec5SDimitry Andricdef  : WriteRes<WriteVecMove,         [SLM_FPC_RSV01]>;
3450b57cec5SDimitry Andricdef  : WriteRes<WriteVecMoveX,        [SLM_FPC_RSV01]>;
346bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecMoveY>;
34704eeddc0SDimitry Andricdefm : X86WriteResUnsupported<WriteVecMoveZ>;
3480b57cec5SDimitry Andricdef  : WriteRes<WriteVecMoveToGpr,    [SLM_IEC_RSV01]>;
3490b57cec5SDimitry Andricdef  : WriteRes<WriteVecMoveFromGpr,  [SLM_IEC_RSV01]>;
3500b57cec5SDimitry Andric
351bdd1243dSDimitry Andricdefm : SLMWriteResPair<WriteVecShift,    [SLM_FPC_RSV0],  2, [2]>;
352bdd1243dSDimitry Andricdefm : SLMWriteResPair<WriteVecShiftX,   [SLM_FPC_RSV0],  2, [2]>;
353bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecShiftY>;
3540b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecShiftZ>;
3550b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecShiftImm, [SLM_FPC_RSV0],  1>;
3560b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecShiftImmX,[SLM_FPC_RSV0],  1>;
357bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecShiftImmY>;
3580b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecShiftImmZ>;
359bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteVarVecShift>;
360fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVarVecShiftY>;
361fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVarVecShiftZ>;
362fe6060f1SDimitry Andric
3630b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecLogic, [SLM_FPC_RSV01], 1>;
3640b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecLogicX,[SLM_FPC_RSV01], 1>;
365bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecLogicY>;
3660b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecLogicZ>;
3670b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecTest,  [SLM_FPC_RSV01], 1>;
368bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecTestY>;
3690b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecTestZ>;
3700b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecALU,   [SLM_FPC_RSV01],  1>;
3710b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecALUX,  [SLM_FPC_RSV01],  1>;
372bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecALUY>;
3730b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecALUZ>;
3740b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecIMul,  [SLM_FPC_RSV0],   4>;
375349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteVecIMulX, [SLM_FPC_RSV0],   5, [2]>;
376bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecIMulY>;
3770b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVecIMulZ>;
37881ad6265SDimitry Andricdefm : SLMWriteResPair<WritePMULLD,  [SLM_FPC_RSV0],   11, [11], 7>;
37981ad6265SDimitry Andricdefm : X86WriteResPairUnsupported<WritePMULLDY>;
3800b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WritePMULLDZ>;
3810b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteShuffle,  [SLM_FPC_RSV0],  1>;
382bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteShuffleY>;
3830b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteShuffleZ>;
3840b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteShuffleX, [SLM_FPC_RSV0],  1>;
3850b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVarShuffle,  [SLM_FPC_RSV0],  1>;
386349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteVarShuffleX, [SLM_FPC_RSV0],  5, [5], 4, 1>;
387349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteVarShuffleY>;
3880b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVarShuffleZ>;
3890b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteBlend,  [SLM_FPC_RSV0],  1>;
390bdd1243dSDimitry Andricdefm : X86WriteResPairUnsupported<WriteBlendY>;
3910b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteBlendZ>;
392349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteVarBlend, [SLM_FPC_RSV0], 4, [4], 2, 1>;
393fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVarBlendY>;
394fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVarBlendZ>;
395349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteMPSAD,  [SLM_FPC_RSV0],  7, [5], 3, 1>;
396349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteMPSADY>;
3970b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteMPSADZ>;
3980b57cec5SDimitry Andricdefm : SLMWriteResPair<WritePSADBW,  [SLM_FPC_RSV0],  4>;
399349cc55cSDimitry Andricdefm : SLMWriteResPair<WritePSADBWX, [SLM_FPC_RSV0],  5, [2]>;
400349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WritePSADBWY>;
4010b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WritePSADBWZ>;
4020b57cec5SDimitry Andricdefm : SLMWriteResPair<WritePHMINPOS,  [SLM_FPC_RSV0],   4>;
403fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteShuffle256>;
404fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVarShuffle256>;
405fe6060f1SDimitry Andricdefm : X86WriteResPairUnsupported<WriteVPMOV256>;
4060b57cec5SDimitry Andric
4070b57cec5SDimitry Andric// Vector insert/extract operations.
4080b57cec5SDimitry Andricdefm : SLMWriteResPair<WriteVecInsert, [SLM_FPC_RSV0],  1>;
4090b57cec5SDimitry Andric
410bdd1243dSDimitry Andricdef  : WriteRes<WriteVecExtract, [SLM_FPC_RSV0]> {
411bdd1243dSDimitry Andric  let NumMicroOps = 2;
412bdd1243dSDimitry Andric}
4130b57cec5SDimitry Andricdef  : WriteRes<WriteVecExtractSt, [SLM_FPC_RSV0, SLM_MEC_RSV]> {
4140b57cec5SDimitry Andric  let Latency = 4;
415bdd1243dSDimitry Andric  let NumMicroOps = 5;
416*5f757f3fSDimitry Andric  let ReleaseAtCycles = [1, 2];
4170b57cec5SDimitry Andric}
4180b57cec5SDimitry Andric
4190b57cec5SDimitry Andric////////////////////////////////////////////////////////////////////////////////
4200b57cec5SDimitry Andric// Horizontal add/sub  instructions.
4210b57cec5SDimitry Andric////////////////////////////////////////////////////////////////////////////////
4220b57cec5SDimitry Andric
423349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteFHAdd,   [SLM_FPC_RSV1],  6, [6], 4, 1>;
424349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WriteFHAddY>;
4250b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WriteFHAddZ>;
426349cc55cSDimitry Andricdefm : SLMWriteResPair<WritePHAdd,   [SLM_FPC_RSV01], 6, [6], 3, 1>;
427349cc55cSDimitry Andricdefm : SLMWriteResPair<WritePHAddX,  [SLM_FPC_RSV01], 6, [6], 3, 1>;
428349cc55cSDimitry Andricdefm : X86WriteResPairUnsupported<WritePHAddY>;
4290b57cec5SDimitry Andricdefm : X86WriteResPairUnsupported<WritePHAddZ>;
4300b57cec5SDimitry Andric
4310b57cec5SDimitry Andric// String instructions.
4320b57cec5SDimitry Andric// Packed Compare Implicit Length Strings, Return Mask
433349cc55cSDimitry Andricdefm : SLMWriteResPair<WritePCmpIStrM,  [SLM_FPC_RSV0], 13, [13], 5, 1>;
4340b57cec5SDimitry Andric
4350b57cec5SDimitry Andric// Packed Compare Explicit Length Strings, Return Mask
436349cc55cSDimitry Andricdefm : SLMWriteResPair<WritePCmpEStrM,  [SLM_FPC_RSV0], 17, [17], 8, 1>;
437fe6060f1SDimitry Andric
4380b57cec5SDimitry Andric// Packed Compare Implicit Length Strings, Return Index
439349cc55cSDimitry Andricdefm : SLMWriteResPair<WritePCmpIStrI,  [SLM_FPC_RSV0], 17, [17], 6, 1>;
4400b57cec5SDimitry Andric
4410b57cec5SDimitry Andric// Packed Compare Explicit Length Strings, Return Index
442349cc55cSDimitry Andricdefm : SLMWriteResPair<WritePCmpEStrI,  [SLM_FPC_RSV0], 21, [21], 9, 1>;
4430b57cec5SDimitry Andric
4440b57cec5SDimitry Andric// MOVMSK Instructions.
4450b57cec5SDimitry Andricdef : WriteRes<WriteFMOVMSK,    [SLM_FPC_RSV1]> { let Latency = 4; }
4460b57cec5SDimitry Andricdef : WriteRes<WriteVecMOVMSK,  [SLM_FPC_RSV1]> { let Latency = 4; }
4470b57cec5SDimitry Andricdef : WriteRes<WriteMMXMOVMSK,  [SLM_FPC_RSV1]> { let Latency = 4; }
448bdd1243dSDimitry Andricdefm : X86WriteResUnsupported<WriteVecMOVMSKY>;
4490b57cec5SDimitry Andric
4500b57cec5SDimitry Andric// AES Instructions.
451bdd1243dSDimitry Andricdefm : SLMWriteResPair<WriteAESDecEnc, [SLM_FPC_RSV0], 8, [5], 4, 1>;
452bdd1243dSDimitry Andricdefm : SLMWriteResPair<WriteAESIMC,    [SLM_FPC_RSV0], 8, [4], 3, 1>;
453bdd1243dSDimitry Andricdefm : SLMWriteResPair<WriteAESKeyGen, [SLM_FPC_RSV0], 8, [4], 3, 1>;
4540b57cec5SDimitry Andric
4550b57cec5SDimitry Andric// Carry-less multiplication instructions.
456349cc55cSDimitry Andricdefm : SLMWriteResPair<WriteCLMul, [SLM_FPC_RSV0], 10, [10], 8, 1>;
4570b57cec5SDimitry Andric
4580b57cec5SDimitry Andricdef : WriteRes<WriteSystem,     [SLM_FPC_RSV0]> { let Latency = 100; }
4590b57cec5SDimitry Andricdef : WriteRes<WriteMicrocoded, [SLM_FPC_RSV0]> { let Latency = 100; }
4600b57cec5SDimitry Andricdef : WriteRes<WriteFence, [SLM_MEC_RSV]>;
4610b57cec5SDimitry Andricdef : WriteRes<WriteNop, []>;
4620b57cec5SDimitry Andric
463480093f4SDimitry Andric// Remaining SLM instrs.
464480093f4SDimitry Andric
465480093f4SDimitry Andricdef SLMWriteResGroup1rr : SchedWriteRes<[SLM_FPC_RSV01]> {
466480093f4SDimitry Andric  let Latency = 4;
467480093f4SDimitry Andric  let NumMicroOps = 2;
468*5f757f3fSDimitry Andric  let ReleaseAtCycles = [8];
469480093f4SDimitry Andric}
4700eae32dcSDimitry Andricdef: InstRW<[SLMWriteResGroup1rr], (instrs MMX_PADDQrr, PADDQrr,
4710eae32dcSDimitry Andric                                           MMX_PSUBQrr, PSUBQrr,
472349cc55cSDimitry Andric                                           PCMPEQQrr)>;
473480093f4SDimitry Andric
474bdd1243dSDimitry Andricdef SLMWriteResGroup2rr : SchedWriteRes<[SLM_FPC_RSV0]> {
475bdd1243dSDimitry Andric  let Latency = 5;
476bdd1243dSDimitry Andric  let NumMicroOps = 1;
477*5f757f3fSDimitry Andric  let ReleaseAtCycles = [2];
478bdd1243dSDimitry Andric}
479bdd1243dSDimitry Andricdef: InstRW<[SLMWriteResGroup2rr], (instrs PCMPGTQrr)>;
480bdd1243dSDimitry Andric
481480093f4SDimitry Andricdef SLMWriteResGroup1rm : SchedWriteRes<[SLM_MEC_RSV,SLM_FPC_RSV01]> {
482480093f4SDimitry Andric  let Latency = 7;
483480093f4SDimitry Andric  let NumMicroOps = 3;
484*5f757f3fSDimitry Andric  let ReleaseAtCycles = [1,8];
485480093f4SDimitry Andric}
486bdd1243dSDimitry Andric
4870eae32dcSDimitry Andricdef: InstRW<[SLMWriteResGroup1rm], (instrs MMX_PADDQrm, PADDQrm,
4880eae32dcSDimitry Andric                                           MMX_PSUBQrm, PSUBQrm,
489349cc55cSDimitry Andric                                           PCMPEQQrm)>;
490480093f4SDimitry Andric
491bdd1243dSDimitry Andricdef SLMWriteResGroup2rm : SchedWriteRes<[SLM_MEC_RSV,SLM_FPC_RSV0]> {
492bdd1243dSDimitry Andric  let Latency = 8;
493bdd1243dSDimitry Andric  let NumMicroOps = 2;
494*5f757f3fSDimitry Andric  let ReleaseAtCycles = [1,2];
495bdd1243dSDimitry Andric}
496bdd1243dSDimitry Andricdef: InstRW<[SLMWriteResGroup2rm], (instrs PCMPGTQrm)>;
497bdd1243dSDimitry Andric
49804eeddc0SDimitry Andric///////////////////////////////////////////////////////////////////////////////
49904eeddc0SDimitry Andric// Dependency breaking instructions.
50004eeddc0SDimitry Andric///////////////////////////////////////////////////////////////////////////////
50104eeddc0SDimitry Andric
50204eeddc0SDimitry Andricdef : IsZeroIdiomFunction<[
50304eeddc0SDimitry Andric  // GPR Zero-idioms.
50404eeddc0SDimitry Andric  DepBreakingClass<[ XOR32rr ], ZeroIdiomPredicate>,
50504eeddc0SDimitry Andric
50604eeddc0SDimitry Andric  // SSE Zero-idioms.
50704eeddc0SDimitry Andric  DepBreakingClass<[
50804eeddc0SDimitry Andric    // fp variants.
50904eeddc0SDimitry Andric    XORPSrr, XORPDrr,
51004eeddc0SDimitry Andric
51104eeddc0SDimitry Andric    // int variants.
51204eeddc0SDimitry Andric    PXORrr,
51304eeddc0SDimitry Andric  ], ZeroIdiomPredicate>,
51404eeddc0SDimitry Andric]>;
51504eeddc0SDimitry Andric
5160b57cec5SDimitry Andric} // SchedModel
517