2014-09-10 04:07:07 +08:00
|
|
|
//=- X86ScheduleBtVer2.td - X86 BtVer2 (Jaguar) 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 AMD btver2 (Jaguar) to support
|
|
|
|
// instruction scheduling and other instruction cost heuristics. Based off AMD Software
|
|
|
|
// Optimization Guide for AMD Family 16h Processors & Instruction Latency appendix.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def BtVer2Model : SchedMachineModel {
|
|
|
|
// All x86 instructions are modeled as a single micro-op, and btver2 can
|
|
|
|
// decode 2 instructions per cycle.
|
|
|
|
let IssueWidth = 2;
|
|
|
|
let MicroOpBufferSize = 64; // Retire Control Unit
|
|
|
|
let LoadLatency = 5; // FPU latency (worse case cf Integer 3 cycle latency)
|
|
|
|
let HighLatency = 25;
|
|
|
|
let MispredictPenalty = 14; // Minimum branch misdirection penalty
|
|
|
|
let PostRAScheduler = 1;
|
2017-12-13 00:12:53 +08:00
|
|
|
|
|
|
|
// FIXME: SSE4/AVX is unimplemented. This flag is set to allow
|
|
|
|
// the scheduler to assign a default model to unrecognized opcodes.
|
|
|
|
let CompleteModel = 0;
|
2014-09-10 04:07:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
let SchedModel = BtVer2Model in {
|
|
|
|
|
|
|
|
// Jaguar can issue up to 6 micro-ops in one cycle
|
|
|
|
def JALU0 : ProcResource<1>; // Integer Pipe0: integer ALU0 (also handle FP->INT jam)
|
|
|
|
def JALU1 : ProcResource<1>; // Integer Pipe1: integer ALU1/MUL/DIV
|
|
|
|
def JLAGU : ProcResource<1>; // Integer Pipe2: LAGU
|
|
|
|
def JSAGU : ProcResource<1>; // Integer Pipe3: SAGU (also handles 3-operand LEA)
|
|
|
|
def JFPU0 : ProcResource<1>; // Vector/FPU Pipe0: VALU0/VIMUL/FPA
|
|
|
|
def JFPU1 : ProcResource<1>; // Vector/FPU Pipe1: VALU1/STC/FPM
|
|
|
|
|
[MC][Tablegen] Allow the definition of processor register files in the scheduling model for llvm-mca
This patch allows the description of register files in processor scheduling
models. This addresses PR36662.
A new tablegen class named 'RegisterFile' has been added to TargetSchedule.td.
Targets can optionally describe register files for their processors using that
class. In particular, class RegisterFile allows to specify:
- The total number of physical registers.
- Which target registers are accessible through the register file.
- The cost of allocating a register at register renaming stage.
Example (from this patch - see file X86/X86ScheduleBtVer2.td)
def FpuPRF : RegisterFile<72, [VR64, VR128, VR256], [1, 1, 2]>
Here, FpuPRF describes a register file for MMX/XMM/YMM registers. On Jaguar
(btver2), a YMM register definition consumes 2 physical registers, while MMX/XMM
register definitions only cost 1 physical register.
The syntax allows to specify an empty set of register classes. An empty set of
register classes means: this register file models all the registers specified by
the Target. For each register class, users can specify an optional register
cost. By default, register costs default to 1. A value of 0 for the number of
physical registers means: "this register file has an unbounded number of
physical registers".
This patch is structured in two parts.
* Part 1 - MC/Tablegen *
A first part adds the tablegen definition of RegisterFile, and teaches the
SubtargetEmitter how to emit information related to register files.
Information about register files is accessible through an instance of
MCExtraProcessorInfo.
The idea behind this design is to logically partition the processor description
which is only used by external tools (like llvm-mca) from the processor
information used by the llvm machine schedulers.
I think that this design would make easier for targets to get rid of the extra
processor information if they don't want it.
* Part 2 - llvm-mca related *
The second part of this patch is related to changes to llvm-mca.
The main differences are:
1) class RegisterFile now needs to take into account the "cost of a register"
when allocating physical registers at register renaming stage.
2) Point 1. triggered a minor refactoring which lef to the removal of the
"maximum 32 register files" restriction.
3) The BackendStatistics view has been updated so that we can print out extra
details related to each register file implemented by the processor.
The effect of point 3. is also visible in tests register-files-[1..5].s.
Differential Revision: https://reviews.llvm.org/D44980
llvm-svn: 329067
2018-04-03 21:36:24 +08:00
|
|
|
// The Integer PRF for Jaguar is 64 entries, and it holds the architectural and
|
|
|
|
// speculative version of the 64-bit integer registers.
|
|
|
|
// Reference: www.realworldtech.com/jaguar/4/
|
|
|
|
def IntegerPRF : RegisterFile<64, [GR8, GR16, GR32, GR64, CCR]>;
|
|
|
|
|
|
|
|
// The Jaguar FP Retire Queue renames SIMD and FP uOps onto a pool of 72 SSE
|
|
|
|
// registers. Operations on 256-bit data types are cracked into two COPs.
|
|
|
|
// Reference: www.realworldtech.com/jaguar/4/
|
|
|
|
def FpuPRF: RegisterFile<72, [VR64, VR128, VR256], [1, 1, 2]>;
|
|
|
|
|
2018-04-05 23:41:41 +08:00
|
|
|
// The retire control unit (RCU) can track up to 64 macro-ops in-flight. It can
|
|
|
|
// retire up to two macro-ops per cycle.
|
|
|
|
// Reference: "Software Optimization Guide for AMD Family 16h Processors"
|
|
|
|
def RCU : RetireControlUnit<64, 2>;
|
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
// Integer Pipe Scheduler
|
|
|
|
def JALU01 : ProcResGroup<[JALU0, JALU1]> {
|
|
|
|
let BufferSize=20;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AGU Pipe Scheduler
|
|
|
|
def JLSAGU : ProcResGroup<[JLAGU, JSAGU]> {
|
|
|
|
let BufferSize=12;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Fpu Pipe Scheduler
|
|
|
|
def JFPU01 : ProcResGroup<[JFPU0, JFPU1]> {
|
|
|
|
let BufferSize=18;
|
|
|
|
}
|
|
|
|
|
2018-03-18 20:09:17 +08:00
|
|
|
// Functional units
|
2014-09-10 04:07:07 +08:00
|
|
|
def JDiv : ProcResource<1>; // integer division
|
|
|
|
def JMul : ProcResource<1>; // integer multiplication
|
|
|
|
def JVALU0 : ProcResource<1>; // vector integer
|
|
|
|
def JVALU1 : ProcResource<1>; // vector integer
|
|
|
|
def JVIMUL : ProcResource<1>; // vector integer multiplication
|
|
|
|
def JSTC : ProcResource<1>; // vector store/convert
|
|
|
|
def JFPM : ProcResource<1>; // FP multiplication
|
|
|
|
def JFPA : ProcResource<1>; // FP addition
|
|
|
|
|
2018-03-18 20:09:17 +08:00
|
|
|
// Functional unit groups
|
|
|
|
def JFPX : ProcResGroup<[JFPA, JFPM]>;
|
|
|
|
def JVALU : ProcResGroup<[JVALU0, JVALU1]>;
|
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
// Integer loads are 3 cycles, so ReadAfterLd registers needn't be available until 3
|
|
|
|
// cycles after the memory operand.
|
|
|
|
def : ReadAdvance<ReadAfterLd, 3>;
|
|
|
|
|
|
|
|
// 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 dispatched by the schedulers.
|
|
|
|
// This multiclass defines the resource usage for variants with and without
|
|
|
|
// folded loads.
|
|
|
|
multiclass JWriteResIntPair<X86FoldableSchedWrite SchedRW,
|
2018-03-16 07:46:12 +08:00
|
|
|
list<ProcResourceKind> ExePorts,
|
2018-05-03 14:08:47 +08:00
|
|
|
int Lat, list<int> Res = [], int UOps = 1> {
|
2014-09-10 04:07:07 +08:00
|
|
|
// Register variant is using a single cycle on ExePort.
|
2018-03-16 07:46:12 +08:00
|
|
|
def : WriteRes<SchedRW, ExePorts> {
|
2018-03-15 05:55:54 +08:00
|
|
|
let Latency = Lat;
|
2018-03-16 07:46:12 +08:00
|
|
|
let ResourceCycles = Res;
|
2018-03-15 05:55:54 +08:00
|
|
|
let NumMicroOps = UOps;
|
|
|
|
}
|
2014-09-10 04:07:07 +08:00
|
|
|
|
|
|
|
// Memory variant also uses a cycle on JLAGU and adds 3 cycles to the
|
|
|
|
// latency.
|
2018-03-16 07:46:12 +08:00
|
|
|
def : WriteRes<SchedRW.Folded, !listconcat([JLAGU], ExePorts)> {
|
2018-03-13 05:35:12 +08:00
|
|
|
let Latency = !add(Lat, 3);
|
2018-05-03 14:08:47 +08:00
|
|
|
let ResourceCycles = !if(!empty(Res), [], !listconcat([1], Res));
|
2018-03-15 05:55:54 +08:00
|
|
|
let NumMicroOps = UOps;
|
2014-09-10 04:07:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
multiclass JWriteResFpuPair<X86FoldableSchedWrite SchedRW,
|
2018-03-15 07:12:09 +08:00
|
|
|
list<ProcResourceKind> ExePorts,
|
2018-05-03 14:08:47 +08:00
|
|
|
int Lat, list<int> Res = [], int UOps = 1> {
|
2014-09-10 04:07:07 +08:00
|
|
|
// Register variant is using a single cycle on ExePort.
|
2018-03-15 07:12:09 +08:00
|
|
|
def : WriteRes<SchedRW, ExePorts> {
|
2018-03-13 00:02:56 +08:00
|
|
|
let Latency = Lat;
|
2018-03-15 07:12:09 +08:00
|
|
|
let ResourceCycles = Res;
|
2018-03-13 00:02:56 +08:00
|
|
|
let NumMicroOps = UOps;
|
|
|
|
}
|
2014-09-10 04:07:07 +08:00
|
|
|
|
|
|
|
// Memory variant also uses a cycle on JLAGU and adds 5 cycles to the
|
|
|
|
// latency.
|
2018-03-15 07:12:09 +08:00
|
|
|
def : WriteRes<SchedRW.Folded, !listconcat([JLAGU], ExePorts)> {
|
2018-03-13 05:35:12 +08:00
|
|
|
let Latency = !add(Lat, 5);
|
2018-05-03 14:08:47 +08:00
|
|
|
let ResourceCycles = !if(!empty(Res), [], !listconcat([1], Res));
|
2018-03-13 05:35:12 +08:00
|
|
|
let NumMicroOps = UOps;
|
2014-09-10 04:07:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-27 23:50:33 +08:00
|
|
|
multiclass JWriteResYMMPair<X86FoldableSchedWrite SchedRW,
|
|
|
|
list<ProcResourceKind> ExePorts,
|
|
|
|
int Lat, list<int> Res = [2], int UOps = 2> {
|
|
|
|
// Register variant is using a single cycle on ExePort.
|
|
|
|
def : WriteRes<SchedRW, ExePorts> {
|
|
|
|
let Latency = Lat;
|
|
|
|
let ResourceCycles = Res;
|
|
|
|
let NumMicroOps = UOps;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Memory variant also uses 2 cycles on JLAGU and adds 5 cycles to the
|
|
|
|
// latency.
|
|
|
|
def : WriteRes<SchedRW.Folded, !listconcat([JLAGU], ExePorts)> {
|
|
|
|
let Latency = !add(Lat, 5);
|
|
|
|
let ResourceCycles = !listconcat([2], Res);
|
|
|
|
let NumMicroOps = UOps;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
// A folded store needs a cycle on the SAGU for the store data.
|
|
|
|
def : WriteRes<WriteRMW, [JSAGU]>;
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Arithmetic.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-05-08 21:51:45 +08:00
|
|
|
defm : JWriteResIntPair<WriteALU, [JALU01], 1>;
|
2018-05-17 23:43:23 +08:00
|
|
|
defm : JWriteResIntPair<WriteADC, [JALU01], 1, [2]>;
|
2018-05-08 21:51:45 +08:00
|
|
|
defm : JWriteResIntPair<WriteIMul, [JALU1, JMul], 3, [1, 1], 2>; // i8/i16/i32 multiplication
|
2018-05-08 22:55:16 +08:00
|
|
|
defm : JWriteResIntPair<WriteIMul64, [JALU1, JMul], 6, [1, 4], 2>; // i64 multiplication
|
|
|
|
defm : X86WriteRes<WriteIMulH, [JALU1], 6, [4], 1>;
|
2018-05-08 21:51:45 +08:00
|
|
|
|
|
|
|
defm : JWriteResIntPair<WriteDiv8, [JALU1, JDiv], 12, [1, 12], 1>;
|
|
|
|
defm : JWriteResIntPair<WriteDiv16, [JALU1, JDiv], 17, [1, 17], 2>;
|
|
|
|
defm : JWriteResIntPair<WriteDiv32, [JALU1, JDiv], 25, [1, 25], 2>;
|
|
|
|
defm : JWriteResIntPair<WriteDiv64, [JALU1, JDiv], 41, [1, 41], 2>;
|
|
|
|
defm : JWriteResIntPair<WriteIDiv8, [JALU1, JDiv], 12, [1, 12], 1>;
|
|
|
|
defm : JWriteResIntPair<WriteIDiv16, [JALU1, JDiv], 17, [1, 17], 2>;
|
|
|
|
defm : JWriteResIntPair<WriteIDiv32, [JALU1, JDiv], 25, [1, 25], 2>;
|
|
|
|
defm : JWriteResIntPair<WriteIDiv64, [JALU1, JDiv], 41, [1, 41], 2>;
|
|
|
|
|
|
|
|
defm : JWriteResIntPair<WriteCRC32, [JALU01], 3, [4], 3>;
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-04-09 01:53:18 +08:00
|
|
|
defm : JWriteResIntPair<WriteCMOV, [JALU01], 1>; // Conditional move.
|
2018-05-18 00:47:30 +08:00
|
|
|
defm : JWriteResIntPair<WriteCMOV2, [JALU01], 1>; // Conditional (CF + ZF flag) move.
|
2018-05-13 02:07:07 +08:00
|
|
|
defm : X86WriteRes<WriteFCMOV, [JFPU0, JFPA], 3, [1,1], 1>; // x87 conditional move.
|
2018-04-09 01:53:18 +08:00
|
|
|
def : WriteRes<WriteSETCC, [JALU01]>; // Setcc.
|
|
|
|
def : WriteRes<WriteSETCCStore, [JALU01,JSAGU]>;
|
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
// This is for simple LEAs with one or two input operands.
|
|
|
|
// FIXME: SAGU 3-operand LEA
|
|
|
|
def : WriteRes<WriteLEA, [JALU01]>;
|
|
|
|
|
2018-03-27 02:19:28 +08:00
|
|
|
// Bit counts.
|
|
|
|
defm : JWriteResIntPair<WriteBitScan, [JALU01], 5, [4], 8>;
|
|
|
|
defm : JWriteResIntPair<WritePOPCNT, [JALU01], 1>;
|
|
|
|
defm : JWriteResIntPair<WriteLZCNT, [JALU01], 1>;
|
|
|
|
defm : JWriteResIntPair<WriteTZCNT, [JALU01], 2, [2]>;
|
2018-03-16 21:43:55 +08:00
|
|
|
|
2018-03-30 04:41:39 +08:00
|
|
|
// BMI1 BEXTR, BMI2 BZHI
|
|
|
|
defm : JWriteResIntPair<WriteBEXTR, [JALU01], 1>;
|
|
|
|
defm : JWriteResIntPair<WriteBZHI, [JALU01], 1>; // NOTE: Doesn't exist on Jaguar.
|
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Integer shifts and rotates.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-16 07:46:12 +08:00
|
|
|
defm : JWriteResIntPair<WriteShift, [JALU01], 1>;
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-03-13 01:07:08 +08:00
|
|
|
def JWriteSHLDrri : SchedWriteRes<[JALU01]> {
|
2017-11-25 18:46:53 +08:00
|
|
|
let Latency = 3;
|
|
|
|
let ResourceCycles = [6];
|
|
|
|
let NumMicroOps = 6;
|
|
|
|
}
|
2018-03-13 01:07:08 +08:00
|
|
|
def: InstRW<[JWriteSHLDrri], (instrs SHLD16rri8, SHLD32rri8, SHLD64rri8,
|
|
|
|
SHRD16rri8, SHRD32rri8, SHRD64rri8)>;
|
2017-11-25 18:46:53 +08:00
|
|
|
|
2018-03-13 01:07:08 +08:00
|
|
|
def JWriteSHLDrrCL : SchedWriteRes<[JALU01]> {
|
2017-11-25 18:46:53 +08:00
|
|
|
let Latency = 4;
|
|
|
|
let ResourceCycles = [8];
|
|
|
|
let NumMicroOps = 7;
|
|
|
|
}
|
2018-03-13 01:07:08 +08:00
|
|
|
def: InstRW<[JWriteSHLDrrCL], (instrs SHLD16rrCL, SHLD32rrCL, SHLD64rrCL,
|
|
|
|
SHRD16rrCL, SHRD32rrCL, SHRD64rrCL)>;
|
2017-11-25 18:46:53 +08:00
|
|
|
|
2018-03-13 01:07:08 +08:00
|
|
|
def JWriteSHLDm : SchedWriteRes<[JLAGU, JALU01]> {
|
2017-11-25 18:46:53 +08:00
|
|
|
let Latency = 9;
|
|
|
|
let ResourceCycles = [1, 22];
|
|
|
|
let NumMicroOps = 8;
|
|
|
|
}
|
2018-03-13 01:07:08 +08:00
|
|
|
def: InstRW<[JWriteSHLDm],(instrs SHLD16mri8, SHLD32mri8, SHLD64mri8,
|
|
|
|
SHLD16mrCL, SHLD32mrCL, SHLD64mrCL,
|
|
|
|
SHRD16mri8, SHRD32mri8, SHRD64mri8,
|
|
|
|
SHRD16mrCL, SHRD32mrCL, SHRD64mrCL)>;
|
2017-11-25 18:46:53 +08:00
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Loads, stores, and moves, not folded with other operations.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-05-15 02:37:19 +08:00
|
|
|
def : WriteRes<WriteLoad, [JLAGU]> { let Latency = 5; }
|
|
|
|
def : WriteRes<WriteStore, [JSAGU]>;
|
|
|
|
def : WriteRes<WriteStoreNT, [JSAGU]>;
|
|
|
|
def : WriteRes<WriteMove, [JALU01]>;
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-04-22 02:07:36 +08:00
|
|
|
// Load/store MXCSR.
|
|
|
|
// FIXME: These are copy and pasted from WriteLoad/Store.
|
|
|
|
def : WriteRes<WriteLDMXCSR, [JLAGU]> { let Latency = 5; }
|
|
|
|
def : WriteRes<WriteSTMXCSR, [JSAGU]>;
|
|
|
|
|
2017-12-10 19:51:29 +08:00
|
|
|
// Treat misc copies as a move.
|
|
|
|
def : InstRW<[WriteMove], (instrs COPY)>;
|
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Idioms that clear a register, like xorps %xmm0, %xmm0.
|
|
|
|
// These can often bypass execution ports completely.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
def : WriteRes<WriteZero, []>;
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Branches don't produce values, so they have no latency, but they still
|
|
|
|
// consume resources. Indirect branches can fold loads.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-16 07:46:12 +08:00
|
|
|
defm : JWriteResIntPair<WriteJump, [JALU01], 1>;
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-03-13 05:35:12 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Special case scheduling classes.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-15 23:12:12 +08:00
|
|
|
def : WriteRes<WriteSystem, [JALU01]> { let Latency = 100; }
|
|
|
|
def : WriteRes<WriteMicrocoded, [JALU01]> { let Latency = 100; }
|
2018-03-13 05:35:12 +08:00
|
|
|
def : WriteRes<WriteFence, [JSAGU]>;
|
2018-04-20 21:12:04 +08:00
|
|
|
|
2018-03-19 22:26:50 +08:00
|
|
|
// Nops don't have dependencies, so there's no actual latency, but we set this
|
|
|
|
// to '1' to tell the scheduler that the nop uses an ALU slot for a cycle.
|
|
|
|
def : WriteRes<WriteNop, [JALU01]> { let Latency = 1; }
|
2018-03-13 05:35:12 +08:00
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Floating point. This covers both scalar and vector operations.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteFLoad, [JLAGU, JFPU01, JFPX], 5, [1, 1, 1], 1>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteFLoadX, [JLAGU, JFPU01, JFPX], 5, [1, 1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFLoadY, [JLAGU, JFPU01, JFPX], 5, [1, 1, 1], 1>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteFMaskedLoad, [JLAGU, JFPU01, JFPX], 6, [1, 1, 2], 1>;
|
|
|
|
defm : X86WriteRes<WriteFMaskedLoadY, [JLAGU, JFPU01, JFPX], 6, [2, 2, 4], 2>;
|
|
|
|
|
2018-05-18 22:22:22 +08:00
|
|
|
defm : X86WriteRes<WriteFStore, [JSAGU, JFPU1, JSTC], 2, [1, 1, 1], 1>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteFStoreX, [JSAGU, JFPU1, JSTC], 1, [1, 1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFStoreY, [JSAGU, JFPU1, JSTC], 1, [1, 1, 1], 1>;
|
2018-05-15 02:37:19 +08:00
|
|
|
defm : X86WriteRes<WriteFStoreNT, [JSAGU, JFPU1, JSTC], 3, [1, 1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFStoreNTX, [JSAGU, JFPU1, JSTC], 3, [1, 1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFStoreNTY, [JSAGU, JFPU1, JSTC], 3, [2, 2, 2], 1>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteFMaskedStore, [JSAGU, JFPU01, JFPX], 6, [1, 1, 4], 1>;
|
|
|
|
defm : X86WriteRes<WriteFMaskedStoreY, [JSAGU, JFPU01, JFPX], 6, [2, 2, 4], 2>;
|
|
|
|
|
2018-05-12 01:38:36 +08:00
|
|
|
defm : X86WriteRes<WriteFMove, [JFPU01, JFPX], 1, [1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFMoveX, [JFPU01, JFPX], 1, [1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteFMoveY, [JFPU01, JFPX], 1, [2, 2], 2>;
|
2018-05-11 22:30:54 +08:00
|
|
|
|
2018-05-12 01:38:36 +08:00
|
|
|
defm : X86WriteRes<WriteEMMS, [JFPU01, JFPX], 2, [1, 1], 1>;
|
2018-03-15 22:45:30 +08:00
|
|
|
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFAdd, [JFPU0, JFPA], 3>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFAddX, [JFPU0, JFPA], 3>;
|
2018-05-02 00:13:42 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFAddY, [JFPU0, JFPA], 3, [2,2], 2>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFAdd64, [JFPU0, JFPA], 3>;
|
|
|
|
defm : JWriteResFpuPair<WriteFAdd64X, [JFPU0, JFPA], 3>;
|
|
|
|
defm : JWriteResYMMPair<WriteFAdd64Y, [JFPU0, JFPA], 3, [2,2], 2>;
|
2018-04-17 15:22:44 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFCmp, [JFPU0, JFPA], 2>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFCmpX, [JFPU0, JFPA], 2>;
|
2018-05-02 00:50:16 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFCmpY, [JFPU0, JFPA], 2, [2,2], 2>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFCmp64, [JFPU0, JFPA], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteFCmp64X, [JFPU0, JFPA], 2>;
|
|
|
|
defm : JWriteResYMMPair<WriteFCmp64Y, [JFPU0, JFPA], 2, [2,2], 2>;
|
2018-04-17 15:22:44 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFCom, [JFPU0, JFPA, JALU0], 3>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFMul, [JFPU1, JFPM], 2>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFMulX, [JFPU1, JFPM], 2>;
|
2018-05-02 02:22:53 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFMulY, [JFPU1, JFPM], 2, [2,2], 2>;
|
2018-05-08 04:52:53 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFMul64, [JFPU1, JFPM], 4, [1,2]>;
|
|
|
|
defm : JWriteResFpuPair<WriteFMul64X, [JFPU1, JFPM], 4, [1,2]>;
|
|
|
|
defm : JWriteResYMMPair<WriteFMul64Y, [JFPU1, JFPM], 4, [2,4], 2>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFMA, [JFPU1, JFPM], 2>; // NOTE: Doesn't exist on Jaguar.
|
2018-05-04 23:20:18 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFMAX, [JFPU1, JFPM], 2>; // NOTE: Doesn't exist on Jaguar.
|
2018-04-25 21:07:58 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFMAY, [JFPU1, JFPM], 2>; // NOTE: Doesn't exist on Jaguar.
|
2018-05-04 06:31:19 +08:00
|
|
|
defm : JWriteResFpuPair<WriteDPPD, [JFPU1, JFPM, JFPA], 9, [1, 3, 3], 3>;
|
|
|
|
defm : JWriteResFpuPair<WriteDPPS, [JFPU1, JFPM, JFPA], 11, [1, 3, 3], 5>;
|
|
|
|
defm : JWriteResYMMPair<WriteDPPSY, [JFPU1, JFPM, JFPA], 12, [2, 6, 6], 10>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFRcp, [JFPU1, JFPM], 2>;
|
2018-05-07 19:50:44 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFRcpX, [JFPU1, JFPM], 2>;
|
2018-05-02 02:06:07 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFRcpY, [JFPU1, JFPM], 2, [2,2], 2>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFRsqrt, [JFPU1, JFPM], 2>;
|
2018-05-07 19:50:44 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFRsqrtX, [JFPU1, JFPM], 2>;
|
2018-05-02 02:06:07 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFRsqrtY, [JFPU1, JFPM], 2, [2,2], 2>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFDiv, [JFPU1, JFPM], 19, [1, 19]>;
|
2018-05-08 00:15:46 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFDivX, [JFPU1, JFPM], 19, [1, 19]>;
|
2018-05-02 02:22:53 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFDivY, [JFPU1, JFPM], 38, [2, 38], 2>;
|
2018-05-08 00:15:46 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFDivZ, [JFPU1, JFPM], 38, [2, 38], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteFDiv64, [JFPU1, JFPM], 19, [1, 19]>;
|
|
|
|
defm : JWriteResFpuPair<WriteFDiv64X, [JFPU1, JFPM], 19, [1, 19]>;
|
|
|
|
defm : JWriteResYMMPair<WriteFDiv64Y, [JFPU1, JFPM], 38, [2, 38], 2>;
|
|
|
|
defm : JWriteResYMMPair<WriteFDiv64Z, [JFPU1, JFPM], 38, [2, 38], 2>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFSqrt, [JFPU1, JFPM], 21, [1, 21]>;
|
2018-05-07 19:50:44 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFSqrtX, [JFPU1, JFPM], 21, [1, 21]>;
|
2018-05-02 02:06:07 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFSqrtY, [JFPU1, JFPM], 42, [2, 42], 2>;
|
2018-05-07 19:50:44 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFSqrtZ, [JFPU1, JFPM], 42, [2, 42], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteFSqrt64, [JFPU1, JFPM], 27, [1, 27]>;
|
|
|
|
defm : JWriteResFpuPair<WriteFSqrt64X, [JFPU1, JFPM], 27, [1, 27]>;
|
|
|
|
defm : JWriteResYMMPair<WriteFSqrt64Y, [JFPU1, JFPM], 54, [2, 54], 2>;
|
|
|
|
defm : JWriteResYMMPair<WriteFSqrt64Z, [JFPU1, JFPM], 54, [2, 54], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteFSqrt80, [JFPU1, JFPM], 35, [1, 35]>;
|
2018-04-21 05:16:05 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFSign, [JFPU1, JFPM], 2>;
|
2018-05-04 20:59:24 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFRnd, [JFPU1, JSTC], 3>;
|
|
|
|
defm : JWriteResYMMPair<WriteFRndY, [JFPU1, JSTC], 3, [2,2], 2>;
|
2018-04-21 05:16:05 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFLogic, [JFPU01, JFPX], 1>;
|
2018-04-27 23:50:33 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFLogicY, [JFPU01, JFPX], 1, [2, 2], 2>;
|
2018-05-08 18:28:03 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFTest, [JFPU0, JFPA, JALU0], 3>;
|
|
|
|
defm : JWriteResYMMPair<WriteFTestY , [JFPU01, JFPX, JFPA, JALU0], 4, [2, 2, 2, 1], 3>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFShuffle, [JFPU01, JFPX], 1>;
|
2018-05-01 22:25:01 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFShuffleY, [JFPU01, JFPX], 1, [2, 2], 2>;
|
2018-04-11 21:49:19 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFVarShuffle, [JFPU01, JFPX], 2, [1, 4], 3>;
|
2018-04-28 02:19:48 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFVarShuffleY,[JFPU01, JFPX], 3, [2, 6], 6>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFBlend, [JFPU01, JFPX], 1>;
|
2018-04-28 02:19:48 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFBlendY, [JFPU01, JFPX], 1, [2, 2], 2>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFVarBlend, [JFPU01, JFPX], 2, [1, 4], 3>;
|
2018-04-28 02:19:48 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFVarBlendY, [JFPU01, JFPX], 3, [2, 6], 6>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFShuffle256, [JFPU01, JFPX], 1>;
|
2018-04-11 21:49:19 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFVarShuffle256, [JFPU01, JFPX], 1>; // NOTE: Doesn't exist on Jaguar.
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-03-13 05:35:12 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Conversions.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-05-16 18:53:45 +08:00
|
|
|
defm : JWriteResFpuPair<WriteCvtSS2I, [JFPU1, JSTC, JFPA, JALU0], 7, [1,1], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteCvtPS2I, [JFPU1, JSTC], 3, [1,1], 1>;
|
|
|
|
defm : JWriteResYMMPair<WriteCvtPS2IY, [JFPU1, JSTC], 3, [2,2], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteCvtSD2I, [JFPU1, JSTC, JFPA, JALU0], 7, [1,1], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteCvtPD2I, [JFPU1, JSTC], 3, [1,1], 1>;
|
|
|
|
defm : JWriteResYMMPair<WriteCvtPD2IY, [JFPU1, JSTC, JFPX], 6, [2,2,4], 3>;
|
|
|
|
|
|
|
|
// FIXME: f+3 ST, LD+STC latency
|
|
|
|
defm : JWriteResFpuPair<WriteCvtI2SS, [JFPU1, JSTC], 9, [1,1], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteCvtI2PS, [JFPU1, JSTC], 3, [1,1], 1>;
|
|
|
|
defm : JWriteResYMMPair<WriteCvtI2PSY, [JFPU1, JSTC], 3, [2,2], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteCvtI2SD, [JFPU1, JSTC], 9, [1,1], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteCvtI2PD, [JFPU1, JSTC], 3, [1,1], 1>;
|
|
|
|
defm : JWriteResYMMPair<WriteCvtI2PDY, [JFPU1, JSTC], 3, [2,2], 2>;
|
2018-05-16 01:36:49 +08:00
|
|
|
|
|
|
|
defm : JWriteResFpuPair<WriteCvtSS2SD, [JFPU1, JSTC], 7, [1,2], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteCvtPS2PD, [JFPU1, JSTC], 2, [1,1], 1>;
|
|
|
|
defm : JWriteResYMMPair<WriteCvtPS2PDY, [JFPU1, JSTC], 2, [2,2], 2>;
|
|
|
|
|
|
|
|
defm : JWriteResFpuPair<WriteCvtSD2SS, [JFPU1, JSTC], 7, [1,2], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteCvtPD2PS, [JFPU1, JSTC], 3, [1,1], 1>;
|
|
|
|
defm : JWriteResYMMPair<WriteCvtPD2PSY, [JFPU1, JSTC, JFPX], 6, [2,2,4], 3>;
|
2018-05-15 22:12:32 +08:00
|
|
|
|
|
|
|
defm : JWriteResFpuPair<WriteCvtPH2PS, [JFPU1, JSTC], 3, [1,1], 1>;
|
|
|
|
defm : JWriteResYMMPair<WriteCvtPH2PSY, [JFPU1, JSTC], 3, [2,2], 2>;
|
|
|
|
|
|
|
|
defm : X86WriteRes<WriteCvtPS2PH, [JFPU1, JSTC], 3, [1,1], 1>;
|
|
|
|
defm : X86WriteRes<WriteCvtPS2PHY, [JFPU1, JSTC, JFPX], 6, [2,2,2], 3>;
|
|
|
|
defm : X86WriteRes<WriteCvtPS2PHSt, [JFPU1, JSTC, JSAGU], 4, [1,1,1], 1>;
|
|
|
|
defm : X86WriteRes<WriteCvtPS2PHYSt, [JFPU1, JSTC, JFPX, JSAGU], 7, [2,2,2,1], 3>;
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-03-13 00:02:56 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2014-09-10 04:07:07 +08:00
|
|
|
// Vector integer operations.
|
2018-03-13 00:02:56 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteVecLoad, [JLAGU, JFPU01, JVALU], 5, [1, 1, 1], 1>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteVecLoadX, [JLAGU, JFPU01, JVALU], 5, [1, 1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecLoadY, [JLAGU, JFPU01, JVALU], 5, [1, 1, 1], 1>;
|
2018-05-15 02:37:19 +08:00
|
|
|
defm : X86WriteRes<WriteVecLoadNT, [JLAGU, JFPU01, JVALU], 5, [1, 1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecLoadNTY, [JLAGU, JFPU01, JVALU], 5, [1, 1, 1], 1>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteVecMaskedLoad, [JLAGU, JFPU01, JVALU], 6, [1, 1, 2], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecMaskedLoadY, [JLAGU, JFPU01, JVALU], 6, [2, 2, 4], 2>;
|
|
|
|
|
2018-05-18 22:22:22 +08:00
|
|
|
defm : X86WriteRes<WriteVecStore, [JSAGU, JFPU1, JSTC], 2, [1, 1, 1], 1>;
|
2018-05-11 22:30:54 +08:00
|
|
|
defm : X86WriteRes<WriteVecStoreX, [JSAGU, JFPU1, JSTC], 1, [1, 1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecStoreY, [JSAGU, JFPU1, JSTC], 1, [1, 1, 1], 1>;
|
2018-05-15 02:37:19 +08:00
|
|
|
defm : X86WriteRes<WriteVecStoreNT, [JSAGU, JFPU1, JSTC], 2, [1, 1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecStoreNTY, [JSAGU, JFPU1, JSTC], 2, [2, 2, 2], 1>;
|
2018-05-08 20:17:55 +08:00
|
|
|
defm : X86WriteRes<WriteVecMaskedStore, [JSAGU, JFPU01, JVALU], 6, [1, 1, 4], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecMaskedStoreY, [JSAGU, JFPU01, JVALU], 6, [2, 2, 4], 2>;
|
|
|
|
|
2018-05-12 01:38:36 +08:00
|
|
|
defm : X86WriteRes<WriteVecMove, [JFPU01, JVALU], 1, [1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecMoveX, [JFPU01, JVALU], 1, [1, 1], 1>;
|
|
|
|
defm : X86WriteRes<WriteVecMoveY, [JFPU01, JVALU], 1, [2, 2], 2>;
|
2018-03-15 22:45:30 +08:00
|
|
|
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecALU, [JFPU01, JVALU], 1>;
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecALUX, [JFPU01, JVALU], 1>;
|
2018-05-03 21:27:10 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecALUY, [JFPU01, JVALU], 1>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecShift, [JFPU01, JVALU], 1>;
|
2018-05-04 01:56:43 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecShiftX, [JFPU01, JVALU], 1>;
|
|
|
|
defm : JWriteResFpuPair<WriteVecShiftY, [JFPU01, JVALU], 1>;
|
2018-05-05 01:47:46 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecShiftImm, [JFPU01, JVALU], 1>;
|
2018-05-04 01:56:43 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecShiftImmX,[JFPU01, JVALU], 1>;
|
|
|
|
defm : JWriteResFpuPair<WriteVecShiftImmY,[JFPU01, JVALU], 1>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecIMul, [JFPU0, JVIMUL], 2>;
|
2018-05-05 01:47:46 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecIMulX, [JFPU0, JVIMUL], 2>;
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecIMulY, [JFPU0, JVIMUL], 2>;
|
2018-03-31 12:54:32 +08:00
|
|
|
defm : JWriteResFpuPair<WritePMULLD, [JFPU0, JFPU01, JVIMUL, JVALU], 4, [2, 1, 2, 1], 3>;
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : JWriteResFpuPair<WritePMULLDY, [JFPU0, JFPU01, JVIMUL, JVALU], 4, [2, 1, 2, 1], 3>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteMPSAD, [JFPU0, JVIMUL], 3, [1, 2]>;
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : JWriteResFpuPair<WriteMPSADY, [JFPU0, JVIMUL], 3, [1, 2]>;
|
2018-04-18 03:35:19 +08:00
|
|
|
defm : JWriteResFpuPair<WritePSADBW, [JFPU01, JVALU], 2>;
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : JWriteResFpuPair<WritePSADBWX, [JFPU01, JVALU], 2>;
|
2018-05-03 18:31:20 +08:00
|
|
|
defm : JWriteResFpuPair<WritePSADBWY, [JFPU01, JVALU], 2>;
|
2018-04-25 02:49:25 +08:00
|
|
|
defm : JWriteResFpuPair<WritePHMINPOS, [JFPU0, JVALU], 2>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteShuffle, [JFPU01, JVALU], 1>;
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : JWriteResFpuPair<WriteShuffleX, [JFPU01, JVALU], 1>;
|
2018-05-03 02:48:23 +08:00
|
|
|
defm : JWriteResFpuPair<WriteShuffleY, [JFPU01, JVALU], 1>;
|
2018-04-11 21:49:19 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVarShuffle, [JFPU01, JVALU], 2, [1, 4], 3>;
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVarShuffleX, [JFPU01, JVALU], 2, [1, 4], 3>;
|
2018-05-03 02:48:23 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVarShuffleY, [JFPU01, JVALU], 2, [1, 4], 3>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteBlend, [JFPU01, JVALU], 1>;
|
2018-05-03 02:48:23 +08:00
|
|
|
defm : JWriteResFpuPair<WriteBlendY, [JFPU01, JVALU], 1>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVarBlend, [JFPU01, JVALU], 2, [1, 4], 3>;
|
2018-05-03 02:48:23 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVarBlendY, [JFPU01, JVALU], 2, [1, 4], 3>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecLogic, [JFPU01, JVALU], 1>;
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecLogicX, [JFPU01, JVALU], 1>;
|
2018-05-01 20:39:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecLogicY, [JFPU01, JVALU], 1>; // NOTE: Doesn't exist on Jaguar.
|
2018-05-08 18:28:03 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecTest, [JFPU0, JFPA, JALU0], 3>;
|
|
|
|
defm : JWriteResYMMPair<WriteVecTestY , [JFPU01, JFPX, JFPA, JALU0], 4, [2, 2, 2, 1], 3>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteShuffle256, [JFPU01, JVALU], 1>;
|
2018-04-11 21:49:19 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVarShuffle256, [JFPU01, JVALU], 1>; // NOTE: Doesn't exist on Jaguar.
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVarVecShift, [JFPU01, JVALU], 1>; // NOTE: Doesn't exist on Jaguar.
|
2018-05-04 01:56:43 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVarVecShiftY,[JFPU01, JVALU], 1>; // NOTE: Doesn't exist on Jaguar.
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-04-08 19:26:26 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2018-04-24 21:21:41 +08:00
|
|
|
// Vector insert/extract operations.
|
2018-04-08 19:26:26 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-04-24 21:21:41 +08:00
|
|
|
defm : JWriteResFpuPair<WriteVecInsert, [JFPU01, JVALU], 1>;
|
|
|
|
def : WriteRes<WriteVecExtract, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
|
|
|
def : WriteRes<WriteVecExtractSt, [JFPU1, JSTC, JSAGU]> { let Latency = 3; }
|
2018-04-08 19:26:26 +08:00
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2018-03-15 07:12:09 +08:00
|
|
|
// SSE42 String instructions.
|
2014-09-10 04:07:07 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-27 00:10:08 +08:00
|
|
|
defm : JWriteResFpuPair<WritePCmpIStrI, [JFPU1, JVALU1, JFPA, JALU0], 7, [1, 2, 1, 1], 3>;
|
|
|
|
defm : JWriteResFpuPair<WritePCmpIStrM, [JFPU1, JVALU1, JFPA, JALU0], 8, [1, 2, 1, 1], 3>;
|
|
|
|
defm : JWriteResFpuPair<WritePCmpEStrI, [JFPU1, JSAGU, JLAGU, JVALU, JVALU1, JFPA, JALU0], 14, [1, 2, 2, 6, 4, 1, 1], 9>;
|
|
|
|
defm : JWriteResFpuPair<WritePCmpEStrM, [JFPU1, JSAGU, JLAGU, JVALU, JVALU1, JFPA, JALU0], 14, [1, 2, 2, 6, 4, 1, 1], 9>;
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2018-03-28 04:38:54 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MOVMSK Instructions.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-05-04 22:54:33 +08:00
|
|
|
def : WriteRes<WriteFMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
|
|
|
def : WriteRes<WriteVecMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
|
|
|
def : WriteRes<WriteVecMOVMSKY, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
|
|
|
def : WriteRes<WriteMMXMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
2018-03-28 04:38:54 +08:00
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// AES Instructions.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-16 01:45:10 +08:00
|
|
|
defm : JWriteResFpuPair<WriteAESIMC, [JFPU0, JVIMUL], 2>;
|
|
|
|
defm : JWriteResFpuPair<WriteAESKeyGen, [JFPU0, JVIMUL], 2>;
|
2018-05-03 14:08:47 +08:00
|
|
|
defm : JWriteResFpuPair<WriteAESDecEnc, [JFPU0, JVIMUL], 3, [1, 1], 2>;
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2017-06-09 00:44:13 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Horizontal add/sub instructions.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WriteFHAdd, [JFPU0, JFPA], 3>;
|
2018-04-28 00:11:57 +08:00
|
|
|
defm : JWriteResYMMPair<WriteFHAddY, [JFPU0, JFPA], 3, [2,2], 2>;
|
2018-03-18 20:09:17 +08:00
|
|
|
defm : JWriteResFpuPair<WritePHAdd, [JFPU01, JVALU], 1>;
|
2018-05-11 01:06:09 +08:00
|
|
|
defm : JWriteResFpuPair<WritePHAddX, [JFPU01, JVALU], 1>;
|
2018-05-03 21:27:10 +08:00
|
|
|
defm : JWriteResFpuPair<WritePHAddY, [JFPU01, JVALU], 1>;
|
2017-06-09 00:44:13 +08:00
|
|
|
|
2014-09-10 04:07:07 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Carry-less multiplication instructions.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-16 01:45:10 +08:00
|
|
|
defm : JWriteResFpuPair<WriteCLMul, [JFPU0, JVIMUL], 2>;
|
2014-09-10 04:07:07 +08:00
|
|
|
|
2017-07-16 20:06:06 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// SSE4A instructions.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-18 21:05:09 +08:00
|
|
|
def JWriteINSERTQ: SchedWriteRes<[JFPU01, JVALU]> {
|
2017-07-16 20:06:06 +08:00
|
|
|
let Latency = 2;
|
2018-03-18 21:05:09 +08:00
|
|
|
let ResourceCycles = [1, 4];
|
2017-07-16 20:06:06 +08:00
|
|
|
}
|
2018-03-13 01:07:08 +08:00
|
|
|
def : InstRW<[JWriteINSERTQ], (instrs INSERTQ, INSERTQI)>;
|
2017-07-16 20:06:06 +08:00
|
|
|
|
2017-07-11 00:36:03 +08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// AVX instructions.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-03-24 00:17:56 +08:00
|
|
|
def JWriteVBROADCASTYLd: SchedWriteRes<[JLAGU, JFPU01, JFPX]> {
|
2017-11-02 18:33:41 +08:00
|
|
|
let Latency = 6;
|
2018-03-26 21:15:20 +08:00
|
|
|
let ResourceCycles = [1, 2, 4];
|
2018-03-28 20:12:04 +08:00
|
|
|
let NumMicroOps = 2;
|
2017-11-02 18:33:41 +08:00
|
|
|
}
|
2018-03-31 02:53:47 +08:00
|
|
|
def : InstRW<[JWriteVBROADCASTYLd, ReadAfterLd], (instrs VBROADCASTSDYrm,
|
|
|
|
VBROADCASTSSYrm)>;
|
2017-11-02 18:33:41 +08:00
|
|
|
|
2018-03-13 01:07:08 +08:00
|
|
|
def JWriteJVZEROALL: SchedWriteRes<[]> {
|
2017-07-27 21:12:08 +08:00
|
|
|
let Latency = 90;
|
|
|
|
let NumMicroOps = 73;
|
|
|
|
}
|
2018-03-13 01:07:08 +08:00
|
|
|
def : InstRW<[JWriteJVZEROALL], (instrs VZEROALL)>;
|
2017-07-27 21:12:08 +08:00
|
|
|
|
2018-03-13 01:07:08 +08:00
|
|
|
def JWriteJVZEROUPPER: SchedWriteRes<[]> {
|
2017-07-27 21:12:08 +08:00
|
|
|
let Latency = 46;
|
|
|
|
let NumMicroOps = 37;
|
|
|
|
}
|
2018-03-13 01:07:08 +08:00
|
|
|
def : InstRW<[JWriteJVZEROUPPER], (instrs VZEROUPPER)>;
|
2014-09-10 04:07:07 +08:00
|
|
|
} // SchedModel
|
|
|
|
|