What is the __udivdi3 __umoddi3 function?
David Nadlinger
code at klickverbot.at
Thu Aug 22 20:39:32 UTC 2019
Hi there,
On 22 Aug 2019, at 21:20, lili via digitalmars-d-ldc wrote:
> I writing a OS in D, compile with -betterC -c, but when call a
> variable template function
> where has __udivdi3 __umoddi3 undefined symbol, can not link with
> ld, how to resolve it.
> see code below
These are software implementations of integer arithmetic where the
desired operation is not natively available on the target CPU (e.g. 64
bit integer division on a 32 bit target).
You can find an implementation in the compiler-rt project (or libgcc),
which you can link into your kernel as needed. You might be able to get
around this by not using 64 bit integers in your code if 32 bits
suffice.
— David
More information about the digitalmars-d-ldc
mailing list