summaryrefslogtreecommitdiff
path: root/libc/string/sparc/sparc32
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-12 00:48:12 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-12 00:48:12 +0000
commitf56e03f5754f666423a80c0d4e74a908a48e1997 (patch)
tree58862c7ce99dbc255b2b71d62334268fe6d32bb3 /libc/string/sparc/sparc32
parentdd1be05eec6310a34647575c0d20bb5a052563c2 (diff)
Add hidden versions, hope I made it correctly. Sparc optimized string functions are not usable with current build system, each function (as long as asm) should go into an own file, the file having the name of the function
Diffstat (limited to 'libc/string/sparc/sparc32')
-rw-r--r--libc/string/sparc/sparc32/memchr.S4
-rw-r--r--libc/string/sparc/sparc32/memcpy.S22
-rw-r--r--libc/string/sparc/sparc32/memset.S7
-rw-r--r--libc/string/sparc/sparc32/stpcpy.S5
-rw-r--r--libc/string/sparc/sparc32/strcat.S7
-rw-r--r--libc/string/sparc/sparc32/strchr.S14
-rw-r--r--libc/string/sparc/sparc32/strcmp.S7
-rw-r--r--libc/string/sparc/sparc32/strcpy.S7
-rw-r--r--libc/string/sparc/sparc32/strlen.S7
9 files changed, 57 insertions, 23 deletions
diff --git a/libc/string/sparc/sparc32/memchr.S b/libc/string/sparc/sparc32/memchr.S
index c00df2427..e8f44f176 100644
--- a/libc/string/sparc/sparc32/memchr.S
+++ b/libc/string/sparc/sparc32/memchr.S
@@ -63,6 +63,9 @@
1: retl
sub %o0, 1, %o0
+.globl memchr
+.set memchr,__memchr
+.hidden __memchr
ENTRY(__memchr)
andcc %o1, 0xff, %o1
sll %o1, 8, %g6
@@ -138,7 +141,6 @@ ENTRY(__memchr)
sub %o0, 4, %o0
END(__memchr)
-weak_alias (__memchr, memchr)
#if !__BOUNDED_POINTERS__
weak_alias (__memchr, __ubp_memchr)
#endif
diff --git a/libc/string/sparc/sparc32/memcpy.S b/libc/string/sparc/sparc32/memcpy.S
index d0a80887b..b2a9b1602 100644
--- a/libc/string/sparc/sparc32/memcpy.S
+++ b/libc/string/sparc/sparc32/memcpy.S
@@ -161,12 +161,19 @@
b 3f
sub %o0, 2, %o0
-ENTRY(bcopy)
+.globl bcopy
+.set bcopy,__bcopy
+.hidden __bcopy
+ENTRY(__bcopy)
mov %o0, %o3
mov %o1, %o0
mov %o3, %o1
-END(bcopy)
-ENTRY(memmove)
+END(__bcopy)
+
+.globl memmove
+.set memmove,__memmove
+.hidden __memmove
+ENTRY(__memmove)
cmp %o0, %o1
st %o0, [%sp + 64]
bleu 9f
@@ -446,9 +453,12 @@ ENTRY(memmove)
sub %o2, 2, %o2
b 3f
add %o0, 2, %o0
-END(memmove)
+END(__memmove)
-ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
+.globl memcpy
+.set memcpy,__memcpy
+.hidden __memcpy
+ENTRY(__memcpy) /* %o0=dst %o1=src %o2=len */
sub %o0, %o1, %o4
st %o0, [%sp + 64]
9: andcc %o4, 3, %o5
@@ -963,4 +973,4 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
sub %o7, %o4, %o5
110: retl
sub %o7, %g6, %o5
-END(memcpy)
+END(__memcpy)
diff --git a/libc/string/sparc/sparc32/memset.S b/libc/string/sparc/sparc32/memset.S
index 02cebb791..ef8a5b634 100644
--- a/libc/string/sparc/sparc32/memset.S
+++ b/libc/string/sparc/sparc32/memset.S
@@ -62,7 +62,10 @@ ENTRY(__bzero)
sub %o0, %o2, %o0
END(__bzero)
-ENTRY(memset)
+.globl memset
+.set memset,__memset
+.hidden __memset
+ENTRY(__memset)
and %o1, 0xff, %g3
sll %g3, 8, %g2
or %g3, %g2, %g3
@@ -147,6 +150,6 @@ ENTRY(memset)
stb %g3, [%o0 + 6]
0: retl
nop
-END(memset)
+END(__memset)
weak_alias (__bzero, bzero)
diff --git a/libc/string/sparc/sparc32/stpcpy.S b/libc/string/sparc/sparc32/stpcpy.S
index b7e7a00f8..97a5dce0e 100644
--- a/libc/string/sparc/sparc32/stpcpy.S
+++ b/libc/string/sparc/sparc32/stpcpy.S
@@ -65,6 +65,9 @@
1: retl
add %o0, -1, %o0
+.globl stpcpy
+.set stpcpy,__stpcpy
+.hidden __stpcpy
ENTRY(__stpcpy)
andcc %o1, 3, %g0
bne 10b
@@ -157,5 +160,3 @@ ENTRY(__stpcpy)
19: retl
nop
END(__stpcpy)
-
-weak_alias (__stpcpy, stpcpy)
diff --git a/libc/string/sparc/sparc32/strcat.S b/libc/string/sparc/sparc32/strcat.S
index e4ff21d01..8efe6aebf 100644
--- a/libc/string/sparc/sparc32/strcat.S
+++ b/libc/string/sparc/sparc32/strcat.S
@@ -91,7 +91,10 @@
b 3f
sub %o0, 1, %o0
-ENTRY(strcat)
+.globl strcat
+.set strcat,__strcat
+.hidden __strcat
+ENTRY(__strcat)
mov %o0, %g2
andcc %o0, 3, %g0
bne 11b
@@ -343,4 +346,4 @@ ENTRY(strcat)
srl %o5, 16, %o4
retl
mov %g2, %o0
-END(strcat)
+END(__strcat)
diff --git a/libc/string/sparc/sparc32/strchr.S b/libc/string/sparc/sparc32/strchr.S
index f18a8abc7..450b4ffe6 100644
--- a/libc/string/sparc/sparc32/strchr.S
+++ b/libc/string/sparc/sparc32/strchr.S
@@ -67,7 +67,10 @@
1: retl
sub %o0, 1, %o0
-ENTRY(strchr)
+.globl strchr
+.set strchr,__strchr
+.hidden __strchr
+ENTRY(__strchr)
andcc %o1, 0xff, %o1
be 12f
sll %o1, 8, %o2
@@ -215,9 +218,12 @@ ENTRY(strchr)
1: or %o4, %lo(0x01010101), %o2
b 7f
ld [%o0], %g4
-END(strchr)
+END(__strchr)
-ENTRY(strrchr)
+.globl strrchr
+.set strrchr,__strrchr
+.hidden __strrchr
+ENTRY(__strrchr)
andcc %o1, 0xff, %o1
clr %o5
be 12b
@@ -274,7 +280,7 @@ ENTRY(strrchr)
ld [%o0], %g4
9: retl
mov %o5, %o0
-END(strrchr)
+END(__strrchr)
weak_alias (strchr, index)
weak_alias (strrchr, rindex)
diff --git a/libc/string/sparc/sparc32/strcmp.S b/libc/string/sparc/sparc32/strcmp.S
index d6cf9e7d3..2ae1b2ef4 100644
--- a/libc/string/sparc/sparc32/strcmp.S
+++ b/libc/string/sparc/sparc32/strcmp.S
@@ -74,7 +74,10 @@
2: retl
mov %o4, %o0
-ENTRY(strcmp)
+.globl strcmp
+.set strcmp,__strcmp
+.hidden __strcmp
+ENTRY(__strcmp)
andcc %o0, 3, %g0
bne 10b
sethi %hi(0x80808080), %g1
@@ -252,4 +255,4 @@ ENTRY(strcmp)
ld [%i0], %i4
jmpl %i7 + 8, %g0
restore %g4, %g0, %o0
-END(strcmp)
+END(__strcmp)
diff --git a/libc/string/sparc/sparc32/strcpy.S b/libc/string/sparc/sparc32/strcpy.S
index c368580ba..6dc3517b5 100644
--- a/libc/string/sparc/sparc32/strcpy.S
+++ b/libc/string/sparc/sparc32/strcpy.S
@@ -63,7 +63,10 @@
b 6f
andcc %o0, 3, %g3
-ENTRY(strcpy)
+.globl strcpy
+.set strcpy,__strcpy
+.hidden __strcpy
+ENTRY(__strcpy)
mov %o0, %g2
andcc %o1, 3, %g0
bne 1b
@@ -269,4 +272,4 @@ ENTRY(strcpy)
srl %o5, 16, %o4
retl
mov %g2, %o0
-END(strcpy)
+END(__strcpy)
diff --git a/libc/string/sparc/sparc32/strlen.S b/libc/string/sparc/sparc32/strlen.S
index cc455ac89..116700e24 100644
--- a/libc/string/sparc/sparc32/strlen.S
+++ b/libc/string/sparc/sparc32/strlen.S
@@ -63,7 +63,10 @@
3: retl
mov 2, %o0
-ENTRY(strlen)
+.globl strlen
+.set strlen,__strlen
+.hidden __strlen
+ENTRY(__strlen)
mov %o0, %o1
andcc %o0, 3, %g0
bne 10b
@@ -98,4 +101,4 @@ ENTRY(strlen)
add %o4, 1, %o4
13: retl
sub %o4, %o1, %o0
-END(strlen)
+END(__strlen)