mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] do_div() with constant divisor simplification
@ 2024-07-05  2:20 Nicolas Pitre
  2024-07-05  2:20 ` [PATCH 1/2] ARM: div64: remove custom __arch_xprod_64() Nicolas Pitre
  2024-07-05  2:20 ` [PATCH 2/2] asm-generic/div64: reimplement __arch_xprod64() Nicolas Pitre
  0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Pitre @ 2024-07-05  2:20 UTC (permalink / raw)
  To: Arnd Bergmann, Russell King; +Cc: Nicolas Pitre, linux-arch, linux-kernel

While working on mul_u64_u64_div_u64() improvements I realized that there
is a better way to perform a 64x64->128 bits multiplication that doesn't
involve any conditionals to handle overflows. It even produces equivalent
or better code than the provided ARM assembly alternative.

And the best part is:

 arch/arm/include/asm/div64.h |  52 -----------------
 include/asm-generic/div64.h  | 105 +++++++++++------------------------
 2 files changed, 31 insertions(+), 126 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-07 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-05  2:20 [PATCH 0/2] do_div() with constant divisor simplification Nicolas Pitre
2024-07-05  2:20 ` [PATCH 1/2] ARM: div64: remove custom __arch_xprod_64() Nicolas Pitre
2024-07-05  2:20 ` [PATCH 2/2] asm-generic/div64: reimplement __arch_xprod64() Nicolas Pitre
2024-07-05  8:17   ` Arnd Bergmann
2024-07-07 16:53     ` Nicolas Pitre
2024-07-06 11:13   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®