Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch/powerpc/string on 601 CPUs skip to norm...



details:   https://anonhg.NetBSD.org/src/rev/8f027a2a1760
branches:  trunk
changeset: 327316:8f027a2a1760
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Mar 04 17:05:14 2014 +0000

description:
on 601 CPUs skip to normal memcpy if both source and destination are 32bit
aligned

diffstat:

 common/lib/libc/arch/powerpc/string/memcpy.S |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r f17175e4f060 -r 8f027a2a1760 common/lib/libc/arch/powerpc/string/memcpy.S
--- a/common/lib/libc/arch/powerpc/string/memcpy.S      Tue Mar 04 16:15:28 2014 +0000
+++ b/common/lib/libc/arch/powerpc/string/memcpy.S      Tue Mar 04 17:05:14 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: memcpy.S,v 1.5 2014/03/03 18:55:02 matt Exp $ */
+/* $NetBSD: memcpy.S,v 1.6 2014/03/04 17:05:14 macallan Exp $ */
 
 /* stropt/memcpy_440.S, pl_string_common, pl_linux 10/11/04 11:45:36
  * ==========================================================================
@@ -73,11 +73,14 @@
         * not available.  Maybe want to have a different memcpy for 601
         * that checks for page boundaries/word alignment...
         */
-       mfspr   %r6, 287                /* mfpvbr %r6 PVR = 287       */
-       srwi    %r6, %r6, 0x10          /* get version field from PVR */
-       cmpwi   %r6, 0x1                /* 601 CPU = 0x0001           */
-       bne     bnorm                   /* skip byte-only unless 601  */
+       mfspr   %r6, 287                /* mfpvbr %r6 PVR = 287        */
+       srwi    %r6, %r6, 0x10          /* get version field from PVR  */
+       cmpwi   %r6, 0x1                /* 601 CPU = 0x0001            */
+       bne     bnorm                   /* skip byte-only unless 601   */
 
+       or      %r6, %r3, %r4           /* see if both source and dest */
+       andi.   %r6, %r6, 3             /* are 32bit aligned           */
+       beq     bnorm                   /* skip byte-only if they are  */
 bcpy:
        mtctr   %r5                     /* byte copy everything */
        li      %r6, 0



Home | Main Index | Thread Index | Old Index