]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/powerpc/powerpc32/power4/memset.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / powerpc / powerpc32 / power4 / memset.S
index d73a5383053b6f15469218cf3f5d0e5acd6de7a5..e42123b891fcf495180730a268c65b6f4b33e858 100644 (file)
@@ -1,5 +1,5 @@
 /* Optimized memset implementation for PowerPC64.
-   Copyright (C) 1997,99, 2000,02,03, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
 
-/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5]));
    Returns 's'.
 
    The memset is done in three sizes: byte (8 bits), word (32 bits),
@@ -28,7 +26,7 @@
    to 0, to take advantage of the dcbz instruction.  */
 
        .machine power4
-EALIGN (BP_SYM (memset), 5, 0)
+EALIGN (memset, 5, 0)
        CALL_MCOUNT
 
 #define rTMP   r0
@@ -52,7 +50,7 @@ L(_memset):
 
 /* Align to word boundary.  */
        cmplwi  cr5, rLEN, 31
-       rlwimi  rCHR, rCHR, 8, 16, 23 /* Replicate byte to halfword.  */
+       insrwi  rCHR, rCHR, 8, 16     /* Replicate byte to halfword.  */
        beq+    L(aligned)
        mtcrf   0x01, rMEMP0
        subfic  rALIGN, rALIGN, 4
@@ -67,7 +65,7 @@ L(g0):
 /* Handle the case of size < 31.  */
 L(aligned):
        mtcrf   0x01, rLEN
-       rlwimi  rCHR, rCHR, 16, 0, 15 /* Replicate halfword to word.  */
+       insrwi  rCHR, rCHR, 16, 0    /* Replicate halfword to word.  */
        ble     cr5, L(medium)
 /* Align to 32-byte boundary.  */
        andi.   rALIGN, rMEMP, 0x1C
@@ -164,7 +162,7 @@ L(cacheAligned):
        add     rMEMP,rMEMP,rCLS
        b       L(cacheAligned)
 
-/* We are here because the cache line size was set and the remainder 
+/* We are here because the cache line size was set and the remainder
   (rLEN) is less than the actual cache line size.
    So set up the preconditions for L(nondcbz) and go there.  */
 L(handletail32):
@@ -224,5 +222,5 @@ L(medium_28t):
         stw     rCHR, -4(rMEMP)
        stw     rCHR, -8(rMEMP)
        blr
-END (BP_SYM (memset))
+END (memset)
 libc_hidden_builtin_def (memset)