On Mon, Jan 3, 2011 at 10:56 PM, erik quanstrom
<quans...@labs.coraid.com> wrote:
>> what does vlong double-spill botch mean in
>> r = (a * b) + (((a * u) + (b * t)) << 18); /* low is only 35b */
>>
>
> this is a workaround that i put in the compiler;
> it's not in the distribution. the distribution
> compiler happily miscompiles.
>
> if both the left and rhs side of an expression
> need to allocate more registers, then 8c often
> miscompiles. you may be able to fix this by
> changing 18 to 18ull, but you might as well
> do it this way:
>
> r = a*u + b*t;
> r <<= 18ull;
> r += a*b;
>
This did not work, but this did
ra = a * b;
rb = a * u;
rc = b * t;
r = ra + ((rb + rc) << 18);