about summary refs log tree commit diff
path: root/sysdeps/x86_64/bits
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-06-14 16:09:42 -0700
committerUlrich Drepper <drepper@redhat.com>2009-06-14 16:09:42 -0700
commiteb0b6cb6e1a979ca12c14b015d9acd52fc6a133f (patch)
treea39bea559b190204186949a7814d90b8f28737c3 /sysdeps/x86_64/bits
parentbfdb73e145e6ca3bedcd5ef93e0b5d0fe9498645 (diff)
downloadglibc-eb0b6cb6e1a979ca12c14b015d9acd52fc6a133f.tar.gz
glibc-eb0b6cb6e1a979ca12c14b015d9acd52fc6a133f.tar.xz
glibc-eb0b6cb6e1a979ca12c14b015d9acd52fc6a133f.zip
Fix warnings when using <sys/select.h>.
gcc 4.4 is more picky.  And the x86-64 version of <bits/select.h>
contained a now unnecessary asm optimization.  Remove it.
Diffstat (limited to 'sysdeps/x86_64/bits')
-rw-r--r--sysdeps/x86_64/bits/select.h36
1 files changed, 6 insertions, 30 deletions
diff --git a/sysdeps/x86_64/bits/select.h b/sysdeps/x86_64/bits/select.h
index 7f23cb59b1..5f31b84080 100644
--- a/sysdeps/x86_64/bits/select.h
+++ b/sysdeps/x86_64/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2001, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2001,2008,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,14 +27,8 @@
 
 # if __WORDSIZE == 64
 #  define __FD_ZERO_STOS "stosq"
-#  define __FD_SET_BTS "btsq"
-#  define __FD_CLR_BTR "btrq"
-#  define __FD_ISSET_BT "btq"
 # else
 #  define __FD_ZERO_STOS "stosl"
-#  define __FD_SET_BTS "btsl"
-#  define __FD_CLR_BTR "btrl"
-#  define __FD_ISSET_BT "btl"
 # endif
 
 # define __FD_ZERO(fdsp) \
@@ -48,26 +42,6 @@
 			  : "memory");					      \
   } while (0)
 
-# define __FD_SET(fd, fdsp) \
-  __asm__ __volatile__ (__FD_SET_BTS " %1,%0"				      \
-			: "=m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
-			: "r" (((int) (fd)) % __NFDBITS)		      \
-			: "cc","memory")
-# define __FD_CLR(fd, fdsp) \
-  __asm__ __volatile__ (__FD_CLR_BTR " %1,%0"				      \
-			: "=m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
-			: "r" (((int) (fd)) % __NFDBITS)		      \
-			: "cc","memory")
-# define __FD_ISSET(fd, fdsp) \
-  (__extension__							      \
-   ({register char __result;						      \
-     __asm__ __volatile__ (__FD_ISSET_BT " %1,%2 ; setcb %b0"		      \
-			   : "=q" (__result)				      \
-			   : "r" (((int) (fd)) % __NFDBITS),		      \
-			     "m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
-			   : "cc");					      \
-     __result; }))
-
 #else	/* ! GNU CC */
 
 /* We don't use `memset' because this would require a prototype and
@@ -79,8 +53,10 @@
     for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i)	      \
       __FDS_BITS (__arr)[__i] = 0;					      \
   } while (0)
-# define __FD_SET(d, set)    (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d))
-# define __FD_CLR(d, set)    (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d))
-# define __FD_ISSET(d, set)  (__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d))
 
 #endif	/* GNU CC */
+
+#define __FD_SET(d, set)    (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d))
+#define __FD_CLR(d, set)    (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d))
+#define __FD_ISSET(d, set) \
+  ((__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d)) != 0)