authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-17 02:05:37+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-26 21:59:59+02:00
log79717740bdce162caa34936040cd774dbe4c15a2
treee1a0edbe56351c6546ea1c30f0be341fcf1646c5
parentea987faa85ea57db89167a220853e0c0936c7d43
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Pick better baseline CPU models for darwin and ps4/ps5 on x86_64.

These are sourced from getX86TargetCPU() in Clang.

1 files changed, 7 insertions(+), 0 deletions(-)

lib/std/Target.zig+7
......@@ -1872,6 +1872,13 @@ pub const Cpu = struct {
18721872 .s390x => &s390x.cpu.arch8, // gcc/clang do not have a generic s390x model.
18731873 .sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
18741874 .x86 => &x86.cpu.pentium4,
1875 .x86_64 => switch (os.tag) {
1876 .driverkit => &x86.cpu.nehalem,
1877 .ios, .macos, .tvos, .visionos, .watchos => &x86.cpu.core2,
1878 .ps4 => &x86.cpu.btver2,
1879 .ps5 => &x86.cpu.znver2,
1880 else => generic(arch),
1881 },
18751882 .xcore => &xcore.cpu.xs1b_generic,
18761883
18771884 else => generic(arch),