Skip to content

Commit 7d026f9

Browse files
author
Fox Snowpatch
committed
1 parent 1ecdccb commit 7d026f9

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

arch/powerpc/include/asm/time.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static inline unsigned long tb_ticks_since(unsigned long tstamp)
8686
#define mulhdu(x,y) \
8787
({unsigned long z; asm ("mulhdu %0,%1,%2" : "=r" (z) : "r" (x), "r" (y)); z;})
8888
#else
89-
extern u64 mulhdu(u64, u64);
89+
#define mulhdu(x, y) mul_u64_u64_shr(x, y, 64)
9090
#endif
9191

9292
extern void div128_by_32(u64 dividend_high, u64 dividend_low,

arch/powerpc/kernel/misc_32.S

-26
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,6 @@
2727

2828
.text
2929

30-
/*
31-
* This returns the high 64 bits of the product of two 64-bit numbers.
32-
*/
33-
_GLOBAL(mulhdu)
34-
cmpwi r6,0
35-
cmpwi cr1,r3,0
36-
mr r10,r4
37-
mulhwu r4,r4,r5
38-
beq 1f
39-
mulhwu r0,r10,r6
40-
mullw r7,r10,r5
41-
addc r7,r0,r7
42-
addze r4,r4
43-
1: beqlr cr1 /* all done if high part of A is 0 */
44-
mullw r9,r3,r5
45-
mulhwu r10,r3,r5
46-
beq 2f
47-
mullw r0,r3,r6
48-
mulhwu r8,r3,r6
49-
addc r7,r0,r7
50-
adde r4,r4,r8
51-
addze r10,r10
52-
2: addc r4,r4,r9
53-
addze r3,r10
54-
blr
55-
5630
/*
5731
* reloc_got2 runs through the .got2 section adding an offset
5832
* to each entry.

0 commit comments

Comments
 (0)