blob: e8a8a7a59525d8be0cbd3579eb3a8a573651a468 [file] [log] [blame]
Scott Michel564427e2007-12-05 01:24:05 +00001//===- SPUSchedule.td - Cell Scheduling Definitions --------*- tablegen -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by a team from the Computer Systems Research
Scott Michel2466c372007-12-05 01:40:25 +00006// Department at The Aerospace Corporation and is distributed under the
7// University of Illinois Open Source License. See LICENSE.TXT for details.
Scott Michel564427e2007-12-05 01:24:05 +00008//
9//===----------------------------------------------------------------------===//
10
11//===----------------------------------------------------------------------===//
12// Even pipeline:
13
14def EVEN_UNIT : FuncUnit; // Even execution unit: (PC & 0x7 == 000)
15def ODD_UNIT : FuncUnit; // Odd execution unit: (PC & 0x7 == 100)
16
17//===----------------------------------------------------------------------===//
18// Instruction Itinerary classes used for Cell SPU
19//===----------------------------------------------------------------------===//
20
21def LoadStore : InstrItinClass; // ODD_UNIT
22def BranchHints : InstrItinClass; // ODD_UNIT
23def BranchResolv : InstrItinClass; // ODD_UNIT
24def ChanOpSPR : InstrItinClass; // ODD_UNIT
25def ShuffleOp : InstrItinClass; // ODD_UNIT
26def SelectOp : InstrItinClass; // ODD_UNIT
27def GatherOp : InstrItinClass; // ODD_UNIT
28def LoadNOP : InstrItinClass; // ODD_UNIT
29def ExecNOP : InstrItinClass; // EVEN_UNIT
30def SPrecFP : InstrItinClass; // EVEN_UNIT
31def DPrecFP : InstrItinClass; // EVEN_UNIT
32def FPInt : InstrItinClass; // EVEN_UNIT (FP<->integer)
33def ByteOp : InstrItinClass; // EVEN_UNIT
34def IntegerOp : InstrItinClass; // EVEN_UNIT
35def IntegerMulDiv: InstrItinClass; // EVEN_UNIT
36def RotateShift : InstrItinClass; // EVEN_UNIT
37def ImmLoad : InstrItinClass; // EVEN_UNIT
38
39/* Note: The itinerary for the Cell SPU is somewhat contrived... */
40def SPUItineraries : ProcessorItineraries<[
41 InstrItinData<LoadStore , [InstrStage<6, [ODD_UNIT]>]>,
42 InstrItinData<BranchHints , [InstrStage<6, [ODD_UNIT]>]>,
43 InstrItinData<BranchResolv, [InstrStage<4, [ODD_UNIT]>]>,
44 InstrItinData<ChanOpSPR , [InstrStage<6, [ODD_UNIT]>]>,
45 InstrItinData<ShuffleOp , [InstrStage<4, [ODD_UNIT]>]>,
46 InstrItinData<SelectOp , [InstrStage<4, [ODD_UNIT]>]>,
47 InstrItinData<GatherOp , [InstrStage<4, [ODD_UNIT]>]>,
48 InstrItinData<LoadNOP , [InstrStage<1, [ODD_UNIT]>]>,
49 InstrItinData<ExecNOP , [InstrStage<1, [EVEN_UNIT]>]>,
50 InstrItinData<SPrecFP , [InstrStage<6, [EVEN_UNIT]>]>,
51 InstrItinData<DPrecFP , [InstrStage<13, [EVEN_UNIT]>]>,
52 InstrItinData<FPInt , [InstrStage<2, [EVEN_UNIT]>]>,
53 InstrItinData<ByteOp , [InstrStage<4, [EVEN_UNIT]>]>,
54 InstrItinData<IntegerOp , [InstrStage<2, [EVEN_UNIT]>]>,
55 InstrItinData<RotateShift , [InstrStage<4, [EVEN_UNIT]>]>,
56 InstrItinData<IntegerMulDiv,[InstrStage<7, [EVEN_UNIT]>]>,
57 InstrItinData<ImmLoad , [InstrStage<2, [EVEN_UNIT]>]>
58 ]>;