xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/R600Processors.td (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
10b57cec5SDimitry Andric//===-- R600Processors.td - R600 Processor definitions --------------------===//
20b57cec5SDimitry Andric//
30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric//
70b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric
90b57cec5SDimitry Andricclass SubtargetFeatureFetchLimit <string Value> :
100b57cec5SDimitry Andric                          SubtargetFeature <"fetch"#Value,
110b57cec5SDimitry Andric  "TexVTXClauseSize",
120b57cec5SDimitry Andric  Value,
130b57cec5SDimitry Andric  "Limit the maximum number of fetches in a clause to "#Value
140b57cec5SDimitry Andric>;
150b57cec5SDimitry Andric
160b57cec5SDimitry Andricdef FeatureR600ALUInst : SubtargetFeature<"R600ALUInst",
170b57cec5SDimitry Andric  "R600ALUInst",
180b57cec5SDimitry Andric  "false",
190b57cec5SDimitry Andric  "Older version of ALU instructions encoding"
200b57cec5SDimitry Andric>;
210b57cec5SDimitry Andric
220b57cec5SDimitry Andricdef FeatureFetchLimit8 : SubtargetFeatureFetchLimit <"8">;
230b57cec5SDimitry Andricdef FeatureFetchLimit16 : SubtargetFeatureFetchLimit <"16">;
240b57cec5SDimitry Andric
250b57cec5SDimitry Andricdef FeatureVertexCache : SubtargetFeature<"HasVertexCache",
260b57cec5SDimitry Andric  "HasVertexCache",
270b57cec5SDimitry Andric  "true",
280b57cec5SDimitry Andric  "Specify use of dedicated vertex cache"
290b57cec5SDimitry Andric>;
300b57cec5SDimitry Andric
310b57cec5SDimitry Andricdef FeatureCaymanISA : SubtargetFeature<"caymanISA",
320b57cec5SDimitry Andric  "CaymanISA",
330b57cec5SDimitry Andric  "true",
340b57cec5SDimitry Andric  "Use Cayman ISA"
350b57cec5SDimitry Andric>;
360b57cec5SDimitry Andric
370b57cec5SDimitry Andricdef FeatureCFALUBug : SubtargetFeature<"cfalubug",
380b57cec5SDimitry Andric  "CFALUBug",
390b57cec5SDimitry Andric  "true",
400b57cec5SDimitry Andric  "GPU has CF_ALU bug"
410b57cec5SDimitry Andric>;
420b57cec5SDimitry Andric
430b57cec5SDimitry Andricclass R600SubtargetFeatureGeneration <string Value, string FeatureName,
440b57cec5SDimitry Andric                                  list<SubtargetFeature> Implies> :
450b57cec5SDimitry Andric        SubtargetFeatureGeneration <Value, FeatureName, "R600Subtarget", Implies>;
460b57cec5SDimitry Andric
470b57cec5SDimitry Andricdef FeatureR600 : R600SubtargetFeatureGeneration<"R600", "r600",
48*349cc55cSDimitry Andric  [FeatureR600ALUInst, FeatureFetchLimit8]
490b57cec5SDimitry Andric>;
500b57cec5SDimitry Andric
510b57cec5SDimitry Andricdef FeatureR700 : R600SubtargetFeatureGeneration<"R700", "r700",
52*349cc55cSDimitry Andric  [FeatureFetchLimit16]
530b57cec5SDimitry Andric>;
540b57cec5SDimitry Andric
550b57cec5SDimitry Andricdef FeatureEvergreen : R600SubtargetFeatureGeneration<"EVERGREEN", "evergreen",
560b57cec5SDimitry Andric  [FeatureFetchLimit16, FeatureLocalMemorySize32768]
570b57cec5SDimitry Andric>;
580b57cec5SDimitry Andric
590b57cec5SDimitry Andricdef FeatureNorthernIslands : R600SubtargetFeatureGeneration<"NORTHERN_ISLANDS",
600b57cec5SDimitry Andric  "northern-islands",
610b57cec5SDimitry Andric  [FeatureFetchLimit16, FeatureWavefrontSize64,
620b57cec5SDimitry Andric   FeatureLocalMemorySize32768]
630b57cec5SDimitry Andric>;
640b57cec5SDimitry Andric
650b57cec5SDimitry Andric
660b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
670b57cec5SDimitry Andric// Radeon HD 2000/3000 Series (R600).
680b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
690b57cec5SDimitry Andric
700b57cec5SDimitry Andricdef : Processor<"r600", R600_VLIW5_Itin,
710b57cec5SDimitry Andric  [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache]
720b57cec5SDimitry Andric>;
730b57cec5SDimitry Andric
740b57cec5SDimitry Andricdef : Processor<"r630", R600_VLIW5_Itin,
750b57cec5SDimitry Andric  [FeatureR600, FeatureWavefrontSize32, FeatureVertexCache]
760b57cec5SDimitry Andric>;
770b57cec5SDimitry Andric
780b57cec5SDimitry Andricdef : Processor<"rs880", R600_VLIW5_Itin,
790b57cec5SDimitry Andric  [FeatureR600, FeatureWavefrontSize16]
800b57cec5SDimitry Andric>;
810b57cec5SDimitry Andric
820b57cec5SDimitry Andricdef : Processor<"rv670", R600_VLIW5_Itin,
830b57cec5SDimitry Andric  [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache]
840b57cec5SDimitry Andric>;
850b57cec5SDimitry Andric
860b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
870b57cec5SDimitry Andric// Radeon HD 4000 Series (R700).
880b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
890b57cec5SDimitry Andric
900b57cec5SDimitry Andricdef : Processor<"rv710", R600_VLIW5_Itin,
910b57cec5SDimitry Andric  [FeatureR700, FeatureWavefrontSize32, FeatureVertexCache]
920b57cec5SDimitry Andric>;
930b57cec5SDimitry Andric
940b57cec5SDimitry Andricdef : Processor<"rv730", R600_VLIW5_Itin,
950b57cec5SDimitry Andric  [FeatureR700, FeatureWavefrontSize32, FeatureVertexCache]
960b57cec5SDimitry Andric>;
970b57cec5SDimitry Andric
980b57cec5SDimitry Andricdef : Processor<"rv770", R600_VLIW5_Itin,
990b57cec5SDimitry Andric  [FeatureR700, FeatureWavefrontSize64, FeatureVertexCache]
1000b57cec5SDimitry Andric>;
1010b57cec5SDimitry Andric
1020b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
1030b57cec5SDimitry Andric// Radeon HD 5000 Series (Evergreen).
1040b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
1050b57cec5SDimitry Andric
1060b57cec5SDimitry Andricdef : Processor<"cedar", R600_VLIW5_Itin,
1070b57cec5SDimitry Andric  [FeatureEvergreen, FeatureWavefrontSize32, FeatureVertexCache,
1080b57cec5SDimitry Andric   FeatureCFALUBug]
1090b57cec5SDimitry Andric>;
1100b57cec5SDimitry Andric
1110b57cec5SDimitry Andricdef : Processor<"cypress", R600_VLIW5_Itin,
1120b57cec5SDimitry Andric  [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache, FeatureFMA]
1130b57cec5SDimitry Andric>;
1140b57cec5SDimitry Andric
1150b57cec5SDimitry Andricdef : Processor<"juniper", R600_VLIW5_Itin,
1160b57cec5SDimitry Andric  [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache]
1170b57cec5SDimitry Andric>;
1180b57cec5SDimitry Andric
1190b57cec5SDimitry Andricdef : Processor<"redwood", R600_VLIW5_Itin,
1200b57cec5SDimitry Andric  [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache,
1210b57cec5SDimitry Andric   FeatureCFALUBug]
1220b57cec5SDimitry Andric>;
1230b57cec5SDimitry Andric
1240b57cec5SDimitry Andricdef : Processor<"sumo", R600_VLIW5_Itin,
1250b57cec5SDimitry Andric  [FeatureEvergreen, FeatureWavefrontSize64, FeatureCFALUBug]
1260b57cec5SDimitry Andric>;
1270b57cec5SDimitry Andric
1280b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
1290b57cec5SDimitry Andric// Radeon HD 6000 Series (Northern Islands).
1300b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
1310b57cec5SDimitry Andric
1320b57cec5SDimitry Andricdef : Processor<"barts", R600_VLIW5_Itin,
1330b57cec5SDimitry Andric  [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug]
1340b57cec5SDimitry Andric>;
1350b57cec5SDimitry Andric
1360b57cec5SDimitry Andricdef : Processor<"caicos", R600_VLIW5_Itin,
1370b57cec5SDimitry Andric  [FeatureNorthernIslands, FeatureCFALUBug]
1380b57cec5SDimitry Andric>;
1390b57cec5SDimitry Andric
1400b57cec5SDimitry Andricdef : Processor<"cayman", R600_VLIW4_Itin,
1410b57cec5SDimitry Andric  [FeatureNorthernIslands, FeatureCaymanISA, FeatureFMA]
1420b57cec5SDimitry Andric>;
1430b57cec5SDimitry Andric
1440b57cec5SDimitry Andricdef : Processor<"turks", R600_VLIW5_Itin,
1450b57cec5SDimitry Andric  [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug]
1460b57cec5SDimitry Andric>;
147