An error occurred while fetching folder content.
Matthias Gehre
authored
According to the RFC [0], this review contains the compiler-rt parts of large integer divison for _BitInt. It adds the functions ``` /// Computes the unsigned division of a / b for two large integers /// composed of n significant words. /// Writes the quotient to quo and the remainder to rem. /// /// \param quo The quotient represented by n words. Must be non-null. /// \param rem The remainder represented by n words. Must be non-null. /// \param a The dividend represented by n + 1 words. Must be non-null. /// \param b The divisor represented by n words. Must be non-null. /// \note The word order is in host endianness. /// \note Might modify a and b. /// \note The storage of 'a' needs to hold n + 1 elements because some /// implementations need extra scratch space in the most significant word. /// The value of that word is ignored. COMPILER_RT_ABI void __udivmodei5(su_int *quo, su_int *rem, su_int *a, su_int *b, unsigned int n); /// Computes the signed division of a / b. /// See __udivmodei5 for details. COMPILER_RT_ABI void __divmodei5(su_int *quo, su_int *rem, su_int *a, su_int *b, unsigned int words); ``` into builtins. In addition it introduces a new "bitint" library containing only those new functions, which is meant as a way to provide those when using libgcc as runtime. [0] https://discourse.llvm.org/t/rfc-add-support-for-division-of-large-bitint-builtins-selectiondag-globalisel-clang/60329 Differential Revision: https://reviews.llvm.org/D120327
Name | Last commit | Last update |
---|