This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] powerpc: Refactor fenvinline.h


Rogerio Alves <rcardoso@linux.ibm.com> writes:

>  /* The weird 'i#*X' constraints on the following suppress a gcc
>     warning when __excepts is not a constant.  Otherwise, they mean the
> -   same as just plain 'i'.  */
> +   same as just plain 'i'. This warning only happens in old GCC 

2 spaces here ---------------^     trailing whitespace here ------^

> +   versions (gcc 3 or less). Otherwise plain 'i' works fine.  */

Likewise ----------------------^

> -	if (__e != 0)							      \
> -	  __asm__ __volatile__ ("mtfsb1 %0"				      \
> -				: : "i#*X" (__builtin_clz (__e)));	      \
> -        __ret = 0;							      \
> +	  __MTFSB1 ((__builtin_clz (__e)));				      \

Wrong indentation.

>          && __e != FE_INVALID)						      \
>        {									      \
> -	if (__e != 0)							      \
> -	  __asm__ __volatile__ ("mtfsb0 %0"				      \
> -				: : "i#*X" (__builtin_clz (__e)));	      \
> -        __ret = 0;							      \
> +	  __MTFSB0 ((__builtin_clz (__e)));				      \

Wrong indentation.

> @@ -80,15 +87,12 @@
>  #   define feclearexcept(__excepts) \
>    (__extension__  ({ 							      \
>      int __e = __excepts;						      \
> -    int __ret;								      \
> +    int __ret = 0;							      \
>      if (__builtin_constant_p (__e)					      \
> -        && (__e & (__e - 1)) == 0					      \
> +        && (__builtin_popcount (__e) == 1)				      \

I remember that Adhemerval disagreed with this particular change and I
don't remember seeing any agreement there.
Rogerio, if you agree with the removal of these lines I can remove this change
from the patch, fix the cosmetic issues and push the patch.
Does it look good for you?

-- 
Tulio Magno


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]