[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] gcmaths.h lost?



Martin Wuerthner wrote:
Was the header file gcmaths.h forgotten when creating the LX sources? It is referenced in gcache.cpp and should define the Hash() function.

Looks like the function is in assembler and was never converted to C.
It used to say:

UINT32 Hash( UINT32 H )
{
        __asm {
                mov             eax,H
                mov             ebx,eax
                rol             ebx,7
                xor             eax,ebx
                mov             ebx,eax
                rol             ebx,11
                xor             eax,ebx
                mov             ebx,eax
                rol             ebx,19
                xor             eax,ebx
                mov             ebx,eax
                rol             ebx,16
                xor             eax,ebx
        }
}

I'm sure you can put together a C implementation pretty trivially.

Alex