Neoverse N2: DYNAMIC_ARCH

This commit is contained in:
Honglin Zhu 2022-07-12 00:40:22 +08:00
parent 7918ba11c2
commit d5ca477f42
1 changed files with 11 additions and 2 deletions

View File

@ -99,6 +99,11 @@ extern gotoblas_t gotoblas_NEOVERSEN1;
#else #else
#define gotoblas_NEOVERSEN1 gotoblas_ARMV8 #define gotoblas_NEOVERSEN1 gotoblas_ARMV8
#endif #endif
#ifdef DYN_NEOVERSEN2
extern gotoblas_t gotoblas_NEOVERSEN2;
#else
#define gotoblas_NEOVERSEN2 gotoblas_ARMV8
#endif
#ifdef DYN_CORTEX_A55 #ifdef DYN_CORTEX_A55
extern gotoblas_t gotoblas_CORTEXA55; extern gotoblas_t gotoblas_CORTEXA55;
#else #else
@ -115,6 +120,7 @@ extern gotoblas_t gotoblas_THUNDERX2T99;
extern gotoblas_t gotoblas_TSV110; extern gotoblas_t gotoblas_TSV110;
extern gotoblas_t gotoblas_EMAG8180; extern gotoblas_t gotoblas_EMAG8180;
extern gotoblas_t gotoblas_NEOVERSEN1; extern gotoblas_t gotoblas_NEOVERSEN1;
extern gotoblas_t gotoblas_NEOVERSEN2;
extern gotoblas_t gotoblas_THUNDERX3T110; extern gotoblas_t gotoblas_THUNDERX3T110;
extern gotoblas_t gotoblas_CORTEXA55; extern gotoblas_t gotoblas_CORTEXA55;
#endif #endif
@ -166,8 +172,9 @@ char *gotoblas_corename(void) {
if (gotoblas == &gotoblas_TSV110) return corename[ 8]; if (gotoblas == &gotoblas_TSV110) return corename[ 8];
if (gotoblas == &gotoblas_EMAG8180) return corename[ 9]; if (gotoblas == &gotoblas_EMAG8180) return corename[ 9];
if (gotoblas == &gotoblas_NEOVERSEN1) return corename[10]; if (gotoblas == &gotoblas_NEOVERSEN1) return corename[10];
if (gotoblas == &gotoblas_THUNDERX3T110) return corename[11]; if (gotoblas == &gotoblas_NEOVERSEN2) return corename[12];
if (gotoblas == &gotoblas_CORTEXA55) return corename[12]; if (gotoblas == &gotoblas_THUNDERX3T110) return corename[13];
if (gotoblas == &gotoblas_CORTEXA55) return corename[14];
return corename[NUM_CORETYPES]; return corename[NUM_CORETYPES];
} }
@ -258,6 +265,8 @@ static gotoblas_t *get_coretype(void) {
return &gotoblas_CORTEXA73; return &gotoblas_CORTEXA73;
case 0xd0c: // Neoverse N1 case 0xd0c: // Neoverse N1
return &gotoblas_NEOVERSEN1; return &gotoblas_NEOVERSEN1;
case 0xd49:
return &gotoblas_NEOVERSEN2;
case 0xd05: // Cortex A55 case 0xd05: // Cortex A55
return &gotoblas_CORTEXA55; return &gotoblas_CORTEXA55;
} }