From 0f1b6acab7713b05223f029bf9201daf42096d3b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 27 Jan 2017 13:09:55 -0800 Subject: x86: Add detection of the AES and SHA New Instructions The AES instructions were first introduced with the Westmere shrink (22nm) of the Nehalem architecture. The SHA instructions are still pending on Intel architecture, but is available on AMD family 17h (gcc argument -march=znver1). Both features operate on SSE registers, so that's why the MSVC command- line argument is the SSE2 one and the configure-time tests depend on features.sse2. The qmake feature names end in "ni" because "aes" and "sha" are too simple and could clash with other uses. The QT_COMPILER_SUPPORTS_ macro doesn't have the "NI" suffix because it has to match the GCC/Clang predefined macro. Change-Id: I445bb15619f6401494e8fffd149dbd1f862ff51c Reviewed-by: Allan Sandfeld Jensen --- config.tests/common/aesni/aesni.pro | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config.tests/common/aesni/aesni.pro (limited to 'config.tests/common/aesni/aesni.pro') diff --git a/config.tests/common/aesni/aesni.pro b/config.tests/common/aesni/aesni.pro new file mode 100644 index 0000000000..49cb132ef7 --- /dev/null +++ b/config.tests/common/aesni/aesni.pro @@ -0,0 +1,3 @@ +SOURCES = aesni.cpp +!defined(QMAKE_CFLAGS_AESNI, "var"): error("This compiler does not support AES New Instructions") +else: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_AESNI -- cgit v1.2.3