authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-08-07 22:48:57-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-08-07 22:48:57-07:00
log468b976f63b0938f2a799261b536167959c059b4
tree9af0e9f74eef0a4cf0732d5600eda9ad425a68d4
parent7a7421c74970a0d52286fa33086e80af29fc8d0b
parente912411fbedab06f4b7313404c9bb88f9e9e6c44
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #20975 from squeek502/cpu-features-update

update_cpu_features: Fixes and updates

3 files changed, 20 insertions(+), 8 deletions(-)

lib/std/Target/arm.zig+9-8
......@@ -86,6 +86,7 @@ pub const Feature = enum {
8686 has_v9_2a,
8787 has_v9_3a,
8888 has_v9_4a,
89 has_v9_5a,
8990 has_v9a,
9091 hwdiv,
9192 hwdiv_arm,
......@@ -754,6 +755,13 @@ pub const all_features = blk: {
754755 .has_v9_3a,
755756 }),
756757 };
758 result[@intFromEnum(Feature.has_v9_5a)] = .{
759 .llvm_name = "v9.5a",
760 .description = "Support ARM v9.5a instructions",
761 .dependencies = featureSet(&[_]Feature{
762 .has_v9_4a,
763 }),
764 };
757765 result[@intFromEnum(Feature.has_v9a)] = .{
758766 .llvm_name = "v9a",
759767 .description = "Support ARM v9a instructions",
......@@ -1582,20 +1590,13 @@ pub const all_features = blk: {
15821590 .db,
15831591 .dsp,
15841592 .fp_armv8,
1593 .has_v9_5a,
15851594 .mp,
15861595 .ras,
15871596 .trustzone,
1588 .v9_5a,
15891597 .virtualization,
15901598 }),
15911599 };
1592 result[@intFromEnum(Feature.v9_5a)] = .{
1593 .llvm_name = "v9.5a",
1594 .description = "Support ARM v9.5a instructions",
1595 .dependencies = featureSet(&[_]Feature{
1596 .has_v9_4a,
1597 }),
1598 };
15991600 result[@intFromEnum(Feature.v9a)] = .{
16001601 .llvm_name = "armv9-a",
16011602 .description = "ARMv9a architecture",
lib/std/Target/riscv.zig+6
......@@ -78,6 +78,7 @@ pub const Feature = enum {
7878 svnapot,
7979 svpbmt,
8080 tagged_globals,
81 unaligned_scalar_mem,
8182 use_postra_scheduler,
8283 v,
8384 ventana_veyron,
......@@ -584,6 +585,11 @@ pub const all_features = blk: {
584585 .description = "Use an instruction sequence for taking the address of a global that allows a memory tag in the upper address bits",
585586 .dependencies = featureSet(&[_]Feature{}),
586587 };
588 result[@intFromEnum(Feature.unaligned_scalar_mem)] = .{
589 .llvm_name = "unaligned-scalar-mem",
590 .description = "Has reasonably performant unaligned scalar loads and stores",
591 .dependencies = featureSet(&[_]Feature{}),
592 };
587593 result[@intFromEnum(Feature.use_postra_scheduler)] = .{
588594 .llvm_name = "use-postra-scheduler",
589595 .description = "Schedule again after register allocation",
tools/update_cpu_features.zig+5
......@@ -809,6 +809,10 @@ const llvm_targets = [_]LlvmTarget{
809809 .llvm_name = "v9.4a",
810810 .zig_name = "has_v9_4a",
811811 },
812 .{
813 .llvm_name = "v9.5a",
814 .zig_name = "has_v9_5a",
815 },
812816 },
813817 // LLVM removed support for v2 and v3 but zig wants to support targeting old hardware
814818 .extra_features = &.{
......@@ -990,6 +994,7 @@ const llvm_targets = [_]LlvmTarget{
990994 "icelake_client",
991995 "icelake_server",
992996 "graniterapids_d",
997 "arrowlake_s",
993998 },
994999 },
9951000 .{