Re: [RFC] Adding division/modulo on arbitrary precision integers to libgcc

2022-05-06 Thread Segher Boessenkool
Hi! On Fri, May 06, 2022 at 02:09:21PM +, Matthias Gehre via Gcc wrote: > We would like to add support for division/modulo on large arbitrary precision  > integers to libgcc/compiler-rt > as required by C23's _BitInt type [0]. > > >From what I know, gcc doesn't yet support C23 _BitInt, but we

Re: [RFC] Adding division/modulo on arbitrary precision integers to libgcc

2022-05-06 Thread Joseph Myers
On Fri, 6 May 2022, Jakub Jelinek via Gcc wrote: > And I really don't like the N + 1 stuff you're proposing, at least for > _BigInts that would be represented as an array of those word etc. elements > from least to most significant (or vice versa? That really needs to be > specified too), if they

Re: [RFC] Adding division/modulo on arbitrary precision integers to libgcc

2022-05-06 Thread Jakub Jelinek via Gcc
On Fri, May 06, 2022 at 02:09:21PM +, Matthias Gehre via Gcc wrote: > /// \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. > /// \p

Re: [RFC] Adding division/modulo on arbitrary precision integers to libgcc

2022-05-06 Thread Joseph Myers
On Fri, 6 May 2022, Matthias Gehre via Gcc wrote: > We would like to add support for division/modulo on large arbitrary > precision integers to libgcc/compiler-rt as required by C23's _BitInt > type [0]. Note that each architecture also needs to specify its _BitInt ABI (including such things a