On Tue, Sep 6, 2011 at 4:21 PM, Martin S. Weber <[email protected]> wrote:
> (and many, many, many, many more lines like that). This seems to be because
> of the calls to asm() ... I don't know how to fix that. FYI, after
> preprocessing, the first instruction of line 104 looks like:
>
> qq[4]+=((qq[1]&(qq[2]^qq[3]))^qq[3])+(block[0] = (({ unsigned
> int y; asm("rorl" " %1,%0" : "=r" (y) : "I" (8), "0" (block[0]));
> y; })&0xFF00FF00) |(({ unsigned int y; asm("roll" " %1,%0" :
> "=r" (y) : "I" (8), "0" (block[0])); y; })&0x00FF00FF))+0x5A827999+({
> unsigned int y; asm("roll" " %1,%0" : "=r" (y) : "I" (5), "0"
> (qq[0])); y; });
The asm() calls are being used to invoke the rotate instructions. C
does not have operators for peforming bitwise rotation of an operand
and emulating a rotate using shifts is messy and very ineficient:
unsigned int rotateLeft(unsigned int x, unsigned int n)
{
unsigned int t;
t = x >> (SIZEOFINT - n);
return ((x << n) | t);
}
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users