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] x86_64: memset optimized with AVX512


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~


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