From: Tom Rini <trini@konsulko.com>
To: Christian Melki <christian.melki@t2data.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] Add udivmoddi4.
Date: Wed, 9 Jun 2021 14:31:03 -0400 [thread overview]
Message-ID: <20210609183103.GK9516@bill-the-cat> (raw)
In-Reply-To: <20210607092047.13246-1-christian.melki@t2data.com>
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
On Mon, Jun 07, 2021 at 11:20:47AM +0200, Christian Melki wrote:
> A newer toolchain will emit udivmoddi4 for certain divide + modulo
> operations instead of a separate divide and modulo operation.
> AFAIU, this would be sufficient.
>
> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
> arch/x86/lib/div64.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/x86/lib/div64.c b/arch/x86/lib/div64.c
> index 2bea205f60..a5b536fbc5 100644
> --- a/arch/x86/lib/div64.c
> +++ b/arch/x86/lib/div64.c
> @@ -110,3 +110,8 @@ u64 __umoddi3(u64 num, u64 den)
> _64bit_divide(num, den, &v);
> return v;
> }
> +
> +u64 __udivmoddi4(u64 num, u64 den, u64 *rem)
> +{
> + return _64bit_divide(num, den, rem);
> +}
How do you trigger this and should you not be using do_div(), etc,
instead?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2021-06-09 18:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 9:20 [PATCH] Add udivmoddi4 Christian Melki
2021-06-09 18:31 ` Tom Rini [this message]
2021-06-09 19:20 ` Christian Melki
2021-06-09 20:29 ` Tom Rini
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=20210609183103.GK9516@bill-the-cat \
--to=trini@konsulko.com \
--cc=christian.melki@t2data.com \
--cc=u-boot@lists.denx.de \
/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