From eb0b6cb6e1a979ca12c14b015d9acd52fc6a133f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Jun 2009 16:09:42 -0700 Subject: Fix warnings when using . gcc 4.4 is more picky. And the x86-64 version of contained a now unnecessary asm optimization. Remove it. --- sysdeps/x86_64/bits/select.h | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) (limited to 'sysdeps/x86_64/bits') 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) -- cgit 1.4.1