mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@fluxnic.net>
To: Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>
Cc: Nicolas Pitre <npitre@baylibre.com>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] do_div() with constant divisor simplification
Date: Thu,  4 Jul 2024 22:20:27 -0400	[thread overview]
Message-ID: <20240705022334.1378363-1-nico@fluxnic.net> (raw)

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(-)

             reply	other threads:[~2024-07-05  2:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05  2:20 Nicolas Pitre [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240705022334.1378363-1-nico@fluxnic.net \
    --to=nico@fluxnic.net \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=npitre@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®