blob: a722f555b85d3622674f184d049d428cba5ea62a [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
Tom Stellarded0ceec2013-10-10 17:11:12 +000024def FeatureIRStructurizer : SubtargetFeature <"EnableIRStructurizer",
25 "EnableIRStructurizer",
26 "true",
27 "Enable IR Structurizer">;
28
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000029// Target features
30
Tom Stellard99792772013-06-07 20:28:49 +000031def FeatureFP64 : SubtargetFeature<"fp64",
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000032 "FP64",
Tom Stellard99792772013-06-07 20:28:49 +000033 "true",
34 "Enable 64bit double precision operations">;
Tom Stellard99792772013-06-07 20:28:49 +000035
36def Feature64BitPtr : SubtargetFeature<"64BitPtr",
37 "Is64bit",
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000038 "true",
Tom Stellard99792772013-06-07 20:28:49 +000039 "Specify if 64bit addressing should be used.">;
40
41def Feature32on64BitPtr : SubtargetFeature<"64on32BitPtr",
42 "Is32on64bit",
43 "false",
44 "Specify if 64bit sized pointers with 32bit addressing should be used.">;
Tom Stellard99792772013-06-07 20:28:49 +000045
46def FeatureR600ALUInst : SubtargetFeature<"R600ALUInst",
47 "R600ALUInst",
48 "false",
49 "Older version of ALU instructions encoding.">;
50
51def FeatureVertexCache : SubtargetFeature<"HasVertexCache",
52 "HasVertexCache",
53 "true",
54 "Specify use of dedicated vertex cache.">;
55
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000056def FeatureCaymanISA : SubtargetFeature<"caymanISA",
57 "CaymanISA",
58 "true",
59 "Use Cayman ISA">;
60
Tom Stellard3498e4f2013-06-07 20:28:55 +000061class SubtargetFeatureFetchLimit <string Value> :
62 SubtargetFeature <"fetch"#Value,
63 "TexVTXClauseSize",
64 Value,
65 "Limit the maximum number of fetches in a clause to "#Value>;
Tom Stellard99792772013-06-07 20:28:49 +000066
Tom Stellard3498e4f2013-06-07 20:28:55 +000067def FeatureFetchLimit8 : SubtargetFeatureFetchLimit <"8">;
68def FeatureFetchLimit16 : SubtargetFeatureFetchLimit <"16">;
69
Tom Stellarda6c6e1b2013-06-07 20:37:48 +000070class SubtargetFeatureGeneration <string Value,
71 list<SubtargetFeature> Implies> :
72 SubtargetFeature <Value, "Gen", "AMDGPUSubtarget::"#Value,
73 Value#" GPU generation", Implies>;
74
75def FeatureR600 : SubtargetFeatureGeneration<"R600",
76 [FeatureR600ALUInst, FeatureFetchLimit8]>;
77
78def FeatureR700 : SubtargetFeatureGeneration<"R700",
79 [FeatureFetchLimit16]>;
80
81def FeatureEvergreen : SubtargetFeatureGeneration<"EVERGREEN",
82 [FeatureFetchLimit16]>;
83
84def FeatureNorthernIslands : SubtargetFeatureGeneration<"NORTHERN_ISLANDS",
85 [FeatureFetchLimit16]>;
86
87def FeatureSouthernIslands : SubtargetFeatureGeneration<"SOUTHERN_ISLANDS",
88 [Feature64BitPtr, FeatureFP64]>;
89
Tom Stellard3498e4f2013-06-07 20:28:55 +000090//===----------------------------------------------------------------------===//
Tom Stellard75aadc22012-12-11 21:25:42 +000091
92def AMDGPUInstrInfo : InstrInfo {
93 let guessInstructionProperties = 1;
94}
95
96//===----------------------------------------------------------------------===//
97// Declare the target which we are implementing
98//===----------------------------------------------------------------------===//
99def AMDGPUAsmWriter : AsmWriter {
100 string AsmWriterClassName = "InstPrinter";
101 int Variant = 0;
102 bit isMCAsmWriter = 1;
103}
104
105def AMDGPU : Target {
106 // Pull in Instruction Info:
107 let InstructionSet = AMDGPUInstrInfo;
108 let AssemblyWriters = [AMDGPUAsmWriter];
109}
110
111// Include AMDGPU TD files
112include "R600Schedule.td"
113include "SISchedule.td"
114include "Processors.td"
115include "AMDGPUInstrInfo.td"
116include "AMDGPUIntrinsics.td"
117include "AMDGPURegisterInfo.td"
118include "AMDGPUInstructions.td"
Christian Konig2c8f6d52013-03-07 09:03:52 +0000119include "AMDGPUCallingConv.td"