Merge tag 'xtensa-for-next-20140815' into for_next
[firefly-linux-kernel-4.4.55.git] / arch / arm / lib / div64.S
index e55c4842c290fa6267e9998eb9dc4bd28f8cfcef..a9eafe4981eb847e2f07e0e245aa8e1f1747fa59 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/assembler.h>
 #include <asm/unwind.h>
 
 #ifdef __ARMEB__
@@ -97,7 +98,7 @@ UNWIND(.fnstart)
        mov     yl, #0
        cmpeq   xl, r4
        movlo   xh, xl
-       movlo   pc, lr
+       retlo   lr
 
        @ The division loop for lower bit positions.
        @ Here we shift remainer bits leftwards rather than moving the
@@ -111,14 +112,14 @@ UNWIND(.fnstart)
        subcs   xh, xh, r4
        movs    ip, ip, lsr #1
        bne     4b
-       mov     pc, lr
+       ret     lr
 
        @ The top part of remainder became zero.  If carry is set
        @ (the 33th bit) this is a false positive so resume the loop.
        @ Otherwise, if lower part is also null then we are done.
 6:     bcs     5b
        cmp     xl, #0
-       moveq   pc, lr
+       reteq   lr
 
        @ We still have remainer bits in the low part.  Bring them up.
 
@@ -144,7 +145,7 @@ UNWIND(.fnstart)
        movs    ip, ip, lsr #1
        mov     xh, #1
        bne     4b
-       mov     pc, lr
+       ret     lr
 
 8:     @ Division by a power of 2: determine what that divisor order is
        @ then simply shift values around
@@ -184,13 +185,13 @@ UNWIND(.fnstart)
  THUMB(        orr     yl, yl, xh              )
        mov     xh, xl, lsl ip
        mov     xh, xh, lsr ip
-       mov     pc, lr
+       ret     lr
 
        @ eq -> division by 1: obvious enough...
 9:     moveq   yl, xl
        moveq   yh, xh
        moveq   xh, #0
-       moveq   pc, lr
+       reteq   lr
 UNWIND(.fnend)
 
 UNWIND(.fnstart)