1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-10 21:06:03 +02:00
divinity76 2024-02-05 16:40:09 +01:00 committed by GitHub
parent 21459753ca
commit f9b332c61c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -159,11 +159,13 @@ static
#elif defined(__aarch64__)
uint64_t id_aa64pfr0_el1;
__asm__ ("mrs %0, ID_AA64PFR0_EL1" : "=r" (id_aa64pfr0_el1));
if((id_aa64pfr0_el1 >> 20) & (1<<0 | 1<<1 | 1<<2 | 1 << 3)) {
if(((id_aa64pfr0_el1 >> 20) & (1<<0 | 1<<1 | 1<<2 | 1 << 3)) != 15) {
// https://developer.arm.com/documentation/ddi0595/2021-12/AArch64-Registers/ID-AA64PFR0-EL1--AArch64-Processor-Feature-Register-0?lang=en
// 15 means not implemented, 0 means neon is present but float16 is missing, 1 means neon with float16 is present ?
features = ARM_NEON;
} else {
features = 0;
}
}
ATOMIC_STORE(g_cpu_features, features);
return features;
#else