Skip to content

Commit 158d582

Browse files
committed
Add back target option evex512 for clang 18 to 21
At least with zig using clang 18 to 21 the target option evex512 needs to be specified. To be on the safe side this target option is added back for those clang versions.
1 parent ba85c89 commit 158d582

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/aegis/aegis128x4/aegis128x4_avx512.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
#ifdef HAVE_VAESINTRIN_H
2424

2525
#ifdef __clang__
26-
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
27-
apply_to = function)
26+
# if __clang_major__ >= 18 && __clang_major__ < 22
27+
# pragma clang attribute push(__attribute__((target("aes,vaes,avx512f,evex512"))), apply_to=function)
28+
# else
29+
# pragma clang attribute push(__attribute__((target("aes,vaes,avx512f"))), apply_to=function)
30+
# endif
2831
#elif defined(__GNUC__)
2932
# pragma GCC target("vaes,avx512f")
3033
#endif

src/aegis/aegis256x4/aegis256x4_avx512.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
#ifdef HAVE_VAESINTRIN_H
2424

2525
#ifdef __clang__
26-
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
27-
apply_to = function)
26+
# if __clang_major__ >= 18 && __clang_major__ < 22
27+
# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), apply_to=function)
28+
# else
29+
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), apply_to=function)
30+
# endif
2831
#elif defined(__GNUC__)
2932
# pragma GCC target("vaes,avx512f")
3033
#endif

0 commit comments

Comments
 (0)