mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-20 09:41:18 +00:00
* sysdeps/generic/bp-checks.h: Use unbounded __memchr
rather than non-existent __ubp_memchr. (CHECK_STRINGopt, CHECK_FCNTL, BOUNDED_N, BOUNDED_1): New macros. (_CHECK_STRING, _CHECK_N): New macros. (CHECK_STRING, CHECK_N, CHECK_Nopt): Rewrite in terms of _CHECK_*. (CHECK_IOCTL): Move inside `#if !__ASSEMBLER__'. * sysdeps/alpha/memchr.S: Change strong name to "__memchr". Add weak alias "memchr". * sysdeps/generic/memchr.c: Likewise. * sysdeps/i386/memchr.S: Likewise. * sysdeps/ia64/memchr.S: Likewise. * sysdeps/m68k/memchr.S: Likewise. * sysdeps/sparc/sparc32/memchr.S: Likewise. * sysdeps/sparc/sparc64/memchr.S: Likewise. * sysdeps/vax/memchr.s: Likewise.
This commit is contained in:
parent
84b5ff5c97
commit
23e6128c4e
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger (davidm@cs.arizona.edu).
|
||||
|
||||
@ -37,7 +37,7 @@ For correctness consider that:
|
||||
.set noreorder
|
||||
.set noat
|
||||
|
||||
ENTRY(memchr)
|
||||
ENTRY(__memchr)
|
||||
#ifdef PROF
|
||||
ldgp gp, 0(pv)
|
||||
lda AT, _mcount
|
||||
@ -167,4 +167,6 @@ $not_found:
|
||||
mov zero, v0 #-e0 :
|
||||
ret # .. e1 :
|
||||
|
||||
END(memchr)
|
||||
END(__memchr)
|
||||
|
||||
weak_alias (__stpcpy, stpcpy)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the
|
||||
first N bytes of STR.
|
||||
For Motorola 68000.
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Schwab <schwab@gnu.org>.
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
#include "asm-syntax.h"
|
||||
|
||||
TEXT
|
||||
ENTRY(memchr)
|
||||
ENTRY(__memchr)
|
||||
/* Save the callee-saved registers we use. */
|
||||
moveml R(d2)-R(d4),MEM_PREDEC(sp)
|
||||
|
||||
@ -223,6 +223,6 @@ L(L9:)
|
||||
movel R(a0),R(d0)
|
||||
moveml MEM_POSTINC(sp),R(d2)-R(d4)
|
||||
rts
|
||||
END(strchr)
|
||||
END(__memchr)
|
||||
|
||||
weak_alias (strchr, index)
|
||||
weak_alias (__memchr, memchr)
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
#include "DEFS.h"
|
||||
|
||||
ENTRY(memchr, 0)
|
||||
ENTRY(__memchr, 0)
|
||||
movq 4(ap),r1 # r1 = cp; r2 = c
|
||||
movl 12(ap),r0 # r0 = n
|
||||
movzwl $65535,r4 # handy constant
|
||||
@ -67,3 +67,6 @@ ENTRY(memchr, 0)
|
||||
decw r0 # from 0 to 65535
|
||||
subl2 r0,r4 # adjust n
|
||||
brb 0b # and loop
|
||||
|
||||
weak_alias (__memchr, memchr)
|
||||
|
Loading…
Reference in New Issue
Block a user