[PATCH v2] powerpc/math-emu: Update macros from gmp-6.1.2

Nick Desaulniers ndesaulniers at google.com
Wed Nov 21 08:28:33 AEDT 2018


On Tue, Nov 20, 2018 at 12:15 PM Segher Boessenkool
<segher at kernel.crashing.org> wrote:
>
> On Tue, Nov 20, 2018 at 10:45:19AM -0800, Nick Desaulniers wrote:
> > On Tue, Nov 20, 2018 at 10:20 AM Segher Boessenkool
> > <segher at kernel.crashing.org> wrote:
> > > > Segher, which tree contains the One True Upstream for longlong.h?
> > >
> > > You should probably get your updates from the same place as was used to
> > > get the file in the first place.
> >
> > So sounds like GMP is the source to take then.
>
> I'm pretty sure the kernel got it from GCC.
> How much does the kernel
> one differ from current GCC?

Compare udiv_qrnnd implementations from:
gcc: https://github.com/gcc-mirror/gcc/blob/f7289f563a5e447ac21a5901ed75aad0dbd37732/include/longlong.h#L1679
gmp: https://gmplib.org/repo/gmp/file/tip/longlong.h#l2063

The kernel currently is using the GCC impl, which Joel's patch here
changes it to the GMP impl.

If you prefer the kernel to keep the kernel keep the GCC derivative,
then Joel can drop the change to udiv_qrnnd() as it does not contain
inline assembly relevant to the original issue.
-- 
Thanks,
~Nick Desaulniers


More information about the Linuxppc-dev mailing list