#
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 ...
|