Skip to content

Commit

Permalink
From patchwork series 435721
Browse files Browse the repository at this point in the history
  • Loading branch information
Fox Snowpatch committed Dec 7, 2024
1 parent 1ecdccb commit 7d026f9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static inline unsigned long tb_ticks_since(unsigned long tstamp)
#define mulhdu(x,y) \
({unsigned long z; asm ("mulhdu %0,%1,%2" : "=r" (z) : "r" (x), "r" (y)); z;})
#else
extern u64 mulhdu(u64, u64);
#define mulhdu(x, y) mul_u64_u64_shr(x, y, 64)
#endif

extern void div128_by_32(u64 dividend_high, u64 dividend_low,
Expand Down
26 changes: 0 additions & 26 deletions arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,6 @@

.text

/*
* This returns the high 64 bits of the product of two 64-bit numbers.
*/
_GLOBAL(mulhdu)
cmpwi r6,0
cmpwi cr1,r3,0
mr r10,r4
mulhwu r4,r4,r5
beq 1f
mulhwu r0,r10,r6
mullw r7,r10,r5
addc r7,r0,r7
addze r4,r4
1: beqlr cr1 /* all done if high part of A is 0 */
mullw r9,r3,r5
mulhwu r10,r3,r5
beq 2f
mullw r0,r3,r6
mulhwu r8,r3,r6
addc r7,r0,r7
adde r4,r4,r8
addze r10,r10
2: addc r4,r4,r9
addze r3,r10
blr

/*
* reloc_got2 runs through the .got2 section adding an offset
* to each entry.
Expand Down

0 comments on commit 7d026f9

Please sign in to comment.