]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/alpha/memset.S
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / alpha / memset.S
index 55271f00ea51ae17e562bcf8a2e1bfc4bde112cf..65acc57f2c2af19e6b56f86aa1d50e4a6bd785fb 100644 (file)
@@ -1,22 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
    Contributed by Richard Henderson (rth@tamu.edu)
+   This file is part of the GNU C Library.
 
-This file is part of the GNU C Library.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <https://www.gnu.org/licenses/>.  */
 
 /* Fill a block of memory with a character.  Optimized for the Alpha
    architecture:
@@ -39,11 +37,11 @@ Cambridge, MA 02139, USA.  */
        .set noreorder
 
        .text
+       .type   memset, @function
+       .globl  memset
+       .usepv  memset, USEPV_PROF
 
-/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
-   doesn't like putting the entry point for a procedure somewhere in the
-   middle of the procedure descriptor.  Work around this by putting the main
-   loop in its own procedure descriptor.  */
+       cfi_startproc
 
        /* On entry to this basic block:
           t3 == loop counter
@@ -51,12 +49,8 @@ Cambridge, MA 02139, USA.  */
           a0 == possibly misaligned destination pointer
           a1 == replicated source character  */
 
-       .ent memset_loop
        .align 3
 memset_loop:
-       .frame sp, 0, ra, 0
-       .prologue 0
-
        beq     t3, $tail
        blbc    t3, 0f          # skip single store if count even
 
@@ -82,12 +76,14 @@ $tail:      bne     t4, 1f          # is there a tail to do?
        stq_u   t0, 0(a0)       # e0    :
        ret                     # .. e1 :
 
-       .end memset_loop
-
-ENTRY(memset)
-       .prologue 0
+memset:
+#ifdef PROF
+       ldgp    gp, 0(pv)
+       lda     AT, _mcount
+       jsr     AT, (AT), _mcount
+#endif
 
-       zapnot  a1, 1, a1       # e0    : zero extend input character
+       and     a1, 0xff, a1    # e0    : zero extend input character
        mov     a0, v0          # .. e1 : move return value in place
        sll     a1, 8, t0       # e0    : begin replicating the char
        beq     a2, $done       # .. e1 : early exit for zero-length store
@@ -127,4 +123,5 @@ $oneq:
 
 $done: ret
 
-       END(memset)
+       cfi_endproc
+libc_hidden_builtin_def (memset)