History log of /dragonfly/sys/platform/pc64/x86_64/__udivti3.c (Results 1 – 1 of 1)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2
# 85f00d18 21-Sep-2020 Sascha Wildner <saw@online.de>

kernel: Provide __udivti3() for intermediate 128-bit calculations.

The recent refactoring of sysclock_t from 32 to 64 bits added -lgcc
to the kernel for this purpose but this approach has a number o

kernel: Provide __udivti3() for intermediate 128-bit calculations.

The recent refactoring of sysclock_t from 32 to 64 bits added -lgcc
to the kernel for this purpose but this approach has a number of
issues:

* It prevents the kernel from linking with clang that does these
things differently.

* We don't generally want to link the kernel against any userspace
libraries. Even less if these are GPL licensed libraries.

So the best solution is to provide __udivti3() in the kernel, too.
The code of the __udivmodti4() function (of which __udivti3() is a
special case) was taken from an older LLVM/clang C runtime library
and is MIT licensed. I've added the (dual-)license and list of
contributors.

The commit also adds kernel specific _uint128_t and _int128_t
types. The choice of names is deliberate, in order to avoid
conflicting with internal types provided by compilers.

In-discussion-with: zrj

show more ...