This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Formatting fixes for some x86 intrin headers


On Fri, Oct 21, 2016 at 5:28 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> While looking at the bextr/bextri/bzhi/pdep/pext intrinsics,
> I've noticed some ugly formatted code in the headers, this patch fixes
> what I found.  Because the headers are installed, IMHO it is more important
> to keep them properly formatted.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2016-10-21  Jakub Jelinek  <jakub@redhat.com>
>
>         * config/i386/adxintrin.h (_subborrow_u32, _addcarry_u32,
>         _addcarryx_u32, _subborrow_u64, _addcarry_u64, _addcarryx_u64):
>         Formatting fixes.
>         * config/i386/rdseedintrin.h (_rdseed16_step, _rdseed32_step,
>         _rdseed64_step): Likewise.
>         * config/i386/tbmintrin.h (__bextri_u32): Likewise.

OK.

(This is obvious patch, similar future formatting fixes are rubber-stamped OK).

Thanks,
Uros.

> --- gcc/config/i386/adxintrin.h.jj      2016-01-04 14:55:55.000000000 +0100
> +++ gcc/config/i386/adxintrin.h 2016-10-21 12:50:33.121927989 +0200
> @@ -31,9 +31,9 @@
>  extern __inline unsigned char
>  __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>  _subborrow_u32 (unsigned char __CF, unsigned int __X,
> -               unsigned int __Y, unsigned int *__P)
> +               unsigned int __Y, unsigned int *__P)
>  {
> -    return __builtin_ia32_sbb_u32 (__CF, __Y, __X, __P);
> +  return __builtin_ia32_sbb_u32 (__CF, __Y, __X, __P);
>  }
>
>  extern __inline unsigned char
> @@ -41,7 +41,7 @@ __attribute__((__gnu_inline__, __always_
>  _addcarry_u32 (unsigned char __CF, unsigned int __X,
>                unsigned int __Y, unsigned int *__P)
>  {
> -    return __builtin_ia32_addcarryx_u32 (__CF, __X, __Y, __P);
> +  return __builtin_ia32_addcarryx_u32 (__CF, __X, __Y, __P);
>  }
>
>  extern __inline unsigned char
> @@ -49,16 +49,16 @@ __attribute__((__gnu_inline__, __always_
>  _addcarryx_u32 (unsigned char __CF, unsigned int __X,
>                 unsigned int __Y, unsigned int *__P)
>  {
> -    return __builtin_ia32_addcarryx_u32 (__CF, __X, __Y, __P);
> +  return __builtin_ia32_addcarryx_u32 (__CF, __X, __Y, __P);
>  }
>
>  #ifdef __x86_64__
>  extern __inline unsigned char
>  __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>  _subborrow_u64 (unsigned char __CF, unsigned long long __X,
> -               unsigned long long __Y, unsigned long long *__P)
> +               unsigned long long __Y, unsigned long long *__P)
>  {
> -    return __builtin_ia32_sbb_u64 (__CF, __Y, __X, __P);
> +  return __builtin_ia32_sbb_u64 (__CF, __Y, __X, __P);
>  }
>
>  extern __inline unsigned char
> @@ -66,7 +66,7 @@ __attribute__((__gnu_inline__, __always_
>  _addcarry_u64 (unsigned char __CF, unsigned long long __X,
>                unsigned long long __Y, unsigned long long *__P)
>  {
> -    return __builtin_ia32_addcarryx_u64 (__CF, __X, __Y, __P);
> +  return __builtin_ia32_addcarryx_u64 (__CF, __X, __Y, __P);
>  }
>
>  extern __inline unsigned char
> @@ -74,7 +74,7 @@ __attribute__((__gnu_inline__, __always_
>  _addcarryx_u64 (unsigned char __CF, unsigned long long __X,
>                 unsigned long long __Y, unsigned long long *__P)
>  {
> -    return __builtin_ia32_addcarryx_u64 (__CF, __X, __Y, __P);
> +  return __builtin_ia32_addcarryx_u64 (__CF, __X, __Y, __P);
>  }
>  #endif
>
> --- gcc/config/i386/rdseedintrin.h.jj   2016-08-19 17:24:43.000000000 +0200
> +++ gcc/config/i386/rdseedintrin.h      2016-10-21 12:52:14.680652144 +0200
> @@ -39,14 +39,14 @@ extern __inline int
>  __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>  _rdseed16_step (unsigned short *__p)
>  {
> -    return __builtin_ia32_rdseed_hi_step (__p);
> +  return __builtin_ia32_rdseed_hi_step (__p);
>  }
>
>  extern __inline int
>  __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>  _rdseed32_step (unsigned int *__p)
>  {
> -    return __builtin_ia32_rdseed_si_step (__p);
> +  return __builtin_ia32_rdseed_si_step (__p);
>  }
>
>  #ifdef __x86_64__
> @@ -54,7 +54,7 @@ extern __inline int
>  __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>  _rdseed64_step (unsigned long long *__p)
>  {
> -    return __builtin_ia32_rdseed_di_step (__p);
> +  return __builtin_ia32_rdseed_di_step (__p);
>  }
>  #endif
>
> --- gcc/config/i386/tbmintrin.h.jj      2016-01-04 14:55:55.000000000 +0100
> +++ gcc/config/i386/tbmintrin.h 2016-10-21 12:51:16.194386886 +0200
> @@ -38,12 +38,12 @@
>  extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>  __bextri_u32 (unsigned int __X, const unsigned int __I)
>  {
> -       return __builtin_ia32_bextri_u32 (__X, __I);
> +  return __builtin_ia32_bextri_u32 (__X, __I);
>  }
>  #else
> -#define __bextri_u32(X, I)                                           \
> -        ((unsigned int)__builtin_ia32_bextri_u32 ((unsigned int)(X), \
> -                                                 (unsigned int)(I)))
> +#define __bextri_u32(X, I)                                             \
> +  ((unsigned int)__builtin_ia32_bextri_u32 ((unsigned int)(X),         \
> +                                           (unsigned int)(I)))
>  #endif /*__OPTIMIZE__ */
>
>  extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>
>         Jakub


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