Fix riscv64 arch detect
Signed-off-by: Han Gao <gaohan@uniontech.com>
This commit is contained in:
parent
3fc52ebcfb
commit
8123324c99
|
@ -1,5 +1,5 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
Copyright (c) 2011-2014, The OpenBLAS Project
|
Copyright (c) 2011-2022, The OpenBLAS Project
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -70,16 +70,16 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
/* or implied, of The University of Texas at Austin. */
|
/* or implied, of The University of Texas at Austin. */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|
||||||
#define CPU_UNKNOWN 0
|
#define CPU_GENERIC 0
|
||||||
#define CPU_C910V 1
|
#define CPU_C910V 1
|
||||||
|
|
||||||
static char *cpuname[] = {
|
static char *cpuname[] = {
|
||||||
"UNKOWN",
|
"RISCV64_GENERIC",
|
||||||
"C910V"
|
"C910V"
|
||||||
};
|
};
|
||||||
|
|
||||||
int detect(void){
|
int detect(void){
|
||||||
return CPU_UNKNOWN;
|
return CPU_GENERIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *get_corename(void){
|
char *get_corename(void){
|
||||||
|
@ -98,7 +98,7 @@ void get_subdirname(void){
|
||||||
}
|
}
|
||||||
|
|
||||||
void get_cpuconfig(void){
|
void get_cpuconfig(void){
|
||||||
printf("#define UNKNOWN\n");
|
printf("#define %s\n", cpuname[detect()]);
|
||||||
printf("#define L1_DATA_SIZE 65536\n");
|
printf("#define L1_DATA_SIZE 65536\n");
|
||||||
printf("#define L1_DATA_LINESIZE 32\n");
|
printf("#define L1_DATA_LINESIZE 32\n");
|
||||||
printf("#define L2_SIZE 512488\n");
|
printf("#define L2_SIZE 512488\n");
|
||||||
|
|
|
@ -1731,7 +1731,7 @@ int main(int argc, char *argv[]){
|
||||||
#ifdef FORCE
|
#ifdef FORCE
|
||||||
printf("CORE=%s\n", CORENAME);
|
printf("CORE=%s\n", CORENAME);
|
||||||
#else
|
#else
|
||||||
#if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc) || defined(__loongarch__)
|
#if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc) || defined(__loongarch__) || defined(__riscv)
|
||||||
printf("CORE=%s\n", get_corename());
|
printf("CORE=%s\n", get_corename());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1879,7 +1879,7 @@ printf("ELF_VERSION=2\n");
|
||||||
#ifdef FORCE
|
#ifdef FORCE
|
||||||
printf("#define CHAR_CORENAME \"%s\"\n", CORENAME);
|
printf("#define CHAR_CORENAME \"%s\"\n", CORENAME);
|
||||||
#else
|
#else
|
||||||
#if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc) || defined(__loongarch__)
|
#if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc) || defined(__loongarch__) || defined(__riscv)
|
||||||
printf("#define CHAR_CORENAME \"%s\"\n", get_corename());
|
printf("#define CHAR_CORENAME \"%s\"\n", get_corename());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue