On Sun, 28 Feb 2016, Alexander Duyck wrote:
> I actually found the root cause. The problem is in add32_with_carry3.
>
> > +static inline unsigned int add32_with_carry3(unsigned int a, unsigned int
> > b,
> > + unsigned int c)
> > +{
> > + asm("addl %2,%0\n\t"
> > + "adcl %3,%0\n\t"
> > + "adcl $0,%0"
> > + : "=r" (a)
> > + : "" (a), "rm" (b), "rm" (c));
> > +
> > + return a;
> > +}
> > +
>
> You need to set the 'a' input variable attribute to "0" instead of ""
> and then things work for me correctly.
Or alternatively you can reduce the number of operands by one, by using
`"+r" (a)' as output, and then removing `a' as a separate input and
renumbering references to `b' and `c' accordingly. It would IMHO actually
better match the in-place operation as well.
FWIW,
Maciej