This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86_64: memset optimized with AVX512
- From: Richard Henderson <rth at twiddle dot net>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Fri, 4 Dec 2015 05:57:43 -0800
- Subject: Re: [PATCH] x86_64: memset optimized with AVX512
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3v7K1bO8aUB=rVBzKqAZJuNrMBh5NuyszONtB-sZrXcgA at mail dot gmail dot com>
On 12/03/2015 12:46 PM, Andrew Senkevich wrote:
> + .section .text,"ax",@progbits
> +ENTRY (MEMSET)
> +#ifdef HAVE_AVX512_ASM_SUPPORT
Surely you'd just wrap the entire function with this ifdef,
so that you don't produce the __memset_avx512 symbol at all.
> + vpxor %xmm0, %xmm0, %xmm0
> + vmovd %esi, %xmm1
...
> + vpshufb %xmm0, %xmm1, %xmm0
...
> + vbroadcastss %xmm0, %zmm2
Surely vpbroadcastb %esi, %{x,z}mm2
Do you need a vzeroupper on the exit paths that use the zmm/ymm register?
We've got them in the avx2 memset...
r~