Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2012 23:30:17 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233683 - head/sys/x86/include
Message-ID:  <201203292330.q2TNUHbu014843@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Thu Mar 29 23:30:17 2012
New Revision: 233683
URL: http://svn.freebsd.org/changeset/base/233683

Log:
  Revert sys/x86/include/endian.h to what it was before r233419, as that
  revision has two problems:
  - It can produce worse code with both clang and gcc.
  - It doesn't fix the actual issue introduced in r232721, which will be
    fixed in the next commit.
  
  Submitted by:	bde, tijl and jh
  Pointy hat to:	dim

Modified:
  head/sys/x86/include/endian.h

Modified: head/sys/x86/include/endian.h
==============================================================================
--- head/sys/x86/include/endian.h	Thu Mar 29 21:54:19 2012	(r233682)
+++ head/sys/x86/include/endian.h	Thu Mar 29 23:30:17 2012	(r233683)
@@ -63,11 +63,11 @@
 #define	BYTE_ORDER	_BYTE_ORDER
 #endif
 
-#define	__bswap16_gen(x)	((__uint16_t)((x) << 8 | (x) >> 8))
+#define	__bswap16_gen(x)	(__uint16_t)((x) << 8 | (x) >> 8)
 #define	__bswap32_gen(x)		\
-	(((__uint32_t)__bswap16_gen(x) << 16) | __bswap16_gen((x) >> 16))
+	(((__uint32_t)__bswap16(x) << 16) | __bswap16((x) >> 16))
 #define	__bswap64_gen(x)		\
-	(((__uint64_t)__bswap32_gen(x) << 32) | __bswap32_gen((x) >> 32))
+	(((__uint64_t)__bswap32(x) << 32) | __bswap32((x) >> 32))
 
 #ifdef __GNUCLIKE_BUILTIN_CONSTANT_P
 #define	__bswap16(x)				\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203292330.q2TNUHbu014843>