Add HAVE_AES and HAVE_F16C

This commit is contained in:
Francois Kritzinger 2022-02-07 11:46:20 +02:00
parent 802db34adb
commit 87f2f24d5b
3 changed files with 40 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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.
*/