Skip to content

Commit fae9368

Browse files
committed
Implement DYNAMIC_LIST for MIPS64
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
1 parent a50b29c commit fae9368

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Makefile.system

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,11 @@ endif
678678

679679
ifeq ($(ARCH), mips64)
680680
DYNAMIC_CORE = LOONGSON3R3 LOONGSON3R4 MIPS64_GENERIC
681+
ifdef DYNAMIC_LIST
682+
override DYNAMIC_CORE = MIPS64_GENERIC $(DYNAMIC_LIST)
683+
XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_MIPS64_GENERIC
684+
XCCOMMON_OPT += $(foreach dcore,$(DYNAMIC_LIST),-DDYN_$(dcore))
685+
endif
681686
endif
682687

683688
ifeq ($(ARCH), loongarch64)

driver/others/dynamic_mips64.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,23 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4747
#endif
4848
#endif
4949

50+
#ifdef DYNAMIC_LIST
51+
extern gotoblas_t gotoblas_MIPS64_GENERIC;
52+
#ifdef DYN_LOONGSON3R3
53+
extern gotoblas_t gotoblas_LOONGSON3R3;
54+
#else
55+
#define gotoblas_LOONGSON3R3 gotoblas_MIPS64_GENERIC
56+
#endif
57+
#ifdef DYN_LOONGSON3R4
58+
extern gotoblas_t gotoblas_LOONGSON3R4;
59+
#else
60+
#define gotoblas_LOONGSON3R4 gotoblas_MIPS64_GENERIC
61+
#endif
62+
#else
5063
extern gotoblas_t gotoblas_LOONGSON3R3;
5164
extern gotoblas_t gotoblas_LOONGSON3R4;
5265
extern gotoblas_t gotoblas_MIPS64_GENERIC;
66+
#endif
5367

5468
extern void openblas_warning(int verbose, const char * msg);
5569

0 commit comments

Comments
 (0)