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 2/N] [x86_64] Vectorized math functions


On Mon, 24 Nov 2014, Andrew Senkevich wrote:

> +#define START(FUNC, SUFF, EXACT) \
> +  CHECK_ARCH_EXT \
> +  if (TEST_MATHVEC) return; \

With a proper definition of CHECK_ARCH_EXT (one that always acts like a 
statement without the trailing ';'), the call should be followed by ';'.

> +# define INIT_ARCH_EXT \
> +  do \
> +    { \
> +      __init_cpu_features (); \
> +      avx2_usable = __cpu_features.feature[index_AVX2_Usable] \
> +    & bit_AVX2_Usable; \
> +    } \
> +  while(0);
> +
> +# define CHECK_ARCH_EXT \
> +  do \
> +    { \
> +      if (!avx2_usable) return; \
> +    } \
> +  while(0);

And the definitions here should not have the trailing semicolon, because 
that will be provided by the caller.  Also note there should be a space 
between "while" and "(0)".

-- 
Joseph S. Myers
joseph@codesourcery.com


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