OS::Mac::CPU: add Apple Silicon

Co-authored-by: Shaun Jackman <sjackman@gmail.com>
This commit is contained in:
Misty De Meo 2020-06-22 11:50:49 -07:00
parent 4de9d10953
commit 6a3f18b0ae

View File

@ -11,12 +11,16 @@ module Hardware
case sysctl_int("hw.cputype") case sysctl_int("hw.cputype")
when 7 when 7
:intel :intel
when MachO::Headers::CPU_TYPE_ARM64
:arm
else else
:dunno :dunno
end end
end end
def family def family
return :dunno if arm?
case sysctl_int("hw.cpufamily") case sysctl_int("hw.cpufamily")
when 0x73d67300 # Yonah: Core Solo/Duo when 0x73d67300 # Yonah: Core Solo/Duo
:core :core