mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
migration/xbzrle: Use __attribute__((target)) for avx512
Use the attribute, which is supported by clang, instead of the #pragma, which is not supported and, for some reason, also not detected by the meson probe, so we fail by -Werror. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20230501210555.289806-1-richard.henderson@linaro.org>
This commit is contained in:
parent
c407535385
commit
dc165fcd4e
2 changed files with 5 additions and 9 deletions
|
@ -2370,12 +2370,9 @@ config_host_data.set('CONFIG_AVX512F_OPT', get_option('avx512f') \
|
|||
config_host_data.set('CONFIG_AVX512BW_OPT', get_option('avx512bw') \
|
||||
.require(have_cpuid_h, error_message: 'cpuid.h not available, cannot enable AVX512BW') \
|
||||
.require(cc.links('''
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target("avx512bw")
|
||||
#include <cpuid.h>
|
||||
#include <immintrin.h>
|
||||
static int bar(void *a) {
|
||||
|
||||
static int __attribute__((target("avx512bw"))) bar(void *a) {
|
||||
__m512i *x = a;
|
||||
__m512i res= _mm512_abs_epi8(*x);
|
||||
return res[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue