|
Message-ID: <4FB940F8.8060102@gmail.com> Date: Sun, 20 May 2012 16:07:36 -0300 From: Claudio André <claudioandre.br@...il.com> To: john-dev@...ts.openwall.com Subject: Re: OpenCL SWAP64 on 7970 Em 05-05-2012 22:55, myrice escreveu: > Claudio, all > > It seems that 7970 has some strange behaviors when we perform bitwise > operation with ulong type. SWAP64 didn't work correctly. > xsha512-opencl and cryptsha512-opencl are all influenced. Here is what > I get from my debugging. > > With a 64bit variable n, if we do (n)<< 56, no problem. However, if > we do (n)& 0xff00<< 24 or<< 32 or<< 40, the result will be 0. It > seems that the& operation converts the result to a 32bit variable. So > the<< 24 or above will make the result to be 0. > > Thanks > myrice Sorry for the late answer, in 7970 you can't use the regular bitwise operations on SWAP64. Another crazy bug?? You got good answers already about vector usage (#define SWAP64(n) (as_ulong(as_uchar8(n).s76543210))) For NVIDIA and CPU keep your bitwise SWAP64 version (for better performance). Claudio
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.