]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/lib/memcpy_64.S
cciss: fix regression firmware not displayed in procfs
[linux-2.6-omap-h63xx.git] / arch / powerpc / lib / memcpy_64.S
index 9ccacdf5bcb952f6a2664cd44b38fc5dee15dafd..3f131129d1c1a496607637f39eb1f563596768d0 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc64/lib/memcpy.S
- *
  * Copyright (C) 2002 Paul Mackerras, IBM Corp.
  *
  * This program is free software; you can redistribute it and/or
@@ -13,7 +11,8 @@
 
        .align  7
 _GLOBAL(memcpy)
-       mtcrf   0x01,r5
+       std     r3,48(r1)       /* save destination pointer for return value */
+       PPC_MTOCRF      0x01,r5
        cmpldi  cr1,r5,16
        neg     r6,r3           # LS 3 bits = # bytes to 8-byte dest bdry
        andi.   r6,r6,7
@@ -40,7 +39,7 @@ _GLOBAL(memcpy)
        stdu    r9,16(r3)
        bdnz    1b
 3:     std     r8,8(r3)
-       beqlr
+       beq     3f
        addi    r3,r3,16
        ld      r9,8(r4)
 .Ldo_tail:
@@ -55,7 +54,8 @@ _GLOBAL(memcpy)
 2:     bf      cr7*4+3,3f
        rotldi  r9,r9,8
        stb     r9,0(r3)
-3:     blr
+3:     ld      r3,48(r1)       /* return dest pointer */
+       blr
 
 .Lsrc_unaligned:
        srdi    r6,r5,3
@@ -117,7 +117,7 @@ _GLOBAL(memcpy)
 5:     srd     r12,r9,r11
        or      r12,r8,r12
        std     r12,24(r3)
-       beqlr
+       beq     4f
        cmpwi   cr1,r5,8
        addi    r3,r3,32
        sld     r9,r9,r10
@@ -128,7 +128,7 @@ _GLOBAL(memcpy)
        b       .Ldo_tail
 
 .Ldst_unaligned:
-       mtcrf   0x01,r6         # put #bytes to 8B bdry into cr7
+       PPC_MTOCRF      0x01,r6         # put #bytes to 8B bdry into cr7
        subf    r5,r6,r5
        li      r7,0
        cmpldi  r1,r5,16
@@ -143,7 +143,7 @@ _GLOBAL(memcpy)
 2:     bf      cr7*4+1,3f
        lwzx    r0,r7,r4
        stwx    r0,r7,r3
-3:     mtcrf   0x01,r5
+3:     PPC_MTOCRF      0x01,r5
        add     r4,r6,r4
        add     r3,r6,r3
        b       .Ldst_aligned
@@ -169,4 +169,5 @@ _GLOBAL(memcpy)
 3:     bf      cr7*4+3,4f
        lbz     r0,0(r4)
        stb     r0,0(r3)
-4:     blr
+4:     ld      r3,48(r1)       /* return dest pointer */
+       blr