arch/powerpc/*/div64.S
Albert Cahalan
acahalan at gmail.com
Sun Oct 3 05:16:57 EST 2010
This looks like duplicated code getting out of sync.
$ diff -Naurd arch/powerpc/lib/div64.S arch/powerpc/boot/div64.S
--- arch/powerpc/lib/div64.S 2009-09-09 18:13:59.000000000 -0400
+++ arch/powerpc/boot/div64.S 2009-09-09 18:13:59.000000000 -0400
@@ -13,10 +13,10 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
-#include <asm/ppc_asm.h>
-#include <asm/processor.h>
+#include "ppc_asm.h"
-_GLOBAL(__div64_32)
+ .globl __div64_32
+__div64_32:
lwz r5,0(r3) # get the dividend into r5/r6
lwz r6,4(r3)
cmplw r5,r4
@@ -33,10 +33,9 @@
cntlzw r0,r5 # we are shifting the dividend right
li r10,-1 # to make it < 2^32, and shifting
srw r10,r10,r0 # the divisor right the same amount,
- addc r9,r4,r10 # rounding up (so the estimate cannot
+ add r9,r4,r10 # rounding up (so the estimate cannot
andc r11,r6,r10 # ever be too large, only too small)
andc r9,r9,r10
- addze r9,r9
or r11,r5,r11
rotlw r9,r9,r0
rotlw r11,r11,r0
More information about the Linuxppc-dev
mailing list