Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aes: initial implementation of most aes instructions #1072

Merged
merged 7 commits into from Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -106,6 +106,7 @@ jobs:
- -mavx
- -mfma
- -mavx2
- -maes
include:
- target: tgl
- isax: -mavx512bw -mavx512vl -mavx512cd -mavx512dq -mavx512vbmi -mavx512ifma -mavx512vpopcntdq -mavx512bitalg -mavx512vnni -mvpclmulqdq -mavx512fp16
Expand Down
1 change: 1 addition & 0 deletions meson.build
Expand Up @@ -393,6 +393,7 @@ if not meson.is_subproject()

install_headers(
files([
'simde/x86/aes.h',
'simde/x86/avx512.h',
'simde/x86/avx2.h',
'simde/x86/avx.h',
Expand Down
3 changes: 3 additions & 0 deletions simde/simde-arch.h
Expand Up @@ -339,6 +339,9 @@
# if defined(__F16C__) || (defined(HEDLEY_MSVC_VERSION) && HEDLEY_MSVC_VERSION_CHECK(19,30,0) && defined(SIMDE_ARCH_X86_AVX2) )
# define SIMDE_ARCH_X86_F16C 1
# endif
# if defined(__AES__)
# define SIMDE_ARCH_X86_AES 1
# endif
#endif

/* Itanium
Expand Down
16 changes: 16 additions & 0 deletions simde/simde-features.h
Expand Up @@ -241,6 +241,15 @@
#define SIMDE_X86_SSE2_NATIVE
#endif

#if !defined(SIMDE_X86_AES_NATIVE) && !defined(SIMDE_X86_AES_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
#if defined(SIMDE_ARCH_X86_AES)
#define SIMDE_X86_AES_NATIVE
#endif
#endif
#if defined(SIMDE_X86_AES_NATIVE) && !defined(SIMDE_X86_SSE2_NATIVE)
#define SIMDE_X86_SSE2_NATIVE
#endif

#if !defined(SIMDE_X86_SSE2_NATIVE) && !defined(SIMDE_X86_SSE2_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
#if defined(SIMDE_ARCH_X86_SSE2)
#define SIMDE_X86_SSE2_NATIVE
Expand Down Expand Up @@ -324,6 +333,10 @@
#endif
#endif

#if defined(SIMDE_X86_AES_NATIVE)
#include <wmmintrin.h>
#endif

#if defined(HEDLEY_MSVC_VERSION)
#pragma warning(pop)
#endif
Expand Down Expand Up @@ -647,6 +660,9 @@
#if !defined(SIMDE_X86_F16C_NATIVE)
#define SIMDE_X86_F16C_ENABLE_NATIVE_ALIASES
#endif
#if !defined(SIMDE_X86_AES_NATIVE)
#define SIMDE_X86_AES_ENABLE_NATIVE_ALIASES
#endif

#if !defined(SIMDE_ARM_NEON_A32V7_NATIVE)
#define SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES
Expand Down
605 changes: 605 additions & 0 deletions simde/x86/aes.h

Large diffs are not rendered by default.

355 changes: 355 additions & 0 deletions test/x86/aes.c

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion test/x86/meson.build
Expand Up @@ -13,7 +13,8 @@ simde_test_x86_tests = [
'gfni',
'clmul',
'svml',
'xop'
'xop',
'aes'
]

subdir('avx512')
Expand Down