annotate lib/Target/X86/X86ScheduleBtVer2.td @ 124:4fa72497ed5d

fix
author mir3636
date Thu, 30 Nov 2017 20:04:56 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
83
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 //=- X86ScheduleBtVer2.td - X86 BtVer2 (Jaguar) Scheduling ---*- tablegen -*-=//
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 //
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // The LLVM Compiler Infrastructure
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 //
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // This file is distributed under the University of Illinois Open Source
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 // License. See LICENSE.TXT for details.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 //
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 //===----------------------------------------------------------------------===//
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 //
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 // This file defines the machine model for AMD btver2 (Jaguar) to support
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 // instruction scheduling and other instruction cost heuristics. Based off AMD Software
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 // Optimization Guide for AMD Family 16h Processors & Instruction Latency appendix.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 //
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 //===----------------------------------------------------------------------===//
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 def BtVer2Model : SchedMachineModel {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 // All x86 instructions are modeled as a single micro-op, and btver2 can
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 // decode 2 instructions per cycle.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 let IssueWidth = 2;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 let MicroOpBufferSize = 64; // Retire Control Unit
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 let LoadLatency = 5; // FPU latency (worse case cf Integer 3 cycle latency)
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 let HighLatency = 25;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 let MispredictPenalty = 14; // Minimum branch misdirection penalty
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 let PostRAScheduler = 1;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 // FIXME: SSE4/AVX is unimplemented. This flag is set to allow
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 // the scheduler to assign a default model to unrecognized opcodes.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 let CompleteModel = 0;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 let SchedModel = BtVer2Model in {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 // Jaguar can issue up to 6 micro-ops in one cycle
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 def JALU0 : ProcResource<1>; // Integer Pipe0: integer ALU0 (also handle FP->INT jam)
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 def JALU1 : ProcResource<1>; // Integer Pipe1: integer ALU1/MUL/DIV
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 def JLAGU : ProcResource<1>; // Integer Pipe2: LAGU
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 def JSAGU : ProcResource<1>; // Integer Pipe3: SAGU (also handles 3-operand LEA)
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 def JFPU0 : ProcResource<1>; // Vector/FPU Pipe0: VALU0/VIMUL/FPA
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 def JFPU1 : ProcResource<1>; // Vector/FPU Pipe1: VALU1/STC/FPM
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 // Any pipe - FIXME we need this until we can discriminate between int/fpu load/store/moves properly
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 def JAny : ProcResGroup<[JALU0, JALU1, JLAGU, JSAGU, JFPU0, JFPU1]>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 // Integer Pipe Scheduler
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 def JALU01 : ProcResGroup<[JALU0, JALU1]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 let BufferSize=20;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 // AGU Pipe Scheduler
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 def JLSAGU : ProcResGroup<[JLAGU, JSAGU]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 let BufferSize=12;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 // Fpu Pipe Scheduler
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 def JFPU01 : ProcResGroup<[JFPU0, JFPU1]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 let BufferSize=18;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 def JDiv : ProcResource<1>; // integer division
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 def JMul : ProcResource<1>; // integer multiplication
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 def JVALU0 : ProcResource<1>; // vector integer
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 def JVALU1 : ProcResource<1>; // vector integer
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 def JVIMUL : ProcResource<1>; // vector integer multiplication
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 def JSTC : ProcResource<1>; // vector store/convert
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 def JFPM : ProcResource<1>; // FP multiplication
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 def JFPA : ProcResource<1>; // FP addition
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 // Integer loads are 3 cycles, so ReadAfterLd registers needn't be available until 3
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 // cycles after the memory operand.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 def : ReadAdvance<ReadAfterLd, 3>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 // Many SchedWrites are defined in pairs with and without a folded load.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 // Instructions with folded loads are usually micro-fused, so they only appear
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 // as two micro-ops when dispatched by the schedulers.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 // This multiclass defines the resource usage for variants with and without
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 // folded loads.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 multiclass JWriteResIntPair<X86FoldableSchedWrite SchedRW,
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 ProcResourceKind ExePort,
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 int Lat> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 // Register variant is using a single cycle on ExePort.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 def : WriteRes<SchedRW, [ExePort]> { let Latency = Lat; }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 // Memory variant also uses a cycle on JLAGU and adds 3 cycles to the
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 // latency.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 def : WriteRes<SchedRW.Folded, [JLAGU, ExePort]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 let Latency = !add(Lat, 3);
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 multiclass JWriteResFpuPair<X86FoldableSchedWrite SchedRW,
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 ProcResourceKind ExePort,
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 int Lat> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 // Register variant is using a single cycle on ExePort.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 def : WriteRes<SchedRW, [ExePort]> { let Latency = Lat; }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 // Memory variant also uses a cycle on JLAGU and adds 5 cycles to the
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 // latency.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 def : WriteRes<SchedRW.Folded, [JLAGU, ExePort]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 let Latency = !add(Lat, 5);
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 // A folded store needs a cycle on the SAGU for the store data.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 def : WriteRes<WriteRMW, [JSAGU]>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 // Arithmetic.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 defm : JWriteResIntPair<WriteALU, JALU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 defm : JWriteResIntPair<WriteIMul, JALU1, 3>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 def : WriteRes<WriteIMulH, [JALU1]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 let Latency = 6;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 let ResourceCycles = [4];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 // FIXME 8/16 bit divisions
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 def : WriteRes<WriteIDiv, [JALU1, JDiv]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 let Latency = 25;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 let ResourceCycles = [1, 25];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 def : WriteRes<WriteIDivLd, [JALU1, JLAGU, JDiv]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 let Latency = 41;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 let ResourceCycles = [1, 1, 25];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 // This is for simple LEAs with one or two input operands.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 // FIXME: SAGU 3-operand LEA
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 def : WriteRes<WriteLEA, [JALU01]>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 // Integer shifts and rotates.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 defm : JWriteResIntPair<WriteShift, JALU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 // Loads, stores, and moves, not folded with other operations.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 // FIXME: Split x86 and SSE load/store/moves
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 def : WriteRes<WriteLoad, [JLAGU]> { let Latency = 5; }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 def : WriteRes<WriteStore, [JSAGU]>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 def : WriteRes<WriteMove, [JAny]>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 // Idioms that clear a register, like xorps %xmm0, %xmm0.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 // These can often bypass execution ports completely.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 def : WriteRes<WriteZero, []>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 // Branches don't produce values, so they have no latency, but they still
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 // consume resources. Indirect branches can fold loads.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 defm : JWriteResIntPair<WriteJump, JALU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 // Floating point. This covers both scalar and vector operations.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 // FIXME: should we bother splitting JFPU pipe + unit stages for fast instructions?
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 // FIXME: Double precision latencies
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 // FIXME: SS vs PS latencies
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 // FIXME: ymm latencies
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 defm : JWriteResFpuPair<WriteFAdd, JFPU0, 3>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 defm : JWriteResFpuPair<WriteFMul, JFPU1, 2>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 defm : JWriteResFpuPair<WriteFRcp, JFPU1, 2>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 defm : JWriteResFpuPair<WriteFRsqrt, JFPU1, 2>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 defm : JWriteResFpuPair<WriteFShuffle, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 defm : JWriteResFpuPair<WriteFBlend, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 defm : JWriteResFpuPair<WriteFShuffle256, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
176
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 def : WriteRes<WriteFSqrt, [JFPU1, JLAGU, JFPM]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 let Latency = 21;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 let ResourceCycles = [1, 1, 21];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 def : WriteRes<WriteFSqrtLd, [JFPU1, JLAGU, JFPM]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 let Latency = 26;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 let ResourceCycles = [1, 1, 21];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
185
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 def : WriteRes<WriteFDiv, [JFPU1, JLAGU, JFPM]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 let Latency = 19;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 let ResourceCycles = [1, 1, 19];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 def : WriteRes<WriteFDivLd, [JFPU1, JLAGU, JFPM]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 let Latency = 24;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 let ResourceCycles = [1, 1, 19];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
194
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 // FIXME: integer pipes
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 defm : JWriteResFpuPair<WriteCvtF2I, JFPU1, 3>; // Float -> Integer.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 defm : JWriteResFpuPair<WriteCvtI2F, JFPU1, 3>; // Integer -> Float.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 defm : JWriteResFpuPair<WriteCvtF2F, JFPU1, 3>; // Float -> Float size conversion.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
199
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 def : WriteRes<WriteFVarBlend, [JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 let Latency = 2;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 let ResourceCycles = [2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 def : WriteRes<WriteFVarBlendLd, [JLAGU, JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 let Latency = 7;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 let ResourceCycles = [1, 2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
208
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 // Vector integer operations.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 defm : JWriteResFpuPair<WriteVecALU, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 defm : JWriteResFpuPair<WriteVecShift, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 defm : JWriteResFpuPair<WriteVecIMul, JFPU0, 2>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 defm : JWriteResFpuPair<WriteShuffle, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 defm : JWriteResFpuPair<WriteBlend, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 defm : JWriteResFpuPair<WriteVecLogic, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 defm : JWriteResFpuPair<WriteShuffle256, JFPU01, 1>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
217
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 def : WriteRes<WriteVarBlend, [JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 let Latency = 2;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 let ResourceCycles = [2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 def : WriteRes<WriteVarBlendLd, [JLAGU, JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 let Latency = 7;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 let ResourceCycles = [1, 2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
226
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 // FIXME: why do we need to define AVX2 resource on CPU that doesn't have AVX2?
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 def : WriteRes<WriteVarVecShift, [JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 let Latency = 1;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 let ResourceCycles = [1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
232 def : WriteRes<WriteVarVecShiftLd, [JLAGU, JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 let Latency = 6;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 let ResourceCycles = [1, 1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
236
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 def : WriteRes<WriteMPSAD, [JFPU0]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 let Latency = 3;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 let ResourceCycles = [2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 def : WriteRes<WriteMPSADLd, [JLAGU, JFPU0]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 let Latency = 8;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 let ResourceCycles = [1, 2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
245
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 // String instructions.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 // Packed Compare Implicit Length Strings, Return Mask
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 // FIXME: approximate latencies + pipe dependencies
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
251
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 def : WriteRes<WritePCmpIStrM, [JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 let Latency = 7;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 let ResourceCycles = [2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
255 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 def : WriteRes<WritePCmpIStrMLd, [JLAGU, JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
257 let Latency = 12;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 let ResourceCycles = [1, 2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
260
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
261 // Packed Compare Explicit Length Strings, Return Mask
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
262 def : WriteRes<WritePCmpEStrM, [JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 let Latency = 13;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 let ResourceCycles = [5];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 def : WriteRes<WritePCmpEStrMLd, [JLAGU, JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 let Latency = 18;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 let ResourceCycles = [1, 5];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
270
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 // Packed Compare Implicit Length Strings, Return Index
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 def : WriteRes<WritePCmpIStrI, [JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 let Latency = 6;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 let ResourceCycles = [2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 def : WriteRes<WritePCmpIStrILd, [JLAGU, JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 let Latency = 11;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 let ResourceCycles = [1, 2];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
280
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 // Packed Compare Explicit Length Strings, Return Index
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 def : WriteRes<WritePCmpEStrI, [JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 let Latency = 13;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 let ResourceCycles = [5];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
286 def : WriteRes<WritePCmpEStrILd, [JLAGU, JFPU01]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
287 let Latency = 18;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
288 let ResourceCycles = [1, 5];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
290
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 // AES Instructions.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
294
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 def : WriteRes<WriteAESDecEnc, [JFPU01, JVIMUL]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 let Latency = 3;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 let ResourceCycles = [1, 1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 def : WriteRes<WriteAESDecEncLd, [JFPU01, JLAGU, JVIMUL]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 let Latency = 8;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 let ResourceCycles = [1, 1, 1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
303
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 def : WriteRes<WriteAESIMC, [JVIMUL]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 let Latency = 2;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 let ResourceCycles = [1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 def : WriteRes<WriteAESIMCLd, [JLAGU, JVIMUL]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 let Latency = 7;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 let ResourceCycles = [1, 1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
312
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
313 def : WriteRes<WriteAESKeyGen, [JVIMUL]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 let Latency = 2;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 let ResourceCycles = [1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 def : WriteRes<WriteAESKeyGenLd, [JLAGU, JVIMUL]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 let Latency = 7;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 let ResourceCycles = [1, 1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
321
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 ////////////////////////////////////////////////////////////////////////////////
121
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
323 // Horizontal add/sub instructions.
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
324 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
325
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
326 def : WriteRes<WriteFHAdd, [JFPU0]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
327 let Latency = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
328 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
329
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
330 def : WriteRes<WriteFHAddLd, [JLAGU, JFPU0]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
331 let Latency = 8;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
332 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
333
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
334 def : WriteRes<WritePHAdd, [JFPU01]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
335 let ResourceCycles = [1];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
336 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
337 def : WriteRes<WritePHAddLd, [JLAGU, JFPU01 ]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
338 let Latency = 6;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
339 let ResourceCycles = [1, 1];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
340 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
341
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
342 def WriteFHAddY: SchedWriteRes<[JFPU0]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
343 let Latency = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
344 let ResourceCycles = [2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
345 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
346 def : InstRW<[WriteFHAddY], (instregex "VH(ADD|SUB)P(S|D)Yrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
347
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
348 def WriteFHAddYLd: SchedWriteRes<[JLAGU, JFPU0]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
349 let Latency = 8;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
350 let ResourceCycles = [1, 2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
351 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
352 def : InstRW<[WriteFHAddYLd], (instregex "VH(ADD|SUB)P(S|D)Yrm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
353
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
354 ////////////////////////////////////////////////////////////////////////////////
83
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
355 // Carry-less multiplication instructions.
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 ////////////////////////////////////////////////////////////////////////////////
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
357
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 def : WriteRes<WriteCLMul, [JVIMUL]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 let Latency = 2;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 let ResourceCycles = [1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
362 def : WriteRes<WriteCLMulLd, [JLAGU, JVIMUL]> {
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 let Latency = 7;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 let ResourceCycles = [1, 1];
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
366
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 // FIXME: pipe for system/microcode?
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 def : WriteRes<WriteSystem, [JAny]> { let Latency = 100; }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 def : WriteRes<WriteMicrocoded, [JAny]> { let Latency = 100; }
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 def : WriteRes<WriteFence, [JSAGU]>;
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
371 def : WriteRes<WriteNop, []>;
121
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
372
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
373 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
374 // SSE4.1 instructions.
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
375 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
376
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
377 def WriteDPPS: SchedWriteRes<[JFPU0, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
378 let Latency = 11;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
379 let ResourceCycles = [3,3];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
380 let NumMicroOps = 5;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
381 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
382 def : InstRW<[WriteDPPS], (instregex "(V)?DPPSrri")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
383
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
384 def WriteDPPSLd: SchedWriteRes<[JLAGU, JFPU0, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
385 let Latency = 16;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
386 let ResourceCycles = [1,3,3];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
387 let NumMicroOps = 6;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
388 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
389 def : InstRW<[WriteDPPSLd], (instregex "(V)?DPPSrmi")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
390
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
391 def WriteDPPD: SchedWriteRes<[JFPU0, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
392 let Latency = 9;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
393 let ResourceCycles = [3,3];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
394 let NumMicroOps = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
395 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
396 def : InstRW<[WriteDPPD], (instregex "(V)?DPPDrri")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
397
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
398 def WriteDPPDLd: SchedWriteRes<[JLAGU, JFPU0, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
399 let Latency = 14;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
400 let ResourceCycles = [1,3,3];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
401 let NumMicroOps = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
402 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
403 def : InstRW<[WriteDPPDLd], (instregex "(V)?DPPDrmi")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
404
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
405 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
406 // SSE4A instructions.
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
407 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
408
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
409 def WriteEXTRQ: SchedWriteRes<[JFPU01]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
410 let Latency = 1;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
411 let ResourceCycles = [1];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
412 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
413 def : InstRW<[WriteEXTRQ], (instregex "EXTRQ")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
414
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
415 def WriteINSERTQ: SchedWriteRes<[JFPU01]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
416 let Latency = 2;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
417 let ResourceCycles = [4];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
418 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
419 def : InstRW<[WriteINSERTQ], (instregex "INSERTQ")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
420
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
421 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
422 // F16C instructions.
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
423 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
424
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
425 def WriteCVT3: SchedWriteRes<[JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
426 let Latency = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
427 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
428 def : InstRW<[WriteCVT3], (instregex "VCVTPS2PHrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
429 def : InstRW<[WriteCVT3], (instregex "VCVTPH2PSrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
430
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
431 def WriteCVT3St: SchedWriteRes<[JFPU1, JLAGU]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
432 let Latency = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
433 let ResourceCycles = [1, 1];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
434 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
435 def : InstRW<[WriteCVT3St], (instregex "VCVTPS2PHmr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
436
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
437 def WriteCVT3Ld: SchedWriteRes<[JFPU1, JLAGU]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
438 let Latency = 8;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
439 let ResourceCycles = [1, 1];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
440 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
441 def : InstRW<[WriteCVT3Ld], (instregex "VCVTPH2PSrm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
442
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
443 def WriteCVTPS2PHY: SchedWriteRes<[JFPU1, JFPU01]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
444 let Latency = 6;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
445 let ResourceCycles = [2,2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
446 let NumMicroOps = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
447 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
448 def : InstRW<[WriteCVTPS2PHY], (instregex "VCVTPS2PHYrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
449
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
450 def WriteCVTPS2PHYSt: SchedWriteRes<[JFPU1, JFPU01, JLAGU]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
451 let Latency = 11;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
452 let ResourceCycles = [2,2,1];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
453 let NumMicroOps = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
454 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
455 def : InstRW<[WriteCVTPS2PHYSt], (instregex "VCVTPS2PHYmr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
456
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
457 def WriteCVTPH2PSY: SchedWriteRes<[JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
458 let Latency = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
459 let ResourceCycles = [2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
460 let NumMicroOps = 2;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
461 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
462 def : InstRW<[WriteCVTPH2PSY], (instregex "VCVTPH2PSYrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
463
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
464 def WriteCVTPH2PSYLd: SchedWriteRes<[JLAGU, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
465 let Latency = 8;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
466 let ResourceCycles = [1,2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
467 let NumMicroOps = 2;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
468 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
469 def : InstRW<[WriteCVTPH2PSYLd], (instregex "VCVTPH2PSYrm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
470
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
471 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
472 // AVX instructions.
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
473 ////////////////////////////////////////////////////////////////////////////////
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
474
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
475 def WriteVDPPSY: SchedWriteRes<[JFPU1, JFPU0]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
476 let Latency = 12;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
477 let ResourceCycles = [6, 6];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
478 let NumMicroOps = 10;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
479 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
480 def : InstRW<[WriteVDPPSY], (instregex "VDPPSYrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
481
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
482 def WriteVDPPSYLd: SchedWriteRes<[JLAGU, JFPU1, JFPU0]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
483 let Latency = 17;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
484 let ResourceCycles = [1, 6, 6];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
485 let NumMicroOps = 11;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
486 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
487 def : InstRW<[WriteVDPPSYLd, ReadAfterLd], (instregex "VDPPSYrm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
488
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
489 def WriteFAddY: SchedWriteRes<[JFPU0]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
490 let Latency = 3;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
491 let ResourceCycles = [2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
492 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
493 def : InstRW<[WriteFAddY], (instregex "VADD(SUB)?P(S|D)Yrr", "VSUBP(S|D)Yrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
494
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
495 def WriteFAddYLd: SchedWriteRes<[JLAGU, JFPU0]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
496 let Latency = 8;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
497 let ResourceCycles = [1, 2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
498 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
499 def : InstRW<[WriteFAddYLd, ReadAfterLd], (instregex "VADD(SUB)?P(S|D)Yrm", "VSUBP(S|D)Yrm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
500
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
501 def WriteFDivY: SchedWriteRes<[JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
502 let Latency = 38;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
503 let ResourceCycles = [38];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
504 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
505 def : InstRW<[WriteFDivY], (instregex "VDIVP(D|S)Yrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
506
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
507 def WriteFDivYLd: SchedWriteRes<[JLAGU, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
508 let Latency = 43;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
509 let ResourceCycles = [1, 38];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
510 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
511 def : InstRW<[WriteFDivYLd, ReadAfterLd], (instregex "VDIVP(S|D)Yrm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
512
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
513 def WriteVMULYPD: SchedWriteRes<[JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
514 let Latency = 4;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
515 let ResourceCycles = [4];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
516 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
517 def : InstRW<[WriteVMULYPD], (instregex "VMULPDYrr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
518
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
519 def WriteVMULYPDLd: SchedWriteRes<[JLAGU, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
520 let Latency = 9;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
521 let ResourceCycles = [1, 4];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
522 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
523 def : InstRW<[WriteVMULYPDLd, ReadAfterLd], (instregex "VMULPDYrm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
524
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
525 def WriteVMULYPS: SchedWriteRes<[JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
526 let Latency = 2;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
527 let ResourceCycles = [2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
528 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
529 def : InstRW<[WriteVMULYPS], (instregex "VMULPSYrr", "VRCPPSYr", "VRSQRTPSYr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
530
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
531 def WriteVMULYPSLd: SchedWriteRes<[JLAGU, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
532 let Latency = 7;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
533 let ResourceCycles = [1, 2];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
534 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
535 def : InstRW<[WriteVMULYPSLd, ReadAfterLd], (instregex "VMULPSYrm", "VRCPPSYm", "VRSQRTPSYm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
536
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
537 def WriteVSQRTYPD: SchedWriteRes<[JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
538 let Latency = 54;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
539 let ResourceCycles = [54];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
540 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
541 def : InstRW<[WriteVSQRTYPD], (instregex "VSQRTPDYr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
542
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
543 def WriteVSQRTYPDLd: SchedWriteRes<[JLAGU, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
544 let Latency = 59;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
545 let ResourceCycles = [1, 54];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
546 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
547 def : InstRW<[WriteVSQRTYPDLd], (instregex "VSQRTPDYm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
548
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
549 def WriteVSQRTYPS: SchedWriteRes<[JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
550 let Latency = 42;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
551 let ResourceCycles = [42];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
552 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
553 def : InstRW<[WriteVSQRTYPS], (instregex "VSQRTPSYr")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
554
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
555 def WriteVSQRTYPSLd: SchedWriteRes<[JLAGU, JFPU1]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
556 let Latency = 47;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
557 let ResourceCycles = [1, 42];
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
558 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
559 def : InstRW<[WriteVSQRTYPSLd], (instregex "VSQRTPSYm")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
560
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
561 def WriteJVZEROALL: SchedWriteRes<[]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
562 let Latency = 90;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
563 let NumMicroOps = 73;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
564 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
565 def : InstRW<[WriteJVZEROALL], (instregex "VZEROALL")>;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
566
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
567 def WriteJVZEROUPPER: SchedWriteRes<[]> {
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
568 let Latency = 46;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
569 let NumMicroOps = 37;
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
570 }
803732b1fca8 LLVM 5.0
kono
parents: 83
diff changeset
571 def : InstRW<[WriteJVZEROUPPER], (instregex "VZEROUPPER")>;
83
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
572 } // SchedModel
60c9769439b8 LLVM 3.7
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
573