Message ID | 1575895568-26473-19-git-send-email-stli@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | Use GCC builtins for some math functions if desired. | expand |
On 09/12/2019 09:46, Stefan Liebler wrote: > This patch just adjusts the generic implementation regarding code style. > No functional change. LGTM, thanks. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > --- > sysdeps/ieee754/ldbl-128/s_copysignl.c | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/sysdeps/ieee754/ldbl-128/s_copysignl.c b/sysdeps/ieee754/ldbl-128/s_copysignl.c > index 848a184524..a8b0639d2e 100644 > --- a/sysdeps/ieee754/ldbl-128/s_copysignl.c > +++ b/sysdeps/ieee754/ldbl-128/s_copysignl.c > @@ -13,7 +13,7 @@ > * ==================================================== > */ > > -#if defined(LIBM_SCCS) && !defined(lint) > +#if defined (LIBM_SCCS) && ! defined (lint) > static char rcsid[] = "$NetBSD: $"; > #endif > > @@ -29,18 +29,19 @@ static char rcsid[] = "$NetBSD: $"; > #include <libm-alias-ldouble.h> > #include <math-use-builtins.h> > > -_Float128 __copysignl(_Float128 x, _Float128 y) > +_Float128 > +__copysignl (_Float128 x, _Float128 y) > { > #if USE_COPYSIGNL_BUILTIN > return __builtin_copysignl (x, y); > #else > /* Use generic implementation. */ > - uint64_t hx,hy; > - GET_LDOUBLE_MSW64(hx,x); > - GET_LDOUBLE_MSW64(hy,y); > - SET_LDOUBLE_MSW64(x,(hx&0x7fffffffffffffffULL) > - |(hy&0x8000000000000000ULL)); > - return x; > + uint64_t hx, hy; > + GET_LDOUBLE_MSW64 (hx, x); > + GET_LDOUBLE_MSW64 (hy, y); > + SET_LDOUBLE_MSW64 (x, (hx & 0x7fffffffffffffffULL) > + | (hy & 0x8000000000000000ULL)); > + return x; > #endif /* ! USE_COPYSIGNL_BUILTIN */ > } > libm_alias_ldouble (__copysign, copysign) > Ok.
diff --git a/sysdeps/ieee754/ldbl-128/s_copysignl.c b/sysdeps/ieee754/ldbl-128/s_copysignl.c index 848a184524..a8b0639d2e 100644 --- a/sysdeps/ieee754/ldbl-128/s_copysignl.c +++ b/sysdeps/ieee754/ldbl-128/s_copysignl.c @@ -13,7 +13,7 @@ * ==================================================== */ -#if defined(LIBM_SCCS) && !defined(lint) +#if defined (LIBM_SCCS) && ! defined (lint) static char rcsid[] = "$NetBSD: $"; #endif @@ -29,18 +29,19 @@ static char rcsid[] = "$NetBSD: $"; #include <libm-alias-ldouble.h> #include <math-use-builtins.h> -_Float128 __copysignl(_Float128 x, _Float128 y) +_Float128 +__copysignl (_Float128 x, _Float128 y) { #if USE_COPYSIGNL_BUILTIN return __builtin_copysignl (x, y); #else /* Use generic implementation. */ - uint64_t hx,hy; - GET_LDOUBLE_MSW64(hx,x); - GET_LDOUBLE_MSW64(hy,y); - SET_LDOUBLE_MSW64(x,(hx&0x7fffffffffffffffULL) - |(hy&0x8000000000000000ULL)); - return x; + uint64_t hx, hy; + GET_LDOUBLE_MSW64 (hx, x); + GET_LDOUBLE_MSW64 (hy, y); + SET_LDOUBLE_MSW64 (x, (hx & 0x7fffffffffffffffULL) + | (hy & 0x8000000000000000ULL)); + return x; #endif /* ! USE_COPYSIGNL_BUILTIN */ } libm_alias_ldouble (__copysign, copysign)