1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00

Print a warning for unsupported CPU architectures

The goal is to warn people trying to build libcpuid on PPC, MIPS, RISC-V and so on.
This commit is contained in:
The Tumultuous Unicorn Of Darkness 2024-07-01 15:11:21 +02:00
parent 2dcd347807
commit 1bc636e2cf
No known key found for this signature in database
GPG key ID: 1E55EE2EFF18BC1A

View file

@ -1287,6 +1287,9 @@ int cpuid_get_raw_data(struct cpu_raw_data_t* data)
cpu_exec_mrs(SYS_ID_AA64PFR2_EL1, data->arm_id_aa64pfr[2]); cpu_exec_mrs(SYS_ID_AA64PFR2_EL1, data->arm_id_aa64pfr[2]);
cpu_exec_mrs(SYS_ID_AA64SMFR0_EL1, data->arm_id_aa64smfr[0]); cpu_exec_mrs(SYS_ID_AA64SMFR0_EL1, data->arm_id_aa64smfr[0]);
cpu_exec_mrs(SYS_ID_AA64ZFR0_EL1, data->arm_id_aa64zfr[0]); cpu_exec_mrs(SYS_ID_AA64ZFR0_EL1, data->arm_id_aa64zfr[0]);
#else
# warning This CPU architecture is not supported by libcpuid
UNUSED(data);
#endif #endif
return cpuid_set_error(ERR_OK); return cpuid_set_error(ERR_OK);
} }