]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/lib/Target/X86/X86Schedule.td
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / lib / Target / X86 / X86Schedule.td
1 //===-- X86Schedule.td - X86 Scheduling Definitions --------*- tablegen -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // InstrSchedModel annotations for out-of-order CPUs.
11 //
12 // These annotations are independent of the itinerary classes defined below.
13
14 // Instructions with folded loads need to read the memory operand immediately,
15 // but other register operands don't have to be read until the load is ready.
16 // These operands are marked with ReadAfterLd.
17 def ReadAfterLd : SchedRead;
18
19 // Instructions with both a load and a store folded are modeled as a folded
20 // load + WriteRMW.
21 def WriteRMW : SchedWrite;
22
23 // Most instructions can fold loads, so almost every SchedWrite comes in two
24 // variants: With and without a folded load.
25 // An X86FoldableSchedWrite holds a reference to the corresponding SchedWrite
26 // with a folded load.
27 class X86FoldableSchedWrite : SchedWrite {
28   // The SchedWrite to use when a load is folded into the instruction.
29   SchedWrite Folded;
30 }
31
32 // Multiclass that produces a linked pair of SchedWrites.
33 multiclass X86SchedWritePair {
34   // Register-Memory operation.
35   def Ld : SchedWrite;
36   // Register-Register operation.
37   def NAME : X86FoldableSchedWrite {
38     let Folded = !cast<SchedWrite>(NAME#"Ld");
39   }
40 }
41
42 // Arithmetic.
43 defm WriteALU  : X86SchedWritePair; // Simple integer ALU op.
44 defm WriteIMul : X86SchedWritePair; // Integer multiplication.
45 def  WriteIMulH : SchedWrite;       // Integer multiplication, high part.
46 defm WriteIDiv : X86SchedWritePair; // Integer division.
47 def  WriteLEA  : SchedWrite;        // LEA instructions can't fold loads.
48
49 // Integer shifts and rotates.
50 defm WriteShift : X86SchedWritePair;
51
52 // Loads, stores, and moves, not folded with other operations.
53 def WriteLoad  : SchedWrite;
54 def WriteStore : SchedWrite;
55 def WriteMove  : SchedWrite;
56
57 // Idioms that clear a register, like xorps %xmm0, %xmm0.
58 // These can often bypass execution ports completely.
59 def WriteZero : SchedWrite;
60
61 // Branches don't produce values, so they have no latency, but they still
62 // consume resources. Indirect branches can fold loads.
63 defm WriteJump : X86SchedWritePair;
64
65 // Floating point. This covers both scalar and vector operations.
66 defm WriteFAdd  : X86SchedWritePair; // Floating point add/sub/compare.
67 defm WriteFMul  : X86SchedWritePair; // Floating point multiplication.
68 defm WriteFDiv  : X86SchedWritePair; // Floating point division.
69 defm WriteFSqrt : X86SchedWritePair; // Floating point square root.
70 defm WriteFRcp  : X86SchedWritePair; // Floating point reciprocal.
71 defm WriteFMA   : X86SchedWritePair; // Fused Multiply Add.
72
73 // FMA Scheduling helper class.
74 class FMASC { X86FoldableSchedWrite Sched = WriteFAdd; }
75
76 // Vector integer operations.
77 defm WriteVecALU   : X86SchedWritePair; // Vector integer ALU op, no logicals.
78 defm WriteVecShift : X86SchedWritePair; // Vector integer shifts.
79 defm WriteVecIMul  : X86SchedWritePair; // Vector integer multiply.
80
81 // Vector bitwise operations.
82 // These are often used on both floating point and integer vectors.
83 defm WriteVecLogic : X86SchedWritePair; // Vector and/or/xor.
84 defm WriteShuffle  : X86SchedWritePair; // Vector shuffles and blends.
85
86 // Conversion between integer and float.
87 defm WriteCvtF2I : X86SchedWritePair; // Float -> Integer.
88 defm WriteCvtI2F : X86SchedWritePair; // Integer -> Float.
89 defm WriteCvtF2F : X86SchedWritePair; // Float -> Float size conversion.
90
91 // Catch-all for expensive system instructions.
92 def WriteSystem : SchedWrite;
93
94 // Old microcoded instructions that nobody use.
95 def WriteMicrocoded : SchedWrite;
96
97 //===----------------------------------------------------------------------===//
98 // Instruction Itinerary classes used for X86
99 def IIC_ALU_MEM     : InstrItinClass;
100 def IIC_ALU_NONMEM  : InstrItinClass;
101 def IIC_LEA         : InstrItinClass;
102 def IIC_LEA_16      : InstrItinClass;
103 def IIC_MUL8        : InstrItinClass;
104 def IIC_MUL16_MEM   : InstrItinClass;
105 def IIC_MUL16_REG   : InstrItinClass;
106 def IIC_MUL32_MEM   : InstrItinClass;
107 def IIC_MUL32_REG   : InstrItinClass;
108 def IIC_MUL64       : InstrItinClass;
109 // imul by al, ax, eax, tax
110 def IIC_IMUL8       : InstrItinClass;
111 def IIC_IMUL16_MEM  : InstrItinClass;
112 def IIC_IMUL16_REG  : InstrItinClass;
113 def IIC_IMUL32_MEM  : InstrItinClass;
114 def IIC_IMUL32_REG  : InstrItinClass;
115 def IIC_IMUL64      : InstrItinClass;
116 // imul reg by reg|mem
117 def IIC_IMUL16_RM   : InstrItinClass;
118 def IIC_IMUL16_RR   : InstrItinClass;
119 def IIC_IMUL32_RM   : InstrItinClass;
120 def IIC_IMUL32_RR   : InstrItinClass;
121 def IIC_IMUL64_RM   : InstrItinClass;
122 def IIC_IMUL64_RR   : InstrItinClass;
123 // imul reg = reg/mem * imm
124 def IIC_IMUL16_RMI  : InstrItinClass;
125 def IIC_IMUL16_RRI  : InstrItinClass;
126 def IIC_IMUL32_RMI  : InstrItinClass;
127 def IIC_IMUL32_RRI  : InstrItinClass;
128 def IIC_IMUL64_RMI  : InstrItinClass;
129 def IIC_IMUL64_RRI  : InstrItinClass;
130 // div
131 def IIC_DIV8_MEM    : InstrItinClass;
132 def IIC_DIV8_REG    : InstrItinClass;
133 def IIC_DIV16       : InstrItinClass;
134 def IIC_DIV32       : InstrItinClass;
135 def IIC_DIV64       : InstrItinClass;
136 // idiv
137 def IIC_IDIV8       : InstrItinClass;
138 def IIC_IDIV16      : InstrItinClass;
139 def IIC_IDIV32      : InstrItinClass;
140 def IIC_IDIV64      : InstrItinClass;
141 // neg/not/inc/dec
142 def IIC_UNARY_REG   : InstrItinClass;
143 def IIC_UNARY_MEM   : InstrItinClass;
144 // add/sub/and/or/xor/sbc/cmp/test
145 def IIC_BIN_MEM     : InstrItinClass;
146 def IIC_BIN_NONMEM  : InstrItinClass;
147 // adc/sbc
148 def IIC_BIN_CARRY_MEM     : InstrItinClass;
149 def IIC_BIN_CARRY_NONMEM  : InstrItinClass;
150 // shift/rotate
151 def IIC_SR          : InstrItinClass;
152 // shift double
153 def IIC_SHD16_REG_IM : InstrItinClass;
154 def IIC_SHD16_REG_CL : InstrItinClass;
155 def IIC_SHD16_MEM_IM : InstrItinClass;
156 def IIC_SHD16_MEM_CL : InstrItinClass;
157 def IIC_SHD32_REG_IM : InstrItinClass;
158 def IIC_SHD32_REG_CL : InstrItinClass;
159 def IIC_SHD32_MEM_IM : InstrItinClass;
160 def IIC_SHD32_MEM_CL : InstrItinClass;
161 def IIC_SHD64_REG_IM : InstrItinClass;
162 def IIC_SHD64_REG_CL : InstrItinClass;
163 def IIC_SHD64_MEM_IM : InstrItinClass;
164 def IIC_SHD64_MEM_CL : InstrItinClass;
165 // cmov
166 def IIC_CMOV16_RM : InstrItinClass;
167 def IIC_CMOV16_RR : InstrItinClass;
168 def IIC_CMOV32_RM : InstrItinClass;
169 def IIC_CMOV32_RR : InstrItinClass;
170 def IIC_CMOV64_RM : InstrItinClass;
171 def IIC_CMOV64_RR : InstrItinClass;
172 // set
173 def IIC_SET_R : InstrItinClass;
174 def IIC_SET_M : InstrItinClass;
175 // jmp/jcc/jcxz
176 def IIC_Jcc : InstrItinClass;
177 def IIC_JCXZ : InstrItinClass;
178 def IIC_JMP_REL : InstrItinClass;
179 def IIC_JMP_REG : InstrItinClass;
180 def IIC_JMP_MEM : InstrItinClass;
181 def IIC_JMP_FAR_MEM : InstrItinClass;
182 def IIC_JMP_FAR_PTR : InstrItinClass;
183 // loop
184 def IIC_LOOP : InstrItinClass;
185 def IIC_LOOPE : InstrItinClass;
186 def IIC_LOOPNE : InstrItinClass;
187 // call
188 def IIC_CALL_RI : InstrItinClass;
189 def IIC_CALL_MEM : InstrItinClass;
190 def IIC_CALL_FAR_MEM : InstrItinClass;
191 def IIC_CALL_FAR_PTR : InstrItinClass;
192 // ret
193 def IIC_RET : InstrItinClass;
194 def IIC_RET_IMM : InstrItinClass;
195 //sign extension movs
196 def IIC_MOVSX : InstrItinClass;
197 def IIC_MOVSX_R16_R8 : InstrItinClass;
198 def IIC_MOVSX_R16_M8 : InstrItinClass;
199 def IIC_MOVSX_R16_R16 : InstrItinClass;
200 def IIC_MOVSX_R32_R32 : InstrItinClass;
201 //zero extension movs
202 def IIC_MOVZX : InstrItinClass;
203 def IIC_MOVZX_R16_R8 : InstrItinClass;
204 def IIC_MOVZX_R16_M8 : InstrItinClass;
205
206 def IIC_REP_MOVS : InstrItinClass;
207 def IIC_REP_STOS : InstrItinClass;
208
209 // SSE scalar/parallel binary operations
210 def IIC_SSE_ALU_F32S_RR : InstrItinClass;
211 def IIC_SSE_ALU_F32S_RM : InstrItinClass;
212 def IIC_SSE_ALU_F64S_RR : InstrItinClass;
213 def IIC_SSE_ALU_F64S_RM : InstrItinClass;
214 def IIC_SSE_MUL_F32S_RR : InstrItinClass;
215 def IIC_SSE_MUL_F32S_RM : InstrItinClass;
216 def IIC_SSE_MUL_F64S_RR : InstrItinClass;
217 def IIC_SSE_MUL_F64S_RM : InstrItinClass;
218 def IIC_SSE_DIV_F32S_RR : InstrItinClass;
219 def IIC_SSE_DIV_F32S_RM : InstrItinClass;
220 def IIC_SSE_DIV_F64S_RR : InstrItinClass;
221 def IIC_SSE_DIV_F64S_RM : InstrItinClass;
222 def IIC_SSE_ALU_F32P_RR : InstrItinClass;
223 def IIC_SSE_ALU_F32P_RM : InstrItinClass;
224 def IIC_SSE_ALU_F64P_RR : InstrItinClass;
225 def IIC_SSE_ALU_F64P_RM : InstrItinClass;
226 def IIC_SSE_MUL_F32P_RR : InstrItinClass;
227 def IIC_SSE_MUL_F32P_RM : InstrItinClass;
228 def IIC_SSE_MUL_F64P_RR : InstrItinClass;
229 def IIC_SSE_MUL_F64P_RM : InstrItinClass;
230 def IIC_SSE_DIV_F32P_RR : InstrItinClass;
231 def IIC_SSE_DIV_F32P_RM : InstrItinClass;
232 def IIC_SSE_DIV_F64P_RR : InstrItinClass;
233 def IIC_SSE_DIV_F64P_RM : InstrItinClass;
234
235 def IIC_SSE_COMIS_RR : InstrItinClass;
236 def IIC_SSE_COMIS_RM : InstrItinClass;
237
238 def IIC_SSE_HADDSUB_RR : InstrItinClass;
239 def IIC_SSE_HADDSUB_RM : InstrItinClass;
240
241 def IIC_SSE_BIT_P_RR  : InstrItinClass;
242 def IIC_SSE_BIT_P_RM  : InstrItinClass;
243
244 def IIC_SSE_INTALU_P_RR  : InstrItinClass;
245 def IIC_SSE_INTALU_P_RM  : InstrItinClass;
246 def IIC_SSE_INTALUQ_P_RR  : InstrItinClass;
247 def IIC_SSE_INTALUQ_P_RM  : InstrItinClass;
248
249 def IIC_SSE_INTMUL_P_RR : InstrItinClass;
250 def IIC_SSE_INTMUL_P_RM : InstrItinClass;
251
252 def IIC_SSE_INTSH_P_RR : InstrItinClass;
253 def IIC_SSE_INTSH_P_RM : InstrItinClass;
254 def IIC_SSE_INTSH_P_RI : InstrItinClass;
255
256 def IIC_SSE_INTSHDQ_P_RI : InstrItinClass;
257
258 def IIC_SSE_SHUFP : InstrItinClass;
259 def IIC_SSE_PSHUF_RI : InstrItinClass;
260 def IIC_SSE_PSHUF_MI : InstrItinClass;
261
262 def IIC_SSE_UNPCK : InstrItinClass;
263
264 def IIC_SSE_MOVMSK : InstrItinClass;
265 def IIC_SSE_MASKMOV : InstrItinClass;
266
267 def IIC_SSE_PEXTRW : InstrItinClass;
268 def IIC_SSE_PINSRW : InstrItinClass;
269
270 def IIC_SSE_PABS_RR : InstrItinClass;
271 def IIC_SSE_PABS_RM : InstrItinClass;
272
273 def IIC_SSE_SQRTPS_RR : InstrItinClass;
274 def IIC_SSE_SQRTPS_RM : InstrItinClass;
275 def IIC_SSE_SQRTSS_RR : InstrItinClass;
276 def IIC_SSE_SQRTSS_RM : InstrItinClass;
277 def IIC_SSE_SQRTPD_RR : InstrItinClass;
278 def IIC_SSE_SQRTPD_RM : InstrItinClass;
279 def IIC_SSE_SQRTSD_RR : InstrItinClass;
280 def IIC_SSE_SQRTSD_RM : InstrItinClass;
281
282 def IIC_SSE_RCPP_RR : InstrItinClass;
283 def IIC_SSE_RCPP_RM : InstrItinClass;
284 def IIC_SSE_RCPS_RR : InstrItinClass;
285 def IIC_SSE_RCPS_RM : InstrItinClass;
286
287 def IIC_SSE_MOV_S_RR : InstrItinClass;
288 def IIC_SSE_MOV_S_RM : InstrItinClass;
289 def IIC_SSE_MOV_S_MR : InstrItinClass;
290
291 def IIC_SSE_MOVA_P_RR : InstrItinClass;
292 def IIC_SSE_MOVA_P_RM : InstrItinClass;
293 def IIC_SSE_MOVA_P_MR : InstrItinClass;
294
295 def IIC_SSE_MOVU_P_RR : InstrItinClass;
296 def IIC_SSE_MOVU_P_RM : InstrItinClass;
297 def IIC_SSE_MOVU_P_MR : InstrItinClass;
298
299 def IIC_SSE_MOVDQ : InstrItinClass;
300 def IIC_SSE_MOVD_ToGP : InstrItinClass;
301 def IIC_SSE_MOVQ_RR : InstrItinClass;
302
303 def IIC_SSE_MOV_LH : InstrItinClass;
304
305 def IIC_SSE_LDDQU : InstrItinClass;
306
307 def IIC_SSE_MOVNT : InstrItinClass;
308
309 def IIC_SSE_PHADDSUBD_RR : InstrItinClass;
310 def IIC_SSE_PHADDSUBD_RM : InstrItinClass;
311 def IIC_SSE_PHADDSUBSW_RR : InstrItinClass;
312 def IIC_SSE_PHADDSUBSW_RM : InstrItinClass;
313 def IIC_SSE_PHADDSUBW_RR : InstrItinClass;
314 def IIC_SSE_PHADDSUBW_RM : InstrItinClass;
315 def IIC_SSE_PSHUFB_RR : InstrItinClass;
316 def IIC_SSE_PSHUFB_RM : InstrItinClass;
317 def IIC_SSE_PSIGN_RR : InstrItinClass;
318 def IIC_SSE_PSIGN_RM : InstrItinClass;
319
320 def IIC_SSE_PMADD : InstrItinClass;
321 def IIC_SSE_PMULHRSW : InstrItinClass;
322 def IIC_SSE_PALIGNRR : InstrItinClass;
323 def IIC_SSE_PALIGNRM : InstrItinClass;
324 def IIC_SSE_MWAIT : InstrItinClass;
325 def IIC_SSE_MONITOR : InstrItinClass;
326
327 def IIC_SSE_PREFETCH : InstrItinClass;
328 def IIC_SSE_PAUSE : InstrItinClass;
329 def IIC_SSE_LFENCE : InstrItinClass;
330 def IIC_SSE_MFENCE : InstrItinClass;
331 def IIC_SSE_SFENCE : InstrItinClass;
332 def IIC_SSE_LDMXCSR : InstrItinClass;
333 def IIC_SSE_STMXCSR : InstrItinClass;
334
335 def IIC_SSE_CVT_PD_RR : InstrItinClass;
336 def IIC_SSE_CVT_PD_RM : InstrItinClass;
337 def IIC_SSE_CVT_PS_RR : InstrItinClass;
338 def IIC_SSE_CVT_PS_RM : InstrItinClass;
339 def IIC_SSE_CVT_PI2PS_RR : InstrItinClass;
340 def IIC_SSE_CVT_PI2PS_RM : InstrItinClass;
341 def IIC_SSE_CVT_Scalar_RR : InstrItinClass;
342 def IIC_SSE_CVT_Scalar_RM : InstrItinClass;
343 def IIC_SSE_CVT_SS2SI32_RM : InstrItinClass;
344 def IIC_SSE_CVT_SS2SI32_RR : InstrItinClass;
345 def IIC_SSE_CVT_SS2SI64_RM : InstrItinClass;
346 def IIC_SSE_CVT_SS2SI64_RR : InstrItinClass;
347 def IIC_SSE_CVT_SD2SI_RM : InstrItinClass;
348 def IIC_SSE_CVT_SD2SI_RR : InstrItinClass;
349
350 // MMX
351 def IIC_MMX_MOV_MM_RM : InstrItinClass;
352 def IIC_MMX_MOV_REG_MM : InstrItinClass;
353 def IIC_MMX_MOVQ_RM : InstrItinClass;
354 def IIC_MMX_MOVQ_RR : InstrItinClass;
355
356 def IIC_MMX_ALU_RM : InstrItinClass;
357 def IIC_MMX_ALU_RR : InstrItinClass;
358 def IIC_MMX_ALUQ_RM : InstrItinClass;
359 def IIC_MMX_ALUQ_RR : InstrItinClass;
360 def IIC_MMX_PHADDSUBW_RM : InstrItinClass;
361 def IIC_MMX_PHADDSUBW_RR : InstrItinClass;
362 def IIC_MMX_PHADDSUBD_RM : InstrItinClass;
363 def IIC_MMX_PHADDSUBD_RR : InstrItinClass;
364 def IIC_MMX_PMUL : InstrItinClass;
365 def IIC_MMX_MISC_FUNC_MEM : InstrItinClass;
366 def IIC_MMX_MISC_FUNC_REG : InstrItinClass;
367 def IIC_MMX_PSADBW : InstrItinClass;
368 def IIC_MMX_SHIFT_RI : InstrItinClass;
369 def IIC_MMX_SHIFT_RM : InstrItinClass;
370 def IIC_MMX_SHIFT_RR : InstrItinClass;
371 def IIC_MMX_UNPCK_H_RM : InstrItinClass;
372 def IIC_MMX_UNPCK_H_RR : InstrItinClass;
373 def IIC_MMX_UNPCK_L : InstrItinClass;
374 def IIC_MMX_PCK_RM : InstrItinClass;
375 def IIC_MMX_PCK_RR : InstrItinClass;
376 def IIC_MMX_PSHUF : InstrItinClass;
377 def IIC_MMX_PEXTR : InstrItinClass;
378 def IIC_MMX_PINSRW : InstrItinClass;
379 def IIC_MMX_MASKMOV : InstrItinClass;
380
381 def IIC_MMX_CVT_PD_RR : InstrItinClass;
382 def IIC_MMX_CVT_PD_RM : InstrItinClass;
383 def IIC_MMX_CVT_PS_RR : InstrItinClass;
384 def IIC_MMX_CVT_PS_RM : InstrItinClass;
385
386 def IIC_CMPX_LOCK : InstrItinClass;
387 def IIC_CMPX_LOCK_8 : InstrItinClass;
388 def IIC_CMPX_LOCK_8B : InstrItinClass;
389 def IIC_CMPX_LOCK_16B : InstrItinClass;
390
391 def IIC_XADD_LOCK_MEM : InstrItinClass;
392 def IIC_XADD_LOCK_MEM8 : InstrItinClass;
393
394 def IIC_FILD : InstrItinClass;
395 def IIC_FLD : InstrItinClass;
396 def IIC_FLD80 : InstrItinClass;
397 def IIC_FST : InstrItinClass;
398 def IIC_FST80 : InstrItinClass;
399 def IIC_FIST : InstrItinClass;
400 def IIC_FLDZ : InstrItinClass;
401 def IIC_FUCOM : InstrItinClass;
402 def IIC_FUCOMI : InstrItinClass;
403 def IIC_FCOMI : InstrItinClass;
404 def IIC_FNSTSW : InstrItinClass;
405 def IIC_FNSTCW : InstrItinClass;
406 def IIC_FLDCW : InstrItinClass;
407 def IIC_FNINIT : InstrItinClass;
408 def IIC_FFREE : InstrItinClass;
409 def IIC_FNCLEX : InstrItinClass;
410 def IIC_WAIT : InstrItinClass;
411 def IIC_FXAM : InstrItinClass;
412 def IIC_FNOP : InstrItinClass;
413 def IIC_FLDL : InstrItinClass;
414 def IIC_F2XM1 : InstrItinClass;
415 def IIC_FYL2X : InstrItinClass;
416 def IIC_FPTAN : InstrItinClass;
417 def IIC_FPATAN : InstrItinClass;
418 def IIC_FXTRACT : InstrItinClass;
419 def IIC_FPREM1 : InstrItinClass;
420 def IIC_FPSTP : InstrItinClass;
421 def IIC_FPREM : InstrItinClass;
422 def IIC_FYL2XP1 : InstrItinClass;
423 def IIC_FSINCOS : InstrItinClass;
424 def IIC_FRNDINT : InstrItinClass;
425 def IIC_FSCALE : InstrItinClass;
426 def IIC_FCOMPP : InstrItinClass;
427 def IIC_FXSAVE : InstrItinClass;
428 def IIC_FXRSTOR : InstrItinClass;
429
430 def IIC_FXCH : InstrItinClass;
431
432 // System instructions
433 def IIC_CPUID : InstrItinClass;
434 def IIC_INT : InstrItinClass;
435 def IIC_INT3 : InstrItinClass;
436 def IIC_INVD : InstrItinClass;
437 def IIC_INVLPG : InstrItinClass;
438 def IIC_IRET : InstrItinClass;
439 def IIC_HLT : InstrItinClass;
440 def IIC_LXS : InstrItinClass;
441 def IIC_LTR : InstrItinClass;
442 def IIC_RDTSC : InstrItinClass;
443 def IIC_RSM : InstrItinClass;
444 def IIC_SIDT : InstrItinClass;
445 def IIC_SGDT : InstrItinClass;
446 def IIC_SLDT : InstrItinClass;
447 def IIC_STR : InstrItinClass;
448 def IIC_SWAPGS : InstrItinClass;
449 def IIC_SYSCALL : InstrItinClass;
450 def IIC_SYS_ENTER_EXIT : InstrItinClass;
451 def IIC_IN_RR : InstrItinClass;
452 def IIC_IN_RI : InstrItinClass;
453 def IIC_OUT_RR : InstrItinClass;
454 def IIC_OUT_IR : InstrItinClass;
455 def IIC_INS : InstrItinClass;
456 def IIC_MOV_REG_DR : InstrItinClass;
457 def IIC_MOV_DR_REG : InstrItinClass;
458 def IIC_MOV_REG_CR : InstrItinClass;
459 def IIC_MOV_CR_REG : InstrItinClass;
460 def IIC_MOV_REG_SR : InstrItinClass;
461 def IIC_MOV_MEM_SR : InstrItinClass;
462 def IIC_MOV_SR_REG : InstrItinClass;
463 def IIC_MOV_SR_MEM : InstrItinClass;
464 def IIC_LAR_RM : InstrItinClass;
465 def IIC_LAR_RR : InstrItinClass;
466 def IIC_LSL_RM : InstrItinClass;
467 def IIC_LSL_RR : InstrItinClass;
468 def IIC_LGDT : InstrItinClass;
469 def IIC_LIDT : InstrItinClass;
470 def IIC_LLDT_REG : InstrItinClass;
471 def IIC_LLDT_MEM : InstrItinClass;
472 def IIC_PUSH_CS : InstrItinClass;
473 def IIC_PUSH_SR : InstrItinClass;
474 def IIC_POP_SR : InstrItinClass;
475 def IIC_POP_SR_SS : InstrItinClass;
476 def IIC_VERR : InstrItinClass;
477 def IIC_VERW_REG : InstrItinClass;
478 def IIC_VERW_MEM : InstrItinClass;
479 def IIC_WRMSR : InstrItinClass;
480 def IIC_RDMSR : InstrItinClass;
481 def IIC_RDPMC : InstrItinClass;
482 def IIC_SMSW : InstrItinClass;
483 def IIC_LMSW_REG : InstrItinClass;
484 def IIC_LMSW_MEM : InstrItinClass;
485 def IIC_ENTER : InstrItinClass;
486 def IIC_LEAVE : InstrItinClass;
487 def IIC_POP_MEM : InstrItinClass;
488 def IIC_POP_REG16 : InstrItinClass;
489 def IIC_POP_REG : InstrItinClass;
490 def IIC_POP_F : InstrItinClass;
491 def IIC_POP_FD : InstrItinClass;
492 def IIC_POP_A : InstrItinClass;
493 def IIC_PUSH_IMM : InstrItinClass;
494 def IIC_PUSH_MEM : InstrItinClass;
495 def IIC_PUSH_REG : InstrItinClass;
496 def IIC_PUSH_F : InstrItinClass;
497 def IIC_PUSH_A : InstrItinClass;
498 def IIC_BSWAP : InstrItinClass;
499 def IIC_BIT_SCAN_MEM : InstrItinClass;
500 def IIC_BIT_SCAN_REG : InstrItinClass;
501 def IIC_MOVS : InstrItinClass;
502 def IIC_STOS : InstrItinClass;
503 def IIC_SCAS : InstrItinClass;
504 def IIC_CMPS : InstrItinClass;
505 def IIC_MOV : InstrItinClass;
506 def IIC_MOV_MEM : InstrItinClass;
507 def IIC_AHF : InstrItinClass;
508 def IIC_BT_MI : InstrItinClass;
509 def IIC_BT_MR : InstrItinClass;
510 def IIC_BT_RI : InstrItinClass;
511 def IIC_BT_RR : InstrItinClass;
512 def IIC_BTX_MI : InstrItinClass;
513 def IIC_BTX_MR : InstrItinClass;
514 def IIC_BTX_RI : InstrItinClass;
515 def IIC_BTX_RR : InstrItinClass;
516 def IIC_XCHG_REG : InstrItinClass;
517 def IIC_XCHG_MEM : InstrItinClass;
518 def IIC_XADD_REG : InstrItinClass;
519 def IIC_XADD_MEM : InstrItinClass;
520 def IIC_CMPXCHG_MEM : InstrItinClass;
521 def IIC_CMPXCHG_REG : InstrItinClass;
522 def IIC_CMPXCHG_MEM8 : InstrItinClass;
523 def IIC_CMPXCHG_REG8 : InstrItinClass;
524 def IIC_CMPXCHG_8B : InstrItinClass;
525 def IIC_CMPXCHG_16B : InstrItinClass;
526 def IIC_LODS : InstrItinClass;
527 def IIC_OUTS : InstrItinClass;
528 def IIC_CLC : InstrItinClass;
529 def IIC_CLD : InstrItinClass;
530 def IIC_CLI : InstrItinClass;
531 def IIC_CMC : InstrItinClass;
532 def IIC_CLTS : InstrItinClass;
533 def IIC_STC : InstrItinClass;
534 def IIC_STI : InstrItinClass;
535 def IIC_STD : InstrItinClass;
536 def IIC_XLAT : InstrItinClass;
537 def IIC_AAA : InstrItinClass;
538 def IIC_AAD : InstrItinClass;
539 def IIC_AAM : InstrItinClass;
540 def IIC_AAS : InstrItinClass;
541 def IIC_DAA : InstrItinClass;
542 def IIC_DAS : InstrItinClass;
543 def IIC_BOUND : InstrItinClass;
544 def IIC_ARPL_REG : InstrItinClass;
545 def IIC_ARPL_MEM : InstrItinClass;
546 def IIC_MOVBE : InstrItinClass;
547 def IIC_AES   : InstrItinClass;
548 def IIC_BLEND_MEM : InstrItinClass;
549 def IIC_BLEND_NOMEM : InstrItinClass;
550 def IIC_CBW   : InstrItinClass;
551 def IIC_CRC32_REG : InstrItinClass;
552 def IIC_CRC32_MEM : InstrItinClass;
553 def IIC_SSE_DPPD_RR : InstrItinClass;
554 def IIC_SSE_DPPD_RM : InstrItinClass;
555 def IIC_SSE_DPPS_RR : InstrItinClass;
556 def IIC_SSE_DPPS_RM : InstrItinClass;
557 def IIC_MMX_EMMS : InstrItinClass;
558 def IIC_SSE_EXTRACTPS_RR : InstrItinClass;
559 def IIC_SSE_EXTRACTPS_RM : InstrItinClass;
560 def IIC_SSE_INSERTPS_RR : InstrItinClass;
561 def IIC_SSE_INSERTPS_RM : InstrItinClass;
562 def IIC_SSE_MPSADBW_RR : InstrItinClass;
563 def IIC_SSE_MPSADBW_RM : InstrItinClass;
564 def IIC_SSE_PMULLD_RR : InstrItinClass;
565 def IIC_SSE_PMULLD_RM : InstrItinClass;
566 def IIC_SSE_ROUNDPS_REG : InstrItinClass;
567 def IIC_SSE_ROUNDPS_MEM : InstrItinClass;
568 def IIC_SSE_ROUNDPD_REG : InstrItinClass;
569 def IIC_SSE_ROUNDPD_MEM : InstrItinClass;
570 def IIC_SSE_POPCNT_RR : InstrItinClass;
571 def IIC_SSE_POPCNT_RM : InstrItinClass;
572 def IIC_SSE_PCLMULQDQ_RR : InstrItinClass;
573 def IIC_SSE_PCLMULQDQ_RM : InstrItinClass;
574
575 def IIC_NOP : InstrItinClass;
576
577 //===----------------------------------------------------------------------===//
578 // Processor instruction itineraries.
579
580 // IssueWidth is analagous to the number of decode units. Core and its
581 // descendents, including Nehalem and SandyBridge have 4 decoders.
582 // Resources beyond the decoder operate on micro-ops and are bufferred
583 // so adjacent micro-ops don't directly compete.
584 //
585 // MicroOpBufferSize > 1 indicates that RAW dependencies can be
586 // decoded in the same cycle. The value 32 is a reasonably arbitrary
587 // number of in-flight instructions.
588 //
589 // HighLatency=10 is optimistic. X86InstrInfo::isHighLatencyDef
590 // indicates high latency opcodes. Alternatively, InstrItinData
591 // entries may be included here to define specific operand
592 // latencies. Since these latencies are not used for pipeline hazards,
593 // they do not need to be exact.
594 //
595 // The GenericModel contains no instruction itineraries.
596 def GenericModel : SchedMachineModel {
597   let IssueWidth = 4;
598   let MicroOpBufferSize = 32;
599   let LoadLatency = 4;
600   let HighLatency = 10;
601 }
602
603 include "X86ScheduleAtom.td"
604 include "X86SchedSandyBridge.td"
605 include "X86SchedHaswell.td"
606 include "X86ScheduleSLM.td"