]> 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 6ee99c204d7588ec8433dd436c64d004e9c8cd9d..251e1cb52f603937c92fc93980f7da85e9e8aa35 100644 (file)
@@ -1,21 +1,20 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
    Contributed by Richard Henderson (rth@tamu.edu)
    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 Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
+   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 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.
+   Lesser 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., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
 
 /* Fill a block of memory with a character.  Optimized for the Alpha
    architecture:
        .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
           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
 
@@ -81,19 +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)
+memset:
 #ifdef PROF
        ldgp    gp, 0(pv)
        lda     AT, _mcount
        jsr     AT, (AT), _mcount
-       .prologue 1
-#else
-       .prologue 0
 #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
@@ -133,4 +123,5 @@ $oneq:
 
 $done: ret
 
-       END(memset)
+       cfi_endproc
+libc_hidden_builtin_def (memset)