Re: use bswapq for swap64 on amd64

2011-03-12 Thread Mike Belopuhov
On Fri, Mar 11, 2011 at 14:45 -0800, Philip Guenther wrote: On Fri, 11 Mar 2011, Mike Belopuhov wrote: recent commit to pirofti made me wonder why don't we take an advantage of the 64 bit bswap instruction on amd64? Here's a revised diff with two changes from Mike's: 1) use %0 instead

Re: use bswapq for swap64 on amd64

2011-03-12 Thread Paul Irofti
On Fri, Mar 11, 2011 at 02:45:06PM -0800, Philip Guenther wrote: On Fri, 11 Mar 2011, Mike Belopuhov wrote: recent commit to pirofti made me wonder why don't we take an advantage of the 64 bit bswap instruction on amd64? Here's a revised diff with two changes from Mike's: 1) use %0

use bswapq for swap64 on amd64

2011-03-11 Thread Mike Belopuhov
recent commit to pirofti made me wonder why don't we take an advantage of the 64 bit bswap instruction on amd64? Index: arch/amd64/include/endian.h === RCS file: /home/cvs/src/sys/arch/amd64/include/endian.h,v retrieving revision 1.3

Re: use bswapq for swap64 on amd64

2011-03-11 Thread Paul Irofti
On Fri, Mar 11, 2011 at 04:50:08PM +0100, Mike Belopuhov wrote: recent commit to pirofti made me wonder why don't we take an advantage of the 64 bit bswap instruction on amd64? Bah, you beat me to it! bswap r64 is the way to do it, but I'm not sure what the second line is supposed to do.

Re: use bswapq for swap64 on amd64

2011-03-11 Thread Paul Irofti
On Fri, Mar 11, 2011 at 09:31:57AM -0800, Matthew Dempsky wrote: On Fri, Mar 11, 2011 at 9:26 AM, Paul Irofti p...@irofti.net wrote: bswap r64 is the way to do it, but I'm not sure what the second line is supposed to do. It's just the syntax for GCC's Statements and Declarations in

Re: use bswapq for swap64 on amd64

2011-03-11 Thread Matthew Dempsky
On Fri, Mar 11, 2011 at 9:26 AM, Paul Irofti p...@irofti.net wrote: bswap r64 is the way to do it, but I'm not sure what the second line is supposed to do. It's just the syntax for GCC's Statements and Declarations in Expressions extension:

Re: use bswapq for swap64 on amd64

2011-03-11 Thread Paul de Weerd
Rude and uncalled for, Marco. Not very nice of you. Paul 'WEiRD' de Weerd On Fri, Mar 11, 2011 at 03:01:47PM -0600, Marco Peereboom wrote: | http://stallman.oURL_CHANGED_TO_PROTECT_THE_INNOCENT.jpg | | On Fri, Mar 11, 2011 at 08:28:06PM +0200, Paul Irofti wrote: | On Fri, Mar 11, 2011 at

Re: use bswapq for swap64 on amd64

2011-03-11 Thread Philip Guenther
On Fri, 11 Mar 2011, Mike Belopuhov wrote: recent commit to pirofti made me wonder why don't we take an advantage of the 64 bit bswap instruction on amd64? Here's a revised diff with two changes from Mike's: 1) use %0 instead of %1, as the %N operands are zero-based. (I dare anyone to