Skip to content

Commit 85be43e

Browse files
authored
Merge pull request #3083 from martin-frbg/develop
Add DYNAMIC_LIST support for ARM64
2 parents 0745ba4 + 0cb9e9f commit 85be43e

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

Makefile.system

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ DYNAMIC_CORE += THUNDERX2T99
625625
DYNAMIC_CORE += TSV110
626626
DYNAMIC_CORE += EMAG8180
627627
DYNAMIC_CORE += THUNDERX3T110
628+
ifdef DYNAMIC_LIST
629+
override DYNAMIC_CORE = ARMV8 $(DYNAMIC_LIST)
630+
XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_ARMV8
631+
XCCOMMON_OPT += $(foreach dcore,$(DYNAMIC_LIST),-DDYN_$(dcore))
632+
endif
628633
endif
629634

630635
ifeq ($(ARCH), mips64)

cmake/arch.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ endif ()
4545
if (DYNAMIC_ARCH)
4646
if (ARM64)
4747
set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
48+
if (DYNAMIC_LIST)
49+
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
50+
endif ()
4851
endif ()
4952

5053
if (POWER)

driver/others/dynamic_arm64.c

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,63 @@
4343
#endif
4444

4545
extern gotoblas_t gotoblas_ARMV8;
46+
#ifdef DYNAMIC_LIST
47+
#ifdef DYN_CORTEXA53
48+
extern gotoblas_t gotoblas_CORTEXA53;
49+
#else
50+
#define gotoblas_CORTEXA53 gotoblas_ARMV8
51+
#endif
52+
#ifdef DYN_CORTEXA57
53+
extern gotoblas_t gotoblas_CORTEXA57;
54+
#else
55+
#define gotoblas_CORTEXA57 gotoblas_ARMV8
56+
#endif
57+
#ifdef DYN_CORTEXA72
58+
extern gotoblas_t gotoblas_CORTEXA72;
59+
#else
60+
#define gotoblas_CORTEXA72 gotoblas_ARMV8
61+
#endif
62+
#ifdef DYN_CORTEXA73
63+
extern gotoblas_t gotoblas_CORTEXA73;
64+
#else
65+
#define gotoblas_CORTEXA73 gotoblas_ARMV8
66+
#endif
67+
#ifdef DYN_FALKOR
68+
extern gotoblas_t gotoblas_FALKOR;
69+
#else
70+
#define gotoblas_FALKOR gotoblas_ARMV8
71+
#endif
72+
#ifdef DYN_TSV110
73+
extern gotoblas_t gotoblas_TSV110;
74+
#else
75+
#define gotoblas_TSV110 gotoblas_ARMV8
76+
#endif
77+
#ifdef DYN_THUNDERX
78+
extern gotoblas_t gotoblas_THUNDERX;
79+
#else
80+
#define gotoblas_THUNDERX gotoblas_ARMV8
81+
#endif
82+
#ifdef DYN_THUNDERX2T99
83+
extern gotoblas_t gotoblas_THUNDERX2T99;
84+
#else
85+
#define gotoblas_THUNDERX2T99 gotoblas_ARMV8
86+
#endif
87+
#ifdef DYN_THUNDERX3T110
88+
extern gotoblas_t gotoblas_THUNDERX3T110;
89+
#else
90+
#define gotoblas_THUNDERX3T110 gotoblas_ARMV8
91+
#endif
92+
#ifdef DYN_EMAG8180
93+
extern gotoblas_t gotoblas_EMAG8180;
94+
#else
95+
#define gotoblas_EMAG8180 gotoblas_ARMV8
96+
#endif
97+
#ifdef DYN_NEOVERSEN1
98+
extern gotoblas_t gotoblas_NEOVERSEN1;
99+
#else
100+
#define gotoblas_NEOVERSEN1 gotoblas_ARMV8
101+
#endif
102+
#else
46103
extern gotoblas_t gotoblas_CORTEXA53;
47104
extern gotoblas_t gotoblas_CORTEXA57;
48105
extern gotoblas_t gotoblas_CORTEXA72;
@@ -54,6 +111,7 @@ extern gotoblas_t gotoblas_TSV110;
54111
extern gotoblas_t gotoblas_EMAG8180;
55112
extern gotoblas_t gotoblas_NEOVERSEN1;
56113
extern gotoblas_t gotoblas_THUNDERX3T110;
114+
#endif
57115

58116
extern void openblas_warning(int verbose, const char * msg);
59117

@@ -68,7 +126,7 @@ extern void openblas_warning(int verbose, const char * msg);
68126
#endif
69127

70128
#define get_cpu_ftr(id, var) ({ \
71-
__asm__ __volatile__("mrs %0, "#id : "=r" (var)); \
129+
__asm__ ("mrs %0, "#id : "=r" (var)); \
72130
})
73131

74132
static char *corename[] = {

0 commit comments

Comments
 (0)