Reduce differences.
This commit is contained in:
parent
71c6689af4
commit
298bf1f240
|
@ -178,23 +178,23 @@ static struct {
|
||||||
|
|
||||||
static int cpuid(void)
|
static int cpuid(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uint32_t pvr;
|
uint32_t pvr;
|
||||||
uint32_t cpu_type;
|
uint32_t cpu_type;
|
||||||
|
|
||||||
asm("mfpvr %0" : "=r"(pvr));
|
asm("mfpvr %0" : "=r"(pvr));
|
||||||
|
|
||||||
for (i = 0 ; i < sizeof pvrPOWER / sizeof *pvrPOWER ; ++i) {
|
for (i = 0 ; i < sizeof pvrPOWER / sizeof *pvrPOWER ; ++i) {
|
||||||
if ((pvr & pvrPOWER[i].pvr_mask) == pvrPOWER[i].pvr_value) {
|
if ((pvr & pvrPOWER[i].pvr_mask) == pvrPOWER[i].pvr_value) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
printf("%s: returning CPU=%s, cpu_type=%p\n", __func__,
|
printf("%s: returning CPU=%s, cpu_type=%p\n", __func__,
|
||||||
pvrPOWER[i].cpu_name, pvrPOWER[i].cpu_type);
|
pvrPOWER[i].cpu_name, pvrPOWER[i].cpu_type);
|
||||||
#endif
|
#endif
|
||||||
cpu_type = pvrPOWER[i].cpu_type;
|
cpu_type = pvrPOWER[i].cpu_type;
|
||||||
return (int)(cpu_type);
|
return (int)(cpu_type);
|
||||||
}
|
}
|
||||||
#endif /* C_PGI */
|
#endif /* C_PGI */
|
||||||
|
@ -252,10 +252,10 @@ static gotoblas_t *get_coretype(void) {
|
||||||
#endif
|
#endif
|
||||||
return &gotoblas_POWER10;
|
return &gotoblas_POWER10;
|
||||||
#endif
|
#endif
|
||||||
/* Fall back to the POWER9 implementation if the toolchain is too old or the MMA feature is not set */
|
/* Fall back to the POWER9 implementation if the toolchain is too old or the MMA feature is not set */
|
||||||
#if (!defined __GNUC__) || ( __GNUC__ >= 11) || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
|
#if (!defined __GNUC__) || ( __GNUC__ >= 11) || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
|
||||||
if (__builtin_cpu_is("power10"))
|
if (__builtin_cpu_is("power10"))
|
||||||
return &gotoblas_POWER9;
|
return &gotoblas_POWER9;
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue