.text
.global _memcpy
+.hidden _memcpy
.type _memcpy,%function
.align 4
/* bcopy = memcpy/memmove with arguments reversed. */
-.global bcopy
-.set bcopy,__bcopy
+#include <features.h>
+
.text
.global __bcopy
.hidden __bcopy
b _memcpy (PLT)
.size __bcopy,.-__bcopy
+
+strong_alias(__bcopy,bcopy)
* by Erik Andersen <andersen@codepoet.org>
*/
+#include <features.h>
+
.text
.global __bzero
+.hidden __bzero
.type __bzero,%function
.align 4
__bzero:
mov r2, r1
mov r1, #0
- b memset (PLT)
+ b __memset
.size __bzero,.-__bzero
-.weak bzero ; bzero = __bzero
+strong_alias(__bzero,bzero)
* by Erik Andersen <andersen@codepoet.org>
*/
+#include <features.h>
-.global memcmp
-.set memcmp,__memcmp
.text
.global __memcmp
.hidden __memcmp
mov pc, lr
.size __memcmp,.-__memcmp
-.weak bcmp ; bcmp = memcmp
+
+strong_alias(__memcmp,memcmp)
+strong_alias(__memcmp,bcmp)
* by Erik Andersen <andersen@codepoet.org>
*/
-.global memcpy
-.set memcpy,__memcpy
+#include <features.h>
+
.text
.global __memcpy
.hidden __memcpy
__memcpy:
stmfd sp!, {r0, lr}
- bl _memcpy (PLT)
+ bl _memcpy
ldmfd sp!, {r0, pc}
.size __memcpy,.-__memcpy
+
+strong_alias(__memcpy,memcpy)
* by Erik Andersen <andersen@codepoet.org>
*/
-.global memmove
-.set memmove,__memmove
+#include <features.h>
+
.text
.global __memmove
.hidden __memmove
__memmove:
stmfd sp!, {r0, lr}
- bl _memcpy (PLT)
+ bl _memcpy
ldmfd sp!, {r0, pc}
.size __memmove,.-__memmove
+
+strong_alias(__memmove,memmove)
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <features.h>
#include <sys/syscall.h>
-.global memset
-.set memset,__memset
.text
.global __memset
.hidden __memset
mov pc, lr
.size __memset,.-__memset
+
+strong_alias(__memset,memset)
#include <features.h>
-.global strcmp
-.set strcmp,__strcmp
.text
.global __strcmp
.hidden __strcmp
mov pc, lr
.size __strcmp,.-__strcmp
+
+strong_alias(__strcmp,strcmp)
#ifndef __UCLIBC_HAS_LOCALE__
-.global __strcoll ; .hidden __strcoll ; __strcoll = __strcmp
-.global strcoll ; .set strcoll,__strcmp
+hidden_strong_alias(__strcmp,__strcoll)
+strong_alias(__strcmp,strcoll)
#endif
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <features.h>
#include <endian.h>
#include <sys/syscall.h>
* exit: r0 = len
*/
-.global strlen
-.set strlen,__strlen
.text
.global __strlen
.hidden __strlen
mov pc,lr
.size __strlen,.-__strlen
+
+strong_alias(__strlen,strlen)
* by Erik Andersen <andersen@codepoet.org>
*/
-.global strncmp
-.set strncmp,__strncmp
+#include <features.h>
+
.text
.global __strncmp
.hidden __strncmp
mov pc, lr
.size __strncmp,.-__strncmp
+
+strong_alias(__strncmp,strncmp)
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <features.h>
.text
.p2align 4
# to caller's fixup routine, aborting the remainder of the copy
#
###############################################################################
- .globl memcpy
- .set memcpy,__memcpy
.globl __memcpy
.hidden __memcpy
.type __memcpy,@function
bralr
.size __memcpy, .-__memcpy
+
+strong_alias(__memcpy,memcpy)
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <features.h>
.text
.p2align 4
# GR4, GR7, GR8, and GR11 must be managed
#
###############################################################################
- .globl memset
- .set memset,__memset
.globl __memset
.hidden __memset
.type __memset,@function
cstb.p gr12,@(gr4,gr0) ,cc7,#1
bralr
.size __memset, .-__memset
+
+strong_alias(__memset,memset)
#define LONG_MAX_32_BITS 2147483647
-#undef memchr
-
/* Search no more than N bytes of S for C. */
void attribute_hidden *__memchr (const void * s, int c_in, size_t n)
{
return 0;
}
-strong_alias(__memchr, memchr)
+strong_alias(__memchr,memchr)
#include <string.h>
-#undef memcmp
-
#include "memcopy.h"
#include <endian.h>
return 0;
}
-strong_alias(__memcmp, memcmp)
+strong_alias(__memcmp,memcmp)
-weak_alias(memcmp, bcmp)
+strong_alias(__memcmp,bcmp)
#include "memcopy.h"
#include "pagecopy.h"
-#undef memcpy
-
/* _wordcopy_fwd_aligned -- Copy block beginning at SRCP to
block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
Both SRCP and DSTP should be aligned for memory operations on `op_t's. */
return dstpp;
}
-strong_alias(__memcpy, memcpy)
+strong_alias(__memcpy,memcpy)
#include <string.h>
#include <stddef.h>
-#undef memmem
-
/* Return the first occurrence of NEEDLE in HAYSTACK. */
void attribute_hidden *__memmem (const void *haystack, size_t haystack_len,
const void *needle, size_t needle_len)
return NULL;
}
-strong_alias(__memmem, memmem)
+strong_alias(__memmem,memmem)
((op_t *) dstp)[3] = MERGE (a0, sh_1, a1, sh_2);
}
-#undef memmove
-
void attribute_hidden *__memmove (void *dest, const void *src, size_t len)
{
unsigned long int dstp = (long int) dest;
return (dest);
}
-strong_alias(__memmove, memmove)
+strong_alias(__memmove,memmove)
#include <string.h>
-#undef mempcpy
-
void attribute_hidden *__mempcpy (void *dstpp, const void *srcpp, size_t len)
{
__memcpy(dstpp, srcpp, len);
#define LONG_MAX_32_BITS 2147483647
-#undef memrchr
-
/* Search no more than N bytes of S for C. */
void attribute_hidden *__memrchr (const void * s, int c_in, size_t n)
{
return 0;
}
-strong_alias(__memrchr, memrchr)
+strong_alias(__memrchr,memrchr)
#include <string.h>
#include "memcopy.h"
-#undef memset
-
void attribute_hidden *__memset (void *dstpp, int c, size_t len)
{
long int dstp = (long int) dstpp;
return dstpp;
}
-strong_alias(__memset, memset)
+strong_alias(__memset,memset)
#define LONG_MAX_32_BITS 2147483647
-#undef rawmemchr
-
/* Find the first occurrence of C in S. */
void attribute_hidden *__rawmemchr (const void * s, int c_in)
{
}
}
-strong_alias(__rawmemchr, rawmemchr)
+strong_alias(__rawmemchr,rawmemchr)
#include <string.h>
#include "memcopy.h"
-#undef strcat
-
/* Append SRC on the end of DEST. */
char attribute_hidden *__strcat (char *dest, const char *src)
{
return dest;
}
-strong_alias(__strcat, strcat)
+strong_alias(__strcat,strcat)
#include "memcopy.h"
-#undef strchr
-
/* Find the first occurrence of C in S. */
char attribute_hidden *__strchr (const char *s, int c_in)
{
return NULL;
}
-strong_alias(__strchr, strchr)
+strong_alias(__strchr,strchr)
-weak_alias(strchr, index)
+strong_alias(__strchr,index)
#include "memcopy.h"
-#undef strchrnul
-
/* Find the first occurrence of C in S or the final NUL byte. */
char attribute_hidden *__strchrnul (const char *s, int c_in)
{
return NULL;
}
-strong_alias(__strchrnul, strchrnul)
+strong_alias(__strchrnul,strchrnul)
02111-1307 USA. */
#include <string.h>
-#include <locale.h>
#include "memcopy.h"
-#undef strcmp
-
/* Compare S1 and S2, returning less than, equal to or
greater than zero if S1 is lexicographically less than,
equal to or greater than S2. */
return c1 - c2;
}
-strong_alias(__strcmp, strcmp)
+strong_alias(__strcmp,strcmp)
-#ifdef __LOCALE_C_ONLY
-hidden_strong_alias(__strcmp, __strcoll)
-strong_alias(__strcmp, strcoll)
-#endif /* __LOCALE_C_ONLY */
+#ifndef __UCLIBC_HAS_LOCALE__
+hidden_strong_alias(__strcmp,__strcoll)
+strong_alias(__strcmp,strcoll)
+#endif
#include "memcopy.h"
#include "bp-checks.h"
-#undef strcpy
-
/* Copy SRC to DEST. */
char attribute_hidden *__strcpy (char *dest, const char *src)
{
return dest;
}
-strong_alias(__strcpy, strcpy)
+strong_alias(__strcpy,strcpy)
#include <string.h>
-#undef strcspn
-
/* Return the length of the maximum initial segment of S
which contains no characters from REJECT. */
size_t attribute_hidden __strcspn (const char *s, const char *reject)
return count;
}
-strong_alias(__strcspn, strcspn)
+strong_alias(__strcspn,strcspn)
#include <string.h>
#include <stdlib.h>
-#undef strlen
-
/* Return the length of the null-terminated string STR. Scan for
the null terminator quickly by testing four bytes at a time. */
size_t attribute_hidden __strlen (const char *str)
}
}
-strong_alias(__strlen, strlen)
+strong_alias(__strlen,strlen)
#include "memcopy.h"
-#undef strncat
-
char attribute_hidden *__strncat (char *s1, const char *s2, size_t n)
{
reg_char c;
return s;
}
-strong_alias(__strncat, strncat)
+strong_alias(__strncat,strncat)
#include <string.h>
#include "memcopy.h"
-#undef strncmp
-
/* Compare no more than N characters of S1 and S2,
returning less than, equal to or greater than zero
if S1 is lexicographically less than, equal to or
return c1 - c2;
}
-strong_alias(__strncmp, strncmp)
+strong_alias(__strncmp,strncmp)
#include <string.h>
#include "memcopy.h"
-#undef strncpy
-
char attribute_hidden *__strncpy (char *s1, const char *s2, size_t n)
{
reg_char c;
return s;
}
-strong_alias(__strncpy, strncpy)
+strong_alias(__strncpy,strncpy)
#include <string.h>
#include <stdlib.h>
-#undef strnlen
-
/* Find the length of S, but scan at most MAXLEN characters. If no
'\0' terminator is found in that many characters, return MAXLEN. */
size_t attribute_hidden __strnlen (const char *str, size_t maxlen)
return char_ptr - str;
}
-strong_alias(__strnlen, strnlen)
+strong_alias(__strnlen,strnlen)
#include <string.h>
-#undef strrchr
-
/* Find the last occurrence of C in S. */
char attribute_hidden *__strrchr (const char *s, int c)
{
return (char *) found;
}
-strong_alias(__strrchr, strrchr)
+strong_alias(__strrchr,strrchr)
-weak_alias (strrchr, rindex)
+strong_alias (__strrchr,rindex)
#include <string.h>
-#undef strsep
-
char attribute_hidden *__strsep (char **stringp, const char *delim)
{
char *begin, *end;
return begin;
}
-strong_alias(__strsep, strsep)
+strong_alias(__strsep,strsep)
#include <string.h>
-#undef strspn
-
/* Return the length of the maximum initial segment
of S which contains only characters in ACCEPT. */
size_t attribute_hidden __strspn (const char *s, const char *accept)
return count;
}
-strong_alias(__strspn, strspn)
+strong_alias(__strspn,strspn)
typedef unsigned chartype;
-#undef strstr
-
char attribute_hidden *__strstr (const char *phaystack, const char *pneedle)
{
const unsigned char *haystack, *needle;
return 0;
}
-strong_alias(__strstr, strstr)
+strong_alias(__strstr,strstr)
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define rawmemchr __rawmemchr
-#define strspn __strspn
-#define strpbrk __strpbrk
-
#define _GNU_SOURCE
#include <string.h>
-#undef strtok_r
-
/* Parse S into tokens separated by characters in DELIM.
If S is NULL, the saved pointer in SAVE_PTR is used as
the next starting point. For example:
s = *save_ptr;
/* Scan leading delimiters. */
- s += strspn (s, delim);
+ s += __strspn (s, delim);
if (*s == '\0')
{
*save_ptr = s;
/* Find the end of the token. */
token = s;
- s = strpbrk (token, delim);
+ s = __strpbrk (token, delim);
if (s == NULL)
/* This token finishes the string. */
- *save_ptr = rawmemchr (token, '\0');
+ *save_ptr = __rawmemchr (token, '\0');
else
{
/* Terminate the token and make *SAVE_PTR point past it. */
return token;
}
-strong_alias(__strtok_r, strtok_r)
+strong_alias(__strtok_r,strtok_r)
#include <string.h>
-#undef memchr
void attribute_hidden *__memchr(const void *cs, int c, size_t count)
{
int d0;
return __res;
}
-strong_alias(__memchr, memchr)
+strong_alias(__memchr,memchr)
#include <string.h>
-#undef memcpy
void attribute_hidden *__memcpy(void * to, const void * from, size_t n)
{
int d0, d1, d2;
return (to);
}
-strong_alias(__memcpy, memcpy)
+strong_alias(__memcpy,memcpy)
#include <string.h>
-#undef memmove
void attribute_hidden *__memmove(void *dest, const void *src, size_t n)
{
int d0, d1, d2;
return dest;
}
-strong_alias(__memmove, memmove)
+strong_alias(__memmove,memmove)
#include <string.h>
-#undef memset
void attribute_hidden *__memset(void *s, int c, size_t count)
{
int d0, d1;
return s;
}
-strong_alias(__memset, memset)
+strong_alias(__memset,memset)
#include <string.h>
-#undef strcat
char attribute_hidden *__strcat(char * dest, const char * src)
{
int d0, d1, d2, d3;
return dest;
}
-strong_alias(__strcat, strcat)
+strong_alias(__strcat,strcat)
#include <string.h>
-#undef strchr
char attribute_hidden *__strchr(const char *s, int c)
{
int d0;
return __res;
}
-strong_alias(__strchr, strchr)
+strong_alias(__strchr,strchr)
-weak_alias(strchr, index)
+strong_alias(__strchr,index)
*/
#include <string.h>
-#include <locale.h> /* for __LOCALE_C_ONLY */
-#undef strcmp
int attribute_hidden __strcmp(const char *cs, const char *ct)
{
int d0, d1;
return __res;
}
-strong_alias(__strcmp, strcmp)
+strong_alias(__strcmp,strcmp)
-#ifdef __LOCALE_C_ONLY
-hidden_strong_alias(__strcmp, __strcoll)
-strong_alias(__strcmp, strcoll)
-#endif /* __LOCALE_C_ONLY */
+#ifndef __UCLIBC_HAS_LOCALE__
+hidden_strong_alias(__strcmp,__strcoll)
+strong_alias(__strcmp,strcoll)
+#endif
#include <string.h>
-#undef strcpy
char attribute_hidden *__strcpy(char * dest, const char * src)
{
int d0, d1, d2;
return dest;
}
-strong_alias(__strcpy, strcpy)
+strong_alias(__strcpy,strcpy)
#include <string.h>
-#undef strlen
size_t attribute_hidden __strlen(const char *s)
{
int d0;
return __res;
}
-strong_alias(__strlen, strlen)
+strong_alias(__strlen,strlen)
#include <string.h>
-#undef strncat
char attribute_hidden *__strncat(char * dest,
const char * src, size_t count)
{
return dest;
}
-strong_alias(__strncat, strncat)
+strong_alias(__strncat,strncat)
#include <string.h>
-#undef strncmp
int attribute_hidden __strncmp(const char *cs, const char *ct, size_t count)
{
register int __res;
return __res;
}
-strong_alias(__strncmp, strncmp)
+strong_alias(__strncmp,strncmp)
#include <string.h>
-#undef strncpy
char attribute_hidden *__strncpy(char * dest, const char * src, size_t count)
{
int d0, d1, d2, d3;
return dest;
}
-strong_alias(__strncpy, strncpy)
+strong_alias(__strncpy,strncpy)
#define _GNU_SOURCE
#include <string.h>
-#undef strnlen
size_t attribute_hidden __strnlen(const char *s, size_t count)
{
int d0;
return __res;
}
-strong_alias(__strnlen, strnlen)
+strong_alias(__strnlen,strnlen)
#include <string.h>
-#undef strrchr
char attribute_hidden *__strrchr(const char *s, int c)
{
int d0, d1;
return __res;
}
-strong_alias(__strrchr, strrchr)
+strong_alias(__strrchr,strrchr)
-weak_alias(strrchr, rindex)
+strong_alias(__strrchr,rindex)
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <features.h>
/*#include <sysdep.h>*/
#include <endian.h>
#include "sysdep.h"
# define SWLO swl /* low part is left in little-endian */
#endif
-ENTRY (memcpy)
+ENTRY (__memcpy)
.set noreorder
slti t0, a2, 8 # Less than 8?
move a2, t0
.set reorder
-END (memcpy)
-libc_hidden_builtin_def (memcpy)
+END (__memcpy)
+
+strong_alias(__memcpy,memcpy)
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <features.h>
/*#include <sysdep.h>*/
#include <endian.h>
#include "sysdep.h"
# define SWHI swr /* high part is right in little-endian */
#endif
-ENTRY (memset)
+ENTRY (__memset)
.set noreorder
slti t1, a2, 8 # Less than 8?
nop
.set reorder
-END (memset)
-libc_hidden_builtin_def (memset)
+END (__memset)
+
+strong_alias(__memset,memset)
#define ENTRY(name) \
.globl name; \
+ .hidden name; \
.align 2; \
.ent name,0; \
name##:
# define L(label) .L ## label
#endif
-#ifdef libc_hidden_builtin_def
-#error "WHOA!!! libc_hidden_builtin_def is defined"
-#else
-#define libc_hidden_builtin_def(name) .global __ ## name ; __ ## name = name
-#endif
-
#endif
#include <string.h>
-#undef memcpy
void attribute_hidden *__memcpy(void *to, const void *from, size_t n)
/* PPC can do pre increment and load/store, but not post increment and load/store.
Therefore use *++ptr instead of *ptr++. */
goto lessthan8;
}
-strong_alias(__memcpy, memcpy)
+strong_alias(__memcpy,memcpy)
#include <string.h>
-#undef memmove
void attribute_hidden *__memmove(void *to, const void *from, size_t n)
{
unsigned long rem, chunks, tmp1, tmp2;
goto lessthan8;
}
-strong_alias(__memmove, memmove)
+strong_alias(__memmove,memmove)
return c;
}
-#undef memset
void attribute_hidden *__memset(void *to, int c, size_t n)
{
unsigned long rem, chunks;
goto lessthan8;
}
-strong_alias(__memset, memset)
+strong_alias(__memset,memset)
! enirety if at least one byte is included in the copy.
!
+#include <features.h>
+
.section .text..SHmedia32,"ax"
- .globl memcpy
- .set memcpy,__memcpy
.globl __memcpy
.hidden __memcpy
.type __memcpy, @function
-
.align 5
+
__memcpy:
#define LDUAQ(P,O,D0,D1) ldlo.q P,O,D0; ldhi.q P,O+7,D1
blink tr1, r63
.size __memcpy,.-__memcpy
+
+strong_alias(__memcpy,memcpy)
! Copyright 2002 SuperH Ltd.
!
+#include <features.h>
#include <endian.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
#endif
.section .text..SHmedia32,"ax"
- .globl memset
- .set memset,__memset
.globl __memset
.hidden __memset
.type __memset, @function
blink tr2,r63
.size __memset,.-__memset
+
+strong_alias(__memset,memset)
!
! SH5 code Copyright 2002 SuperH Ltd.
+#include <features.h>
#include <endian.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
#endif
.section .text..SHmedia32,"ax"
- .globl strcpy
- .set strcpy,__strcpy
.globl __strcpy
.hidden __strcpy
.type __strcpy, @function
-
.align 5
+
__strcpy:
pta/l shortstring,tr1
blink tr1, r63 // shortstring
.size __strcpy,.-__strcpy
+
+strong_alias(__strcpy,strcpy)
* SUCH DAMAGE.
*/
+#include <features.h>
+
.section .text..SHmedia32,"ax"
- .globl strlen
- .set strlen,__strlen
.globl __strlen
.hidden __strlen
.type __strlen,@function
blink tr4, r63
.size __strlen,.-__strlen
+
+strong_alias(__strlen,strlen)
#define ENTRY(sym) \
.global sym; \
+ .hidden sym; \
.align ENTRY_ALIGN; \
.type sym,%function; \
sym:
#define END(sym) \
.size sym,.-sym;
-
-#undef weak_alias
-#define weak_alias(sym, alias) \
- .weak alias; \
- alias = sym;
1: retl
sub %o0, 1, %o0
-.globl memchr
-.set memchr,__memchr
-.hidden __memchr
ENTRY(__memchr)
andcc %o1, 0xff, %o1
sll %o1, 8, %g6
4: retl
sub %o0, 4, %o0
END(__memchr)
+strong_alias(__memchr,memchr)
#if !__BOUNDED_POINTERS__
-weak_alias (__memchr, __ubp_memchr)
+weak_alias(__memchr,__ubp_memchr)
#endif
b 3f
sub %o0, 2, %o0
-.globl bcopy
-.set bcopy,__bcopy
-.hidden __bcopy
ENTRY(__bcopy)
mov %o0, %o3
mov %o1, %o0
mov %o3, %o1
END(__bcopy)
+strong_alias(__bcopy,bcopy)
-.globl memmove
-.set memmove,__memmove
-.hidden __memmove
ENTRY(__memmove)
cmp %o0, %o1
st %o0, [%sp + 64]
b 3f
add %o0, 2, %o0
END(__memmove)
+strong_alias(__memmove,memmove)
-.globl memcpy
-.set memcpy,__memcpy
-.hidden __memcpy
ENTRY(__memcpy) /* %o0=dst %o1=src %o2=len */
sub %o0, %o1, %o4
st %o0, [%sp + 64]
110: retl
sub %o7, %g6, %o5
END(__memcpy)
+strong_alias(__memcpy,memcpy)
b 4f
sub %o0, %o2, %o0
END(__bzero)
+strong_alias(__bzero,bzero)
-.globl memset
-.set memset,__memset
-.hidden __memset
ENTRY(__memset)
and %o1, 0xff, %g3
sll %g3, 8, %g2
0: retl
nop
END(__memset)
-
-weak_alias (__bzero, bzero)
+strong_alias(__memset,memset)
1: retl
add %o0, -1, %o0
-.globl stpcpy
-.set stpcpy,__stpcpy
-.hidden __stpcpy
ENTRY(__stpcpy)
andcc %o1, 3, %g0
bne 10b
19: retl
nop
END(__stpcpy)
+
+strong_alias(__stpcpy,stpcpy)
b 3f
sub %o0, 1, %o0
-.globl strcat
-.set strcat,__strcat
-.hidden __strcat
ENTRY(__strcat)
mov %o0, %g2
andcc %o0, 3, %g0
retl
mov %g2, %o0
END(__strcat)
+
+strong_alias(__strcat,strcat)
1: retl
sub %o0, 1, %o0
-.globl strchr
-.set strchr,__strchr
-.hidden __strchr
ENTRY(__strchr)
andcc %o1, 0xff, %o1
be 12f
b 7f
ld [%o0], %g4
END(__strchr)
+strong_alias(__strchr,strchr)
+strong_alias(__strchr,index)
-.globl strrchr
-.set strrchr,__strrchr
-.hidden __strrchr
ENTRY(__strrchr)
andcc %o1, 0xff, %o1
clr %o5
9: retl
mov %o5, %o0
END(__strrchr)
-
-weak_alias (strchr, index)
-weak_alias (strrchr, rindex)
+strong_alias(__strrchr,strrchr)
+strong_alias(__strrchr,rindex)
2: retl
mov %o4, %o0
-.globl strcmp
-.set strcmp,__strcmp
-.hidden __strcmp
ENTRY(__strcmp)
andcc %o0, 3, %g0
bne 10b
jmpl %i7 + 8, %g0
restore %g4, %g0, %o0
END(__strcmp)
+
+strong_alias(__strcmp,strcmp)
b 6f
andcc %o0, 3, %g3
-.globl strcpy
-.set strcpy,__strcpy
-.hidden __strcpy
ENTRY(__strcpy)
mov %o0, %g2
andcc %o1, 3, %g0
retl
mov %g2, %o0
END(__strcpy)
+
+strong_alias(__strcpy,strcpy)
3: retl
mov 2, %o0
-.globl strlen
-.set strlen,__strlen
-.hidden __strlen
ENTRY(__strlen)
mov %o0, %o1
andcc %o0, 3, %g0
13: retl
sub %o4, %o1, %o0
END(__strlen)
+
+strong_alias(__strlen,strlen)
add %o0, -1, %o0 /* IEU0 */
END(__memchr)
-weak_alias (__memchr, memchr)
+strong_alias(__memchr,memchr)
#if !__BOUNDED_POINTERS__
-weak_alias (__memchr, __ubp_memchr)
+weak_alias(__memchr,__ubp_memchr)
#endif
.text
.align 32
-.globl bcopy
-.set bcopy,__bcopy
-.hidden __bcopy
ENTRY(__bcopy)
sub %o1, %o0, %o4 /* IEU0 Group */
mov %o0, %g3 /* IEU1 */
retl
nop
END(__bcopy)
+strong_alias(__bcopy,bcopy)
.align 32
200: be,pt %xcc, 201f /* CTI */
#endif
.align 32
-.globl memcpy
-.set memcpy,__memcpy
-.hidden __memcpy
ENTRY(__memcpy)
210:
#ifndef USE_BPR
retl
mov %g4, %o0
END(__memcpy)
+strong_alias(__memcpy,memcpy)
.align 32
228: andcc %o2, 1, %g0 /* IEU1 Group */
nop
.align 32
-.globl memmove
-.set memmove,__memmove
-.hidden __memmove
ENTRY(__memmove)
#ifndef USE_BPR
srl %o2, 0, %o2 /* IEU1 Group */
retl
mov %g4, %o0
END(__memmove)
+strong_alias(__memmove,memmove)
#ifdef USE_BPR
-weak_alias (memcpy, __align_cpy_1)
-weak_alias (memcpy, __align_cpy_2)
+weak_alias(__memcpy,__align_cpy_1)
+weak_alias(__memcpy,__align_cpy_2)
#endif
/* Well, memset is a lot easier to get right than bcopy... */
.text
.align 32
-.globl memset
-.set memset,__memset
-.hidden __memset
ENTRY(__memset)
andcc %o1, 0xff, %o1
mov %o0, %o5
ba,pt %xcc, 18b
ldd [%o0], %f0
END(__memset)
+strong_alias(__memset,memset)
#define ZERO_BLOCKS(base, offset, source) \
stx source, [base - offset - 0x38]; \
0: retl
mov %o5, %o0
END(__bzero)
-
-weak_alias (__bzero, bzero)
+strong_alias(__bzero,bzero)
.text
.align 32
-.globl bcopy
-.set bcopy,__bcopy
-.hidden __bcopy
ENTRY(__bcopy)
sub %o1, %o0, %o4
mov %o0, %g4
retl
nop
END(__bcopy)
+strong_alias(__bcopy,bcopy)
/* Special/non-trivial issues of this code:
*
* of up to 2.4GB per second.
*/
.align 32
-.globl memcpy
-.set memcpy,__memcpy
-.hidden __memcpy
ENTRY(__memcpy)
100: /* %o0=dst, %o1=src, %o2=len */
mov %g5, %o0
END(__memcpy)
+strong_alias(__memcpy,memcpy)
#define RMOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3) \
ldx [%src - offset - 0x20], %t0; \
mov %g4, %o0
.align 32
-.globl memmove
-.set memmove,__memmove
-.hidden __memmove
ENTRY(__memmove)
mov %o0, %g5
#ifndef USE_BPR
retl
mov %g4, %o0
END(__memmove)
+strong_alias(__memmove,memmove)
#ifdef USE_BPR
-weak_alias (memcpy, __align_cpy_1)
-weak_alias (memcpy, __align_cpy_2)
-weak_alias (memcpy, __align_cpy_4)
-weak_alias (memcpy, __align_cpy_8)
-weak_alias (memcpy, __align_cpy_16)
+weak_alias(memcpy,__align_cpy_1)
+weak_alias(memcpy,__align_cpy_2)
+weak_alias(memcpy,__align_cpy_4)
+weak_alias(memcpy,__align_cpy_8)
+weak_alias(memcpy,__align_cpy_16)
#endif
mov %g6, %o0 /* IEU0 */
END(__stpcpy)
-weak_alias (__stpcpy, stpcpy)
+strong_alias(__stpcpy,stpcpy)
.text
.align 32
-.globl strcat
-.set strcat,__strcat
-.hidden __strcat
ENTRY(__strcat)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
ldub [%o0], %o3 /* Load */
retl /* CTI+IEU1 Group */
mov %g6, %o0 /* IEU0 */
END(__strcat)
+
+strong_alias(__strcat,strcat)
.text
.align 32
-.globl strchr
-.set strchr,__strchr
-.hidden __strchr
ENTRY(__strchr)
andcc %o1, 0xff, %o1 /* IEU1 Group */
be,pn %icc, 17f /* CTI */
retl /* CTI+IEU1 Group */
add %o0, -1, %o0 /* IEU0 */
END(__strchr)
+strong_alias(__strchr,strchr)
+strong_alias(__strchr,index)
.align 32
-.globl strrchr
-.set strrchr,__strrchr
-.hidden __strrchr
ENTRY(__strrchr)
andcc %o1, 0xff, %o1 /* IEU1 Group */
be,pn %icc, 17b /* CTI */
ldx [%o0], %o3 /* Load */
END(__strrchr)
-
-weak_alias (strchr, index)
-weak_alias (strrchr, rindex)
+strong_alias(__strrchr,strrchr)
+strong_alias(__strrchr,rindex)
.text
.align 32
-.globl strcmp
-.set strcmp,__strcmp
-.hidden __strcmp
ENTRY(__strcmp)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
andcc %o0, 7, %g0 /* IEU1 */
ba,pt %xcc, 11b /* CTI Group */
ldxa [%o1 + %o0] ASI_PNF, %g6 /* Load */
END(__strcmp)
+
+strong_alias(__strcmp,strcmp)
.text
.align 32
-.globl strcpy
-.set strcpy,__strcpy
-.hidden __strcpy
ENTRY(__strcpy)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
mov %o0, %g6 /* IEU1 */
retl /* CTI+IEU1 Group */
mov %g6, %o0 /* IEU0 */
END(__strcpy)
+
+strong_alias(__strcpy,strcpy)
.text
.align 32
-.globl strlen
-.set strlen,__strlen
-.hidden __strlen
ENTRY(__strlen)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
ldub [%o0], %o3 /* Load */
retl /* CTI+IEU1 Group */
sub %o0, %o1, %o0 /* IEU0 */
END(__strlen)
+
+strong_alias(__strlen,strlen)
#define ENTRY(sym) \
.global sym; \
+ .hidden sym; \
.align ENTRY_ALIGN; \
.type sym,%function; \
sym:
#define END(sym) \
.size sym,.-sym;
-
-#undef weak_alias
-#define weak_alias(sym, alias) \
- .weak alias; \
- alias = sym;
-#define memset __bzero
+#define __memset __bzero
#include "memset.S"
-weak_alias (__bzero, bzero)
+strong_alias(__bzero,bzero)
/* BEWARE: `#ifdef memcpy' means that memcpy is redefined as `mempcpy',
and the return value is the byte after the last one copied in
the destination. */
-#define MEMPCPY_P (defined memcpy)
+#define MEMPCPY_P (defined __memcpy)
.text
#if defined PIC && !defined NOT_IN_libc
jb HIDDEN_JUMPTARGET (__chk_fail)
END (__memcpy_chk)
#endif
-.global memcpy
-.set memcpy,__memcpy
-.hidden __memcpy
ENTRY (BP_SYM (__memcpy))
/* Cutoff for the big loop is a size of 32 bytes since otherwise
the loop will never be entered. */
ret
END (BP_SYM (__memcpy))
+#if !MEMPCPY_P
+strong_alias(__memcpy,memcpy)
+#endif
--- /dev/null
+#define __memcpy __mempcpy
+#include "memcpy.S"
+strong_alias(__mempcpy,mempcpy)
#include "_glibc_inc.h"
/* BEWARE: `#ifdef memset' means that memset is redefined as `bzero' */
-#define BZERO_P (defined memset)
+#define BZERO_P (defined __memset)
/* This is somehow experimental and could made dependend on the cache
size. */
jb HIDDEN_JUMPTARGET (__chk_fail)
END (__memset_chk)
#endif
-.global memset
-.set memset,__memset
-.hidden __memset
ENTRY (__memset)
#if BZERO_P
mov %rsi,%rdx /* Adjust parameter. */
jmp 4b
END (__memset)
+#if !BZERO_P
+strong_alias(__memset,memset)
+#endif
#if !BZERO_P && defined PIC && !defined NOT_IN_libc
strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
#define USE_AS_STPCPY
#define STRCPY __stpcpy
-
#include "strcpy.S"
-
-weak_alias (__stpcpy, stpcpy)
+strong_alias(__stpcpy,stpcpy)
.text
-.global strcat
-.set strcat,__strcat
-.hidden __strcat
ENTRY (BP_SYM (__strcat))
movq %rdi, %rcx /* Dest. register. */
andl $7, %ecx /* mask alignment bits */
movq %rdi, %rax /* Source is return value. */
retq
END (BP_SYM (__strcat))
+
+strong_alias(__strcat,strcat)
.text
-.globl strchr
-.set strchr,__strchr
-.hidden __strchr
ENTRY (BP_SYM (__strchr))
/* Before we start with the main loop we process single bytes
retq
END (BP_SYM (__strchr))
-weak_alias (BP_SYM (strchr), BP_SYM (index))
+strong_alias(__strchr,strchr)
+strong_alias (BP_SYM (__strchr), BP_SYM (index))
#include "_glibc_inc.h"
.text
-.global strcmp
-.set strcmp,__strcmp
-.hidden __strcmp
ENTRY (BP_SYM (__strcmp))
L(oop): movb (%rdi), %al
cmpb (%rsi), %al
cmovbl %ecx, %eax
ret
END (BP_SYM (__strcmp))
+
+strong_alias(__strcmp,strcmp)
#ifndef USE_AS_STPCPY
# define STRCPY __strcpy
-.global strcpy
-.set strcpy,__strcpy
-.hidden __strcpy
#endif
.text
#endif
retq
END (BP_SYM (STRCPY))
+#ifndef USE_AS_STPCPY
+strong_alias(__strcpy,strcpy)
+#endif
#define STRPBRK_P (defined __strcspn)
.text
-#if STRPBRK_P
-#else
-.global strcspn
-.set strcspn,__strcspn
-.hidden __strcspn
-#endif
ENTRY (__strcspn)
movq %rdi, %rdx /* Save SRC. */
#endif
ret
END (__strcspn)
+
+#if !STRPBRK_P
+strong_alias(__strcspn,strcspn)
+#endif
.text
-.global strlen
-.set strlen,__strlen
-.hidden __strlen
ENTRY (__strlen)
movq %rdi, %rcx /* Duplicate source pointer. */
andl $7, %ecx /* mask alignment bits */
subq %rdi, %rax /* compute difference to string start */
ret
END (__strlen)
+
+strong_alias(__strlen,strlen)
#define __strcspn __strpbrk
-.global strpbrk
-.set strpbrk,__strpbrk
-.hidden __strpbrk
#include "strcspn.S"
+strong_alias(__strpbrk,strpbrk)
#include "_glibc_inc.h"
.text
-.global strspn
-.set strspn,__strspn
-.hidden __strspn
ENTRY (__strspn)
movq %rdi, %rdx /* Save SRC. */
non-valid character */
ret
END (__strspn)
+
+strong_alias(__strspn,strspn)