Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cpu family for M4 #1

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/CPUInfo/Model/CPUFamily.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public enum CPUFamily {
case arm_coll
/// CPUFAMILY_ARM_LOBOS
case arm_lobos
/// CPUFAMILY_ARM_DONAN
case arm_donan
}

extension CPUFamily: RawRepresentable {
Expand Down Expand Up @@ -132,6 +134,7 @@ extension CPUFamily: RawRepresentable {
case RawValue(CPUFAMILY_ARM_PALMA): self = .arm_palma
case RawValue(CPUFAMILY_ARM_COLL): self = .arm_coll
case RawValue(CPUFAMILY_ARM_LOBOS): self = .arm_lobos
case RawValue(CPUFAMILY_ARM_DONAN): self = .arm_donan
default: return nil
}
}
Expand Down Expand Up @@ -175,6 +178,7 @@ extension CPUFamily: RawRepresentable {
case .arm_palma: RawValue(CPUFAMILY_ARM_PALMA)
case .arm_coll: RawValue(CPUFAMILY_ARM_COLL)
case .arm_lobos: RawValue(CPUFAMILY_ARM_LOBOS)
case .arm_donan: RawValue(CPUFAMILY_ARM_DONAN)
}
}
}
Expand Down Expand Up @@ -220,6 +224,7 @@ extension CPUFamily: CustomStringConvertible {
case .arm_palma: "CPUFAMILY_ARM_PALMA"
case .arm_coll: "CPUFAMILY_ARM_COLL"
case .arm_lobos: "CPUFAMILY_ARM_LOBOS"
case .arm_donan: "CPUFAMILY_ARM_DONAN"
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions Sources/CPUInfoC/include/cpu_family.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@
#define CPUFAMILY_ARM_LOBOS 0x5f4dea93
#endif

#ifndef CPUFAMILY_ARM_DONAN
#define CPUFAMILY_ARM_DONAN 0x6f5129ac
#endif

#endif /* cpu_family_h */