http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46186

Thorsten Glaser <tg at mirbsd dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tg at mirbsd dot org

--- Comment #22 from Thorsten Glaser <tg at mirbsd dot org> 2010-10-29 21:06:44 
UTC ---
(In reply to comment #19)
> It's a bit more complicated than that, in that you can't just compute 
> (b*(b-1)-a*(a-1)) mod 2^n, then divide by 2, as that will lose the top 
> bit.  (I haven't checked exactly what the generated code is doing here.)

Haven’t checked either, but in i386 asm, using RCR instead of SHR would work
if the carry flag is correct after the sequence calculating that (or SAR).

Reply via email to