Skip to content

Commit 10cf06d

Browse files
authored
Merge branch 'OpenMathLib:develop' into develop
2 parents 760bf7a + 2057cd7 commit 10cf06d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cpuid_arm64.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ int detect(void)
281281
if (value64 ==131287967|| value64 == 458787763 ) return CPU_VORTEX; //A12/M1
282282
if (value64 == 3660830781) return CPU_VORTEX; //A15/M2
283283
if (value64 == 2271604202) return CPU_VORTEX; //A16/M3
284+
if (value64 == 1867590060) return CPU_VORTEX; //M4
284285
#endif
285286
return CPU_ARMV8;
286287
#endif
@@ -558,6 +559,8 @@ void get_cpuconfig(void)
558559
case CPU_VORTEX:
559560
printf("#define VORTEX \n");
560561
#ifdef __APPLE__
562+
sysctlbyname("hw.cpufamily",&value64,&length64,NULL,0);
563+
if (value64 == 1867590060) printf("#define HAVE_SME 1\n");; //M4
561564
sysctlbyname("hw.l1icachesize",&value64,&length64,NULL,0);
562565
printf("#define L1_CODE_SIZE %lld \n",value64);
563566
sysctlbyname("hw.cachelinesize",&value64,&length64,NULL,0);

0 commit comments

Comments
 (0)