2017-10-25 04:19:47 +08:00
|
|
|
//=- X86SchedBroadwell.td - X86 Broadwell Scheduling ---------*- tablegen -*-=//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines the machine model for Broadwell to support instruction
|
|
|
|
// scheduling and other instruction cost heuristics.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2018-05-02 21:54:38 +08:00
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
def BroadwellModel : SchedMachineModel {
|
2018-04-24 21:21:41 +08:00
|
|
|
// All x86 instructions are modeled as a single micro-op, and BW can decode 4
|
2017-10-25 04:19:47 +08:00
|
|
|
// instructions per cycle.
|
|
|
|
let IssueWidth = 4;
|
|
|
|
let MicroOpBufferSize = 192; // Based on the reorder buffer.
|
|
|
|
let LoadLatency = 5;
|
|
|
|
let MispredictPenalty = 16;
|
|
|
|
|
|
|
|
// Based on the LSD (loop-stream detector) queue size and benchmarking data.
|
|
|
|
let LoopMicroOpBufferSize = 50;
|
2017-12-13 00:12:53 +08:00
|
|
|
|
2018-03-25 03:37:28 +08:00
|
|
|
// This flag is set to allow the scheduler to assign a default model to
|
2017-12-13 00:12:53 +08:00
|
|
|
// unrecognized opcodes.
|
|
|
|
let CompleteModel = 0;
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
let SchedModel = BroadwellModel in {
|
|
|
|
|
|
|
|
// Broadwell can issue micro-ops to 8 different ports in one cycle.
|
|
|
|
|
|
|
|
// Ports 0, 1, 5, and 6 handle all computation.
|
|
|
|
// Port 4 gets the data half of stores. Store data can be available later than
|
|
|
|
// the store address, but since we don't model the latency of stores, we can
|
|
|
|
// ignore that.
|
|
|
|
// Ports 2 and 3 are identical. They handle loads and the address half of
|
|
|
|
// stores. Port 7 can handle address calculations.
|
|
|
|
def BWPort0 : ProcResource<1>;
|
|
|
|
def BWPort1 : ProcResource<1>;
|
|
|
|
def BWPort2 : ProcResource<1>;
|
|
|
|
def BWPort3 : ProcResource<1>;
|
|
|
|
def BWPort4 : ProcResource<1>;
|
|
|
|
def BWPort5 : ProcResource<1>;
|
|
|
|
def BWPort6 : ProcResource<1>;
|
|
|
|
def BWPort7 : ProcResource<1>;
|
|
|
|
|
|
|
|
// Many micro-ops are capable of issuing on multiple ports.
|
|
|
|
def BWPort01 : ProcResGroup<[BWPort0, BWPort1]>;
|
|
|
|
def BWPort23 : ProcResGroup<[BWPort2, BWPort3]>;
|
|
|
|
def BWPort237 : ProcResGroup<[BWPort2, BWPort3, BWPort7]>;
|
|
|
|
def BWPort04 : ProcResGroup<[BWPort0, BWPort4]>;
|
|
|
|
def BWPort05 : ProcResGroup<[BWPort0, BWPort5]>;
|
|
|
|
def BWPort06 : ProcResGroup<[BWPort0, BWPort6]>;
|
|
|
|
def BWPort15 : ProcResGroup<[BWPort1, BWPort5]>;
|
|
|
|
def BWPort16 : ProcResGroup<[BWPort1, BWPort6]>;
|
|
|
|
def BWPort56 : ProcResGroup<[BWPort5, BWPort6]>;
|
|
|
|
def BWPort015 : ProcResGroup<[BWPort0, BWPort1, BWPort5]>;
|
|
|
|
def BWPort056 : ProcResGroup<[BWPort0, BWPort5, BWPort6]>;
|
|
|
|
def BWPort0156: ProcResGroup<[BWPort0, BWPort1, BWPort5, BWPort6]>;
|
|
|
|
|
|
|
|
// 60 Entry Unified Scheduler
|
|
|
|
def BWPortAny : ProcResGroup<[BWPort0, BWPort1, BWPort2, BWPort3, BWPort4,
|
|
|
|
BWPort5, BWPort6, BWPort7]> {
|
|
|
|
let BufferSize=60;
|
|
|
|
}
|
|
|
|
|
2018-03-19 22:46:07 +08:00
|
|
|
// Integer division issued on port 0.
|
2018-04-02 13:33:28 +08:00
|
|
|
def BWDivider : ProcResource<1>;
|
|
|
|
// FP division and sqrt on port 0.
|
|
|
|
def BWFPDivider : ProcResource<1>;
|
2018-03-19 22:46:07 +08:00
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Loads are 5 cycles, so ReadAfterLd registers needn't be available until 5
|
|
|
|
// cycles after the memory operand.
|
|
|
|
def : ReadAdvance<ReadAfterLd, 5>;
|
|
|
|
|
|
|
|
// Many SchedWrites are defined in pairs with and without a folded load.
|
|
|
|
// Instructions with folded loads are usually micro-fused, so they only appear
|
|
|
|
// as two micro-ops when queued in the reservation station.
|
|
|
|
// This multiclass defines the resource usage for variants with and without
|
|
|
|
// folded loads.
|
|
|
|
multiclass BWWriteResPair<X86FoldableSchedWrite SchedRW,
|
2018-03-19 22:46:07 +08:00
|
|
|
list<ProcResourceKind> ExePorts,
|
2018-03-25 18:21:19 +08:00
|
|
|
int Lat, list<int> Res = [1], int UOps = 1,
|
|
|
|
int LoadLat = 5> {
|
2017-10-25 04:19:47 +08:00
|
|
|
// Register variant is using a single cycle on ExePort.
|
2018-03-19 22:46:07 +08:00
|
|
|
def : WriteRes<SchedRW, ExePorts> {
|
|
|
|
let Latency = Lat;
|
|
|
|
let ResourceCycles = Res;
|
|
|
|
let NumMicroOps = UOps;
|
|
|
|
}
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-03-25 18:21:19 +08:00
|
|
|
// Memory variant also uses a cycle on port 2/3 and adds LoadLat cycles to
|
|
|
|
// the latency (default = 5).
|
2018-03-19 22:46:07 +08:00
|
|
|
def : WriteRes<SchedRW.Folded, !listconcat([BWPort23], ExePorts)> {
|
2018-03-25 18:21:19 +08:00
|
|
|
let Latency = !add(Lat, LoadLat);
|
2018-03-19 22:46:07 +08:00
|
|
|
let ResourceCycles = !listconcat([1], Res);
|
2018-03-25 18:21:19 +08:00
|
|
|
let NumMicroOps = !add(UOps, 1);
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-07 00:16:46 +08:00
|
|
|
// A folded store needs a cycle on port 4 for the store data, and an extra port
|
|
|
|
// 2/3/7 cycle to recompute the address.
|
|
|
|
def : WriteRes<WriteRMW, [BWPort237,BWPort4]>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
// Arithmetic.
|
2018-05-08 22:55:16 +08:00
|
|
|
defm : BWWriteResPair<WriteALU, [BWPort0156], 1>; // Simple integer ALU op.
|
2018-05-17 20:43:42 +08:00
|
|
|
defm : BWWriteResPair<WriteADC, [BWPort06], 1>; // Integer ALU + flags op.
|
2018-05-08 22:55:16 +08:00
|
|
|
defm : BWWriteResPair<WriteIMul, [BWPort1], 3>; // Integer multiplication.
|
|
|
|
defm : BWWriteResPair<WriteIMul64, [BWPort1], 3>; // Integer 64-bit multiplication.
|
2018-05-08 21:51:45 +08:00
|
|
|
defm : BWWriteResPair<WriteDiv8, [BWPort0, BWDivider], 25, [1, 10]>;
|
|
|
|
defm : BWWriteResPair<WriteDiv16, [BWPort0, BWDivider], 25, [1, 10]>;
|
|
|
|
defm : BWWriteResPair<WriteDiv32, [BWPort0, BWDivider], 25, [1, 10]>;
|
|
|
|
defm : BWWriteResPair<WriteDiv64, [BWPort0, BWDivider], 25, [1, 10]>;
|
|
|
|
defm : BWWriteResPair<WriteIDiv8, [BWPort0, BWDivider], 25, [1, 10]>;
|
|
|
|
defm : BWWriteResPair<WriteIDiv16, [BWPort0, BWDivider], 25, [1, 10]>;
|
|
|
|
defm : BWWriteResPair<WriteIDiv32, [BWPort0, BWDivider], 25, [1, 10]>;
|
|
|
|
defm : BWWriteResPair<WriteIDiv64, [BWPort0, BWDivider], 25, [1, 10]>;
|
|
|
|
|
2018-08-30 14:26:00 +08:00
|
|
|
defm : X86WriteRes<WriteCMPXCHG,[BWPort06, BWPort0156], 5, [2, 3], 5>;
|
|
|
|
defm : X86WriteRes<WriteCMPXCHGRMW,[BWPort23, BWPort06, BWPort0156, BWPort237, BWPort4], 8, [1, 2, 1, 1, 1], 6>;
|
2018-08-01 02:24:24 +08:00
|
|
|
defm : X86WriteRes<WriteBSWAP32, [BWPort15], 1, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteBSWAP64, [BWPort06, BWPort15], 2, [1, 1], 2>;
|
2018-08-09 17:23:26 +08:00
|
|
|
defm : X86WriteRes<WriteXCHG, [BWPort0156], 2, [3], 3>;
|
2018-07-20 17:39:14 +08:00
|
|
|
|
2018-03-27 05:06:14 +08:00
|
|
|
defm : BWWriteResPair<WriteCRC32, [BWPort1], 3>;
|
2017-10-25 04:19:47 +08:00
|
|
|
def : WriteRes<WriteIMulH, []> { let Latency = 3; } // Integer multiplication, high part.
|
|
|
|
|
|
|
|
def : WriteRes<WriteLEA, [BWPort15]>; // LEA instructions can't fold loads.
|
|
|
|
|
2018-04-09 01:53:18 +08:00
|
|
|
defm : BWWriteResPair<WriteCMOV, [BWPort06], 1>; // Conditional move.
|
2018-05-18 00:47:30 +08:00
|
|
|
defm : BWWriteResPair<WriteCMOV2, [BWPort06,BWPort0156], 2, [1,1], 2>; // // Conditional (CF + ZF flag) move.
|
2018-05-13 02:07:07 +08:00
|
|
|
defm : X86WriteRes<WriteFCMOV, [BWPort1], 3, [1], 1>; // x87 conditional move.
|
|
|
|
|
2018-04-09 01:53:18 +08:00
|
|
|
def : WriteRes<WriteSETCC, [BWPort06]>; // Setcc.
|
|
|
|
def : WriteRes<WriteSETCCStore, [BWPort06,BWPort4,BWPort237]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
}
|
2018-06-20 14:13:39 +08:00
|
|
|
def : WriteRes<WriteLAHFSAHF, [BWPort06]>;
|
2018-08-01 18:24:27 +08:00
|
|
|
def : WriteRes<WriteBitTest,[BWPort06]>; // Bit Test instrs
|
2018-04-09 01:53:18 +08:00
|
|
|
|
2018-03-27 02:19:28 +08:00
|
|
|
// Bit counts.
|
2018-07-08 17:50:25 +08:00
|
|
|
defm : BWWriteResPair<WriteBSF, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteBSR, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteLZCNT, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteTZCNT, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WritePOPCNT, [BWPort1], 3>;
|
2018-03-27 02:19:28 +08:00
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Integer shifts and rotates.
|
2018-09-23 23:12:10 +08:00
|
|
|
defm : BWWriteResPair<WriteShift, [BWPort06], 1>;
|
2018-09-24 00:53:02 +08:00
|
|
|
defm : BWWriteResPair<WriteRotate, [BWPort06], 2, [2], 2>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-07-31 18:14:43 +08:00
|
|
|
// SHLD/SHRD.
|
|
|
|
defm : X86WriteRes<WriteSHDrri, [BWPort1], 3, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteSHDrrcl,[BWPort1,BWPort06,BWPort0156], 6, [1, 1, 2], 4>;
|
|
|
|
defm : X86WriteRes<WriteSHDmri, [BWPort1,BWPort23,BWPort237,BWPort0156], 9, [1, 1, 1, 1], 4>;
|
|
|
|
defm : X86WriteRes<WriteSHDmrcl,[BWPort1,BWPort23,BWPort237,BWPort06,BWPort0156], 11, [1, 1, 1, 1, 2], 6>;
|
2018-07-09 03:01:55 +08:00
|
|
|
|
2018-09-14 21:09:56 +08:00
|
|
|
// BMI1 BEXTR/BLS, BMI2 BZHI
|
2018-03-30 04:41:39 +08:00
|
|
|
defm : BWWriteResPair<WriteBEXTR, [BWPort06,BWPort15], 2, [1,1], 2>;
|
2018-09-14 21:09:56 +08:00
|
|
|
defm : BWWriteResPair<WriteBLS, [BWPort15], 1>;
|
|
|
|
defm : BWWriteResPair<WriteBZHI, [BWPort15], 1>;
|
2018-03-30 04:41:39 +08:00
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Loads, stores, and moves, not folded with other operations.
|
2018-05-15 02:37:19 +08:00
|
|
|
defm : X86WriteRes<WriteLoad, [BWPort23], 5, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteStore, [BWPort237, BWPort4], 1, [1,1], 1>;
|
|
|
|
defm : X86WriteRes<WriteStoreNT, [BWPort237, BWPort4], 1, [1,1], 2>;
|
2018-06-07 15:37:49 +08:00
|
|
|
defm : X86WriteRes<WriteMove, [BWPort0156], 1, [1], 1>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
// Idioms that clear a register, like xorps %xmm0, %xmm0.
|
|
|
|
// These can often bypass execution ports completely.
|
|
|
|
def : WriteRes<WriteZero, []>;
|
|
|
|
|
2017-12-13 03:11:31 +08:00
|
|
|
// Treat misc copies as a move.
|
|
|
|
def : InstRW<[WriteMove], (instrs COPY)>;
|
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Branches don't produce values, so they have no latency, but they still
|
|
|
|
// consume resources. Indirect branches can fold loads.
|
2018-03-19 22:46:07 +08:00
|
|
|
defm : BWWriteResPair<WriteJump, [BWPort06], 1>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
// Floating point. This covers both scalar and vector operations.
|
2018-05-31 19:41:27 +08:00
|
|
|
defm : X86WriteRes<WriteFLD0, [BWPort01], 1, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFLD1, [BWPort01], 1, [2], 2>;
|
[X86] Introduce WriteFLDC for x87 constant loads.
Summary:
{FLDL2E, FLDL2T, FLDLG2, FLDLN2, FLDPI} were using WriteMicrocoded.
- I've measured the values for Broadwell, Haswell, SandyBridge, Skylake.
- For ZnVer1 and Atom, values were transferred form InstRWs.
- For SLM and BtVer2, I've guessed some values :(
Reviewers: RKSimon, craig.topper, andreadb
Subscribers: gbedwell, llvm-commits
Differential Revision: https://reviews.llvm.org/D47585
llvm-svn: 333656
2018-05-31 22:22:01 +08:00
|
|
|
defm : X86WriteRes<WriteFLDC, [BWPort01], 1, [2], 2>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteFLoad, [BWPort23], 5, [1], 1>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteFLoadX, [BWPort23], 5, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFLoadY, [BWPort23], 6, [1], 1>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteFMaskedLoad, [BWPort23,BWPort5], 7, [1,2], 3>;
|
|
|
|
defm : X86WriteRes<WriteFMaskedLoadY, [BWPort23,BWPort5], 8, [1,2], 3>;
|
2018-05-09 19:01:16 +08:00
|
|
|
defm : X86WriteRes<WriteFStore, [BWPort237,BWPort4], 1, [1,1], 2>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteFStoreX, [BWPort237,BWPort4], 1, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteFStoreY, [BWPort237,BWPort4], 1, [1,1], 2>;
|
2018-05-15 02:37:19 +08:00
|
|
|
defm : X86WriteRes<WriteFStoreNT, [BWPort237,BWPort4], 1, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteFStoreNTX, [BWPort237,BWPort4], 1, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteFStoreNTY, [BWPort237,BWPort4], 1, [1,1], 2>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteFMaskedStore, [BWPort0,BWPort4,BWPort237,BWPort15], 5, [1,1,1,1], 4>;
|
|
|
|
defm : X86WriteRes<WriteFMaskedStoreY, [BWPort0,BWPort4,BWPort237,BWPort15], 5, [1,1,1,1], 4>;
|
|
|
|
defm : X86WriteRes<WriteFMove, [BWPort5], 1, [1], 1>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteFMoveX, [BWPort5], 1, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFMoveY, [BWPort5], 1, [1], 1>;
|
2018-03-15 22:45:30 +08:00
|
|
|
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : BWWriteResPair<WriteFAdd, [BWPort1], 3, [1], 1, 5>; // Floating point add/sub.
|
|
|
|
defm : BWWriteResPair<WriteFAddX, [BWPort1], 3, [1], 1, 5>; // Floating point add/sub (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFAddY, [BWPort1], 3, [1], 1, 6>; // Floating point add/sub (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFAddZ>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : BWWriteResPair<WriteFAdd64, [BWPort1], 3, [1], 1, 5>; // Floating point double add/sub.
|
|
|
|
defm : BWWriteResPair<WriteFAdd64X, [BWPort1], 3, [1], 1, 5>; // Floating point double add/sub (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFAdd64Y, [BWPort1], 3, [1], 1, 6>; // Floating point double add/sub (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFAdd64Z>;
|
2018-05-08 04:52:53 +08:00
|
|
|
|
|
|
|
defm : BWWriteResPair<WriteFCmp, [BWPort1], 3, [1], 1, 5>; // Floating point compare.
|
|
|
|
defm : BWWriteResPair<WriteFCmpX, [BWPort1], 3, [1], 1, 5>; // Floating point compare (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFCmpY, [BWPort1], 3, [1], 1, 6>; // Floating point compare (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFCmpZ>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : BWWriteResPair<WriteFCmp64, [BWPort1], 3, [1], 1, 5>; // Floating point double compare.
|
|
|
|
defm : BWWriteResPair<WriteFCmp64X, [BWPort1], 3, [1], 1, 5>; // Floating point double compare (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFCmp64Y, [BWPort1], 3, [1], 1, 6>; // Floating point double compare (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFCmp64Z>;
|
2018-05-08 04:52:53 +08:00
|
|
|
|
|
|
|
defm : BWWriteResPair<WriteFCom, [BWPort1], 3>; // Floating point compare to flags.
|
|
|
|
|
|
|
|
defm : BWWriteResPair<WriteFMul, [BWPort01], 3, [1], 1, 5>; // Floating point multiplication.
|
|
|
|
defm : BWWriteResPair<WriteFMulX, [BWPort01], 3, [1], 1, 5>; // Floating point multiplication (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFMulY, [BWPort01], 3, [1], 1, 6>; // Floating point multiplication (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFMulZ>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : BWWriteResPair<WriteFMul64, [BWPort01], 3, [1], 1, 5>; // Floating point double multiplication.
|
|
|
|
defm : BWWriteResPair<WriteFMul64X, [BWPort01], 3, [1], 1, 5>; // Floating point double multiplication (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFMul64Y, [BWPort01], 3, [1], 1, 6>; // Floating point double multiplication (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFMul64Z>;
|
2018-05-08 00:15:46 +08:00
|
|
|
|
|
|
|
//defm : BWWriteResPair<WriteFDiv, [BWPort0,BWFPDivider], 11, [1,3], 1, 5>; // Floating point division.
|
|
|
|
defm : BWWriteResPair<WriteFDivX, [BWPort0,BWFPDivider], 11, [1,5], 1, 5>; // Floating point division (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFDivY, [BWPort0,BWPort015,BWFPDivider], 17, [2,1,10], 3, 6>; // Floating point division (YMM).
|
2018-06-11 15:00:08 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFDivZ>;
|
2018-05-08 00:15:46 +08:00
|
|
|
//defm : BWWriteResPair<WriteFDiv64, [BWPort0,BWFPDivider], 14, [1,8], 1, 5>; // Floating point division.
|
|
|
|
defm : BWWriteResPair<WriteFDiv64X, [BWPort0,BWFPDivider], 14, [1,8], 1, 5>; // Floating point division (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFDiv64Y, [BWPort0,BWPort015,BWFPDivider], 23, [2,1,16], 3, 6>; // Floating point division (YMM).
|
2018-06-11 15:00:08 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFDiv64Z>;
|
2018-05-07 19:50:44 +08:00
|
|
|
|
|
|
|
defm : X86WriteRes<WriteFSqrt, [BWPort0,BWFPDivider], 11, [1,4], 1>; // Floating point square root.
|
|
|
|
defm : X86WriteRes<WriteFSqrtLd, [BWPort0,BWPort23,BWFPDivider], 16, [1,1,7], 2>;
|
|
|
|
defm : BWWriteResPair<WriteFSqrtX, [BWPort0,BWFPDivider], 11, [1,7], 1, 5>; // Floating point square root (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFSqrtY, [BWPort0,BWPort015,BWFPDivider], 21, [2,1,14], 3, 6>; // Floating point square root (YMM).
|
2018-06-11 15:00:08 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFSqrtZ>;
|
2018-05-07 19:50:44 +08:00
|
|
|
defm : X86WriteRes<WriteFSqrt64, [BWPort0,BWFPDivider], 16, [1,8], 1>; // Floating point double square root.
|
|
|
|
defm : X86WriteRes<WriteFSqrt64Ld, [BWPort0,BWPort23,BWFPDivider], 21, [1,1,14], 2>;
|
|
|
|
defm : BWWriteResPair<WriteFSqrt64X, [BWPort0,BWFPDivider], 16, [1,14],1, 5>; // Floating point double square root (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFSqrt64Y, [BWPort0,BWPort015,BWFPDivider], 29, [2,1,28], 3, 6>; // Floating point double square root (YMM).
|
2018-06-11 15:00:08 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFSqrt64Z>;
|
2018-05-07 19:50:44 +08:00
|
|
|
defm : BWWriteResPair<WriteFSqrt80, [BWPort0,BWFPDivider], 23, [1,9]>; // Floating point long double square root.
|
|
|
|
|
2018-05-02 02:06:07 +08:00
|
|
|
defm : BWWriteResPair<WriteFRcp, [BWPort0], 5, [1], 1, 5>; // Floating point reciprocal estimate.
|
2018-05-07 19:50:44 +08:00
|
|
|
defm : BWWriteResPair<WriteFRcpX, [BWPort0], 5, [1], 1, 5>; // Floating point reciprocal estimate (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFRcpY, [BWPort0,BWPort015], 11, [2,1], 3, 6>; // Floating point reciprocal estimate (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFRcpZ>;
|
2018-05-07 19:50:44 +08:00
|
|
|
|
2018-05-02 02:06:07 +08:00
|
|
|
defm : BWWriteResPair<WriteFRsqrt, [BWPort0], 5, [1], 1, 5>; // Floating point reciprocal square root estimate.
|
2018-05-07 19:50:44 +08:00
|
|
|
defm : BWWriteResPair<WriteFRsqrtX,[BWPort0], 5, [1], 1, 5>; // Floating point reciprocal square root estimate (XMM).
|
|
|
|
defm : BWWriteResPair<WriteFRsqrtY,[BWPort0,BWPort015], 11, [2,1], 3, 6>; // Floating point reciprocal square root estimate (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFRsqrtZ>;
|
2018-05-07 19:50:44 +08:00
|
|
|
|
2018-04-25 21:07:58 +08:00
|
|
|
defm : BWWriteResPair<WriteFMA, [BWPort01], 5, [1], 1, 5>; // Fused Multiply Add.
|
2018-05-04 23:20:18 +08:00
|
|
|
defm : BWWriteResPair<WriteFMAX, [BWPort01], 5, [1], 1, 5>; // Fused Multiply Add (XMM).
|
2018-04-25 21:07:58 +08:00
|
|
|
defm : BWWriteResPair<WriteFMAY, [BWPort01], 5, [1], 1, 6>; // Fused Multiply Add (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFMAZ>;
|
2018-05-04 06:31:19 +08:00
|
|
|
defm : BWWriteResPair<WriteDPPD, [BWPort0,BWPort1,BWPort5], 9, [1,1,1], 3, 5>; // Floating point double dot product.
|
|
|
|
defm : BWWriteResPair<WriteDPPS, [BWPort0,BWPort1,BWPort5], 14, [2,1,1], 4, 5>; // Floating point single dot product.
|
|
|
|
defm : BWWriteResPair<WriteDPPSY, [BWPort0,BWPort1,BWPort5], 14, [2,1,1], 4, 6>; // Floating point single dot product (YMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteDPPSZ>;
|
2018-05-04 20:59:24 +08:00
|
|
|
defm : BWWriteResPair<WriteFSign, [BWPort5], 1>; // Floating point fabs/fchs.
|
|
|
|
defm : X86WriteRes<WriteFRnd, [BWPort23], 6, [1], 1>; // Floating point rounding.
|
|
|
|
defm : X86WriteRes<WriteFRndY, [BWPort23], 6, [1], 1>; // Floating point rounding (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFRndZ>;
|
2018-05-04 20:59:24 +08:00
|
|
|
defm : X86WriteRes<WriteFRndLd, [BWPort1,BWPort23], 11, [2,1], 3>;
|
|
|
|
defm : X86WriteRes<WriteFRndYLd, [BWPort1,BWPort23], 12, [2,1], 3>;
|
2018-04-27 23:50:33 +08:00
|
|
|
defm : BWWriteResPair<WriteFLogic, [BWPort5], 1, [1], 1, 5>; // Floating point and/or/xor logicals.
|
|
|
|
defm : BWWriteResPair<WriteFLogicY, [BWPort5], 1, [1], 1, 6>; // Floating point and/or/xor logicals (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFLogicZ>;
|
2018-05-08 18:28:03 +08:00
|
|
|
defm : BWWriteResPair<WriteFTest, [BWPort0], 1, [1], 1, 5>; // Floating point TEST instructions.
|
|
|
|
defm : BWWriteResPair<WriteFTestY, [BWPort0], 1, [1], 1, 6>; // Floating point TEST instructions (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFTestZ>;
|
2018-05-01 22:25:01 +08:00
|
|
|
defm : BWWriteResPair<WriteFShuffle, [BWPort5], 1, [1], 1, 5>; // Floating point vector shuffles.
|
|
|
|
defm : BWWriteResPair<WriteFShuffleY, [BWPort5], 1, [1], 1, 6>; // Floating point vector shuffles (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFShuffleZ>;
|
2018-04-28 02:19:48 +08:00
|
|
|
defm : BWWriteResPair<WriteFVarShuffle, [BWPort5], 1, [1], 1, 5>; // Floating point vector variable shuffles.
|
|
|
|
defm : BWWriteResPair<WriteFVarShuffleY, [BWPort5], 1, [1], 1, 6>; // Floating point vector variable shuffles.
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFVarShuffleZ>;
|
2018-04-28 02:19:48 +08:00
|
|
|
defm : BWWriteResPair<WriteFBlend, [BWPort015], 1, [1], 1, 5>; // Floating point vector blends.
|
|
|
|
defm : BWWriteResPair<WriteFBlendY, [BWPort015], 1, [1], 1, 6>; // Floating point vector blends.
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFBlendZ>;
|
2018-04-22 22:43:12 +08:00
|
|
|
defm : BWWriteResPair<WriteFVarBlend, [BWPort5], 2, [2], 2, 5>; // Fp vector variable blends.
|
2018-04-28 02:19:48 +08:00
|
|
|
defm : BWWriteResPair<WriteFVarBlendY, [BWPort5], 2, [2], 2, 6>; // Fp vector variable blends.
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteFVarBlendZ>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
// FMA Scheduling helper class.
|
|
|
|
// class FMASC { X86FoldableSchedWrite Sched = WriteFAdd; }
|
|
|
|
|
|
|
|
// Vector integer operations.
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteVecLoad, [BWPort23], 5, [1], 1>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteVecLoadX, [BWPort23], 5, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecLoadY, [BWPort23], 6, [1], 1>;
|
2018-05-15 02:37:19 +08:00
|
|
|
defm : X86WriteRes<WriteVecLoadNT, [BWPort23], 5, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecLoadNTY, [BWPort23], 6, [1], 1>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteVecMaskedLoad, [BWPort23,BWPort5], 7, [1,2], 3>;
|
|
|
|
defm : X86WriteRes<WriteVecMaskedLoadY, [BWPort23,BWPort5], 8, [1,2], 3>;
|
2018-05-09 19:01:16 +08:00
|
|
|
defm : X86WriteRes<WriteVecStore, [BWPort237,BWPort4], 1, [1,1], 2>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteVecStoreX, [BWPort237,BWPort4], 1, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteVecStoreY, [BWPort237,BWPort4], 1, [1,1], 2>;
|
2018-05-15 02:37:19 +08:00
|
|
|
defm : X86WriteRes<WriteVecStoreNT, [BWPort237,BWPort4], 1, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteVecStoreNTY, [BWPort237,BWPort4], 1, [1,1], 2>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteVecMaskedStore, [BWPort0,BWPort4,BWPort237,BWPort15], 5, [1,1,1,1], 4>;
|
|
|
|
defm : X86WriteRes<WriteVecMaskedStoreY, [BWPort0,BWPort4,BWPort237,BWPort15], 5, [1,1,1,1], 4>;
|
|
|
|
defm : X86WriteRes<WriteVecMove, [BWPort015], 1, [1], 1>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteVecMoveX, [BWPort015], 1, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecMoveY, [BWPort015], 1, [1], 1>;
|
2018-05-19 01:58:36 +08:00
|
|
|
defm : X86WriteRes<WriteVecMoveToGpr, [BWPort0], 1, [1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecMoveFromGpr, [BWPort5], 1, [1], 1>;
|
|
|
|
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteEMMS, [BWPort01,BWPort15,BWPort015,BWPort0156], 31, [8,1,21,1], 31>;
|
2018-03-15 22:45:30 +08:00
|
|
|
|
2018-05-03 21:27:10 +08:00
|
|
|
defm : BWWriteResPair<WriteVecALU, [BWPort15], 1, [1], 1, 5>; // Vector integer ALU op, no logicals.
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : BWWriteResPair<WriteVecALUX, [BWPort15], 1, [1], 1, 5>; // Vector integer ALU op, no logicals.
|
2018-05-03 21:27:10 +08:00
|
|
|
defm : BWWriteResPair<WriteVecALUY, [BWPort15], 1, [1], 1, 6>; // Vector integer ALU op, no logicals (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVecALUZ>;
|
2018-05-01 20:39:17 +08:00
|
|
|
defm : BWWriteResPair<WriteVecLogic, [BWPort015], 1, [1], 1, 5>; // Vector integer and/or/xor.
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : BWWriteResPair<WriteVecLogicX,[BWPort015], 1, [1], 1, 5>; // Vector integer and/or/xor.
|
2018-05-01 20:39:17 +08:00
|
|
|
defm : BWWriteResPair<WriteVecLogicY,[BWPort015], 1, [1], 1, 6>; // Vector integer and/or/xor (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVecLogicZ>;
|
2018-05-08 18:28:03 +08:00
|
|
|
defm : BWWriteResPair<WriteVecTest, [BWPort0,BWPort5], 2, [1,1], 2, 5>; // Vector integer TEST instructions.
|
|
|
|
defm : BWWriteResPair<WriteVecTestY, [BWPort0,BWPort5], 4, [1,1], 2, 6>; // Vector integer TEST instructions (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVecTestZ>;
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : BWWriteResPair<WriteVecIMul, [BWPort0], 5, [1], 1, 5>; // Vector integer multiply.
|
2018-05-05 01:47:46 +08:00
|
|
|
defm : BWWriteResPair<WriteVecIMulX, [BWPort0], 5, [1], 1, 5>; // Vector integer multiply.
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : BWWriteResPair<WriteVecIMulY, [BWPort0], 5, [1], 1, 6>; // Vector integer multiply.
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVecIMulZ>;
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : BWWriteResPair<WritePMULLD, [BWPort0], 10, [2], 2, 5>; // Vector PMULLD.
|
|
|
|
defm : BWWriteResPair<WritePMULLDY, [BWPort0], 10, [2], 2, 6>; // Vector PMULLD (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WritePMULLDZ>;
|
2018-05-03 01:58:50 +08:00
|
|
|
defm : BWWriteResPair<WriteShuffle, [BWPort5], 1, [1], 1, 5>; // Vector shuffles.
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : BWWriteResPair<WriteShuffleX, [BWPort5], 1, [1], 1, 5>; // Vector shuffles.
|
2018-05-03 02:48:23 +08:00
|
|
|
defm : BWWriteResPair<WriteShuffleY, [BWPort5], 1, [1], 1, 6>; // Vector shuffles (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteShuffleZ>;
|
2018-05-03 01:58:50 +08:00
|
|
|
defm : BWWriteResPair<WriteVarShuffle, [BWPort5], 1, [1], 1, 5>; // Vector variable shuffles.
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : BWWriteResPair<WriteVarShuffleX,[BWPort5], 1, [1], 1, 5>; // Vector variable shuffles.
|
2018-05-03 02:48:23 +08:00
|
|
|
defm : BWWriteResPair<WriteVarShuffleY,[BWPort5], 1, [1], 1, 6>; // Vector variable shuffles (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVarShuffleZ>;
|
2018-05-03 02:48:23 +08:00
|
|
|
defm : BWWriteResPair<WriteBlend, [BWPort5], 1, [1], 1, 5>; // Vector blends.
|
|
|
|
defm : BWWriteResPair<WriteBlendY, [BWPort5], 1, [1], 1, 6>; // Vector blends (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteBlendZ>;
|
2018-04-22 22:43:12 +08:00
|
|
|
defm : BWWriteResPair<WriteVarBlend, [BWPort5], 2, [2], 2, 5>; // Vector variable blends.
|
2018-05-03 02:48:23 +08:00
|
|
|
defm : BWWriteResPair<WriteVarBlendY, [BWPort5], 2, [2], 2, 6>; // Vector variable blends (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVarBlendZ>;
|
2018-04-22 18:39:16 +08:00
|
|
|
defm : BWWriteResPair<WriteMPSAD, [BWPort0, BWPort5], 7, [1, 2], 3, 5>; // Vector MPSAD.
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : BWWriteResPair<WriteMPSADY, [BWPort0, BWPort5], 7, [1, 2], 3, 6>; // Vector MPSAD.
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteMPSADZ>;
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : BWWriteResPair<WritePSADBW, [BWPort0], 5, [1], 1, 5>; // Vector PSADBW.
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : BWWriteResPair<WritePSADBWX, [BWPort0], 5, [1], 1, 5>; // Vector PSADBW.
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : BWWriteResPair<WritePSADBWY, [BWPort0], 5, [1], 1, 6>; // Vector PSADBW (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WritePSADBWZ>;
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : BWWriteResPair<WritePHMINPOS, [BWPort0], 5>; // Vector PHMINPOS.
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-05-04 01:56:43 +08:00
|
|
|
// Vector integer shifts.
|
|
|
|
defm : BWWriteResPair<WriteVecShift, [BWPort0], 1, [1], 1, 5>;
|
|
|
|
defm : BWWriteResPair<WriteVecShiftX, [BWPort0,BWPort5], 2, [1,1], 2, 5>;
|
|
|
|
defm : X86WriteRes<WriteVecShiftY, [BWPort0,BWPort5], 4, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteVecShiftYLd, [BWPort0,BWPort23], 7, [1,1], 2>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVecShiftZ>;
|
2018-05-04 01:56:43 +08:00
|
|
|
|
2018-05-05 01:47:46 +08:00
|
|
|
defm : BWWriteResPair<WriteVecShiftImm, [BWPort0], 1, [1], 1, 5>;
|
2018-05-04 01:56:43 +08:00
|
|
|
defm : BWWriteResPair<WriteVecShiftImmX, [BWPort0], 1, [1], 1, 5>; // Vector integer immediate shifts (XMM).
|
|
|
|
defm : BWWriteResPair<WriteVecShiftImmY, [BWPort0], 1, [1], 1, 6>; // Vector integer immediate shifts (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVecShiftImmZ>;
|
2018-05-04 01:56:43 +08:00
|
|
|
defm : BWWriteResPair<WriteVarVecShift, [BWPort0, BWPort5], 3, [2,1], 3, 5>; // Variable vector shifts.
|
|
|
|
defm : BWWriteResPair<WriteVarVecShiftY, [BWPort0, BWPort5], 3, [2,1], 3, 6>; // Variable vector shifts (YMM/ZMM).
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteVarVecShiftZ>;
|
2018-05-04 01:56:43 +08:00
|
|
|
|
2018-04-24 21:21:41 +08:00
|
|
|
// Vector insert/extract operations.
|
|
|
|
def : WriteRes<WriteVecInsert, [BWPort5]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [2];
|
|
|
|
}
|
|
|
|
def : WriteRes<WriteVecInsertLd, [BWPort5,BWPort23]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
def : WriteRes<WriteVecExtract, [BWPort0,BWPort5]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
}
|
|
|
|
def : WriteRes<WriteVecExtractSt, [BWPort4,BWPort5,BWPort237]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
}
|
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Conversion between integer and float.
|
2018-05-16 18:53:45 +08:00
|
|
|
defm : BWWriteResPair<WriteCvtSS2I, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteCvtPS2I, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteCvtPS2IY, [BWPort1], 3>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteCvtPS2IZ>;
|
2018-05-16 18:53:45 +08:00
|
|
|
defm : BWWriteResPair<WriteCvtSD2I, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteCvtPD2I, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteCvtPD2IY, [BWPort1], 3>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteCvtPD2IZ>;
|
2018-05-16 18:53:45 +08:00
|
|
|
|
|
|
|
defm : BWWriteResPair<WriteCvtI2SS, [BWPort1], 4>;
|
|
|
|
defm : BWWriteResPair<WriteCvtI2PS, [BWPort1], 4>;
|
|
|
|
defm : BWWriteResPair<WriteCvtI2PSY, [BWPort1], 4>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteCvtI2PSZ>;
|
2018-05-16 18:53:45 +08:00
|
|
|
defm : BWWriteResPair<WriteCvtI2SD, [BWPort1], 4>;
|
|
|
|
defm : BWWriteResPair<WriteCvtI2PD, [BWPort1], 4>;
|
|
|
|
defm : BWWriteResPair<WriteCvtI2PDY, [BWPort1], 4>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteCvtI2PDZ>;
|
2018-05-16 01:36:49 +08:00
|
|
|
|
|
|
|
defm : BWWriteResPair<WriteCvtSS2SD, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteCvtPS2PD, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteCvtPS2PDY, [BWPort1], 3>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteCvtPS2PDZ>;
|
2018-05-16 01:36:49 +08:00
|
|
|
defm : BWWriteResPair<WriteCvtSD2SS, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteCvtPD2PS, [BWPort1], 3>;
|
|
|
|
defm : BWWriteResPair<WriteCvtPD2PSY, [BWPort1], 3>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResPairUnsupported<WriteCvtPD2PSZ>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-05-15 22:12:32 +08:00
|
|
|
defm : X86WriteRes<WriteCvtPH2PS, [BWPort0,BWPort5], 2, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteCvtPH2PSY, [BWPort0,BWPort5], 2, [1,1], 2>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResUnsupported<WriteCvtPH2PSZ>;
|
2018-05-15 22:12:32 +08:00
|
|
|
defm : X86WriteRes<WriteCvtPH2PSLd, [BWPort0,BWPort23], 6, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteCvtPH2PSYLd, [BWPort0,BWPort23], 6, [1,1], 2>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResUnsupported<WriteCvtPH2PSZLd>;
|
2018-05-15 22:12:32 +08:00
|
|
|
|
|
|
|
defm : X86WriteRes<WriteCvtPS2PH, [BWPort1,BWPort5], 4, [1,1], 2>;
|
|
|
|
defm : X86WriteRes<WriteCvtPS2PHY, [BWPort1,BWPort5], 6, [1,1], 2>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResUnsupported<WriteCvtPS2PHZ>;
|
2018-05-15 22:12:32 +08:00
|
|
|
defm : X86WriteRes<WriteCvtPS2PHSt, [BWPort1,BWPort4,BWPort237], 5, [1,1,1], 3>;
|
|
|
|
defm : X86WriteRes<WriteCvtPS2PHYSt, [BWPort1,BWPort4,BWPort237], 7, [1,1,1], 3>;
|
2018-06-11 22:37:53 +08:00
|
|
|
defm : X86WriteResUnsupported<WriteCvtPS2PHZSt>;
|
2018-05-15 22:12:32 +08:00
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Strings instructions.
|
2018-03-22 22:56:18 +08:00
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Packed Compare Implicit Length Strings, Return Mask
|
|
|
|
def : WriteRes<WritePCmpIStrM, [BWPort0]> {
|
2018-03-22 22:56:18 +08:00
|
|
|
let Latency = 11;
|
|
|
|
let NumMicroOps = 3;
|
2017-10-25 04:19:47 +08:00
|
|
|
let ResourceCycles = [3];
|
|
|
|
}
|
|
|
|
def : WriteRes<WritePCmpIStrMLd, [BWPort0, BWPort23]> {
|
2018-03-22 22:56:18 +08:00
|
|
|
let Latency = 16;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [3,1];
|
|
|
|
}
|
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Packed Compare Explicit Length Strings, Return Mask
|
2018-03-22 22:56:18 +08:00
|
|
|
def : WriteRes<WritePCmpEStrM, [BWPort0, BWPort5, BWPort015, BWPort0156]> {
|
|
|
|
let Latency = 19;
|
|
|
|
let NumMicroOps = 9;
|
|
|
|
let ResourceCycles = [4,3,1,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-03-22 22:56:18 +08:00
|
|
|
def : WriteRes<WritePCmpEStrMLd, [BWPort0, BWPort5, BWPort23, BWPort015, BWPort0156]> {
|
|
|
|
let Latency = 24;
|
|
|
|
let NumMicroOps = 10;
|
|
|
|
let ResourceCycles = [4,3,1,1,1];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Packed Compare Implicit Length Strings, Return Index
|
2017-10-25 04:19:47 +08:00
|
|
|
def : WriteRes<WritePCmpIStrI, [BWPort0]> {
|
|
|
|
let Latency = 11;
|
2018-03-22 22:56:18 +08:00
|
|
|
let NumMicroOps = 3;
|
2017-10-25 04:19:47 +08:00
|
|
|
let ResourceCycles = [3];
|
|
|
|
}
|
|
|
|
def : WriteRes<WritePCmpIStrILd, [BWPort0, BWPort23]> {
|
2018-03-22 22:56:18 +08:00
|
|
|
let Latency = 16;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [3,1];
|
|
|
|
}
|
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Packed Compare Explicit Length Strings, Return Index
|
2018-03-22 22:56:18 +08:00
|
|
|
def : WriteRes<WritePCmpEStrI, [BWPort0, BWPort5, BWPort0156]> {
|
|
|
|
let Latency = 18;
|
|
|
|
let NumMicroOps = 8;
|
|
|
|
let ResourceCycles = [4,3,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-03-22 22:56:18 +08:00
|
|
|
def : WriteRes<WritePCmpEStrILd, [BWPort0, BWPort5, BWPort23, BWPort0156]> {
|
|
|
|
let Latency = 23;
|
|
|
|
let NumMicroOps = 9;
|
|
|
|
let ResourceCycles = [4,3,1,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
|
|
|
|
2018-03-28 04:38:54 +08:00
|
|
|
// MOVMSK Instructions.
|
2018-05-04 22:54:33 +08:00
|
|
|
def : WriteRes<WriteFMOVMSK, [BWPort0]> { let Latency = 3; }
|
|
|
|
def : WriteRes<WriteVecMOVMSK, [BWPort0]> { let Latency = 3; }
|
|
|
|
def : WriteRes<WriteVecMOVMSKY, [BWPort0]> { let Latency = 3; }
|
|
|
|
def : WriteRes<WriteMMXMOVMSK, [BWPort0]> { let Latency = 1; }
|
2018-03-28 04:38:54 +08:00
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// AES instructions.
|
|
|
|
def : WriteRes<WriteAESDecEnc, [BWPort5]> { // Decryption, encryption.
|
|
|
|
let Latency = 7;
|
2018-03-22 21:18:08 +08:00
|
|
|
let NumMicroOps = 1;
|
2017-10-25 04:19:47 +08:00
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
|
|
|
def : WriteRes<WriteAESDecEncLd, [BWPort5, BWPort23]> {
|
2018-03-22 21:18:08 +08:00
|
|
|
let Latency = 12;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-03-22 21:18:08 +08:00
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
def : WriteRes<WriteAESIMC, [BWPort5]> { // InvMixColumn.
|
|
|
|
let Latency = 14;
|
2018-03-22 21:18:08 +08:00
|
|
|
let NumMicroOps = 2;
|
2017-10-25 04:19:47 +08:00
|
|
|
let ResourceCycles = [2];
|
|
|
|
}
|
|
|
|
def : WriteRes<WriteAESIMCLd, [BWPort5, BWPort23]> {
|
2018-03-22 21:18:08 +08:00
|
|
|
let Latency = 19;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [2,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-03-22 21:18:08 +08:00
|
|
|
|
|
|
|
def : WriteRes<WriteAESKeyGen, [BWPort0, BWPort5, BWPort015]> { // Key Generation.
|
|
|
|
let Latency = 29;
|
|
|
|
let NumMicroOps = 11;
|
|
|
|
let ResourceCycles = [2,7,2];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-03-22 21:18:08 +08:00
|
|
|
def : WriteRes<WriteAESKeyGenLd, [BWPort0, BWPort5, BWPort23, BWPort015]> {
|
|
|
|
let Latency = 33;
|
|
|
|
let NumMicroOps = 11;
|
|
|
|
let ResourceCycles = [2,7,1,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Carry-less multiplication instructions.
|
2018-03-22 21:37:30 +08:00
|
|
|
defm : BWWriteResPair<WriteCLMul, [BWPort0], 5>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
// Catch-all for expensive system instructions.
|
|
|
|
def : WriteRes<WriteSystem, [BWPort0156]> { let Latency = 100; } // def WriteSystem : SchedWrite;
|
|
|
|
|
|
|
|
// AVX2.
|
2018-05-10 03:27:48 +08:00
|
|
|
defm : BWWriteResPair<WriteFShuffle256, [BWPort5], 3, [1], 1, 6>; // Fp 256-bit width vector shuffles.
|
|
|
|
defm : BWWriteResPair<WriteFVarShuffle256, [BWPort5], 3, [1], 1, 6>; // Fp 256-bit width vector variable shuffles.
|
|
|
|
defm : BWWriteResPair<WriteShuffle256, [BWPort5], 3, [1], 1, 6>; // 256-bit width vector shuffles.
|
|
|
|
defm : BWWriteResPair<WriteVarShuffle256, [BWPort5], 3, [1], 1, 6>; // 256-bit width vector variable shuffles.
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
// Old microcoded instructions that nobody use.
|
|
|
|
def : WriteRes<WriteMicrocoded, [BWPort0156]> { let Latency = 100; } // def WriteMicrocoded : SchedWrite;
|
|
|
|
|
|
|
|
// Fence instructions.
|
|
|
|
def : WriteRes<WriteFence, [BWPort23, BWPort4]>;
|
|
|
|
|
2018-04-22 02:07:36 +08:00
|
|
|
// Load/store MXCSR.
|
|
|
|
def : WriteRes<WriteLDMXCSR, [BWPort0,BWPort23,BWPort0156]> { let Latency = 7; let NumMicroOps = 3; let ResourceCycles = [1,1,1]; }
|
|
|
|
def : WriteRes<WriteSTMXCSR, [BWPort4,BWPort5,BWPort237]> { let Latency = 2; let NumMicroOps = 3; let ResourceCycles = [1,1,1]; }
|
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
// Nop, not very useful expect it provides a model for nops!
|
|
|
|
def : WriteRes<WriteNop, []>;
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Horizontal add/sub instructions.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-05-03 21:27:10 +08:00
|
|
|
defm : BWWriteResPair<WriteFHAdd, [BWPort1,BWPort5], 5, [1,2], 3, 5>;
|
2018-04-28 00:11:57 +08:00
|
|
|
defm : BWWriteResPair<WriteFHAddY, [BWPort1,BWPort5], 5, [1,2], 3, 6>;
|
2018-05-03 21:27:10 +08:00
|
|
|
defm : BWWriteResPair<WritePHAdd, [BWPort5,BWPort15], 3, [2,1], 3, 5>;
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : BWWriteResPair<WritePHAddX, [BWPort5,BWPort15], 3, [2,1], 3, 5>;
|
2018-05-03 21:27:10 +08:00
|
|
|
defm : BWWriteResPair<WritePHAddY, [BWPort5,BWPort15], 3, [2,1], 3, 6>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
// Remaining instrs.
|
|
|
|
|
|
|
|
def BWWriteResGroup1 : SchedWriteRes<[BWPort0]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-05-19 01:58:36 +08:00
|
|
|
def: InstRW<[BWWriteResGroup1], (instregex "VPSLLVQ(Y?)rr",
|
2018-05-08 18:28:03 +08:00
|
|
|
"VPSRLVQ(Y?)rr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup2 : SchedWriteRes<[BWPort1]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup2], (instregex "COM(P?)_FST0r",
|
|
|
|
"UCOM_F(P?)r")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup3 : SchedWriteRes<[BWPort5]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup3], (instrs MMX_MOVQ2DQrr)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup4 : SchedWriteRes<[BWPort6]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup4], (instregex "JMP(16|32|64)r")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup5 : SchedWriteRes<[BWPort01]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-04-24 00:10:50 +08:00
|
|
|
def: InstRW<[BWWriteResGroup5], (instrs FINCSTP, FNOP)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup6 : SchedWriteRes<[BWPort06]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-04-06 05:56:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup6], (instrs CDQ, CQO)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup7 : SchedWriteRes<[BWPort15]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-09-14 21:09:56 +08:00
|
|
|
def: InstRW<[BWWriteResGroup7], (instregex "ANDN(32|64)rr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup8 : SchedWriteRes<[BWPort015]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-05-19 01:58:36 +08:00
|
|
|
def: InstRW<[BWWriteResGroup8], (instregex "VPBLENDD(Y?)rri")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup9 : SchedWriteRes<[BWPort0156]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup9], (instrs SGDT64m,
|
|
|
|
SIDT64m,
|
|
|
|
SMSW16m,
|
|
|
|
STRm,
|
|
|
|
SYSCALL)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup10 : SchedWriteRes<[BWPort4,BWPort237]> {
|
|
|
|
let Latency = 1;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup10], (instrs FBSTPm)>;
|
|
|
|
def: InstRW<[BWWriteResGroup10], (instregex "ST_FP(32|64|80)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup12 : SchedWriteRes<[BWPort01]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [2];
|
|
|
|
}
|
2018-04-24 00:10:50 +08:00
|
|
|
def: InstRW<[BWWriteResGroup12], (instrs FDECSTP)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup14 : SchedWriteRes<[BWPort0156]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [2];
|
|
|
|
}
|
2018-04-27 21:32:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup14], (instrs LFENCE,
|
|
|
|
MFENCE,
|
|
|
|
WAIT,
|
|
|
|
XGETBV)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup15 : SchedWriteRes<[BWPort0,BWPort5]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-05-15 22:12:32 +08:00
|
|
|
def: InstRW<[BWWriteResGroup15], (instregex "(V?)CVTPS2PDrr",
|
2018-05-08 18:28:03 +08:00
|
|
|
"(V?)CVTSS2SDrr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup16 : SchedWriteRes<[BWPort6,BWPort0156]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup16], (instregex "CLFLUSH")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup17 : SchedWriteRes<[BWPort01,BWPort015]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup17], (instrs MMX_MOVDQ2Qrr)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup18 : SchedWriteRes<[BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup18], (instrs SFENCE)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup20 : SchedWriteRes<[BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup20], (instrs CWD,
|
|
|
|
JCXZ, JECXZ, JRCXZ,
|
|
|
|
ADC8i8, SBB8i8)>;
|
|
|
|
def: InstRW<[BWWriteResGroup20], (instregex "ADC8ri",
|
2018-03-21 14:28:42 +08:00
|
|
|
"SBB8ri",
|
|
|
|
"SET(A|BE)r")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup22 : SchedWriteRes<[BWPort4,BWPort6,BWPort237]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup22], (instrs FNSTCW16m)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup24 : SchedWriteRes<[BWPort4,BWPort237,BWPort15]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup24], (instregex "MOVBE(16|32|64)mr")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup25 : SchedWriteRes<[BWPort4,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 2;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup25], (instrs PUSH16r, PUSH32r, PUSH64r, PUSH64i8,
|
2018-04-27 21:32:42 +08:00
|
|
|
STOSB, STOSL, STOSQ, STOSW)>;
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup25], (instregex "PUSH(16|32|64)rmr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup27 : SchedWriteRes<[BWPort1]> {
|
|
|
|
let Latency = 3;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup27], (instrs MMX_CVTPI2PSirr)>;
|
|
|
|
def: InstRW<[BWWriteResGroup27], (instregex "P(DEP|EXT)(32|64)rr",
|
2018-04-22 05:16:44 +08:00
|
|
|
"(V?)CVTDQ2PS(Y?)rr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup27_16 : SchedWriteRes<[BWPort1, BWPort0156]> {
|
2018-04-19 13:34:05 +08:00
|
|
|
let Latency = 4;
|
2017-10-25 04:19:47 +08:00
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
[X86] Add IMUL scheduling info on sandybridge, fix it on >=haswell.
Summary:
Only IMUL16rri uses an extra P0156. IMUL32* and IMUL16rr only use
P1.
This was computed using https://github.com/google/EXEgesis/blob/master/exegesis/tools/compute_itineraries.cc
This can easily be validated by running perf on the following code:
```
int main(int argc, char**argv) {
int a = argc;
int b = argc;
int c = argc;
int d = argc;
for (int i = 0; i < LOOP_ITERATIONS; ++i) {
asm volatile(
R"(
.rept 10000
imull $0x2, %%edx, %%eax
imull $0x2, %%ecx, %%ebx
imull $0x2, %%eax, %%edx
imull $0x2, %%ebx, %%ecx
.endr
)"
: "+a"(a), "+b"(b), "+c"(c), "+d"(d)
:
:);
}
return a+b+c+d;
}
```
-> test.cc
perf stat -x, -e cycles --pfm-events=uops_executed_port:port_0:u,uops_executed_port:port_1:u,uops_executed_port:port_2:u,uops_executed_port:port_3:u,uops_executed_port:port_4:u,uops_executed_port:port_5:u,uops_executed_port:port_6:u,uops_executed_port:port_7:u test
Reviewers: craig.topper, RKSimon, gadi.haber
Subscribers: llvm-commits, gchatelet, chandlerc
Differential Revision: https://reviews.llvm.org/D43460
llvm-svn: 326877
2018-03-07 16:14:02 +08:00
|
|
|
def: InstRW<[BWWriteResGroup27_16], (instrs IMUL16rri, IMUL16rri8)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup28 : SchedWriteRes<[BWPort5]> {
|
|
|
|
let Latency = 3;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup28], (instrs VPBROADCASTBrr,
|
|
|
|
VPBROADCASTWrr)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup33 : SchedWriteRes<[BWPort5,BWPort0156]> {
|
|
|
|
let Latency = 3;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [2,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup33], (instrs MMX_PACKSSDWirr,
|
|
|
|
MMX_PACKSSWBirr,
|
|
|
|
MMX_PACKUSWBirr)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup34 : SchedWriteRes<[BWPort6,BWPort0156]> {
|
|
|
|
let Latency = 3;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,2];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup34], (instregex "CLD")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup35 : SchedWriteRes<[BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 3;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,2];
|
|
|
|
}
|
2018-08-18 23:58:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup35], (instregex "RCL(8|16|32|64)r(1|i)",
|
|
|
|
"RCR(8|16|32|64)r(1|i)")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup36 : SchedWriteRes<[BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 3;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [2,1];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup36], (instregex "ROL(8|16|32|64)rCL",
|
|
|
|
"ROR(8|16|32|64)rCL",
|
|
|
|
"SAR(8|16|32|64)rCL",
|
|
|
|
"SHL(8|16|32|64)rCL",
|
|
|
|
"SHR(8|16|32|64)rCL")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup37 : SchedWriteRes<[BWPort4,BWPort6,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 3;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [1,1,1,1];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup37], (instregex "CALL(16|32|64)r")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup38 : SchedWriteRes<[BWPort4,BWPort237,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 3;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [1,1,1,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup38], (instrs CALL64pcrel32)>;
|
|
|
|
def: InstRW<[BWWriteResGroup38], (instregex "SET(A|BE)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup39 : SchedWriteRes<[BWPort0,BWPort1]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-05-10 03:04:15 +08:00
|
|
|
def: InstRW<[BWWriteResGroup39], (instregex "(V?)CVT(T?)SD2SI64rr",
|
|
|
|
"(V?)CVT(T?)SD2SIrr",
|
|
|
|
"(V?)CVT(T?)SS2SI64rr",
|
|
|
|
"(V?)CVT(T?)SS2SIrr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup40 : SchedWriteRes<[BWPort0,BWPort5]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup40], (instrs VCVTPS2PDYrr)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup41 : SchedWriteRes<[BWPort0,BWPort0156]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup41], (instrs FNSTSW16r)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup42 : SchedWriteRes<[BWPort1,BWPort5]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup42], (instrs IMUL64r, MUL64r, MULX64rr,
|
|
|
|
MMX_CVTPI2PDirr)>;
|
|
|
|
def: InstRW<[BWWriteResGroup42], (instregex "MMX_CVT(T?)PD2PIirr",
|
2018-05-10 03:04:15 +08:00
|
|
|
"MMX_CVT(T?)PS2PIirr",
|
2018-03-25 03:37:28 +08:00
|
|
|
"(V?)CVTDQ2PDrr",
|
|
|
|
"(V?)CVTPD2PSrr",
|
|
|
|
"(V?)CVTSD2SSrr",
|
|
|
|
"(V?)CVTSI642SDrr",
|
|
|
|
"(V?)CVTSI2SDrr",
|
|
|
|
"(V?)CVTSI2SSrr",
|
2018-05-10 03:04:15 +08:00
|
|
|
"(V?)CVT(T?)PD2DQrr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup42_16 : SchedWriteRes<[BWPort1,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 4;
|
2018-04-19 13:34:05 +08:00
|
|
|
let ResourceCycles = [1,1,2];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup42_16], (instrs IMUL16r, MUL16r)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup43 : SchedWriteRes<[BWPort0,BWPort4,BWPort237]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup43], (instrs FNSTSWm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup44 : SchedWriteRes<[BWPort1,BWPort4,BWPort237]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-04-28 05:14:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup44], (instregex "IST(T?)_FP(16|32|64)m",
|
|
|
|
"IST_F(16|32)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup45 : SchedWriteRes<[BWPort0156]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [4];
|
|
|
|
}
|
2018-04-24 00:10:50 +08:00
|
|
|
def: InstRW<[BWWriteResGroup45], (instrs FNCLEX)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup46 : SchedWriteRes<[BWPort015,BWPort0156]> {
|
|
|
|
let Latency = 4;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [1,3];
|
|
|
|
}
|
2018-04-27 21:32:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup46], (instrs VZEROUPPER)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup47 : SchedWriteRes<[BWPort0]> {
|
|
|
|
let Latency = 5;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-05-03 00:16:24 +08:00
|
|
|
def: InstRW<[BWWriteResGroup47], (instregex "(V?)PCMPGTQ(Y?)rr",
|
2018-05-11 03:08:06 +08:00
|
|
|
"MUL_(FPrST0|FST0r|FrST0)")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup49 : SchedWriteRes<[BWPort23]> {
|
|
|
|
let Latency = 5;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup49], (instregex "MOVSX(16|32|64)rm(8|16|32)",
|
|
|
|
"MOVZX(16|32|64)rm(8|16)")>;
|
|
|
|
def: InstRW<[BWWriteResGroup49], (instrs VBROADCASTSSrm,
|
|
|
|
VMOVDDUPrm, MOVDDUPrm,
|
|
|
|
VMOVSHDUPrm, MOVSHDUPrm,
|
|
|
|
VMOVSLDUPrm, MOVSLDUPrm,
|
|
|
|
VPBROADCASTDrm,
|
|
|
|
VPBROADCASTQrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup50 : SchedWriteRes<[BWPort1,BWPort5]> {
|
|
|
|
let Latency = 5;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,2];
|
|
|
|
}
|
2018-04-22 23:25:59 +08:00
|
|
|
def: InstRW<[BWWriteResGroup50], (instregex "(V?)CVTSI642SSrr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup51 : SchedWriteRes<[BWPort1,BWPort6,BWPort06]> {
|
|
|
|
let Latency = 5;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup51], (instregex "STR(16|32|64)r")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup52 : SchedWriteRes<[BWPort1,BWPort06,BWPort0156]> {
|
2018-03-23 03:22:51 +08:00
|
|
|
let Latency = 4;
|
2017-10-25 04:19:47 +08:00
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-03-23 03:22:51 +08:00
|
|
|
def: InstRW<[BWWriteResGroup52], (instrs IMUL32r, MUL32r, MULX32rr)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup54 : SchedWriteRes<[BWPort6,BWPort0156]> {
|
|
|
|
let Latency = 5;
|
|
|
|
let NumMicroOps = 5;
|
|
|
|
let ResourceCycles = [1,4];
|
|
|
|
}
|
2018-04-29 23:33:15 +08:00
|
|
|
def: InstRW<[BWWriteResGroup54], (instrs PAUSE)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup55 : SchedWriteRes<[BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 5;
|
|
|
|
let NumMicroOps = 5;
|
|
|
|
let ResourceCycles = [1,4];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup55], (instrs XSETBV)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup57 : SchedWriteRes<[BWPort4,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 5;
|
|
|
|
let NumMicroOps = 6;
|
|
|
|
let ResourceCycles = [1,1,4];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup57], (instregex "PUSHF(16|64)")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup58 : SchedWriteRes<[BWPort23]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup58], (instregex "LD_F(32|64|80)m")>;
|
|
|
|
def: InstRW<[BWWriteResGroup58], (instrs VBROADCASTF128,
|
|
|
|
VBROADCASTI128,
|
|
|
|
VBROADCASTSDYrm,
|
|
|
|
VBROADCASTSSYrm,
|
|
|
|
VMOVDDUPYrm,
|
|
|
|
VMOVSHDUPYrm,
|
|
|
|
VMOVSLDUPYrm,
|
|
|
|
VPBROADCASTDYrm,
|
|
|
|
VPBROADCASTQYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup59 : SchedWriteRes<[BWPort0,BWPort23]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup59], (instrs CVTPS2PDrm, VCVTPS2PDrm,
|
|
|
|
CVTSS2SDrm, VCVTSS2SDrm,
|
|
|
|
VPSLLVQrm,
|
|
|
|
VPSRLVQrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup60 : SchedWriteRes<[BWPort1,BWPort5]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup60], (instrs VCVTDQ2PDYrr,
|
|
|
|
VCVTPD2PSYrr,
|
|
|
|
VCVTPD2DQYrr,
|
|
|
|
VCVTTPD2DQYrr)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup62 : SchedWriteRes<[BWPort6,BWPort23]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup62], (instrs FARJMP64)>;
|
|
|
|
def: InstRW<[BWWriteResGroup62], (instregex "JMP(16|32|64)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup63 : SchedWriteRes<[BWPort23,BWPort06]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-04-18 14:41:25 +08:00
|
|
|
def: InstRW<[BWWriteResGroup63], (instregex "BT(16|32|64)mi8")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup64 : SchedWriteRes<[BWPort23,BWPort15]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup64], (instregex "ANDN(32|64)rm",
|
2018-04-24 06:45:04 +08:00
|
|
|
"MOVBE(16|32|64)rm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup65 : SchedWriteRes<[BWPort23,BWPort015]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup65], (instrs VINSERTF128rm,
|
|
|
|
VINSERTI128rm,
|
|
|
|
VPBLENDDrmi)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup66 : SchedWriteRes<[BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-03-18 16:38:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup66], (instrs POP16r, POP32r, POP64r)>;
|
2018-04-07 00:16:48 +08:00
|
|
|
def: InstRW<[BWWriteResGroup66], (instregex "POP(16|32|64)rmr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup68 : SchedWriteRes<[BWPort1,BWPort6,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [1,1,1,1];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup68], (instregex "SLDT(16|32|64)r")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup69 : SchedWriteRes<[BWPort4,BWPort23,BWPort237,BWPort06]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [1,1,1,1];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup69], (instregex "BTC(16|32|64)mi8",
|
|
|
|
"BTR(16|32|64)mi8",
|
|
|
|
"BTS(16|32|64)mi8",
|
2018-08-18 23:58:19 +08:00
|
|
|
"SAR(8|16|32|64)m(1|i)",
|
|
|
|
"SHL(8|16|32|64)m(1|i)",
|
|
|
|
"SHR(8|16|32|64)m(1|i)")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup70 : SchedWriteRes<[BWPort4,BWPort23,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [1,1,1,1];
|
|
|
|
}
|
2018-04-07 00:16:48 +08:00
|
|
|
def: InstRW<[BWWriteResGroup70], (instregex "POP(16|32|64)rmm",
|
|
|
|
"PUSH(16|32|64)rmm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup71 : SchedWriteRes<[BWPort6,BWPort0156]> {
|
|
|
|
let Latency = 6;
|
|
|
|
let NumMicroOps = 6;
|
|
|
|
let ResourceCycles = [1,5];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup71], (instrs STD)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup73 : SchedWriteRes<[BWPort0,BWPort23]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup73], (instrs VPSLLVQYrm,
|
|
|
|
VPSRLVQYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup74 : SchedWriteRes<[BWPort1,BWPort23]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup74], (instregex "FCOM(P?)(32|64)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup77 : SchedWriteRes<[BWPort23,BWPort015]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup77], (instrs VPBLENDDYrmi)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup79 : SchedWriteRes<[BWPort5,BWPort23]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [2,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup79], (instrs MMX_PACKSSDWirm,
|
|
|
|
MMX_PACKSSWBirm,
|
|
|
|
MMX_PACKUSWBirm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup80 : SchedWriteRes<[BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,2];
|
|
|
|
}
|
2018-04-06 05:16:26 +08:00
|
|
|
def: InstRW<[BWWriteResGroup80], (instrs LEAVE, LEAVE64,
|
|
|
|
SCASB, SCASL, SCASQ, SCASW)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup82 : SchedWriteRes<[BWPort0,BWPort01,BWPort23]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup82], (instrs FLDCW16m)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup84 : SchedWriteRes<[BWPort6,BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup84], (instrs LRETQ, RETQ)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup87 : SchedWriteRes<[BWPort4,BWPort23,BWPort237,BWPort06]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 5;
|
|
|
|
let ResourceCycles = [1,1,1,2];
|
|
|
|
}
|
2018-08-18 23:58:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup87], (instregex "ROL(8|16|32|64)m(1|i)",
|
|
|
|
"ROR(8|16|32|64)m(1|i)")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup88 : SchedWriteRes<[BWPort4,BWPort23,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 5;
|
|
|
|
let ResourceCycles = [1,1,1,2];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup88], (instregex "XADD(8|16|32|64)rm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup89 : SchedWriteRes<[BWPort4,BWPort6,BWPort23,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 5;
|
|
|
|
let ResourceCycles = [1,1,1,1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup89], (instregex "CALL(16|32|64)m")>;
|
|
|
|
def: InstRW<[BWWriteResGroup89], (instrs FARCALL64)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup90 : SchedWriteRes<[BWPort6,BWPort06,BWPort15,BWPort0156]> {
|
|
|
|
let Latency = 7;
|
|
|
|
let NumMicroOps = 7;
|
|
|
|
let ResourceCycles = [2,2,1,2];
|
|
|
|
}
|
2018-03-18 16:38:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup90], (instrs LOOP)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup91 : SchedWriteRes<[BWPort1,BWPort23]> {
|
|
|
|
let Latency = 8;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup91], (instrs MMX_CVTPI2PSirm,
|
|
|
|
CVTDQ2PSrm,
|
|
|
|
VCVTDQ2PSrm)>;
|
|
|
|
def: InstRW<[BWWriteResGroup91], (instregex "P(DEP|EXT)(32|64)rm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup91_16 : SchedWriteRes<[BWPort1, BWPort0156, BWPort23]> {
|
2018-04-19 13:34:05 +08:00
|
|
|
let Latency = 8;
|
2017-10-25 04:19:47 +08:00
|
|
|
let NumMicroOps = 3;
|
2018-03-25 03:37:28 +08:00
|
|
|
let ResourceCycles = [1,1,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-04-19 13:34:05 +08:00
|
|
|
def: InstRW<[BWWriteResGroup91_16], (instrs IMUL16rmi, IMUL16rmi8)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-04-19 13:34:05 +08:00
|
|
|
def BWWriteResGroup91_16_2 : SchedWriteRes<[BWPort1, BWPort06, BWPort0156, BWPort23]> {
|
|
|
|
let Latency = 9;
|
2017-10-25 04:19:47 +08:00
|
|
|
let NumMicroOps = 5;
|
2018-04-19 13:34:05 +08:00
|
|
|
let ResourceCycles = [1,1,2,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup91_16_2], (instrs IMUL16m, MUL16m)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup92 : SchedWriteRes<[BWPort5,BWPort23]> {
|
|
|
|
let Latency = 8;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup92], (instrs VPMOVSXBDYrm,
|
|
|
|
VPMOVSXBQYrm,
|
|
|
|
VPMOVSXBWYrm,
|
|
|
|
VPMOVSXDQYrm,
|
|
|
|
VPMOVSXWDYrm,
|
|
|
|
VPMOVSXWQYrm,
|
|
|
|
VPMOVZXWDYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup97 : SchedWriteRes<[BWPort23,BWPort237,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 8;
|
|
|
|
let NumMicroOps = 5;
|
|
|
|
let ResourceCycles = [1,1,1,2];
|
|
|
|
}
|
2018-08-18 23:58:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup97], (instregex "RCL(8|16|32|64)m(1|i)",
|
|
|
|
"RCR(8|16|32|64)m(1|i)")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup99 : SchedWriteRes<[BWPort4,BWPort23,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 8;
|
|
|
|
let NumMicroOps = 6;
|
|
|
|
let ResourceCycles = [1,1,1,3];
|
|
|
|
}
|
2018-04-02 05:54:24 +08:00
|
|
|
def: InstRW<[BWWriteResGroup99], (instregex "XCHG(8|16|32|64)rm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup100 : SchedWriteRes<[BWPort4,BWPort23,BWPort237,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 8;
|
|
|
|
let NumMicroOps = 6;
|
|
|
|
let ResourceCycles = [1,1,1,2,1];
|
|
|
|
}
|
2018-05-17 20:43:42 +08:00
|
|
|
def : SchedAlias<WriteADCRMW, BWWriteResGroup100>;
|
2018-08-30 14:26:00 +08:00
|
|
|
def: InstRW<[BWWriteResGroup100], (instregex "ROL(8|16|32|64)mCL",
|
2018-09-24 03:16:01 +08:00
|
|
|
"ROR(8|16|32|64)mCL",
|
2018-03-21 14:28:42 +08:00
|
|
|
"SAR(8|16|32|64)mCL",
|
|
|
|
"SHL(8|16|32|64)mCL",
|
|
|
|
"SHR(8|16|32|64)mCL")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup101 : SchedWriteRes<[BWPort1,BWPort23]> {
|
|
|
|
let Latency = 9;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-04-28 05:14:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup101], (instregex "(ADD|SUB|SUBR)_F(32|64)m",
|
2018-08-19 02:04:29 +08:00
|
|
|
"ILD_F(16|32|64)m")>;
|
|
|
|
def: InstRW<[BWWriteResGroup101], (instrs VCVTPS2DQYrm,
|
|
|
|
VCVTTPS2DQYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup105 : SchedWriteRes<[BWPort0,BWPort1,BWPort23]> {
|
|
|
|
let Latency = 9;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-05-10 03:04:15 +08:00
|
|
|
def: InstRW<[BWWriteResGroup105], (instregex "(V?)CVTSS2SI(64)?rm",
|
|
|
|
"(V?)CVT(T?)SD2SI64rm",
|
|
|
|
"(V?)CVT(T?)SD2SIrm",
|
2018-03-21 14:28:42 +08:00
|
|
|
"VCVTTSS2SI64rm",
|
2018-03-25 03:37:28 +08:00
|
|
|
"(V?)CVTTSS2SIrm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup106 : SchedWriteRes<[BWPort0,BWPort5,BWPort23]> {
|
|
|
|
let Latency = 9;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup106], (instrs VCVTPS2PDYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup107 : SchedWriteRes<[BWPort1,BWPort5,BWPort23]> {
|
|
|
|
let Latency = 9;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup107], (instrs IMUL64m, MUL64m, MULX64rm,
|
|
|
|
CVTPD2PSrm,
|
|
|
|
CVTPD2DQrm,
|
|
|
|
CVTTPD2DQrm,
|
|
|
|
MMX_CVTPI2PDirm)>;
|
|
|
|
def: InstRW<[BWWriteResGroup107], (instregex "MMX_CVT(T?)PD2PIirm",
|
2018-03-25 03:37:28 +08:00
|
|
|
"(V?)CVTDQ2PDrm",
|
|
|
|
"(V?)CVTSD2SSrm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup108 : SchedWriteRes<[BWPort5,BWPort23,BWPort015]> {
|
|
|
|
let Latency = 9;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-03-25 03:37:28 +08:00
|
|
|
def: InstRW<[BWWriteResGroup108], (instregex "VPBROADCASTB(Y?)rm",
|
|
|
|
"VPBROADCASTW(Y?)rm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup112 : SchedWriteRes<[BWPort23,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 9;
|
|
|
|
let NumMicroOps = 5;
|
|
|
|
let ResourceCycles = [1,1,3];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup112], (instregex "RDRAND(16|32|64)r")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup113 : SchedWriteRes<[BWPort1,BWPort6,BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 9;
|
|
|
|
let NumMicroOps = 5;
|
|
|
|
let ResourceCycles = [1,2,1,1];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup113], (instregex "LAR(16|32|64)rm",
|
|
|
|
"LSL(16|32|64)rm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup115 : SchedWriteRes<[BWPort0,BWPort23]> {
|
|
|
|
let Latency = 10;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-04-24 06:45:04 +08:00
|
|
|
def: InstRW<[BWWriteResGroup115], (instregex "(V?)PCMPGTQrm")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup117 : SchedWriteRes<[BWPort1,BWPort23]> {
|
|
|
|
let Latency = 10;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [2,1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup117], (instregex "FICOM(P?)(16|32)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup120 : SchedWriteRes<[BWPort0,BWPort1,BWPort5,BWPort23]> {
|
|
|
|
let Latency = 10;
|
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [1,1,1,1];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup120], (instregex "CVTTSS2SI64rm")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup121 : SchedWriteRes<[BWPort1,BWPort23,BWPort06,BWPort0156]> {
|
2018-03-23 03:22:51 +08:00
|
|
|
let Latency = 9;
|
2017-10-25 04:19:47 +08:00
|
|
|
let NumMicroOps = 4;
|
|
|
|
let ResourceCycles = [1,1,1,1];
|
|
|
|
}
|
2018-03-23 03:22:51 +08:00
|
|
|
def: InstRW<[BWWriteResGroup121], (instrs IMUL32m, MUL32m, MULX32rm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-04-02 13:33:28 +08:00
|
|
|
def BWWriteResGroup122_1 : SchedWriteRes<[BWPort0,BWFPDivider]> {
|
|
|
|
let Latency = 11;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1,3]; // Really 2.5 cycle throughput
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-05-08 00:15:46 +08:00
|
|
|
def : SchedAlias<WriteFDiv, BWWriteResGroup122_1>; // TODO - convert to ZnWriteResFpuPair
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup123 : SchedWriteRes<[BWPort0,BWPort23]> {
|
|
|
|
let Latency = 11;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup123], (instregex "MUL_F(32|64)m")>;
|
|
|
|
def: InstRW<[BWWriteResGroup123], (instrs VPCMPGTQYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup128 : SchedWriteRes<[BWPort1,BWPort5,BWPort23]> {
|
|
|
|
let Latency = 11;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup128], (instrs VCVTDQ2PDYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup131 : SchedWriteRes<[BWPort1,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 11;
|
|
|
|
let NumMicroOps = 7;
|
|
|
|
let ResourceCycles = [2,2,3];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup131], (instregex "RCL(16|32|64)rCL",
|
|
|
|
"RCR(16|32|64)rCL")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup132 : SchedWriteRes<[BWPort1,BWPort06,BWPort15,BWPort0156]> {
|
|
|
|
let Latency = 11;
|
|
|
|
let NumMicroOps = 9;
|
|
|
|
let ResourceCycles = [1,4,1,3];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup132], (instrs RCL8rCL)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup133 : SchedWriteRes<[BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 11;
|
|
|
|
let NumMicroOps = 11;
|
|
|
|
let ResourceCycles = [2,9];
|
|
|
|
}
|
2018-03-18 16:38:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup133], (instrs LOOPE)>;
|
|
|
|
def: InstRW<[BWWriteResGroup133], (instrs LOOPNE)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup135 : SchedWriteRes<[BWPort1,BWPort23]> {
|
|
|
|
let Latency = 12;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [2,1];
|
|
|
|
}
|
2018-05-04 20:59:24 +08:00
|
|
|
def: InstRW<[BWWriteResGroup135], (instregex "(ADD|SUB|SUBR)_FI(16|32)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-04-02 13:33:28 +08:00
|
|
|
def BWWriteResGroup139_1 : SchedWriteRes<[BWPort0,BWFPDivider]> {
|
|
|
|
let Latency = 14;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1,4];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-05-08 00:15:46 +08:00
|
|
|
def : SchedAlias<WriteFDiv64, BWWriteResGroup139_1>; // TODO - convert to ZnWriteResFpuPair
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup141 : SchedWriteRes<[BWPort0,BWPort1,BWPort23]> {
|
|
|
|
let Latency = 14;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-04-28 05:14:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup141], (instregex "MUL_FI(16|32)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup144 : SchedWriteRes<[BWPort1,BWPort6,BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 14;
|
|
|
|
let NumMicroOps = 8;
|
|
|
|
let ResourceCycles = [2,2,1,3];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup144], (instregex "LAR(16|32|64)rr")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup145 : SchedWriteRes<[BWPort1,BWPort06,BWPort15,BWPort0156]> {
|
|
|
|
let Latency = 14;
|
|
|
|
let NumMicroOps = 10;
|
|
|
|
let ResourceCycles = [2,3,1,4];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup145], (instrs RCR8rCL)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup146 : SchedWriteRes<[BWPort0,BWPort1,BWPort6,BWPort0156]> {
|
|
|
|
let Latency = 14;
|
|
|
|
let NumMicroOps = 12;
|
|
|
|
let ResourceCycles = [2,1,4,5];
|
|
|
|
}
|
2018-04-27 21:32:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup146], (instrs XCH_F)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup147 : SchedWriteRes<[BWPort0]> {
|
|
|
|
let Latency = 15;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup147], (instregex "DIVR_(FPrST0|FST0r|FrST0)")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup149 : SchedWriteRes<[BWPort1,BWPort23,BWPort237,BWPort06,BWPort15,BWPort0156]> {
|
|
|
|
let Latency = 15;
|
|
|
|
let NumMicroOps = 10;
|
|
|
|
let ResourceCycles = [1,1,1,4,1,2];
|
|
|
|
}
|
2018-03-19 08:56:09 +08:00
|
|
|
def: InstRW<[BWWriteResGroup149], (instregex "RCL(8|16|32|64)mCL")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-04-02 13:33:28 +08:00
|
|
|
def BWWriteResGroup150 : SchedWriteRes<[BWPort0,BWPort23,BWFPDivider]> {
|
2017-10-25 04:19:47 +08:00
|
|
|
let Latency = 16;
|
|
|
|
let NumMicroOps = 2;
|
2018-04-02 13:33:28 +08:00
|
|
|
let ResourceCycles = [1,1,5];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-05-08 00:15:46 +08:00
|
|
|
def : SchedAlias<WriteFDivLd, BWWriteResGroup150>; // TODO - convert to ZnWriteResFpuPair
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup153 : SchedWriteRes<[BWPort4,BWPort23,BWPort237,BWPort06,BWPort15,BWPort0156]> {
|
|
|
|
let Latency = 16;
|
|
|
|
let NumMicroOps = 14;
|
|
|
|
let ResourceCycles = [1,1,1,4,2,5];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup153], (instrs CMPXCHG8B)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup154 : SchedWriteRes<[BWPort5]> {
|
|
|
|
let Latency = 16;
|
|
|
|
let NumMicroOps = 16;
|
|
|
|
let ResourceCycles = [16];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup154], (instrs VZEROALL)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup159 : SchedWriteRes<[BWPort5,BWPort6,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 18;
|
|
|
|
let NumMicroOps = 8;
|
|
|
|
let ResourceCycles = [1,1,1,5];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup159], (instrs CPUID)>;
|
2018-03-18 16:38:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup159], (instrs RDTSC)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup160 : SchedWriteRes<[BWPort1,BWPort23,BWPort237,BWPort06,BWPort15,BWPort0156]> {
|
|
|
|
let Latency = 18;
|
|
|
|
let NumMicroOps = 11;
|
|
|
|
let ResourceCycles = [2,1,1,3,1,3];
|
|
|
|
}
|
2018-03-19 08:56:09 +08:00
|
|
|
def: InstRW<[BWWriteResGroup160], (instregex "RCR(8|16|32|64)mCL")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
2018-04-02 13:33:28 +08:00
|
|
|
def BWWriteResGroup161 : SchedWriteRes<[BWPort0,BWPort23,BWFPDivider]> {
|
2017-10-25 04:19:47 +08:00
|
|
|
let Latency = 19;
|
|
|
|
let NumMicroOps = 2;
|
2018-04-02 13:33:28 +08:00
|
|
|
let ResourceCycles = [1,1,8];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2018-05-08 00:15:46 +08:00
|
|
|
def : SchedAlias<WriteFDiv64Ld, BWWriteResGroup161>; // TODO - convert to ZnWriteResFpuPair
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup165 : SchedWriteRes<[BWPort0]> {
|
|
|
|
let Latency = 20;
|
|
|
|
let NumMicroOps = 1;
|
|
|
|
let ResourceCycles = [1];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup165], (instregex "DIV_(FPrST0|FST0r|FrST0)")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup167 : SchedWriteRes<[BWPort4,BWPort5,BWPort6,BWPort23,BWPort237,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 20;
|
|
|
|
let NumMicroOps = 8;
|
|
|
|
let ResourceCycles = [1,1,1,1,1,1,2];
|
|
|
|
}
|
2018-04-27 21:32:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup167], (instrs INSB, INSL, INSW)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup169 : SchedWriteRes<[BWPort0,BWPort23]> {
|
|
|
|
let Latency = 21;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-04-28 05:14:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup169], (instregex "DIV_F(32|64)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup171 : SchedWriteRes<[BWPort0,BWPort4,BWPort5,BWPort23,BWPort237,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 21;
|
|
|
|
let NumMicroOps = 19;
|
|
|
|
let ResourceCycles = [2,1,4,1,1,4,6];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup171], (instrs CMPXCHG16B)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup172 : SchedWriteRes<[BWPort6,BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 22;
|
|
|
|
let NumMicroOps = 18;
|
|
|
|
let ResourceCycles = [1,1,16];
|
|
|
|
}
|
2018-08-19 02:04:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup172], (instrs POPF64)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup176 : SchedWriteRes<[BWPort6,BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 23;
|
|
|
|
let NumMicroOps = 19;
|
|
|
|
let ResourceCycles = [3,1,15];
|
|
|
|
}
|
2017-12-10 09:24:08 +08:00
|
|
|
def: InstRW<[BWWriteResGroup176], (instregex "XRSTOR(64)?")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup177 : SchedWriteRes<[BWPort0,BWPort1,BWPort23]> {
|
|
|
|
let Latency = 24;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-04-28 05:14:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup177], (instregex "DIV_FI(16|32)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup180 : SchedWriteRes<[BWPort0,BWPort23]> {
|
|
|
|
let Latency = 26;
|
|
|
|
let NumMicroOps = 2;
|
|
|
|
let ResourceCycles = [1,1];
|
|
|
|
}
|
2018-04-28 05:14:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup180], (instregex "DIVR_F(32|64)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup182 : SchedWriteRes<[BWPort0,BWPort1,BWPort23]> {
|
|
|
|
let Latency = 29;
|
|
|
|
let NumMicroOps = 3;
|
|
|
|
let ResourceCycles = [1,1,1];
|
|
|
|
}
|
2018-04-28 05:14:19 +08:00
|
|
|
def: InstRW<[BWWriteResGroup182], (instregex "DIVR_FI(16|32)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup183_1 : SchedWriteRes<[BWPort4, BWPort5, BWPort23, BWPort0156]> {
|
|
|
|
let Latency = 22;
|
|
|
|
let NumMicroOps = 7;
|
|
|
|
let ResourceCycles = [1,3,2,1];
|
|
|
|
}
|
2017-12-17 02:35:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup183_1], (instrs VGATHERQPDrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup183_2 : SchedWriteRes<[BWPort4, BWPort5, BWPort23, BWPort0156]> {
|
|
|
|
let Latency = 23;
|
|
|
|
let NumMicroOps = 9;
|
|
|
|
let ResourceCycles = [1,3,4,1];
|
|
|
|
}
|
2017-12-17 02:35:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup183_2], (instrs VGATHERQPDYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup183_3 : SchedWriteRes<[BWPort4, BWPort5, BWPort23, BWPort0156]> {
|
|
|
|
let Latency = 24;
|
|
|
|
let NumMicroOps = 9;
|
|
|
|
let ResourceCycles = [1,5,2,1];
|
|
|
|
}
|
2017-12-17 02:35:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup183_3], (instrs VGATHERQPSYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup183_4 : SchedWriteRes<[BWPort4, BWPort5, BWPort23, BWPort0156]> {
|
|
|
|
let Latency = 25;
|
|
|
|
let NumMicroOps = 7;
|
|
|
|
let ResourceCycles = [1,3,2,1];
|
|
|
|
}
|
2017-12-17 02:35:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup183_4], (instrs VGATHERDPDrm,
|
|
|
|
VGATHERDPSrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup183_5 : SchedWriteRes<[BWPort4, BWPort5, BWPort23, BWPort0156]> {
|
|
|
|
let Latency = 26;
|
|
|
|
let NumMicroOps = 9;
|
|
|
|
let ResourceCycles = [1,5,2,1];
|
|
|
|
}
|
2017-12-17 02:35:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup183_5], (instrs VGATHERDPDYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup183_6 : SchedWriteRes<[BWPort4, BWPort5, BWPort23, BWPort0156]> {
|
|
|
|
let Latency = 26;
|
|
|
|
let NumMicroOps = 14;
|
2018-03-25 03:37:28 +08:00
|
|
|
let ResourceCycles = [1,4,8,1];
|
2017-10-25 04:19:47 +08:00
|
|
|
}
|
2017-12-17 02:35:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup183_6], (instrs VGATHERDPSYrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup183_7 : SchedWriteRes<[BWPort4, BWPort5, BWPort23, BWPort0156]> {
|
|
|
|
let Latency = 27;
|
|
|
|
let NumMicroOps = 9;
|
|
|
|
let ResourceCycles = [1,5,2,1];
|
|
|
|
}
|
2017-12-17 02:35:29 +08:00
|
|
|
def: InstRW<[BWWriteResGroup183_7], (instrs VGATHERQPSrm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup185 : SchedWriteRes<[BWPort4,BWPort6,BWPort23,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 29;
|
|
|
|
let NumMicroOps = 27;
|
|
|
|
let ResourceCycles = [1,5,1,1,19];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup185], (instrs XSAVE64)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup186 : SchedWriteRes<[BWPort4,BWPort6,BWPort23,BWPort237,BWPort0156]> {
|
|
|
|
let Latency = 30;
|
|
|
|
let NumMicroOps = 28;
|
|
|
|
let ResourceCycles = [1,6,1,1,19];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup186], (instrs XSAVE)>;
|
|
|
|
def: InstRW<[BWWriteResGroup186], (instregex "XSAVEC", "XSAVES", "XSAVEOPT")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup190 : SchedWriteRes<[BWPort0,BWPort1,BWPort5,BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 34;
|
|
|
|
let NumMicroOps = 8;
|
|
|
|
let ResourceCycles = [2,2,2,1,1];
|
|
|
|
}
|
2018-03-19 08:56:09 +08:00
|
|
|
def: InstRW<[BWWriteResGroup190], (instregex "DIV(8|16|32|64)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup191 : SchedWriteRes<[BWPort5,BWPort6,BWPort23,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 34;
|
|
|
|
let NumMicroOps = 23;
|
|
|
|
let ResourceCycles = [1,5,3,4,10];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup191], (instregex "IN(8|16|32)ri",
|
|
|
|
"IN(8|16|32)rr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup193 : SchedWriteRes<[BWPort0,BWPort1,BWPort5,BWPort23,BWPort0156]> {
|
|
|
|
let Latency = 35;
|
|
|
|
let NumMicroOps = 8;
|
|
|
|
let ResourceCycles = [2,2,2,1,1];
|
|
|
|
}
|
2018-03-19 08:56:09 +08:00
|
|
|
def: InstRW<[BWWriteResGroup193], (instregex "IDIV(8|16|32|64)m")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup194 : SchedWriteRes<[BWPort5,BWPort6,BWPort23,BWPort237,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 35;
|
|
|
|
let NumMicroOps = 23;
|
|
|
|
let ResourceCycles = [1,5,2,1,4,10];
|
|
|
|
}
|
2018-03-21 14:28:42 +08:00
|
|
|
def: InstRW<[BWWriteResGroup194], (instregex "OUT(8|16|32)ir",
|
|
|
|
"OUT(8|16|32)rr")>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup196 : SchedWriteRes<[BWPort5,BWPort0156]> {
|
|
|
|
let Latency = 42;
|
|
|
|
let NumMicroOps = 22;
|
|
|
|
let ResourceCycles = [2,20];
|
|
|
|
}
|
2018-03-18 16:38:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup196], (instrs RDTSCP)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup197 : SchedWriteRes<[BWPort0,BWPort01,BWPort23,BWPort05,BWPort06,BWPort015,BWPort0156]> {
|
|
|
|
let Latency = 60;
|
|
|
|
let NumMicroOps = 64;
|
|
|
|
let ResourceCycles = [2,2,8,1,10,2,39];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup197], (instrs FLDENVm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup198 : SchedWriteRes<[BWPort0,BWPort6,BWPort23,BWPort05,BWPort06,BWPort15,BWPort0156]> {
|
|
|
|
let Latency = 63;
|
|
|
|
let NumMicroOps = 88;
|
|
|
|
let ResourceCycles = [4,4,31,1,2,1,45];
|
|
|
|
}
|
2018-03-18 16:38:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup198], (instrs FXRSTOR64)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup199 : SchedWriteRes<[BWPort0,BWPort6,BWPort23,BWPort05,BWPort06,BWPort15,BWPort0156]> {
|
|
|
|
let Latency = 63;
|
|
|
|
let NumMicroOps = 90;
|
|
|
|
let ResourceCycles = [4,2,33,1,2,1,47];
|
|
|
|
}
|
2018-03-18 16:38:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup199], (instrs FXRSTOR)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup200 : SchedWriteRes<[BWPort5,BWPort01,BWPort0156]> {
|
|
|
|
let Latency = 75;
|
|
|
|
let NumMicroOps = 15;
|
|
|
|
let ResourceCycles = [6,3,6];
|
|
|
|
}
|
2018-04-24 00:10:50 +08:00
|
|
|
def: InstRW<[BWWriteResGroup200], (instrs FNINIT)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
|
|
|
def BWWriteResGroup201 : SchedWriteRes<[BWPort0,BWPort1,BWPort5,BWPort6,BWPort01,BWPort0156]> {
|
|
|
|
let Latency = 80;
|
|
|
|
let NumMicroOps = 32;
|
|
|
|
let ResourceCycles = [7,7,3,3,1,11];
|
|
|
|
}
|
|
|
|
def: InstRW<[BWWriteResGroup201], (instregex "DIV(16|32|64)r")>;
|
|
|
|
|
|
|
|
def BWWriteResGroup202 : SchedWriteRes<[BWPort0,BWPort1,BWPort4,BWPort5,BWPort6,BWPort237,BWPort06,BWPort0156]> {
|
|
|
|
let Latency = 115;
|
|
|
|
let NumMicroOps = 100;
|
|
|
|
let ResourceCycles = [9,9,11,8,1,11,21,30];
|
|
|
|
}
|
2018-05-11 03:08:06 +08:00
|
|
|
def: InstRW<[BWWriteResGroup202], (instrs FSTENVm)>;
|
2017-10-25 04:19:47 +08:00
|
|
|
|
[X86][Sched] Add InstRW for CLC on Intel after SNB.
Summary:
After SNB, Intel CPUs can rename CF independently of other EFLAGS,
so the renamer can zero it for free. Note that STC still consumes resources.
To reproduce: `$ llvm-exegesis -mode=uops -opcode-name=CLC`
On SNB:
```
---
key:
opcode_name: CLC
mode: uops
config: ''
cpu_name: sandybridge
llvm_triple: x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
- { key: '3', value: 0.0014, debug_string: SBPort0 }
- { key: '4', value: 0.0013, debug_string: SBPort1 }
- { key: '5', value: 0.0003, debug_string: SBPort4 }
- { key: '6', value: 0.0029, debug_string: SBPort5 }
- { key: '10', value: 0.0003, debug_string: SBPort23 }
error: ''
info: 'instruction is serial, repeating a random one.
Snippet:
CLC
'
...
```
On HSW:
```
---
key:
opcode_name: CLC
mode: uops
config: ''
cpu_name: haswell
llvm_triple: x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
- { key: '3', value: 0.001, debug_string: HWPort0 }
- { key: '4', value: 0.0009, debug_string: HWPort1 }
- { key: '5', value: 0.0004, debug_string: HWPort2 }
- { key: '6', value: 0.0006, debug_string: HWPort3 }
- { key: '7', value: 0.0002, debug_string: HWPort4 }
- { key: '8', value: 0.0012, debug_string: HWPort5 }
- { key: '9', value: 0.0022, debug_string: HWPort6 }
- { key: '10', value: 0.0001, debug_string: HWPort7 }
error: ''
info: 'instruction is serial, repeating a random one.
Snippet:
CLC
'
...
```
Reviewers: craig.topper, RKSimon
Subscribers: gchatelet, llvm-commits
Differential Revision: https://reviews.llvm.org/D47362
llvm-svn: 333392
2018-05-29 14:19:39 +08:00
|
|
|
def: InstRW<[WriteZero], (instrs CLC)>;
|
|
|
|
|
2017-10-25 04:19:47 +08:00
|
|
|
} // SchedModel
|