[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] util: add util function buffer_zero_avx512()
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 2/2] util: add util function buffer_zero_avx512() |
Date: |
Fri, 28 Feb 2020 18:09:14 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 2/27/20 6:24 PM, Robert Hoo wrote:
> if ((bv & 6) == 6 && (b & bit_AVX2)) {
> cache |= CACHE_AVX2;
> }
> + if ((bv & 6) == 6 && (b & bit_AVX512F)) {
> + cache |= CACHE_AVX512F;
> + }
Oh, one more thing I missed -- we have to ensure that the 512-bit registers are
enabled. I believe the minimum is bits 6 and 7 enabled (ZMM_Hi256, Hi16_ZMM),
since we don't know that the compiler won't allocate registers from zmm16-31.
So: (bv & 0xc6) == 0xc6.
You'd be right that some comments would be helpful on these lines. :-P
With that,
Reviewed-by: Richard Henderson <address@hidden>
r~