Re: svn commit: r233684 - head/sys/x86/include

2012-03-30 Thread Andrey Chernov
On Thu, Mar 29, 2012 at 11:31:48PM +, Dimitry Andric wrote: However, the arguments are not properly masked, which results in the wrong value being calculated in some instances. For example, bswap32(0x12345678) returns 0x7c563412, and bswap64(0x123456789abcdef0) returns

Re: svn commit: r233684 - head/sys/x86/include

2012-03-30 Thread Dimitry Andric
On 2012-03-30 10:25, Andrey Chernov wrote: On Thu, Mar 29, 2012 at 11:31:48PM +, Dimitry Andric wrote: However, the arguments are not properly masked, which results in the wrong value being calculated in some instances. For example, bswap32(0x12345678) returns 0x7c563412, and

Re: svn commit: r233684 - head/sys/x86/include

2012-03-30 Thread Andrey Chernov
On Fri, Mar 30, 2012 at 02:11:21PM +0200, Dimitry Andric wrote: In case of the __bswapXX() macros, you can see that the argument to __bswapXX_gen() is first explicitly cast to an unsigned type, for example with __bswap32(): #define __bswap32(x)\

svn commit: r233684 - head/sys/x86/include

2012-03-29 Thread Dimitry Andric
Author: dim Date: Thu Mar 29 23:31:48 2012 New Revision: 233684 URL: http://svn.freebsd.org/changeset/base/233684 Log: Fix an issue introduced in sys/x86/include/endian.h with r232721. In that revision, the bswapXX_const() macros were renamed to bswapXX_gen(). Also, bswap64_gen() was