LoongArch64: Temporarily disable LASX and LSX optimization by default

This commit is contained in:
gxw 2022-08-16 14:50:07 +08:00
parent fa4d5fb397
commit 26eee97b38
2 changed files with 24 additions and 4 deletions

View File

@ -230,14 +230,24 @@ int detect(void) {
switch (prid & PRID_SERIES_MASK) { switch (prid & PRID_SERIES_MASK) {
case (PRID_SERIES_LA464): case (PRID_SERIES_LA464):
if (support_lasx()) if (support_lasx())
return CPU_LA464; /* TODO: Temporarily disable LASX optimization by default.
* When other upstream like kernel and gcc support LASX,
* return CPU_LA464.
*/
//return CPU_LA464;
return CPU_GENERIC;
else else
return CPU_GENERIC; return CPU_GENERIC;
break; break;
case (PRID_SERIES_LA264): case (PRID_SERIES_LA264):
if (support_lsx()) if (support_lsx())
return CPU_LA264; /* TODO: Temporarily disable LSX optimization by default.
* When other upstream like kernel and gcc support LSX,
* return CPU_LA264.
*/
//return CPU_LA264;
return CPU_GENERIC;
else else
return CPU_GENERIC; return CPU_GENERIC;
break; break;

View File

@ -124,14 +124,24 @@ static gotoblas_t *get_coretype(void) {
switch (prid & PRID_SERIES_MASK) { switch (prid & PRID_SERIES_MASK) {
case (PRID_SERIES_LA464): case (PRID_SERIES_LA464):
if (support_lasx()) if (support_lasx())
return &gotoblas_LA464; /* TODO: Temporarily disable LASX optimization by default.
* When other upstream like kernel and gcc support LASX,
* return &gotoblas_LA464.
*/
//return &gotoblas_LA464;
return &gotoblas_LA64_GENERIC;
else else
return &gotoblas_LA64_GENERIC; return &gotoblas_LA64_GENERIC;
break; break;
case (PRID_SERIES_LA264): case (PRID_SERIES_LA264):
if (support_lsx()) if (support_lsx())
return &gotoblas_LA264; /* TODO: Temporarily disable LSX optimization by default.
* When other upstream like kernel and gcc support LSX,
* return &gotoblas_LA264.
*/
//return &gotoblas_LA264;
return &gotoblas_LA64_GENERIC;
else else
return &gotoblas_LA64_GENERIC; return &gotoblas_LA64_GENERIC;
break; break;