Skip to content

Commit 265ab48

Browse files
committed
Change default RISC-V 64-bit corename to RISCV64_GENERIC
e.g. make CC=riscv64-unknown-linux-gnu-gcc FC=riscv64-unknown-linux-gnu-gfortran TARGET=RISCV64_GENERIC HOSTCC=gcc
1 parent 44020a4 commit 265ab48

File tree

5 files changed

+187
-154
lines changed

5 files changed

+187
-154
lines changed

TargetList.txt

+3
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,6 @@ TSV110
9797
ZARCH_GENERIC
9898
Z13
9999
Z14
100+
101+
10.RISC-V 64:
102+
RISCV64_GENERIC

getarch.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -906,17 +906,17 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
906906
#else
907907
#endif
908908

909-
#ifdef FORCE_RISCV64
909+
#ifdef FORCE_RISCV64_GENERIC
910910
#define FORCE
911911
#define ARCHITECTURE "RISCV64"
912-
#define SUBARCHITECTURE "RISCV64"
912+
#define SUBARCHITECTURE "RISCV64_GENERIC"
913913
#define SUBDIRNAME "riscv64"
914-
#define ARCHCONFIG "-DRISCV64 " \
914+
#define ARCHCONFIG "-DRISCV64_GENERIC " \
915915
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
916916
"-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
917917
"-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
918-
#define LIBNAME "riscv64"
919-
#define CORENAME "RISCV64"
918+
#define LIBNAME "riscv64_generic"
919+
#define CORENAME "RISCV64_GENERIC"
920920
#else
921921
#endif
922922

kernel/riscv64/KERNEL

+14-148
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,18 @@
1-
SAMAXKERNEL = ../riscv64/amax.c
2-
DAMAXKERNEL = ../riscv64/amax.c
3-
CAMAXKERNEL = ../riscv64/zamax.c
4-
ZAMAXKERNEL = ../riscv64/zamax.c
5-
6-
SAMINKERNEL = ../riscv64/amin.c
7-
DAMINKERNEL = ../riscv64/amin.c
8-
CAMINKERNEL = ../riscv64/zamin.c
9-
ZAMINKERNEL = ../riscv64/zamin.c
10-
11-
SMAXKERNEL = ../riscv64/max.c
12-
DMAXKERNEL = ../riscv64/max.c
13-
14-
SMINKERNEL = ../riscv64/min.c
15-
DMINKERNEL = ../riscv64/min.c
16-
17-
ISAMAXKERNEL = ../riscv64/iamax.c
18-
IDAMAXKERNEL = ../riscv64/iamax.c
19-
ICAMAXKERNEL = ../riscv64/izamax.c
20-
IZAMAXKERNEL = ../riscv64/izamax.c
21-
22-
ISAMINKERNEL = ../riscv64/iamin.c
23-
IDAMINKERNEL = ../riscv64/iamin.c
24-
ICAMINKERNEL = ../riscv64/izamin.c
25-
IZAMINKERNEL = ../riscv64/izamin.c
26-
27-
ISMAXKERNEL = ../riscv64/imax.c
28-
IDMAXKERNEL = ../riscv64/imax.c
29-
30-
ISMINKERNEL = ../riscv64/imin.c
31-
IDMINKERNEL = ../riscv64/imin.c
32-
33-
SASUMKERNEL = ../riscv64/asum.c
34-
DASUMKERNEL = ../riscv64/asum.c
35-
CASUMKERNEL = ../riscv64/zasum.c
36-
ZASUMKERNEL = ../riscv64/zasum.c
37-
38-
SSUMKERNEL = ../arm/sum.c
39-
DSUMKERNEL = ../arm/sum.c
40-
CSUMKERNEL = ../arm/zsum.c
41-
ZSUMKERNEL = ../arm/zsum.c
42-
43-
SAXPYKERNEL = ../riscv64/axpy.c
44-
DAXPYKERNEL = ../riscv64/axpy.c
45-
CAXPYKERNEL = ../riscv64/zaxpy.c
46-
ZAXPYKERNEL = ../riscv64/zaxpy.c
47-
48-
SCOPYKERNEL = ../riscv64/copy.c
49-
DCOPYKERNEL = ../riscv64/copy.c
50-
CCOPYKERNEL = ../riscv64/zcopy.c
51-
ZCOPYKERNEL = ../riscv64/zcopy.c
52-
53-
SDOTKERNEL = ../riscv64/dot.c
54-
DDOTKERNEL = ../riscv64/dot.c
55-
CDOTKERNEL = ../riscv64/zdot.c
56-
ZDOTKERNEL = ../riscv64/zdot.c
57-
58-
SNRM2KERNEL = ../riscv64/nrm2.c
59-
DNRM2KERNEL = ../riscv64/nrm2.c
60-
CNRM2KERNEL = ../riscv64/znrm2.c
61-
ZNRM2KERNEL = ../riscv64/znrm2.c
62-
63-
SROTKERNEL = ../riscv64/rot.c
64-
DROTKERNEL = ../riscv64/rot.c
65-
CROTKERNEL = ../riscv64/zrot.c
66-
ZROTKERNEL = ../riscv64/zrot.c
67-
68-
SSCALKERNEL = ../riscv64/scal.c
69-
DSCALKERNEL = ../riscv64/scal.c
70-
CSCALKERNEL = ../riscv64/zscal.c
71-
ZSCALKERNEL = ../riscv64/zscal.c
72-
73-
SSWAPKERNEL = ../riscv64/swap.c
74-
DSWAPKERNEL = ../riscv64/swap.c
75-
CSWAPKERNEL = ../riscv64/zswap.c
76-
ZSWAPKERNEL = ../riscv64/zswap.c
77-
78-
SGEMVNKERNEL = ../riscv64/gemv_n.c
79-
DGEMVNKERNEL = ../riscv64/gemv_n.c
80-
CGEMVNKERNEL = ../riscv64/zgemv_n.c
81-
ZGEMVNKERNEL = ../riscv64/zgemv_n.c
82-
83-
SGEMVTKERNEL = ../riscv64/gemv_t.c
84-
DGEMVTKERNEL = ../riscv64/gemv_t.c
85-
CGEMVTKERNEL = ../riscv64/zgemv_t.c
86-
ZGEMVTKERNEL = ../riscv64/zgemv_t.c
87-
88-
STRMMKERNEL = ../generic/trmmkernel_2x2.c
89-
DTRMMKERNEL = ../generic/trmmkernel_2x2.c
90-
CTRMMKERNEL = ../generic/ztrmmkernel_2x2.c
91-
ZTRMMKERNEL = ../generic/ztrmmkernel_2x2.c
92-
93-
SGEMMKERNEL = ../generic/gemmkernel_2x2.c
94-
SGEMMONCOPY = ../generic/gemm_ncopy_2.c
95-
SGEMMOTCOPY = ../generic/gemm_tcopy_2.c
96-
SGEMMONCOPYOBJ = sgemm_oncopy.o
97-
SGEMMOTCOPYOBJ = sgemm_otcopy.o
98-
99-
DGEMMKERNEL = ../generic/gemmkernel_2x2.c
100-
DGEMMONCOPY = ../generic/gemm_ncopy_2.c
101-
DGEMMOTCOPY = ../generic/gemm_tcopy_2.c
102-
DGEMMONCOPYOBJ = dgemm_oncopy.o
103-
DGEMMOTCOPYOBJ = dgemm_otcopy.o
104-
105-
CGEMMKERNEL = ../generic/zgemmkernel_2x2.c
106-
CGEMMONCOPY = ../generic/zgemm_ncopy_2.c
107-
CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
108-
CGEMMONCOPYOBJ = cgemm_oncopy.o
109-
CGEMMOTCOPYOBJ = cgemm_otcopy.o
110-
111-
ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c
112-
ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c
113-
ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
114-
ZGEMMONCOPYOBJ = zgemm_oncopy.o
115-
ZGEMMOTCOPYOBJ = zgemm_otcopy.o
116-
117-
STRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
118-
STRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
119-
STRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
120-
STRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
121-
122-
DTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
123-
DTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
124-
DTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
125-
DTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
126-
127-
CTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
128-
CTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
129-
CTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
130-
CTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
131-
132-
ZTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
133-
ZTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
134-
ZTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
135-
ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
136-
137-
SSYMV_U_KERNEL = ../generic/symv_k.c
138-
SSYMV_L_KERNEL = ../generic/symv_k.c
139-
DSYMV_U_KERNEL = ../generic/symv_k.c
140-
DSYMV_L_KERNEL = ../generic/symv_k.c
141-
CSYMV_U_KERNEL = ../generic/zsymv_k.c
142-
CSYMV_L_KERNEL = ../generic/zsymv_k.c
143-
ZSYMV_U_KERNEL = ../generic/zsymv_k.c
144-
ZSYMV_L_KERNEL = ../generic/zsymv_k.c
145-
146-
147-
LSAME_KERNEL = ../generic/lsame.c
148-
1+
ifndef SCABS_KERNEL
1492
SCABS_KERNEL = ../generic/cabs.c
3+
endif
4+
5+
ifndef DCABS_KERNEL
1506
DCABS_KERNEL = ../generic/cabs.c
7+
endif
8+
9+
ifndef QCABS_KERNEL
15110
QCABS_KERNEL = ../generic/cabs.c
11+
endif
12+
13+
ifndef LSAME_KERNEL
14+
LSAME_KERNEL = ../generic/lsame.c
15+
endif
15216

15317
ifndef SGEMM_BETA
15418
SGEMM_BETA = ../generic/gemm_beta.c
@@ -162,3 +26,5 @@ endif
16226
ifndef ZGEMM_BETA
16327
ZGEMM_BETA = ../generic/zgemm_beta.c
16428
endif
29+
30+

kernel/riscv64/KERNEL.RISCV64_GENERIC

+164
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
SAMAXKERNEL = ../riscv64/amax.c
2+
DAMAXKERNEL = ../riscv64/amax.c
3+
CAMAXKERNEL = ../riscv64/zamax.c
4+
ZAMAXKERNEL = ../riscv64/zamax.c
5+
6+
SAMINKERNEL = ../riscv64/amin.c
7+
DAMINKERNEL = ../riscv64/amin.c
8+
CAMINKERNEL = ../riscv64/zamin.c
9+
ZAMINKERNEL = ../riscv64/zamin.c
10+
11+
SMAXKERNEL = ../riscv64/max.c
12+
DMAXKERNEL = ../riscv64/max.c
13+
14+
SMINKERNEL = ../riscv64/min.c
15+
DMINKERNEL = ../riscv64/min.c
16+
17+
ISAMAXKERNEL = ../riscv64/iamax.c
18+
IDAMAXKERNEL = ../riscv64/iamax.c
19+
ICAMAXKERNEL = ../riscv64/izamax.c
20+
IZAMAXKERNEL = ../riscv64/izamax.c
21+
22+
ISAMINKERNEL = ../riscv64/iamin.c
23+
IDAMINKERNEL = ../riscv64/iamin.c
24+
ICAMINKERNEL = ../riscv64/izamin.c
25+
IZAMINKERNEL = ../riscv64/izamin.c
26+
27+
ISMAXKERNEL = ../riscv64/imax.c
28+
IDMAXKERNEL = ../riscv64/imax.c
29+
30+
ISMINKERNEL = ../riscv64/imin.c
31+
IDMINKERNEL = ../riscv64/imin.c
32+
33+
SASUMKERNEL = ../riscv64/asum.c
34+
DASUMKERNEL = ../riscv64/asum.c
35+
CASUMKERNEL = ../riscv64/zasum.c
36+
ZASUMKERNEL = ../riscv64/zasum.c
37+
38+
SSUMKERNEL = ../arm/sum.c
39+
DSUMKERNEL = ../arm/sum.c
40+
CSUMKERNEL = ../arm/zsum.c
41+
ZSUMKERNEL = ../arm/zsum.c
42+
43+
SAXPYKERNEL = ../riscv64/axpy.c
44+
DAXPYKERNEL = ../riscv64/axpy.c
45+
CAXPYKERNEL = ../riscv64/zaxpy.c
46+
ZAXPYKERNEL = ../riscv64/zaxpy.c
47+
48+
SCOPYKERNEL = ../riscv64/copy.c
49+
DCOPYKERNEL = ../riscv64/copy.c
50+
CCOPYKERNEL = ../riscv64/zcopy.c
51+
ZCOPYKERNEL = ../riscv64/zcopy.c
52+
53+
SDOTKERNEL = ../riscv64/dot.c
54+
DDOTKERNEL = ../riscv64/dot.c
55+
CDOTKERNEL = ../riscv64/zdot.c
56+
ZDOTKERNEL = ../riscv64/zdot.c
57+
58+
SNRM2KERNEL = ../riscv64/nrm2.c
59+
DNRM2KERNEL = ../riscv64/nrm2.c
60+
CNRM2KERNEL = ../riscv64/znrm2.c
61+
ZNRM2KERNEL = ../riscv64/znrm2.c
62+
63+
SROTKERNEL = ../riscv64/rot.c
64+
DROTKERNEL = ../riscv64/rot.c
65+
CROTKERNEL = ../riscv64/zrot.c
66+
ZROTKERNEL = ../riscv64/zrot.c
67+
68+
SSCALKERNEL = ../riscv64/scal.c
69+
DSCALKERNEL = ../riscv64/scal.c
70+
CSCALKERNEL = ../riscv64/zscal.c
71+
ZSCALKERNEL = ../riscv64/zscal.c
72+
73+
SSWAPKERNEL = ../riscv64/swap.c
74+
DSWAPKERNEL = ../riscv64/swap.c
75+
CSWAPKERNEL = ../riscv64/zswap.c
76+
ZSWAPKERNEL = ../riscv64/zswap.c
77+
78+
SGEMVNKERNEL = ../riscv64/gemv_n.c
79+
DGEMVNKERNEL = ../riscv64/gemv_n.c
80+
CGEMVNKERNEL = ../riscv64/zgemv_n.c
81+
ZGEMVNKERNEL = ../riscv64/zgemv_n.c
82+
83+
SGEMVTKERNEL = ../riscv64/gemv_t.c
84+
DGEMVTKERNEL = ../riscv64/gemv_t.c
85+
CGEMVTKERNEL = ../riscv64/zgemv_t.c
86+
ZGEMVTKERNEL = ../riscv64/zgemv_t.c
87+
88+
STRMMKERNEL = ../generic/trmmkernel_2x2.c
89+
DTRMMKERNEL = ../generic/trmmkernel_2x2.c
90+
CTRMMKERNEL = ../generic/ztrmmkernel_2x2.c
91+
ZTRMMKERNEL = ../generic/ztrmmkernel_2x2.c
92+
93+
SGEMMKERNEL = ../generic/gemmkernel_2x2.c
94+
SGEMMONCOPY = ../generic/gemm_ncopy_2.c
95+
SGEMMOTCOPY = ../generic/gemm_tcopy_2.c
96+
SGEMMONCOPYOBJ = sgemm_oncopy.o
97+
SGEMMOTCOPYOBJ = sgemm_otcopy.o
98+
99+
DGEMMKERNEL = ../generic/gemmkernel_2x2.c
100+
DGEMMONCOPY = ../generic/gemm_ncopy_2.c
101+
DGEMMOTCOPY = ../generic/gemm_tcopy_2.c
102+
DGEMMONCOPYOBJ = dgemm_oncopy.o
103+
DGEMMOTCOPYOBJ = dgemm_otcopy.o
104+
105+
CGEMMKERNEL = ../generic/zgemmkernel_2x2.c
106+
CGEMMONCOPY = ../generic/zgemm_ncopy_2.c
107+
CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
108+
CGEMMONCOPYOBJ = cgemm_oncopy.o
109+
CGEMMOTCOPYOBJ = cgemm_otcopy.o
110+
111+
ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c
112+
ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c
113+
ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
114+
ZGEMMONCOPYOBJ = zgemm_oncopy.o
115+
ZGEMMOTCOPYOBJ = zgemm_otcopy.o
116+
117+
STRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
118+
STRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
119+
STRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
120+
STRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
121+
122+
DTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
123+
DTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
124+
DTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
125+
DTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
126+
127+
CTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
128+
CTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
129+
CTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
130+
CTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
131+
132+
ZTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
133+
ZTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
134+
ZTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
135+
ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
136+
137+
SSYMV_U_KERNEL = ../generic/symv_k.c
138+
SSYMV_L_KERNEL = ../generic/symv_k.c
139+
DSYMV_U_KERNEL = ../generic/symv_k.c
140+
DSYMV_L_KERNEL = ../generic/symv_k.c
141+
CSYMV_U_KERNEL = ../generic/zsymv_k.c
142+
CSYMV_L_KERNEL = ../generic/zsymv_k.c
143+
ZSYMV_U_KERNEL = ../generic/zsymv_k.c
144+
ZSYMV_L_KERNEL = ../generic/zsymv_k.c
145+
146+
147+
LSAME_KERNEL = ../generic/lsame.c
148+
149+
SCABS_KERNEL = ../generic/cabs.c
150+
DCABS_KERNEL = ../generic/cabs.c
151+
QCABS_KERNEL = ../generic/cabs.c
152+
153+
ifndef SGEMM_BETA
154+
SGEMM_BETA = ../generic/gemm_beta.c
155+
endif
156+
ifndef DGEMM_BETA
157+
DGEMM_BETA = ../generic/gemm_beta.c
158+
endif
159+
ifndef CGEMM_BETA
160+
CGEMM_BETA = ../generic/zgemm_beta.c
161+
endif
162+
ifndef ZGEMM_BETA
163+
ZGEMM_BETA = ../generic/zgemm_beta.c
164+
endif

param.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2509,7 +2509,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25092509
#define SYMV_P 16
25102510
#endif
25112511

2512-
#ifdef RISCV64
2512+
#ifdef RISCV64_GENERIC
25132513
#define GEMM_DEFAULT_OFFSET_A 0
25142514
#define GEMM_DEFAULT_OFFSET_B 0
25152515
#define GEMM_DEFAULT_ALIGN 0x03fffUL

0 commit comments

Comments
 (0)