blob: 0048e25e2f3d3f7d6e297843abfd66030cf463d8 [file] [log] [blame]
Tom Stellard75aadc22012-12-11 21:25:42 +00001//===-- AMDIL.td - AMDIL Tablegen files --*- 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// Include AMDIL TD files
11include "AMDILBase.td"
12
Tom Stellard99792772013-06-07 20:28:49 +000013//===----------------------------------------------------------------------===//
14// Subtarget Features
15//===----------------------------------------------------------------------===//
16
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000017// Debugging Features
18
19def FeatureDumpCode : SubtargetFeature <"DumpCode",
20 "DumpCode",
21 "true",
22 "Dump MachineInstrs in the CodeEmitter">;
23
24// Target features
25
Tom Stellard99792772013-06-07 20:28:49 +000026def FeatureFP64 : SubtargetFeature<"fp64",
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000027 "FP64",
Tom Stellard99792772013-06-07 20:28:49 +000028 "true",
29 "Enable 64bit double precision operations">;
Tom Stellard99792772013-06-07 20:28:49 +000030
31def Feature64BitPtr : SubtargetFeature<"64BitPtr",
32 "Is64bit",
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000033 "true",
Tom Stellard99792772013-06-07 20:28:49 +000034 "Specify if 64bit addressing should be used.">;
35
36def Feature32on64BitPtr : SubtargetFeature<"64on32BitPtr",
37 "Is32on64bit",
38 "false",
39 "Specify if 64bit sized pointers with 32bit addressing should be used.">;
Tom Stellard99792772013-06-07 20:28:49 +000040
41def FeatureR600ALUInst : SubtargetFeature<"R600ALUInst",
42 "R600ALUInst",
43 "false",
44 "Older version of ALU instructions encoding.">;
45
46def FeatureVertexCache : SubtargetFeature<"HasVertexCache",
47 "HasVertexCache",
48 "true",
49 "Specify use of dedicated vertex cache.">;
50
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000051def FeatureCaymanISA : SubtargetFeature<"caymanISA",
52 "CaymanISA",
53 "true",
54 "Use Cayman ISA">;
55
Tom Stellard3498e4f2013-06-07 20:28:55 +000056class SubtargetFeatureFetchLimit <string Value> :
57 SubtargetFeature <"fetch"#Value,
58 "TexVTXClauseSize",
59 Value,
60 "Limit the maximum number of fetches in a clause to "#Value>;
Tom Stellard99792772013-06-07 20:28:49 +000061
Tom Stellard3498e4f2013-06-07 20:28:55 +000062def FeatureFetchLimit8 : SubtargetFeatureFetchLimit <"8">;
63def FeatureFetchLimit16 : SubtargetFeatureFetchLimit <"16">;
64
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000065class SubtargetFeatureGeneration <string Value,
66 list<SubtargetFeature> Implies> :
67 SubtargetFeature <Value, "Gen", "AMDGPUSubtarget::"#Value,
68 Value#" GPU generation", Implies>;
69
70def FeatureR600 : SubtargetFeatureGeneration<"R600",
71 [FeatureR600ALUInst, FeatureFetchLimit8]>;
72
73def FeatureR700 : SubtargetFeatureGeneration<"R700",
74 [FeatureFetchLimit16]>;
75
76def FeatureEvergreen : SubtargetFeatureGeneration<"EVERGREEN",
77 [FeatureFetchLimit16]>;
78
79def FeatureNorthernIslands : SubtargetFeatureGeneration<"NORTHERN_ISLANDS",
80 [FeatureFetchLimit16]>;
81
82def FeatureSouthernIslands : SubtargetFeatureGeneration<"SOUTHERN_ISLANDS",
83 [Feature64BitPtr, FeatureFP64]>;
84
Tom Stellard3498e4f2013-06-07 20:28:55 +000085//===----------------------------------------------------------------------===//
Tom Stellard75aadc22012-12-11 21:25:42 +000086
87def AMDGPUInstrInfo : InstrInfo {
88 let guessInstructionProperties = 1;
89}
90
91//===----------------------------------------------------------------------===//
92// Declare the target which we are implementing
93//===----------------------------------------------------------------------===//
94def AMDGPUAsmWriter : AsmWriter {
95 string AsmWriterClassName = "InstPrinter";
96 int Variant = 0;
97 bit isMCAsmWriter = 1;
98}
99
100def AMDGPU : Target {
101 // Pull in Instruction Info:
102 let InstructionSet = AMDGPUInstrInfo;
103 let AssemblyWriters = [AMDGPUAsmWriter];
104}
105
106// Include AMDGPU TD files
107include "R600Schedule.td"
108include "SISchedule.td"
109include "Processors.td"
110include "AMDGPUInstrInfo.td"
111include "AMDGPUIntrinsics.td"
112include "AMDGPURegisterInfo.td"
113include "AMDGPUInstructions.td"
Christian Konig2c8f6d52013-03-07 09:03:52 +0000114include "AMDGPUCallingConv.td"