What is the __udivdi3 __umoddi3 function?
lili
akozhao at tencent.com
Fri Aug 23 02:18:41 UTC 2019
On Thursday, 22 August 2019 at 20:39:32 UTC, David Nadlinger
wrote:
> 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
Thanks a lot.
More information about the digitalmars-d-ldc
mailing list