From 87f2f24d5be34d59fe1214a62bb9bba959f6f636 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Mon, 7 Feb 2022 11:46:20 +0200 Subject: [PATCH] Add HAVE_AES and HAVE_F16C --- .../libbuild2/autoconf/checks/HAVE_AES.h | 19 +++++++++++++++++++ .../libbuild2/autoconf/checks/HAVE_F16C.h | 18 ++++++++++++++++++ .../libbuild2/autoconf/checks/HAVE_SSE4_2.h | 3 +++ 3 files changed, 40 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_AES.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_F16C.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_AES.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_AES.h new file mode 100644 index 0000000..b7faaa9 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_AES.h @@ -0,0 +1,19 @@ +// HAVE_AES + +#undef HAVE_AES + +/* GCC, Clang: -maes + * + * MSVC: No controlling compiler option nor indicating macro. The + * documentation murkily says it's always enabled on Intel and only + * Intel processors; see: + * https://docs.microsoft.com/en-us/cpp/intrinsics/x86-intrinsics-list + * https://docs.microsoft.com/en-us/cpp/intrinsics/x64-amd64-intrinsics-list) + * + * The AES-NI instructions which are widely supported in CPUs (since 2009 for + * Intel; also `latest` ARM and SPARC processors) and most modern compilers + * (according to Wikipedia). First added to GCC 4.4.7 (2012). + */ +#ifdef __AES__ +# define HAVE_AES 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_F16C.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_F16C.h new file mode 100644 index 0000000..271fe17 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_F16C.h @@ -0,0 +1,18 @@ +// HAVE_F16C + +#undef HAVE_F16C + +/* GCC, Clang: -mf16c + * + * MSVC: No controlling compiler option nor indicating macro. The + * documentation murkily says it's always enabled on Intel and only + * Intel processors; see: + * https://docs.microsoft.com/en-us/cpp/intrinsics/x86-intrinsics-list + * https://docs.microsoft.com/en-us/cpp/intrinsics/x64-amd64-intrinsics-list) + * + * Supported since Intel's Ivy Bridge (2012) and AMD's Bulldozer (2011). Added + * to GCC 4.6.4 (2013) at the latest. + */ +#ifdef __F16C__ +# define HAVE_F16C 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SSE4_2.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SSE4_2.h index e59690e..572faf4 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SSE4_2.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SSE4_2.h @@ -6,6 +6,9 @@ * * MSVC: /arch:{AVX,AVX2,AVX512} * + * Supported since Intel's Nehalem (2008), AMD's Bulldozer (2011), and GCC 4.3 + * (2008). + * * This code is based on * https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qsimd.h. */