[mips] Add new InstrItinClasses for move from/to coprocessor instructions and
[oota-llvm.git] / lib / Target / Mips / MipsSchedule.td
1 //===-- MipsSchedule.td - Mips 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 //===----------------------------------------------------------------------===//
11 // Functional units across Mips chips sets. Based on GCC/Mips backend files.
12 //===----------------------------------------------------------------------===//
13 def ALU     : FuncUnit;
14 def IMULDIV : FuncUnit;
15
16 //===----------------------------------------------------------------------===//
17 // Instruction Itinerary classes used for Mips
18 //===----------------------------------------------------------------------===//
19 def IIAlu              : InstrItinClass;
20 def IILoad             : InstrItinClass;
21 def IIStore            : InstrItinClass;
22 def IIXfer             : InstrItinClass;
23 def IIBranch           : InstrItinClass;
24 def IIHiLo             : InstrItinClass;
25 def IIImul             : InstrItinClass;
26 def IIIdiv             : InstrItinClass;
27 def IIFcvt             : InstrItinClass;
28 def IIFmove            : InstrItinClass;
29 def IIFcmp             : InstrItinClass;
30 def IIFadd             : InstrItinClass;
31 def IIFmulSingle       : InstrItinClass;
32 def IIFmulDouble       : InstrItinClass;
33 def IIFdivSingle       : InstrItinClass;
34 def IIFdivDouble       : InstrItinClass;
35 def IIFsqrtSingle      : InstrItinClass;
36 def IIFsqrtDouble      : InstrItinClass;
37 def IIFrecipFsqrtStep  : InstrItinClass;
38 def IIFLoad            : InstrItinClass;
39 def IIFStore           : InstrItinClass;
40 def IIFmoveC1          : InstrItinClass;
41 def IIPseudo           : InstrItinClass;
42
43 //===----------------------------------------------------------------------===//
44 // Mips Generic instruction itineraries.
45 //===----------------------------------------------------------------------===//
46 def MipsGenericItineraries : ProcessorItineraries<[ALU, IMULDIV], [], [
47   InstrItinData<IIAlu              , [InstrStage<1,  [ALU]>]>,
48   InstrItinData<IILoad             , [InstrStage<3,  [ALU]>]>,
49   InstrItinData<IIStore            , [InstrStage<1,  [ALU]>]>,
50   InstrItinData<IIXfer             , [InstrStage<2,  [ALU]>]>,
51   InstrItinData<IIBranch           , [InstrStage<1,  [ALU]>]>,
52   InstrItinData<IIHiLo             , [InstrStage<1,  [IMULDIV]>]>,
53   InstrItinData<IIImul             , [InstrStage<17, [IMULDIV]>]>,
54   InstrItinData<IIIdiv             , [InstrStage<38, [IMULDIV]>]>,
55   InstrItinData<IIFcvt             , [InstrStage<1,  [ALU]>]>,
56   InstrItinData<IIFmove            , [InstrStage<2,  [ALU]>]>,
57   InstrItinData<IIFcmp             , [InstrStage<3,  [ALU]>]>,
58   InstrItinData<IIFadd             , [InstrStage<4,  [ALU]>]>,
59   InstrItinData<IIFmulSingle       , [InstrStage<7,  [ALU]>]>,
60   InstrItinData<IIFmulDouble       , [InstrStage<8,  [ALU]>]>,
61   InstrItinData<IIFdivSingle       , [InstrStage<23, [ALU]>]>,
62   InstrItinData<IIFdivDouble       , [InstrStage<36, [ALU]>]>,
63   InstrItinData<IIFsqrtSingle      , [InstrStage<54, [ALU]>]>,
64   InstrItinData<IIFsqrtDouble      , [InstrStage<12, [ALU]>]>,
65   InstrItinData<IIFrecipFsqrtStep  , [InstrStage<5,  [ALU]>]>,
66   InstrItinData<IIFLoad            , [InstrStage<3,  [ALU]>]>,
67   InstrItinData<IIFStore           , [InstrStage<1,  [ALU]>]>,
68   InstrItinData<IIFmoveC1          , [InstrStage<2,  [ALU]>]>
69 ]>;