U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add udivmoddi4.
@ 2021-06-07  9:20 Christian Melki
  2021-06-09 18:31 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Melki @ 2021-06-07  9:20 UTC (permalink / raw)
  To: u-boot; +Cc: christian.melki

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);
+}
-- 
2.31.1


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

end of thread, other threads:[~2021-06-09 20:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-07  9:20 [PATCH] Add udivmoddi4 Christian Melki
2021-06-09 18:31 ` Tom Rini
2021-06-09 19:20   ` Christian Melki
2021-06-09 20:29     ` Tom Rini

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