authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-19 18:12:06-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-19 18:12:06-05:00
log4c6f207aff482cf973218bbda1d28e6d2a619df5
tree1b071512502cdbff6d1e3aa50fc28f2da4e3dae9
parentc664692bdd62765ab444a79a8704d2161c1809f1
signature Commit is signed but in an unrecognized format.

clean up arm CPU features

* remove "cpu features" that are actually just processors * rename `v8` to `v8a`. this matches the corresponding change to target/aarch64.zig * rename types in preparation for removing sub-architecture from `std.Target`. I have other files changed in my dirty working tree, but about to make some changes to arm.zig that I don't want batched with this commit.

1 files changed, 102 insertions(+), 231 deletions(-)

lib/std/target/arm.zig+102-231
......@@ -1,25 +1,11 @@
11const std = @import("../std.zig");
2const Cpu = std.Target.Cpu;
2const CpuFeature = std.Target.Cpu.Feature;
3const CpuModel = std.Target.Cpu.Model;
34
45pub const Feature = enum {
56 @"32bit",
67 @"8msecext",
7 a12,
8 a15,
9 a17,
10 a32,
11 a35,
12 a5,
13 a53,
14 a55,
15 a57,
16 a7,
17 a72,
18 a73,
19 a75,
208 a76,
21 a8,
22 a9,
239 aclass,
2410 acquire_release,
2511 aes,
......@@ -89,8 +75,6 @@ pub const Feature = enum {
8975 hwdiv_arm,
9076 iwmmxt,
9177 iwmmxt2,
92 krait,
93 kryo,
9478 lob,
9579 long_calls,
9680 loop_align,
......@@ -114,9 +98,6 @@ pub const Feature = enum {
11498 prefer_vmovsr,
11599 prof_unpr,
116100 r4,
117 r5,
118 r52,
119 r7,
120101 ras,
121102 rclass,
122103 read_tp_hard,
......@@ -148,7 +129,7 @@ pub const Feature = enum {
148129 v6t2,
149130 v7,
150131 v7clrex,
151 v8,
132 v8a,
152133 v8_1a,
153134 v8_1m_main,
154135 v8_2a,
......@@ -178,13 +159,13 @@ pub const Feature = enum {
178159 zcz,
179160};
180161
181pub usingnamespace Cpu.Feature.feature_set_fns(Feature);
162pub usingnamespace CpuFeature.feature_set_fns(Feature);
182163
183164pub const all_features = blk: {
184165 @setEvalBranchQuota(10000);
185166 const len = @typeInfo(Feature).Enum.fields.len;
186 std.debug.assert(len <= Cpu.Feature.Set.needed_bit_count);
187 var result: [len]Cpu.Feature = undefined;
167 std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
168 var result: [len]CpuFeature = undefined;
188169 result[@enumToInt(Feature.@"32bit")] = .{
189170 .llvm_name = "32bit",
190171 .description = "Prefer 32-bit Thumb instrs",
......@@ -195,86 +176,11 @@ pub const all_features = blk: {
195176 .description = "Enable support for ARMv8-M Security Extensions",
196177 .dependencies = featureSet(&[_]Feature{}),
197178 };
198 result[@enumToInt(Feature.a12)] = .{
199 .llvm_name = "a12",
200 .description = "Cortex-A12 ARM processors",
201 .dependencies = featureSet(&[_]Feature{}),
202 };
203 result[@enumToInt(Feature.a15)] = .{
204 .llvm_name = "a15",
205 .description = "Cortex-A15 ARM processors",
206 .dependencies = featureSet(&[_]Feature{}),
207 };
208 result[@enumToInt(Feature.a17)] = .{
209 .llvm_name = "a17",
210 .description = "Cortex-A17 ARM processors",
211 .dependencies = featureSet(&[_]Feature{}),
212 };
213 result[@enumToInt(Feature.a32)] = .{
214 .llvm_name = "a32",
215 .description = "Cortex-A32 ARM processors",
216 .dependencies = featureSet(&[_]Feature{}),
217 };
218 result[@enumToInt(Feature.a35)] = .{
219 .llvm_name = "a35",
220 .description = "Cortex-A35 ARM processors",
221 .dependencies = featureSet(&[_]Feature{}),
222 };
223 result[@enumToInt(Feature.a5)] = .{
224 .llvm_name = "a5",
225 .description = "Cortex-A5 ARM processors",
226 .dependencies = featureSet(&[_]Feature{}),
227 };
228 result[@enumToInt(Feature.a53)] = .{
229 .llvm_name = "a53",
230 .description = "Cortex-A53 ARM processors",
231 .dependencies = featureSet(&[_]Feature{}),
232 };
233 result[@enumToInt(Feature.a55)] = .{
234 .llvm_name = "a55",
235 .description = "Cortex-A55 ARM processors",
236 .dependencies = featureSet(&[_]Feature{}),
237 };
238 result[@enumToInt(Feature.a57)] = .{
239 .llvm_name = "a57",
240 .description = "Cortex-A57 ARM processors",
241 .dependencies = featureSet(&[_]Feature{}),
242 };
243 result[@enumToInt(Feature.a7)] = .{
244 .llvm_name = "a7",
245 .description = "Cortex-A7 ARM processors",
246 .dependencies = featureSet(&[_]Feature{}),
247 };
248 result[@enumToInt(Feature.a72)] = .{
249 .llvm_name = "a72",
250 .description = "Cortex-A72 ARM processors",
251 .dependencies = featureSet(&[_]Feature{}),
252 };
253 result[@enumToInt(Feature.a73)] = .{
254 .llvm_name = "a73",
255 .description = "Cortex-A73 ARM processors",
256 .dependencies = featureSet(&[_]Feature{}),
257 };
258 result[@enumToInt(Feature.a75)] = .{
259 .llvm_name = "a75",
260 .description = "Cortex-A75 ARM processors",
261 .dependencies = featureSet(&[_]Feature{}),
262 };
263179 result[@enumToInt(Feature.a76)] = .{
264180 .llvm_name = "a76",
265181 .description = "Cortex-A76 ARM processors",
266182 .dependencies = featureSet(&[_]Feature{}),
267183 };
268 result[@enumToInt(Feature.a8)] = .{
269 .llvm_name = "a8",
270 .description = "Cortex-A8 ARM processors",
271 .dependencies = featureSet(&[_]Feature{}),
272 };
273 result[@enumToInt(Feature.a9)] = .{
274 .llvm_name = "a9",
275 .description = "Cortex-A9 ARM processors",
276 .dependencies = featureSet(&[_]Feature{}),
277 };
278184 result[@enumToInt(Feature.aclass)] = .{
279185 .llvm_name = "aclass",
280186 .description = "Is application profile ('A' series)",
......@@ -497,7 +403,7 @@ pub const all_features = blk: {
497403 .mp,
498404 .neon,
499405 .trustzone,
500 .v8,
406 .v8a,
501407 .virtualization,
502408 }),
503409 };
......@@ -543,7 +449,7 @@ pub const all_features = blk: {
543449 .mp,
544450 .neon,
545451 .rclass,
546 .v8,
452 .v8a,
547453 .virtualization,
548454 }),
549455 };
......@@ -872,16 +778,6 @@ pub const all_features = blk: {
872778 .armv5te,
873779 }),
874780 };
875 result[@enumToInt(Feature.krait)] = .{
876 .llvm_name = "krait",
877 .description = "Qualcomm Krait processors",
878 .dependencies = featureSet(&[_]Feature{}),
879 };
880 result[@enumToInt(Feature.kryo)] = .{
881 .llvm_name = "kryo",
882 .description = "Qualcomm Kryo processors",
883 .dependencies = featureSet(&[_]Feature{}),
884 };
885781 result[@enumToInt(Feature.lob)] = .{
886782 .llvm_name = "lob",
887783 .description = "Enable Low Overhead Branch extensions",
......@@ -1008,21 +904,6 @@ pub const all_features = blk: {
1008904 .description = "Cortex-R4 ARM processors",
1009905 .dependencies = featureSet(&[_]Feature{}),
1010906 };
1011 result[@enumToInt(Feature.r5)] = .{
1012 .llvm_name = "r5",
1013 .description = "Cortex-R5 ARM processors",
1014 .dependencies = featureSet(&[_]Feature{}),
1015 };
1016 result[@enumToInt(Feature.r52)] = .{
1017 .llvm_name = "r52",
1018 .description = "Cortex-R52 ARM processors",
1019 .dependencies = featureSet(&[_]Feature{}),
1020 };
1021 result[@enumToInt(Feature.r7)] = .{
1022 .llvm_name = "r7",
1023 .description = "Cortex-R7 ARM processors",
1024 .dependencies = featureSet(&[_]Feature{}),
1025 };
1026907 result[@enumToInt(Feature.ras)] = .{
1027908 .llvm_name = "ras",
1028909 .description = "Enable Reliability, Availability and Serviceability extensions",
......@@ -1200,9 +1081,9 @@ pub const all_features = blk: {
12001081 .description = "Has v7 clrex instruction",
12011082 .dependencies = featureSet(&[_]Feature{}),
12021083 };
1203 result[@enumToInt(Feature.v8)] = .{
1204 .llvm_name = "v8",
1205 .description = "Support ARM v8 instructions",
1084 result[@enumToInt(Feature.v8a)] = .{
1085 .llvm_name = "v8a",
1086 .description = "Support ARM v8a instructions",
12061087 .dependencies = featureSet(&[_]Feature{
12071088 .acquire_release,
12081089 .v7,
......@@ -1212,7 +1093,7 @@ pub const all_features = blk: {
12121093 .llvm_name = "v8.1a",
12131094 .description = "Support ARM v8.1a instructions",
12141095 .dependencies = featureSet(&[_]Feature{
1215 .v8,
1096 .v8a,
12161097 }),
12171098 };
12181099 result[@enumToInt(Feature.v8_1m_main)] = .{
......@@ -1415,49 +1296,49 @@ pub const all_features = blk: {
14151296};
14161297
14171298pub const cpu = struct {
1418 pub const arm1020e = Cpu{
1299 pub const arm1020e = CpuModel{
14191300 .name = "arm1020e",
14201301 .llvm_name = "arm1020e",
14211302 .features = featureSet(&[_]Feature{
14221303 .armv5te,
14231304 }),
14241305 };
1425 pub const arm1020t = Cpu{
1306 pub const arm1020t = CpuModel{
14261307 .name = "arm1020t",
14271308 .llvm_name = "arm1020t",
14281309 .features = featureSet(&[_]Feature{
14291310 .armv5t,
14301311 }),
14311312 };
1432 pub const arm1022e = Cpu{
1313 pub const arm1022e = CpuModel{
14331314 .name = "arm1022e",
14341315 .llvm_name = "arm1022e",
14351316 .features = featureSet(&[_]Feature{
14361317 .armv5te,
14371318 }),
14381319 };
1439 pub const arm10e = Cpu{
1320 pub const arm10e = CpuModel{
14401321 .name = "arm10e",
14411322 .llvm_name = "arm10e",
14421323 .features = featureSet(&[_]Feature{
14431324 .armv5te,
14441325 }),
14451326 };
1446 pub const arm10tdmi = Cpu{
1327 pub const arm10tdmi = CpuModel{
14471328 .name = "arm10tdmi",
14481329 .llvm_name = "arm10tdmi",
14491330 .features = featureSet(&[_]Feature{
14501331 .armv5t,
14511332 }),
14521333 };
1453 pub const arm1136j_s = Cpu{
1334 pub const arm1136j_s = CpuModel{
14541335 .name = "arm1136j_s",
14551336 .llvm_name = "arm1136j-s",
14561337 .features = featureSet(&[_]Feature{
14571338 .armv6,
14581339 }),
14591340 };
1460 pub const arm1136jf_s = Cpu{
1341 pub const arm1136jf_s = CpuModel{
14611342 .name = "arm1136jf_s",
14621343 .llvm_name = "arm1136jf-s",
14631344 .features = featureSet(&[_]Feature{
......@@ -1466,14 +1347,14 @@ pub const cpu = struct {
14661347 .vfp2,
14671348 }),
14681349 };
1469 pub const arm1156t2_s = Cpu{
1350 pub const arm1156t2_s = CpuModel{
14701351 .name = "arm1156t2_s",
14711352 .llvm_name = "arm1156t2-s",
14721353 .features = featureSet(&[_]Feature{
14731354 .armv6t2,
14741355 }),
14751356 };
1476 pub const arm1156t2f_s = Cpu{
1357 pub const arm1156t2f_s = CpuModel{
14771358 .name = "arm1156t2f_s",
14781359 .llvm_name = "arm1156t2f-s",
14791360 .features = featureSet(&[_]Feature{
......@@ -1482,21 +1363,21 @@ pub const cpu = struct {
14821363 .vfp2,
14831364 }),
14841365 };
1485 pub const arm1176j_s = Cpu{
1366 pub const arm1176j_s = CpuModel{
14861367 .name = "arm1176j_s",
14871368 .llvm_name = "arm1176j-s",
14881369 .features = featureSet(&[_]Feature{
14891370 .armv6kz,
14901371 }),
14911372 };
1492 pub const arm1176jz_s = Cpu{
1373 pub const arm1176jz_s = CpuModel{
14931374 .name = "arm1176jz_s",
14941375 .llvm_name = "arm1176jz-s",
14951376 .features = featureSet(&[_]Feature{
14961377 .armv6kz,
14971378 }),
14981379 };
1499 pub const arm1176jzf_s = Cpu{
1380 pub const arm1176jzf_s = CpuModel{
15001381 .name = "arm1176jzf_s",
15011382 .llvm_name = "arm1176jzf-s",
15021383 .features = featureSet(&[_]Feature{
......@@ -1505,126 +1386,133 @@ pub const cpu = struct {
15051386 .vfp2,
15061387 }),
15071388 };
1508 pub const arm710t = Cpu{
1389 pub const arm710t = CpuModel{
15091390 .name = "arm710t",
15101391 .llvm_name = "arm710t",
15111392 .features = featureSet(&[_]Feature{
15121393 .armv4t,
15131394 }),
15141395 };
1515 pub const arm720t = Cpu{
1396 pub const arm720t = CpuModel{
15161397 .name = "arm720t",
15171398 .llvm_name = "arm720t",
15181399 .features = featureSet(&[_]Feature{
15191400 .armv4t,
15201401 }),
15211402 };
1522 pub const arm7tdmi = Cpu{
1403 pub const arm7tdmi = CpuModel{
15231404 .name = "arm7tdmi",
15241405 .llvm_name = "arm7tdmi",
15251406 .features = featureSet(&[_]Feature{
15261407 .armv4t,
15271408 }),
15281409 };
1529 pub const arm7tdmi_s = Cpu{
1410 pub const arm7tdmi_s = CpuModel{
15301411 .name = "arm7tdmi_s",
15311412 .llvm_name = "arm7tdmi-s",
15321413 .features = featureSet(&[_]Feature{
15331414 .armv4t,
15341415 }),
15351416 };
1536 pub const arm8 = Cpu{
1417 pub const arm8 = CpuModel{
15371418 .name = "arm8",
15381419 .llvm_name = "arm8",
15391420 .features = featureSet(&[_]Feature{
15401421 .armv4,
15411422 }),
15421423 };
1543 pub const arm810 = Cpu{
1424 pub const arm810 = CpuModel{
15441425 .name = "arm810",
15451426 .llvm_name = "arm810",
15461427 .features = featureSet(&[_]Feature{
15471428 .armv4,
15481429 }),
15491430 };
1550 pub const arm9 = Cpu{
1431 pub const arm9 = CpuModel{
15511432 .name = "arm9",
15521433 .llvm_name = "arm9",
15531434 .features = featureSet(&[_]Feature{
15541435 .armv4t,
15551436 }),
15561437 };
1557 pub const arm920 = Cpu{
1438 pub const arm920 = CpuModel{
15581439 .name = "arm920",
15591440 .llvm_name = "arm920",
15601441 .features = featureSet(&[_]Feature{
15611442 .armv4t,
15621443 }),
15631444 };
1564 pub const arm920t = Cpu{
1445 pub const arm920t = CpuModel{
15651446 .name = "arm920t",
15661447 .llvm_name = "arm920t",
15671448 .features = featureSet(&[_]Feature{
15681449 .armv4t,
15691450 }),
15701451 };
1571 pub const arm922t = Cpu{
1452 pub const arm922t = CpuModel{
15721453 .name = "arm922t",
15731454 .llvm_name = "arm922t",
15741455 .features = featureSet(&[_]Feature{
15751456 .armv4t,
15761457 }),
15771458 };
1578 pub const arm926ej_s = Cpu{
1459 pub const arm926ej_s = CpuModel{
15791460 .name = "arm926ej_s",
15801461 .llvm_name = "arm926ej-s",
15811462 .features = featureSet(&[_]Feature{
15821463 .armv5te,
15831464 }),
15841465 };
1585 pub const arm940t = Cpu{
1466 pub const arm940t = CpuModel{
15861467 .name = "arm940t",
15871468 .llvm_name = "arm940t",
15881469 .features = featureSet(&[_]Feature{
15891470 .armv4t,
15901471 }),
15911472 };
1592 pub const arm946e_s = Cpu{
1473 pub const arm946e_s = CpuModel{
15931474 .name = "arm946e_s",
15941475 .llvm_name = "arm946e-s",
15951476 .features = featureSet(&[_]Feature{
15961477 .armv5te,
15971478 }),
15981479 };
1599 pub const arm966e_s = Cpu{
1480 pub const arm966e_s = CpuModel{
16001481 .name = "arm966e_s",
16011482 .llvm_name = "arm966e-s",
16021483 .features = featureSet(&[_]Feature{
16031484 .armv5te,
16041485 }),
16051486 };
1606 pub const arm968e_s = Cpu{
1487 pub const arm968e_s = CpuModel{
16071488 .name = "arm968e_s",
16081489 .llvm_name = "arm968e-s",
16091490 .features = featureSet(&[_]Feature{
16101491 .armv5te,
16111492 }),
16121493 };
1613 pub const arm9e = Cpu{
1494 pub const arm9e = CpuModel{
16141495 .name = "arm9e",
16151496 .llvm_name = "arm9e",
16161497 .features = featureSet(&[_]Feature{
16171498 .armv5te,
16181499 }),
16191500 };
1620 pub const arm9tdmi = Cpu{
1501 pub const arm9tdmi = CpuModel{
16211502 .name = "arm9tdmi",
16221503 .llvm_name = "arm9tdmi",
16231504 .features = featureSet(&[_]Feature{
16241505 .armv4t,
16251506 }),
16261507 };
1627 pub const cortex_a12 = Cpu{
1508 pub const baseline = CpuModel{
1509 .name = "baseline",
1510 .llvm_name = "generic",
1511 .features = featureSet(&[_]Feature{
1512 .armv6_m,
1513 }),
1514 };
1515 pub const cortex_a12 = CpuModel{
16281516 .name = "cortex_a12",
16291517 .llvm_name = "cortex-a12",
16301518 .features = featureSet(&[_]Feature{
......@@ -1639,11 +1527,10 @@ pub const cpu = struct {
16391527 .vmlx_forwarding,
16401528 }),
16411529 };
1642 pub const cortex_a15 = Cpu{
1530 pub const cortex_a15 = CpuModel{
16431531 .name = "cortex_a15",
16441532 .llvm_name = "cortex-a15",
16451533 .features = featureSet(&[_]Feature{
1646 .a15,
16471534 .armv7_a,
16481535 .avoid_partial_cpsr,
16491536 .dont_widen_vmovs,
......@@ -1657,11 +1544,10 @@ pub const cpu = struct {
16571544 .vldn_align,
16581545 }),
16591546 };
1660 pub const cortex_a17 = Cpu{
1547 pub const cortex_a17 = CpuModel{
16611548 .name = "cortex_a17",
16621549 .llvm_name = "cortex-a17",
16631550 .features = featureSet(&[_]Feature{
1664 .a17,
16651551 .armv7_a,
16661552 .avoid_partial_cpsr,
16671553 .mp,
......@@ -1672,7 +1558,7 @@ pub const cpu = struct {
16721558 .vmlx_forwarding,
16731559 }),
16741560 };
1675 pub const cortex_a32 = Cpu{
1561 pub const cortex_a32 = CpuModel{
16761562 .name = "cortex_a32",
16771563 .llvm_name = "cortex-a32",
16781564 .features = featureSet(&[_]Feature{
......@@ -1683,11 +1569,10 @@ pub const cpu = struct {
16831569 .hwdiv_arm,
16841570 }),
16851571 };
1686 pub const cortex_a35 = Cpu{
1572 pub const cortex_a35 = CpuModel{
16871573 .name = "cortex_a35",
16881574 .llvm_name = "cortex-a35",
16891575 .features = featureSet(&[_]Feature{
1690 .a35,
16911576 .armv8_a,
16921577 .crc,
16931578 .crypto,
......@@ -1695,11 +1580,10 @@ pub const cpu = struct {
16951580 .hwdiv_arm,
16961581 }),
16971582 };
1698 pub const cortex_a5 = Cpu{
1583 pub const cortex_a5 = CpuModel{
16991584 .name = "cortex_a5",
17001585 .llvm_name = "cortex-a5",
17011586 .features = featureSet(&[_]Feature{
1702 .a5,
17031587 .armv7_a,
17041588 .mp,
17051589 .ret_addr_stack,
......@@ -1710,11 +1594,10 @@ pub const cpu = struct {
17101594 .vmlx_forwarding,
17111595 }),
17121596 };
1713 pub const cortex_a53 = Cpu{
1597 pub const cortex_a53 = CpuModel{
17141598 .name = "cortex_a53",
17151599 .llvm_name = "cortex-a53",
17161600 .features = featureSet(&[_]Feature{
1717 .a53,
17181601 .armv8_a,
17191602 .crc,
17201603 .crypto,
......@@ -1723,22 +1606,20 @@ pub const cpu = struct {
17231606 .hwdiv_arm,
17241607 }),
17251608 };
1726 pub const cortex_a55 = Cpu{
1609 pub const cortex_a55 = CpuModel{
17271610 .name = "cortex_a55",
17281611 .llvm_name = "cortex-a55",
17291612 .features = featureSet(&[_]Feature{
1730 .a55,
17311613 .armv8_2_a,
17321614 .dotprod,
17331615 .hwdiv,
17341616 .hwdiv_arm,
17351617 }),
17361618 };
1737 pub const cortex_a57 = Cpu{
1619 pub const cortex_a57 = CpuModel{
17381620 .name = "cortex_a57",
17391621 .llvm_name = "cortex-a57",
17401622 .features = featureSet(&[_]Feature{
1741 .a57,
17421623 .armv8_a,
17431624 .avoid_partial_cpsr,
17441625 .cheap_predicable_cpsr,
......@@ -1749,11 +1630,10 @@ pub const cpu = struct {
17491630 .hwdiv_arm,
17501631 }),
17511632 };
1752 pub const cortex_a7 = Cpu{
1633 pub const cortex_a7 = CpuModel{
17531634 .name = "cortex_a7",
17541635 .llvm_name = "cortex-a7",
17551636 .features = featureSet(&[_]Feature{
1756 .a7,
17571637 .armv7_a,
17581638 .mp,
17591639 .ret_addr_stack,
......@@ -1766,11 +1646,10 @@ pub const cpu = struct {
17661646 .vmlx_hazards,
17671647 }),
17681648 };
1769 pub const cortex_a72 = Cpu{
1649 pub const cortex_a72 = CpuModel{
17701650 .name = "cortex_a72",
17711651 .llvm_name = "cortex-a72",
17721652 .features = featureSet(&[_]Feature{
1773 .a72,
17741653 .armv8_a,
17751654 .crc,
17761655 .crypto,
......@@ -1778,11 +1657,10 @@ pub const cpu = struct {
17781657 .hwdiv_arm,
17791658 }),
17801659 };
1781 pub const cortex_a73 = Cpu{
1660 pub const cortex_a73 = CpuModel{
17821661 .name = "cortex_a73",
17831662 .llvm_name = "cortex-a73",
17841663 .features = featureSet(&[_]Feature{
1785 .a73,
17861664 .armv8_a,
17871665 .crc,
17881666 .crypto,
......@@ -1790,18 +1668,17 @@ pub const cpu = struct {
17901668 .hwdiv_arm,
17911669 }),
17921670 };
1793 pub const cortex_a75 = Cpu{
1671 pub const cortex_a75 = CpuModel{
17941672 .name = "cortex_a75",
17951673 .llvm_name = "cortex-a75",
17961674 .features = featureSet(&[_]Feature{
1797 .a75,
17981675 .armv8_2_a,
17991676 .dotprod,
18001677 .hwdiv,
18011678 .hwdiv_arm,
18021679 }),
18031680 };
1804 pub const cortex_a76 = Cpu{
1681 pub const cortex_a76 = CpuModel{
18051682 .name = "cortex_a76",
18061683 .llvm_name = "cortex-a76",
18071684 .features = featureSet(&[_]Feature{
......@@ -1815,7 +1692,7 @@ pub const cpu = struct {
18151692 .hwdiv_arm,
18161693 }),
18171694 };
1818 pub const cortex_a76ae = Cpu{
1695 pub const cortex_a76ae = CpuModel{
18191696 .name = "cortex_a76ae",
18201697 .llvm_name = "cortex-a76ae",
18211698 .features = featureSet(&[_]Feature{
......@@ -1829,11 +1706,10 @@ pub const cpu = struct {
18291706 .hwdiv_arm,
18301707 }),
18311708 };
1832 pub const cortex_a8 = Cpu{
1709 pub const cortex_a8 = CpuModel{
18331710 .name = "cortex_a8",
18341711 .llvm_name = "cortex-a8",
18351712 .features = featureSet(&[_]Feature{
1836 .a8,
18371713 .armv7_a,
18381714 .nonpipelined_vfp,
18391715 .ret_addr_stack,
......@@ -1844,11 +1720,10 @@ pub const cpu = struct {
18441720 .vmlx_hazards,
18451721 }),
18461722 };
1847 pub const cortex_a9 = Cpu{
1723 pub const cortex_a9 = CpuModel{
18481724 .name = "cortex_a9",
18491725 .llvm_name = "cortex-a9",
18501726 .features = featureSet(&[_]Feature{
1851 .a9,
18521727 .armv7_a,
18531728 .avoid_partial_cpsr,
18541729 .expand_fp_mlx,
......@@ -1864,28 +1739,28 @@ pub const cpu = struct {
18641739 .vmlx_hazards,
18651740 }),
18661741 };
1867 pub const cortex_m0 = Cpu{
1742 pub const cortex_m0 = CpuModel{
18681743 .name = "cortex_m0",
18691744 .llvm_name = "cortex-m0",
18701745 .features = featureSet(&[_]Feature{
18711746 .armv6_m,
18721747 }),
18731748 };
1874 pub const cortex_m0plus = Cpu{
1749 pub const cortex_m0plus = CpuModel{
18751750 .name = "cortex_m0plus",
18761751 .llvm_name = "cortex-m0plus",
18771752 .features = featureSet(&[_]Feature{
18781753 .armv6_m,
18791754 }),
18801755 };
1881 pub const cortex_m1 = Cpu{
1756 pub const cortex_m1 = CpuModel{
18821757 .name = "cortex_m1",
18831758 .llvm_name = "cortex-m1",
18841759 .features = featureSet(&[_]Feature{
18851760 .armv6_m,
18861761 }),
18871762 };
1888 pub const cortex_m23 = Cpu{
1763 pub const cortex_m23 = CpuModel{
18891764 .name = "cortex_m23",
18901765 .llvm_name = "cortex-m23",
18911766 .features = featureSet(&[_]Feature{
......@@ -1893,7 +1768,7 @@ pub const cpu = struct {
18931768 .no_movt,
18941769 }),
18951770 };
1896 pub const cortex_m3 = Cpu{
1771 pub const cortex_m3 = CpuModel{
18971772 .name = "cortex_m3",
18981773 .llvm_name = "cortex-m3",
18991774 .features = featureSet(&[_]Feature{
......@@ -1905,7 +1780,7 @@ pub const cpu = struct {
19051780 .use_misched,
19061781 }),
19071782 };
1908 pub const cortex_m33 = Cpu{
1783 pub const cortex_m33 = CpuModel{
19091784 .name = "cortex_m33",
19101785 .llvm_name = "cortex-m33",
19111786 .features = featureSet(&[_]Feature{
......@@ -1919,7 +1794,7 @@ pub const cpu = struct {
19191794 .use_misched,
19201795 }),
19211796 };
1922 pub const cortex_m35p = Cpu{
1797 pub const cortex_m35p = CpuModel{
19231798 .name = "cortex_m35p",
19241799 .llvm_name = "cortex-m35p",
19251800 .features = featureSet(&[_]Feature{
......@@ -1933,7 +1808,7 @@ pub const cpu = struct {
19331808 .use_misched,
19341809 }),
19351810 };
1936 pub const cortex_m4 = Cpu{
1811 pub const cortex_m4 = CpuModel{
19371812 .name = "cortex_m4",
19381813 .llvm_name = "cortex-m4",
19391814 .features = featureSet(&[_]Feature{
......@@ -1946,7 +1821,7 @@ pub const cpu = struct {
19461821 .vfp4d16sp,
19471822 }),
19481823 };
1949 pub const cortex_m7 = Cpu{
1824 pub const cortex_m7 = CpuModel{
19501825 .name = "cortex_m7",
19511826 .llvm_name = "cortex-m7",
19521827 .features = featureSet(&[_]Feature{
......@@ -1954,7 +1829,7 @@ pub const cpu = struct {
19541829 .fp_armv8d16,
19551830 }),
19561831 };
1957 pub const cortex_r4 = Cpu{
1832 pub const cortex_r4 = CpuModel{
19581833 .name = "cortex_r4",
19591834 .llvm_name = "cortex-r4",
19601835 .features = featureSet(&[_]Feature{
......@@ -1964,7 +1839,7 @@ pub const cpu = struct {
19641839 .ret_addr_stack,
19651840 }),
19661841 };
1967 pub const cortex_r4f = Cpu{
1842 pub const cortex_r4f = CpuModel{
19681843 .name = "cortex_r4f",
19691844 .llvm_name = "cortex-r4f",
19701845 .features = featureSet(&[_]Feature{
......@@ -1977,32 +1852,30 @@ pub const cpu = struct {
19771852 .vfp3d16,
19781853 }),
19791854 };
1980 pub const cortex_r5 = Cpu{
1855 pub const cortex_r5 = CpuModel{
19811856 .name = "cortex_r5",
19821857 .llvm_name = "cortex-r5",
19831858 .features = featureSet(&[_]Feature{
19841859 .armv7_r,
19851860 .avoid_partial_cpsr,
19861861 .hwdiv_arm,
1987 .r5,
19881862 .ret_addr_stack,
19891863 .slow_fp_brcc,
19901864 .slowfpvmlx,
19911865 .vfp3d16,
19921866 }),
19931867 };
1994 pub const cortex_r52 = Cpu{
1868 pub const cortex_r52 = CpuModel{
19951869 .name = "cortex_r52",
19961870 .llvm_name = "cortex-r52",
19971871 .features = featureSet(&[_]Feature{
19981872 .armv8_r,
19991873 .fpao,
2000 .r52,
20011874 .use_aa,
20021875 .use_misched,
20031876 }),
20041877 };
2005 pub const cortex_r7 = Cpu{
1878 pub const cortex_r7 = CpuModel{
20061879 .name = "cortex_r7",
20071880 .llvm_name = "cortex-r7",
20081881 .features = featureSet(&[_]Feature{
......@@ -2011,14 +1884,13 @@ pub const cpu = struct {
20111884 .fp16,
20121885 .hwdiv_arm,
20131886 .mp,
2014 .r7,
20151887 .ret_addr_stack,
20161888 .slow_fp_brcc,
20171889 .slowfpvmlx,
20181890 .vfp3d16,
20191891 }),
20201892 };
2021 pub const cortex_r8 = Cpu{
1893 pub const cortex_r8 = CpuModel{
20221894 .name = "cortex_r8",
20231895 .llvm_name = "cortex-r8",
20241896 .features = featureSet(&[_]Feature{
......@@ -2033,7 +1905,7 @@ pub const cpu = struct {
20331905 .vfp3d16,
20341906 }),
20351907 };
2036 pub const cyclone = Cpu{
1908 pub const cyclone = CpuModel{
20371909 .name = "cyclone",
20381910 .llvm_name = "cyclone",
20391911 .features = featureSet(&[_]Feature{
......@@ -2054,14 +1926,14 @@ pub const cpu = struct {
20541926 .zcz,
20551927 }),
20561928 };
2057 pub const ep9312 = Cpu{
1929 pub const ep9312 = CpuModel{
20581930 .name = "ep9312",
20591931 .llvm_name = "ep9312",
20601932 .features = featureSet(&[_]Feature{
20611933 .armv4t,
20621934 }),
20631935 };
2064 pub const exynos_m1 = Cpu{
1936 pub const exynos_m1 = CpuModel{
20651937 .name = "exynos_m1",
20661938 .llvm_name = "exynos-m1",
20671939 .features = featureSet(&[_]Feature{
......@@ -2069,7 +1941,7 @@ pub const cpu = struct {
20691941 .exynos,
20701942 }),
20711943 };
2072 pub const exynos_m2 = Cpu{
1944 pub const exynos_m2 = CpuModel{
20731945 .name = "exynos_m2",
20741946 .llvm_name = "exynos-m2",
20751947 .features = featureSet(&[_]Feature{
......@@ -2077,7 +1949,7 @@ pub const cpu = struct {
20771949 .exynos,
20781950 }),
20791951 };
2080 pub const exynos_m3 = Cpu{
1952 pub const exynos_m3 = CpuModel{
20811953 .name = "exynos_m3",
20821954 .llvm_name = "exynos-m3",
20831955 .features = featureSet(&[_]Feature{
......@@ -2085,7 +1957,7 @@ pub const cpu = struct {
20851957 .exynos,
20861958 }),
20871959 };
2088 pub const exynos_m4 = Cpu{
1960 pub const exynos_m4 = CpuModel{
20891961 .name = "exynos_m4",
20901962 .llvm_name = "exynos-m4",
20911963 .features = featureSet(&[_]Feature{
......@@ -2095,7 +1967,7 @@ pub const cpu = struct {
20951967 .fullfp16,
20961968 }),
20971969 };
2098 pub const exynos_m5 = Cpu{
1970 pub const exynos_m5 = CpuModel{
20991971 .name = "exynos_m5",
21001972 .llvm_name = "exynos-m5",
21011973 .features = featureSet(&[_]Feature{
......@@ -2105,19 +1977,19 @@ pub const cpu = struct {
21051977 .fullfp16,
21061978 }),
21071979 };
2108 pub const generic = Cpu{
1980 pub const generic = CpuModel{
21091981 .name = "generic",
21101982 .llvm_name = "generic",
21111983 .features = featureSet(&[_]Feature{}),
21121984 };
2113 pub const iwmmxt = Cpu{
1985 pub const iwmmxt = CpuModel{
21141986 .name = "iwmmxt",
21151987 .llvm_name = "iwmmxt",
21161988 .features = featureSet(&[_]Feature{
21171989 .armv5te,
21181990 }),
21191991 };
2120 pub const krait = Cpu{
1992 pub const krait = CpuModel{
21211993 .name = "krait",
21221994 .llvm_name = "krait",
21231995 .features = featureSet(&[_]Feature{
......@@ -2126,7 +1998,6 @@ pub const cpu = struct {
21261998 .fp16,
21271999 .hwdiv,
21282000 .hwdiv_arm,
2129 .krait,
21302001 .muxed_units,
21312002 .ret_addr_stack,
21322003 .vfp4,
......@@ -2134,7 +2005,7 @@ pub const cpu = struct {
21342005 .vmlx_forwarding,
21352006 }),
21362007 };
2137 pub const kryo = Cpu{
2008 pub const kryo = CpuModel{
21382009 .name = "kryo",
21392010 .llvm_name = "kryo",
21402011 .features = featureSet(&[_]Feature{
......@@ -2146,7 +2017,7 @@ pub const cpu = struct {
21462017 .kryo,
21472018 }),
21482019 };
2149 pub const mpcore = Cpu{
2020 pub const mpcore = CpuModel{
21502021 .name = "mpcore",
21512022 .llvm_name = "mpcore",
21522023 .features = featureSet(&[_]Feature{
......@@ -2155,21 +2026,21 @@ pub const cpu = struct {
21552026 .vfp2,
21562027 }),
21572028 };
2158 pub const mpcorenovfp = Cpu{
2029 pub const mpcorenovfp = CpuModel{
21592030 .name = "mpcorenovfp",
21602031 .llvm_name = "mpcorenovfp",
21612032 .features = featureSet(&[_]Feature{
21622033 .armv6k,
21632034 }),
21642035 };
2165 pub const sc000 = Cpu{
2036 pub const sc000 = CpuModel{
21662037 .name = "sc000",
21672038 .llvm_name = "sc000",
21682039 .features = featureSet(&[_]Feature{
21692040 .armv6_m,
21702041 }),
21712042 };
2172 pub const sc300 = Cpu{
2043 pub const sc300 = CpuModel{
21732044 .name = "sc300",
21742045 .llvm_name = "sc300",
21752046 .features = featureSet(&[_]Feature{
......@@ -2180,35 +2051,35 @@ pub const cpu = struct {
21802051 .use_misched,
21812052 }),
21822053 };
2183 pub const strongarm = Cpu{
2054 pub const strongarm = CpuModel{
21842055 .name = "strongarm",
21852056 .llvm_name = "strongarm",
21862057 .features = featureSet(&[_]Feature{
21872058 .armv4,
21882059 }),
21892060 };
2190 pub const strongarm110 = Cpu{
2061 pub const strongarm110 = CpuModel{
21912062 .name = "strongarm110",
21922063 .llvm_name = "strongarm110",
21932064 .features = featureSet(&[_]Feature{
21942065 .armv4,
21952066 }),
21962067 };
2197 pub const strongarm1100 = Cpu{
2068 pub const strongarm1100 = CpuModel{
21982069 .name = "strongarm1100",
21992070 .llvm_name = "strongarm1100",
22002071 .features = featureSet(&[_]Feature{
22012072 .armv4,
22022073 }),
22032074 };
2204 pub const strongarm1110 = Cpu{
2075 pub const strongarm1110 = CpuModel{
22052076 .name = "strongarm1110",
22062077 .llvm_name = "strongarm1110",
22072078 .features = featureSet(&[_]Feature{
22082079 .armv4,
22092080 }),
22102081 };
2211 pub const swift = Cpu{
2082 pub const swift = CpuModel{
22122083 .name = "swift",
22132084 .llvm_name = "swift",
22142085 .features = featureSet(&[_]Feature{
......@@ -2235,7 +2106,7 @@ pub const cpu = struct {
22352106 .wide_stride_vfp,
22362107 }),
22372108 };
2238 pub const xscale = Cpu{
2109 pub const xscale = CpuModel{
22392110 .name = "xscale",
22402111 .llvm_name = "xscale",
22412112 .features = featureSet(&[_]Feature{
......@@ -2247,7 +2118,7 @@ pub const cpu = struct {
22472118/// All arm CPUs, sorted alphabetically by name.
22482119/// TODO: Replace this with usage of `std.meta.declList`. It does work, but stage1
22492120/// compiler has inefficient memory and CPU usage, affecting build times.
2250pub const all_cpus = &[_]*const Cpu{
2121pub const all_cpus = &[_]*const CpuModel{
22512122 &cpu.arm1020e,
22522123 &cpu.arm1020t,
22532124 &cpu.arm1022e,