Skip to content

Commit

Permalink
Add Apple M4 as VORTEX with HAVE_SME
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Nov 12, 2024
1 parent 24c5152 commit 50da5c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpuid_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ int detect(void)
if (value64 ==131287967|| value64 == 458787763 ) return CPU_VORTEX; //A12/M1
if (value64 == 3660830781) return CPU_VORTEX; //A15/M2
if (value64 == 2271604202) return CPU_VORTEX; //A16/M3
if (value64 == 1867590060) return CPU_VORTEX; //M4
#endif
return CPU_ARMV8;
#endif
Expand Down Expand Up @@ -558,6 +559,8 @@ void get_cpuconfig(void)
case CPU_VORTEX:
printf("#define VORTEX \n");
#ifdef __APPLE__
sysctlbyname("hw.cpufamily",&value64,&length64,NULL,0);
if (value64 == 1867590060) printf("#define HAVE_SME 1\n");; //M4
sysctlbyname("hw.l1icachesize",&value64,&length64,NULL,0);
printf("#define L1_CODE_SIZE %lld \n",value64);
sysctlbyname("hw.cachelinesize",&value64,&length64,NULL,0);
Expand Down

0 comments on commit 50da5c2

Please sign in to comment.