This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/N] [x86_64] Vectorized math functions
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Wed, 26 Nov 2014 13:12:11 +0000
- Subject: Re: [PATCH 2/N] [x86_64] Vectorized math functions
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3vS-vKA7wDGRf-bA2JEGUag850_S4TEiARKfpiRP-f2Eg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1411211748210 dot 2475 at digraph dot polyomino dot org dot uk> <CAMXFM3v_NGkTsqsvSR1f-Ff_O8x5w=qtJVhaSEqKGjMCUPkfJQ at mail dot gmail dot com>
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