[v0.98][PPC] Add altivec detection and peak performance output

This commit is contained in:
Dr-Noob
2021-07-31 17:43:02 +02:00
parent faac972107
commit 4d1d14d2a7
6 changed files with 80 additions and 11 deletions

View File

@@ -219,6 +219,23 @@ struct uarch* get_uarch_from_pvr(uint32_t pvr) {
return arch;
}
bool has_altivec(struct uarch* arch) {
switch(arch->uarch) {
case UARCH_PPC970FX:
case UARCH_PPC970MP:
case UARCH_CELLBE:
case UARCH_POWER6:
case UARCH_POWER7:
case UARCH_POWER7PLUS:
case UARCH_POWER8:
case UARCH_POWER9:
case UARCH_POWER10:
return true;
default:
return false;
}
}
char* get_str_uarch(struct cpuInfo* cpu) {
return cpu->arch->uarch_str;
}