summaryrefslogtreecommitdiff
path: root/libc/string/sparc/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/sparc/sparc64')
-rw-r--r--libc/string/sparc/sparc64/memcpy.S21
-rw-r--r--libc/string/sparc/sparc64/memset.S7
-rw-r--r--libc/string/sparc/sparc64/sparcv9b/memcpy.S21
-rw-r--r--libc/string/sparc/sparc64/strcat.S7
-rw-r--r--libc/string/sparc/sparc64/strchr.S14
-rw-r--r--libc/string/sparc/sparc64/strcmp.S7
-rw-r--r--libc/string/sparc/sparc64/strcpy.S7
-rw-r--r--libc/string/sparc/sparc64/strlen.S7
8 files changed, 65 insertions, 26 deletions
diff --git a/libc/string/sparc/sparc64/memcpy.S b/libc/string/sparc/sparc64/memcpy.S
index 660fae6b2..47f812a1e 100644
--- a/libc/string/sparc/sparc64/memcpy.S
+++ b/libc/string/sparc/sparc64/memcpy.S
@@ -191,7 +191,10 @@
.text
.align 32
-ENTRY(bcopy)
+.globl bcopy
+.set bcopy,__bcopy
+.hidden __bcopy
+ENTRY(__bcopy)
sub %o1, %o0, %o4 /* IEU0 Group */
mov %o0, %g3 /* IEU1 */
cmp %o4, %o2 /* IEU1 Group */
@@ -205,7 +208,7 @@ ENTRY(bcopy)
add %o0, %o2, %o0 /* IEU0 */
retl
nop
-END(bcopy)
+END(__bcopy)
.align 32
200: be,pt %xcc, 201f /* CTI */
@@ -503,7 +506,10 @@ END(__align_cpy_16)
#endif
.align 32
-ENTRY(memcpy)
+.globl memcpy
+.set memcpy,__memcpy
+.hidden __memcpy
+ENTRY(__memcpy)
210:
#ifndef USE_BPR
srl %o2, 0, %o2 /* IEU1 Group */
@@ -694,7 +700,7 @@ ENTRY(memcpy)
214: wr %g0, FPRS_FEF, %fprs
retl
mov %g4, %o0
-END(memcpy)
+END(__memcpy)
.align 32
228: andcc %o2, 1, %g0 /* IEU1 Group */
@@ -719,7 +725,10 @@ END(memcpy)
nop
.align 32
-ENTRY(memmove)
+.globl memmove
+.set memmove,__memmove
+.hidden __memmove
+ENTRY(__memmove)
#ifndef USE_BPR
srl %o2, 0, %o2 /* IEU1 Group */
#endif
@@ -910,7 +919,7 @@ ENTRY(memmove)
234: wr %g0, FPRS_FEF, %fprs
retl
mov %g4, %o0
-END(memmove)
+END(__memmove)
#ifdef USE_BPR
weak_alias (memcpy, __align_cpy_1)
diff --git a/libc/string/sparc/sparc64/memset.S b/libc/string/sparc/sparc64/memset.S
index 2e23f92a8..5d2911451 100644
--- a/libc/string/sparc/sparc64/memset.S
+++ b/libc/string/sparc/sparc64/memset.S
@@ -36,7 +36,10 @@
/* Well, memset is a lot easier to get right than bcopy... */
.text
.align 32
-ENTRY(memset)
+.globl memset
+.set memset,__memset
+.hidden __memset
+ENTRY(__memset)
andcc %o1, 0xff, %o1
mov %o0, %o5
be,a,pt %icc, 50f
@@ -176,7 +179,7 @@ ENTRY(memset)
nop
ba,pt %xcc, 18b
ldd [%o0], %f0
-END(memset)
+END(__memset)
#define ZERO_BLOCKS(base, offset, source) \
stx source, [base - offset - 0x38]; \
diff --git a/libc/string/sparc/sparc64/sparcv9b/memcpy.S b/libc/string/sparc/sparc64/sparcv9b/memcpy.S
index 7f36b7c2c..91e74d438 100644
--- a/libc/string/sparc/sparc64/sparcv9b/memcpy.S
+++ b/libc/string/sparc/sparc64/sparcv9b/memcpy.S
@@ -36,7 +36,10 @@
.text
.align 32
-ENTRY(bcopy)
+.globl bcopy
+.set bcopy,__bcopy
+.hidden __bcopy
+ENTRY(__bcopy)
sub %o1, %o0, %o4
mov %o0, %g4
cmp %o4, %o2
@@ -50,7 +53,7 @@ ENTRY(bcopy)
add %o0, %o2, %o0
retl
nop
-END(bcopy)
+END(__bcopy)
/* Special/non-trivial issues of this code:
*
@@ -67,7 +70,10 @@ END(bcopy)
* of up to 2.4GB per second.
*/
.align 32
-ENTRY(memcpy)
+.globl memcpy
+.set memcpy,__memcpy
+.hidden __memcpy
+ENTRY(__memcpy)
100: /* %o0=dst, %o1=src, %o2=len */
mov %o0, %g5
@@ -328,7 +334,7 @@ small_copy_unaligned:
retl
mov %g5, %o0
-END(memcpy)
+END(__memcpy)
#define RMOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3) \
ldx [%src - offset - 0x20], %t0; \
@@ -403,7 +409,10 @@ END(memcpy)
mov %g4, %o0
.align 32
-ENTRY(memmove)
+.globl memmove
+.set memmove,__memmove
+.hidden __memmove
+ENTRY(__memmove)
mov %o0, %g5
#ifndef USE_BPR
srl %o2, 0, %o2 /* IEU1 Group */
@@ -595,7 +604,7 @@ ENTRY(memmove)
234: wr %g0, FPRS_FEF, %fprs
retl
mov %g4, %o0
-END(memmove)
+END(__memmove)
#ifdef USE_BPR
weak_alias (memcpy, __align_cpy_1)
diff --git a/libc/string/sparc/sparc64/strcat.S b/libc/string/sparc/sparc64/strcat.S
index 21ff119c4..3b81e59e6 100644
--- a/libc/string/sparc/sparc64/strcat.S
+++ b/libc/string/sparc/sparc64/strcat.S
@@ -47,7 +47,10 @@
.text
.align 32
-ENTRY(strcat)
+.globl strcat
+.set strcat,__strcat
+.hidden __strcat
+ENTRY(__strcat)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
ldub [%o0], %o3 /* Load */
or %g1, %lo(0x01010101), %g1 /* IEU0 Group */
@@ -335,4 +338,4 @@ ENTRY(strcat)
stb %o4, [%o0 - 8] /* Store */
retl /* CTI+IEU1 Group */
mov %g6, %o0 /* IEU0 */
-END(strcat)
+END(__strcat)
diff --git a/libc/string/sparc/sparc64/strchr.S b/libc/string/sparc/sparc64/strchr.S
index 784b7fe4d..6943e8b96 100644
--- a/libc/string/sparc/sparc64/strchr.S
+++ b/libc/string/sparc/sparc64/strchr.S
@@ -47,7 +47,10 @@
.text
.align 32
-ENTRY(strchr)
+.globl strchr
+.set strchr,__strchr
+.hidden __strchr
+ENTRY(__strchr)
andcc %o1, 0xff, %o1 /* IEU1 Group */
be,pn %icc, 17f /* CTI */
sllx %o1, 8, %g3 /* IEU0 Group */
@@ -327,10 +330,13 @@ ENTRY(strchr)
lduba [%o0] ASI_PNF, %o3 /* Load */
retl /* CTI+IEU1 Group */
add %o0, -1, %o0 /* IEU0 */
-END(strchr)
+END(__strchr)
.align 32
-ENTRY(strrchr)
+.globl strrchr
+.set strrchr,__strrchr
+.hidden __strrchr
+ENTRY(__strrchr)
andcc %o1, 0xff, %o1 /* IEU1 Group */
be,pn %icc, 17b /* CTI */
clr %g4 /* IEU0 */
@@ -474,7 +480,7 @@ ENTRY(strrchr)
ba,pt %xcc, 1b /* CTI Group */
ldx [%o0], %o3 /* Load */
-END(strrchr)
+END(__strrchr)
weak_alias (strchr, index)
weak_alias (strrchr, rindex)
diff --git a/libc/string/sparc/sparc64/strcmp.S b/libc/string/sparc/sparc64/strcmp.S
index 5866778d3..a4eb36632 100644
--- a/libc/string/sparc/sparc64/strcmp.S
+++ b/libc/string/sparc/sparc64/strcmp.S
@@ -45,7 +45,10 @@
.text
.align 32
-ENTRY(strcmp)
+.globl strcmp
+.set strcmp,__strcmp
+.hidden __strcmp
+ENTRY(__strcmp)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
andcc %o0, 7, %g0 /* IEU1 */
bne,pn %icc, 7f /* CTI */
@@ -275,4 +278,4 @@ ENTRY(strcmp)
ba,pt %xcc, 11b /* CTI Group */
ldxa [%o1 + %o0] ASI_PNF, %g6 /* Load */
-END(strcmp)
+END(__strcmp)
diff --git a/libc/string/sparc/sparc64/strcpy.S b/libc/string/sparc/sparc64/strcpy.S
index aa5d2aee3..cc906bae7 100644
--- a/libc/string/sparc/sparc64/strcpy.S
+++ b/libc/string/sparc/sparc64/strcpy.S
@@ -45,7 +45,10 @@
.text
.align 32
-ENTRY(strcpy)
+.globl strcpy
+.set strcpy,__strcpy
+.hidden __strcpy
+ENTRY(__strcpy)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
mov %o0, %g6 /* IEU1 */
or %g1, %lo(0x01010101), %g1 /* IEU0 Group */
@@ -240,4 +243,4 @@ ENTRY(strcpy)
stb %o4, [%o0 - 8] /* Store */
retl /* CTI+IEU1 Group */
mov %g6, %o0 /* IEU0 */
-END(strcpy)
+END(__strcpy)
diff --git a/libc/string/sparc/sparc64/strlen.S b/libc/string/sparc/sparc64/strlen.S
index 5167ad5ba..9f48fe6a1 100644
--- a/libc/string/sparc/sparc64/strlen.S
+++ b/libc/string/sparc/sparc64/strlen.S
@@ -39,7 +39,10 @@
.text
.align 32
-ENTRY(strlen)
+.globl strlen
+.set strlen,__strlen
+.hidden __strlen
+ENTRY(__strlen)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
ldub [%o0], %o3 /* Load */
or %g1, %lo(0x01010101), %g1 /* IEU0 Group */
@@ -169,4 +172,4 @@ ENTRY(strlen)
add %o0, -1, %o0 /* IEU0 Group */
retl /* CTI+IEU1 Group */
sub %o0, %o1, %o0 /* IEU0 */
-END(strlen)
+END(__strlen)