| 1 | #include <isa-level.h> |
| 2 | |
| 3 | #if ISA_SHOULD_BUILD (3) |
| 4 | |
| 5 | # define USE_WITH_AVX2 1 |
| 6 | |
| 7 | # ifndef VEC_SIZE |
| 8 | # include "x86-avx-vecs.h" |
| 9 | # endif |
| 10 | |
| 11 | # define MEMSET_SET_VEC0_AND_SET_RETURN(d, r) \ |
| 12 | vmovd d, %xmm0; \ |
| 13 | movq r, %rax; |
| 14 | |
| 15 | # define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \ |
| 16 | MEMSET_SET_VEC0_AND_SET_RETURN(d, r) |
| 17 | |
| 18 | # define MEMSET_VDUP_TO_VEC0_HIGH() vpbroadcastb %xmm0, %ymm0 |
| 19 | # define MEMSET_VDUP_TO_VEC0_LOW() vpbroadcastb %xmm0, %xmm0 |
| 20 | |
| 21 | # define WMEMSET_VDUP_TO_VEC0_HIGH() vpbroadcastd %xmm0, %ymm0 |
| 22 | # define WMEMSET_VDUP_TO_VEC0_LOW() vpbroadcastd %xmm0, %xmm0 |
| 23 | |
| 24 | # ifndef MEMSET_SYMBOL |
| 25 | # define MEMSET_SYMBOL(p,s) p##_avx2_##s |
| 26 | # endif |
| 27 | # ifndef WMEMSET_SYMBOL |
| 28 | # define WMEMSET_SYMBOL(p,s) p##_avx2_##s |
| 29 | # endif |
| 30 | |
| 31 | # define USE_XMM_LESS_VEC |
| 32 | # include "memset-vec-unaligned-erms.S" |
| 33 | #endif |
| 34 | |