diff --git a/src/aegis128x4/aegis128x4_avx512.c b/src/aegis128x4/aegis128x4_avx512.c index 1501b6d..610aa0f 100644 --- a/src/aegis128x4/aegis128x4_avx512.c +++ b/src/aegis128x4/aegis128x4_avx512.c @@ -13,8 +13,13 @@ # ifdef HAVE_VAESINTRIN_H # ifdef __clang__ -# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \ - apply_to = function) +# if __clang_major__ >= 18 +# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \ + apply_to = function) +# else +# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \ + apply_to = function) +# endif # elif defined(__GNUC__) # pragma GCC target("vaes,avx512f") # endif diff --git a/src/aegis256x4/aegis256x4_avx512.c b/src/aegis256x4/aegis256x4_avx512.c index 652fee9..20ff319 100644 --- a/src/aegis256x4/aegis256x4_avx512.c +++ b/src/aegis256x4/aegis256x4_avx512.c @@ -13,8 +13,13 @@ # ifdef HAVE_VAESINTRIN_H # ifdef __clang__ -# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \ +# if __clang_major__ >= 18 +# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \ apply_to = function) +# else +# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \ + apply_to = function) +# endif # elif defined(__GNUC__) # pragma GCC target("vaes,avx512f") # endif