[PATCH] x86_64: memset optimized with AVX512
Richard Henderson
rth@twiddle.net
Fri Dec 4 13:57:00 GMT 2015
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~
More information about the Libc-alpha
mailing list