Skip to content

Commit af80b3a

Browse files
committed
add 'hidden' to assembler directives, use generic lsame and cabs
1 parent 488bc20 commit af80b3a

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

patches/extern_asm_hidden.patch

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
diff --git a/common_loongarch64.h b/common_loongarch64.h
2+
index 6e96984f6..f0c925132 100644
3+
--- a/common_loongarch64.h
4+
+++ b/common_loongarch64.h
5+
@@ -270,6 +270,7 @@ static inline int get_cpu_model(char *model_name) {
6+
.text ;\
7+
.align 5 ;\
8+
.globl REALNAME ;\
9+
+ .hidden REALNAME ;\
10+
.type REALNAME, @function ;\
11+
REALNAME: ;\
12+
13+
diff --git a/common_mips64.h b/common_mips64.h
14+
index c7eb212df..2f4640323 100644
15+
--- a/common_mips64.h
16+
+++ b/common_mips64.h
17+
@@ -210,6 +210,7 @@ static inline int blas_quickdivide(blasint x, blasint y){
18+
.set ASSEMBLER_ARCH ;\
19+
.align 5 ;\
20+
.globl REALNAME ;\
21+
+ .hidden REALNAME ;\
22+
.ent REALNAME ;\
23+
.type REALNAME, @function ;\
24+
REALNAME: ;\
25+
diff --git a/common_power.h b/common_power.h
26+
index ded76ad51..1bf964528 100644
27+
--- a/common_power.h
28+
+++ b/common_power.h
29+
@@ -535,6 +535,7 @@ static inline int blas_quickdivide(blasint x, blasint y){
30+
.section .text;\
31+
.align 6;\
32+
.globl REALNAME;\
33+
+ .hidden REALNAME ;\
34+
.type REALNAME, @function;\
35+
REALNAME:
36+
#define EPILOGUE .size REALNAME, .-REALNAME
37+
@@ -544,6 +545,7 @@ REALNAME:
38+
.section .text;\
39+
.align 6;\
40+
.globl REALNAME;\
41+
+ .hidden REALNAME ;\
42+
.type REALNAME, @function;\
43+
REALNAME:
44+
#define EPILOGUE .size REALNAME, .-REALNAME
45+
@@ -552,6 +554,7 @@ REALNAME:
46+
.section .text;\
47+
.align 5;\
48+
.globl REALNAME;\
49+
+ .hidden REALNAME ;\
50+
.section ".opd","aw";\
51+
.align 3;\
52+
REALNAME:;\
53+
@@ -560,6 +563,7 @@ REALNAME:;\
54+
.size REALNAME, 24;\
55+
.type .REALNAME, @function;\
56+
.globl .REALNAME;\
57+
+ .hidden .REALNAME ;\
58+
.REALNAME:
59+
#define EPILOGUE \
60+
.long 0 ; \
61+
diff --git a/common_x86.h b/common_x86.h
62+
index 65fb9a460..12c854df4 100644
63+
--- a/common_x86.h
64+
+++ b/common_x86.h
65+
@@ -339,6 +339,7 @@ REALNAME:
66+
.text; \
67+
.align 16; \
68+
.globl REALNAME ;\
69+
+ .hidden REALNAME ;\
70+
.type REALNAME, @function; \
71+
REALNAME: \
72+
_CET_ENDBR
73+
diff --git a/common_x86_64.h b/common_x86_64.h
74+
index 143e188a7..fff5eefbc 100644
75+
--- a/common_x86_64.h
76+
+++ b/common_x86_64.h
77+
@@ -454,6 +454,7 @@ REALNAME:
78+
.text; \
79+
.align 512; \
80+
.globl REALNAME ;\
81+
+ .hidden REALNAME ;\
82+
.type REALNAME, @function; \
83+
REALNAME: \
84+
_CET_ENDBR

patches/use_generics.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/kernel/Makefile.LA b/kernel/Makefile.LA
2+
index 88342718c..3b1939d26 100644
3+
--- a/kernel/Makefile.LA
4+
+++ b/kernel/Makefile.LA
5+
@@ -49,3 +49,7 @@ $(KDIR)zlaswp_ncopy$(TSUFFIX).$(SUFFIX) $(KDIR)zlaswp_ncopy$(TSUFFIX).$(PSUFFIX)
6+
$(KDIR)xlaswp_ncopy$(TSUFFIX).$(SUFFIX) $(KDIR)xlaswp_ncopy$(TSUFFIX).$(PSUFFIX) : generic/zlaswp_ncopy_$(XGEMM_UNROLL_N).c
7+
$(CC) -c $(CFLAGS) $< -o $@
8+
9+
+LSAME_KERNEL = ../generic/lsame.c
10+
+SCABS_KERNEL = ../generic/cabs.c
11+
+DCABS_KERNEL = ../generic/cabs.c
12+
+QCABS_KERNEL = ../generic/cabs.c

0 commit comments

Comments
 (0)