authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-27 01:54:07-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-27 01:54:07-07:00
log02bda72d918f9020887b0bafe439d0d4024b8e02
tree9f736c9120ed58e8cc8e92303f7d1ba1034ad687
parenta9f19221e99d9470d936f63ecfa20c735e175a2c

update amdgpu target CPU features


2 files changed, 39 insertions(+), 89 deletions(-)

lib/std/target/amdgpu.zig+29-89
......@@ -1,8 +1,5 @@
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2015-2021 Zig Contributors
3// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
4// The MIT license requires this copyright notice to be included in all copies
5// and substantial portions of the software.
1//! This file is auto-generated by tools/update_cpu_features.zig.
2
63const std = @import("../std.zig");
74const CpuFeature = std.Target.Cpu.Feature;
85const CpuModel = std.Target.Cpu.Model;
......@@ -26,7 +23,6 @@ pub const Feature = enum {
2623 dpp,
2724 dpp8,
2825 ds_src2_insts,
29 dump_code,
3026 enable_ds128,
3127 enable_prt_strict_null,
3228 fast_denormal_f32,
......@@ -76,8 +72,6 @@ pub const Feature = enum {
7672 movrel,
7773 no_data_dep_hazard,
7874 no_sdst_cmpx,
79 no_sram_ecc_support,
80 no_xnack_support,
8175 nsa_encoding,
8276 nsa_to_vmem_bug,
8377 offset_3f_bug,
......@@ -101,7 +95,8 @@ pub const Feature = enum {
10195 si_scheduler,
10296 smem_to_vector_write_hazard,
10397 southern_islands,
104 sram_ecc,
98 sramecc,
99 sramecc_support,
105100 trap_handler,
106101 trig_reduced_range,
107102 unaligned_access_mode,
......@@ -122,6 +117,7 @@ pub const Feature = enum {
122117 wavefrontsize32,
123118 wavefrontsize64,
124119 xnack,
120 xnack_support,
125121};
126122
127123pub usingnamespace CpuFeature.feature_set_fns(Feature);
......@@ -222,14 +218,9 @@ pub const all_features = blk: {
222218 .description = "Has ds_*_src2 instructions",
223219 .dependencies = featureSet(&[_]Feature{}),
224220 };
225 result[@enumToInt(Feature.dump_code)] = .{
226 .llvm_name = "dumpcode",
227 .description = "Dump MachineInstrs in the CodeEmitter",
228 .dependencies = featureSet(&[_]Feature{}),
229 };
230221 result[@enumToInt(Feature.enable_ds128)] = .{
231222 .llvm_name = "enable-ds128",
232 .description = "Use ds_read|write_b128",
223 .description = "Use ds_{read|write}_b128",
233224 .dependencies = featureSet(&[_]Feature{}),
234225 };
235226 result[@enumToInt(Feature.enable_prt_strict_null)] = .{
......@@ -337,7 +328,6 @@ pub const all_features = blk: {
337328 .movrel,
338329 .no_data_dep_hazard,
339330 .no_sdst_cmpx,
340 .no_sram_ecc_support,
341331 .pk_fmac_f16_inst,
342332 .register_banking,
343333 .s_memrealtime,
......@@ -417,6 +407,7 @@ pub const all_features = blk: {
417407 .vgpr_index_mode,
418408 .vop3p,
419409 .wavefrontsize64,
410 .xnack_support,
420411 }),
421412 };
422413 result[@enumToInt(Feature.gfx9_insts)] = .{
......@@ -549,16 +540,6 @@ pub const all_features = blk: {
549540 .description = "V_CMPX does not write VCC/SGPR in addition to EXEC",
550541 .dependencies = featureSet(&[_]Feature{}),
551542 };
552 result[@enumToInt(Feature.no_sram_ecc_support)] = .{
553 .llvm_name = "no-sram-ecc-support",
554 .description = "Hardware does not support SRAM ECC",
555 .dependencies = featureSet(&[_]Feature{}),
556 };
557 result[@enumToInt(Feature.no_xnack_support)] = .{
558 .llvm_name = "no-xnack-support",
559 .description = "Hardware does not support XNACK",
560 .dependencies = featureSet(&[_]Feature{}),
561 };
562543 result[@enumToInt(Feature.nsa_encoding)] = .{
563544 .llvm_name = "nsa-encoding",
564545 .description = "Support NSA encoding for image instructions",
......@@ -662,7 +643,6 @@ pub const all_features = blk: {
662643 .mad_mac_f32_insts,
663644 .mimg_r128,
664645 .movrel,
665 .no_sram_ecc_support,
666646 .s_memtime_inst,
667647 .trig_reduced_range,
668648 .unaligned_buffer_access,
......@@ -695,16 +675,19 @@ pub const all_features = blk: {
695675 .mad_mac_f32_insts,
696676 .mimg_r128,
697677 .movrel,
698 .no_sram_ecc_support,
699 .no_xnack_support,
700678 .s_memtime_inst,
701679 .trig_reduced_range,
702680 .wavefrontsize64,
703681 }),
704682 };
705 result[@enumToInt(Feature.sram_ecc)] = .{
706 .llvm_name = "sram-ecc",
707 .description = "Enable SRAM ECC",
683 result[@enumToInt(Feature.sramecc)] = .{
684 .llvm_name = "sramecc",
685 .description = "Enable SRAMECC",
686 .dependencies = featureSet(&[_]Feature{}),
687 };
688 result[@enumToInt(Feature.sramecc_support)] = .{
689 .llvm_name = "sramecc-support",
690 .description = "Hardware supports SRAMECC",
708691 .dependencies = featureSet(&[_]Feature{}),
709692 };
710693 result[@enumToInt(Feature.trap_handler)] = .{
......@@ -787,7 +770,6 @@ pub const all_features = blk: {
787770 .mad_mac_f32_insts,
788771 .mimg_r128,
789772 .movrel,
790 .no_sram_ecc_support,
791773 .s_memrealtime,
792774 .s_memtime_inst,
793775 .scalar_stores,
......@@ -835,6 +817,11 @@ pub const all_features = blk: {
835817 .description = "Enable XNACK support",
836818 .dependencies = featureSet(&[_]Feature{}),
837819 };
820 result[@enumToInt(Feature.xnack_support)] = .{
821 .llvm_name = "xnack-support",
822 .description = "Hardware supports XNACK",
823 .dependencies = featureSet(&[_]Feature{}),
824 };
838825 const ti = @typeInfo(Feature);
839826 for (result) |*elem, i| {
840827 elem.index = i;
......@@ -849,7 +836,6 @@ pub const cpu = struct {
849836 .llvm_name = "bonaire",
850837 .features = featureSet(&[_]Feature{
851838 .ldsbankcount32,
852 .no_xnack_support,
853839 .sea_islands,
854840 }),
855841 };
......@@ -862,7 +848,7 @@ pub const cpu = struct {
862848 .ldsbankcount32,
863849 .unpacked_d16_vmem,
864850 .volcanic_islands,
865 .xnack,
851 .xnack_support,
866852 }),
867853 };
868854 pub const fiji = CpuModel{
......@@ -870,7 +856,6 @@ pub const cpu = struct {
870856 .llvm_name = "fiji",
871857 .features = featureSet(&[_]Feature{
872858 .ldsbankcount32,
873 .no_xnack_support,
874859 .unpacked_d16_vmem,
875860 .volcanic_islands,
876861 }),
......@@ -904,7 +889,6 @@ pub const cpu = struct {
904889 .lds_misaligned_bug,
905890 .ldsbankcount32,
906891 .mad_mac_f32_insts,
907 .no_xnack_support,
908892 .nsa_encoding,
909893 .nsa_to_vmem_bug,
910894 .offset_3f_bug,
......@@ -917,6 +901,7 @@ pub const cpu = struct {
917901 .vcmpx_permlane_hazard,
918902 .vmem_to_scalar_write_hazard,
919903 .wavefrontsize32,
904 .xnack_support,
920905 }),
921906 };
922907 pub const gfx1011 = CpuModel{
......@@ -937,7 +922,6 @@ pub const cpu = struct {
937922 .lds_misaligned_bug,
938923 .ldsbankcount32,
939924 .mad_mac_f32_insts,
940 .no_xnack_support,
941925 .nsa_encoding,
942926 .nsa_to_vmem_bug,
943927 .offset_3f_bug,
......@@ -950,6 +934,7 @@ pub const cpu = struct {
950934 .vcmpx_permlane_hazard,
951935 .vmem_to_scalar_write_hazard,
952936 .wavefrontsize32,
937 .xnack_support,
953938 }),
954939 };
955940 pub const gfx1012 = CpuModel{
......@@ -970,7 +955,6 @@ pub const cpu = struct {
970955 .lds_misaligned_bug,
971956 .ldsbankcount32,
972957 .mad_mac_f32_insts,
973 .no_xnack_support,
974958 .nsa_encoding,
975959 .nsa_to_vmem_bug,
976960 .offset_3f_bug,
......@@ -983,6 +967,7 @@ pub const cpu = struct {
983967 .vcmpx_permlane_hazard,
984968 .vmem_to_scalar_write_hazard,
985969 .wavefrontsize32,
970 .xnack_support,
986971 }),
987972 };
988973 pub const gfx1030 = CpuModel{
......@@ -998,7 +983,6 @@ pub const cpu = struct {
998983 .gfx10_3_insts,
999984 .gfx10_b_encoding,
1000985 .ldsbankcount32,
1001 .no_xnack_support,
1002986 .nsa_encoding,
1003987 .wavefrontsize32,
1004988 }),
......@@ -1016,7 +1000,6 @@ pub const cpu = struct {
10161000 .gfx10_3_insts,
10171001 .gfx10_b_encoding,
10181002 .ldsbankcount32,
1019 .no_xnack_support,
10201003 .nsa_encoding,
10211004 .wavefrontsize32,
10221005 }),
......@@ -1034,7 +1017,6 @@ pub const cpu = struct {
10341017 .gfx10_3_insts,
10351018 .gfx10_b_encoding,
10361019 .ldsbankcount32,
1037 .no_xnack_support,
10381020 .nsa_encoding,
10391021 .wavefrontsize32,
10401022 }),
......@@ -1052,7 +1034,6 @@ pub const cpu = struct {
10521034 .gfx10_3_insts,
10531035 .gfx10_b_encoding,
10541036 .ldsbankcount32,
1055 .no_xnack_support,
10561037 .nsa_encoding,
10571038 .wavefrontsize32,
10581039 }),
......@@ -1063,8 +1044,6 @@ pub const cpu = struct {
10631044 .features = featureSet(&[_]Feature{
10641045 .fast_fmaf,
10651046 .half_rate_64_ops,
1066 .ldsbankcount32,
1067 .no_xnack_support,
10681047 .southern_islands,
10691048 }),
10701049 };
......@@ -1072,8 +1051,6 @@ pub const cpu = struct {
10721051 .name = "gfx601",
10731052 .llvm_name = "gfx601",
10741053 .features = featureSet(&[_]Feature{
1075 .ldsbankcount32,
1076 .no_xnack_support,
10771054 .southern_islands,
10781055 }),
10791056 };
......@@ -1081,8 +1058,6 @@ pub const cpu = struct {
10811058 .name = "gfx602",
10821059 .llvm_name = "gfx602",
10831060 .features = featureSet(&[_]Feature{
1084 .ldsbankcount32,
1085 .no_xnack_support,
10861061 .southern_islands,
10871062 }),
10881063 };
......@@ -1091,7 +1066,6 @@ pub const cpu = struct {
10911066 .llvm_name = "gfx700",
10921067 .features = featureSet(&[_]Feature{
10931068 .ldsbankcount32,
1094 .no_xnack_support,
10951069 .sea_islands,
10961070 }),
10971071 };
......@@ -1102,7 +1076,6 @@ pub const cpu = struct {
11021076 .fast_fmaf,
11031077 .half_rate_64_ops,
11041078 .ldsbankcount32,
1105 .no_xnack_support,
11061079 .sea_islands,
11071080 }),
11081081 };
......@@ -1112,7 +1085,6 @@ pub const cpu = struct {
11121085 .features = featureSet(&[_]Feature{
11131086 .fast_fmaf,
11141087 .ldsbankcount16,
1115 .no_xnack_support,
11161088 .sea_islands,
11171089 }),
11181090 };
......@@ -1121,7 +1093,6 @@ pub const cpu = struct {
11211093 .llvm_name = "gfx703",
11221094 .features = featureSet(&[_]Feature{
11231095 .ldsbankcount16,
1124 .no_xnack_support,
11251096 .sea_islands,
11261097 }),
11271098 };
......@@ -1130,7 +1101,6 @@ pub const cpu = struct {
11301101 .llvm_name = "gfx704",
11311102 .features = featureSet(&[_]Feature{
11321103 .ldsbankcount32,
1133 .no_xnack_support,
11341104 .sea_islands,
11351105 }),
11361106 };
......@@ -1139,7 +1109,6 @@ pub const cpu = struct {
11391109 .llvm_name = "gfx705",
11401110 .features = featureSet(&[_]Feature{
11411111 .ldsbankcount16,
1142 .no_xnack_support,
11431112 .sea_islands,
11441113 }),
11451114 };
......@@ -1152,7 +1121,7 @@ pub const cpu = struct {
11521121 .ldsbankcount32,
11531122 .unpacked_d16_vmem,
11541123 .volcanic_islands,
1155 .xnack,
1124 .xnack_support,
11561125 }),
11571126 };
11581127 pub const gfx802 = CpuModel{
......@@ -1160,7 +1129,6 @@ pub const cpu = struct {
11601129 .llvm_name = "gfx802",
11611130 .features = featureSet(&[_]Feature{
11621131 .ldsbankcount32,
1163 .no_xnack_support,
11641132 .sgpr_init_bug,
11651133 .unpacked_d16_vmem,
11661134 .volcanic_islands,
......@@ -1171,7 +1139,6 @@ pub const cpu = struct {
11711139 .llvm_name = "gfx803",
11721140 .features = featureSet(&[_]Feature{
11731141 .ldsbankcount32,
1174 .no_xnack_support,
11751142 .unpacked_d16_vmem,
11761143 .volcanic_islands,
11771144 }),
......@@ -1181,7 +1148,6 @@ pub const cpu = struct {
11811148 .llvm_name = "gfx805",
11821149 .features = featureSet(&[_]Feature{
11831150 .ldsbankcount32,
1184 .no_xnack_support,
11851151 .sgpr_init_bug,
11861152 .unpacked_d16_vmem,
11871153 .volcanic_islands,
......@@ -1195,7 +1161,7 @@ pub const cpu = struct {
11951161 .image_store_d16_bug,
11961162 .ldsbankcount16,
11971163 .volcanic_islands,
1198 .xnack,
1164 .xnack_support,
11991165 }),
12001166 };
12011167 pub const gfx900 = CpuModel{
......@@ -1206,8 +1172,6 @@ pub const cpu = struct {
12061172 .image_gather4_d16_bug,
12071173 .ldsbankcount32,
12081174 .mad_mix_insts,
1209 .no_sram_ecc_support,
1210 .no_xnack_support,
12111175 }),
12121176 };
12131177 pub const gfx902 = CpuModel{
......@@ -1218,8 +1182,6 @@ pub const cpu = struct {
12181182 .image_gather4_d16_bug,
12191183 .ldsbankcount32,
12201184 .mad_mix_insts,
1221 .no_sram_ecc_support,
1222 .xnack,
12231185 }),
12241186 };
12251187 pub const gfx904 = CpuModel{
......@@ -1230,8 +1192,6 @@ pub const cpu = struct {
12301192 .gfx9,
12311193 .image_gather4_d16_bug,
12321194 .ldsbankcount32,
1233 .no_sram_ecc_support,
1234 .no_xnack_support,
12351195 }),
12361196 };
12371197 pub const gfx906 = CpuModel{
......@@ -1246,7 +1206,7 @@ pub const cpu = struct {
12461206 .half_rate_64_ops,
12471207 .image_gather4_d16_bug,
12481208 .ldsbankcount32,
1249 .no_xnack_support,
1209 .sramecc_support,
12501210 }),
12511211 };
12521212 pub const gfx908 = CpuModel{
......@@ -1269,7 +1229,7 @@ pub const cpu = struct {
12691229 .mai_insts,
12701230 .mfma_inline_literal_bug,
12711231 .pk_fmac_f16_inst,
1272 .sram_ecc,
1232 .sramecc_support,
12731233 }),
12741234 };
12751235 pub const gfx909 = CpuModel{
......@@ -1280,7 +1240,6 @@ pub const cpu = struct {
12801240 .image_gather4_d16_bug,
12811241 .ldsbankcount32,
12821242 .mad_mix_insts,
1283 .xnack,
12841243 }),
12851244 };
12861245 pub const gfx90c = CpuModel{
......@@ -1298,8 +1257,6 @@ pub const cpu = struct {
12981257 .name = "hainan",
12991258 .llvm_name = "hainan",
13001259 .features = featureSet(&[_]Feature{
1301 .ldsbankcount32,
1302 .no_xnack_support,
13031260 .southern_islands,
13041261 }),
13051262 };
......@@ -1310,7 +1267,6 @@ pub const cpu = struct {
13101267 .fast_fmaf,
13111268 .half_rate_64_ops,
13121269 .ldsbankcount32,
1313 .no_xnack_support,
13141270 .sea_islands,
13151271 }),
13161272 };
......@@ -1319,7 +1275,6 @@ pub const cpu = struct {
13191275 .llvm_name = "iceland",
13201276 .features = featureSet(&[_]Feature{
13211277 .ldsbankcount32,
1322 .no_xnack_support,
13231278 .sgpr_init_bug,
13241279 .unpacked_d16_vmem,
13251280 .volcanic_islands,
......@@ -1330,7 +1285,6 @@ pub const cpu = struct {
13301285 .llvm_name = "kabini",
13311286 .features = featureSet(&[_]Feature{
13321287 .ldsbankcount16,
1333 .no_xnack_support,
13341288 .sea_islands,
13351289 }),
13361290 };
......@@ -1339,7 +1293,6 @@ pub const cpu = struct {
13391293 .llvm_name = "kaveri",
13401294 .features = featureSet(&[_]Feature{
13411295 .ldsbankcount32,
1342 .no_xnack_support,
13431296 .sea_islands,
13441297 }),
13451298 };
......@@ -1348,7 +1301,6 @@ pub const cpu = struct {
13481301 .llvm_name = "mullins",
13491302 .features = featureSet(&[_]Feature{
13501303 .ldsbankcount16,
1351 .no_xnack_support,
13521304 .sea_islands,
13531305 }),
13541306 };
......@@ -1356,8 +1308,6 @@ pub const cpu = struct {
13561308 .name = "oland",
13571309 .llvm_name = "oland",
13581310 .features = featureSet(&[_]Feature{
1359 .ldsbankcount32,
1360 .no_xnack_support,
13611311 .southern_islands,
13621312 }),
13631313 };
......@@ -1365,8 +1315,6 @@ pub const cpu = struct {
13651315 .name = "pitcairn",
13661316 .llvm_name = "pitcairn",
13671317 .features = featureSet(&[_]Feature{
1368 .ldsbankcount32,
1369 .no_xnack_support,
13701318 .southern_islands,
13711319 }),
13721320 };
......@@ -1375,7 +1323,6 @@ pub const cpu = struct {
13751323 .llvm_name = "polaris10",
13761324 .features = featureSet(&[_]Feature{
13771325 .ldsbankcount32,
1378 .no_xnack_support,
13791326 .unpacked_d16_vmem,
13801327 .volcanic_islands,
13811328 }),
......@@ -1385,7 +1332,6 @@ pub const cpu = struct {
13851332 .llvm_name = "polaris11",
13861333 .features = featureSet(&[_]Feature{
13871334 .ldsbankcount32,
1388 .no_xnack_support,
13891335 .unpacked_d16_vmem,
13901336 .volcanic_islands,
13911337 }),
......@@ -1398,7 +1344,7 @@ pub const cpu = struct {
13981344 .image_store_d16_bug,
13991345 .ldsbankcount16,
14001346 .volcanic_islands,
1401 .xnack,
1347 .xnack_support,
14021348 }),
14031349 };
14041350 pub const tahiti = CpuModel{
......@@ -1407,8 +1353,6 @@ pub const cpu = struct {
14071353 .features = featureSet(&[_]Feature{
14081354 .fast_fmaf,
14091355 .half_rate_64_ops,
1410 .ldsbankcount32,
1411 .no_xnack_support,
14121356 .southern_islands,
14131357 }),
14141358 };
......@@ -1417,7 +1361,6 @@ pub const cpu = struct {
14171361 .llvm_name = "tonga",
14181362 .features = featureSet(&[_]Feature{
14191363 .ldsbankcount32,
1420 .no_xnack_support,
14211364 .sgpr_init_bug,
14221365 .unpacked_d16_vmem,
14231366 .volcanic_islands,
......@@ -1428,7 +1371,6 @@ pub const cpu = struct {
14281371 .llvm_name = "tongapro",
14291372 .features = featureSet(&[_]Feature{
14301373 .ldsbankcount32,
1431 .no_xnack_support,
14321374 .sgpr_init_bug,
14331375 .unpacked_d16_vmem,
14341376 .volcanic_islands,
......@@ -1438,8 +1380,6 @@ pub const cpu = struct {
14381380 .name = "verde",
14391381 .llvm_name = "verde",
14401382 .features = featureSet(&[_]Feature{
1441 .ldsbankcount32,
1442 .no_xnack_support,
14431383 .southern_islands,
14441384 }),
14451385 };
tools/update_cpu_features.zig+10
......@@ -44,6 +44,16 @@ const llvm_targets = [_]LlvmTarget{
4444 .zig_name = "amdgpu",
4545 .llvm_name = "AMDGPU",
4646 .td_name = "AMDGPU.td",
47 .feature_overrides = &.{
48 .{
49 .llvm_name = "DumpCode",
50 .omit = true,
51 },
52 .{
53 .llvm_name = "dumpcode",
54 .omit = true,
55 },
56 },
4757 },
4858 .{
4959 .zig_name = "arc",