correctly detect apple a15 and a16 chips

This commit is contained in:
xdBronch 2023-10-02 20:47:03 -04:00 committed by Andrew Kelley
parent 412d863ba5
commit c9c3ee704c
2 changed files with 4 additions and 0 deletions

View File

@ -3028,6 +3028,8 @@ pub const CPUFAMILY = enum(u32) {
ARM_VORTEX_TEMPEST = 0x07d34b9f,
ARM_LIGHTNING_THUNDER = 0x462504d2,
ARM_FIRESTORM_ICESTORM = 0x1b588bb3,
ARM_BLIZZARD_AVALANCHE = 0xda33d83d,
ARM_EVEREST_SAWTOOTH = 0x8765edea,
_,
};

View File

@ -428,6 +428,8 @@ pub fn detectNativeCpuAndFeatures() ?Target.Cpu {
switch (current_arch) {
.aarch64, .aarch64_be, .aarch64_32 => {
const model = switch (cpu_family) {
.ARM_EVEREST_SAWTOOTH => &Target.aarch64.cpu.apple_a16,
.ARM_BLIZZARD_AVALANCHE => &Target.aarch64.cpu.apple_a15,
.ARM_FIRESTORM_ICESTORM => &Target.aarch64.cpu.apple_a14,
.ARM_LIGHTNING_THUNDER => &Target.aarch64.cpu.apple_a13,
.ARM_VORTEX_TEMPEST => &Target.aarch64.cpu.apple_a12,