How to Compile for the Intel® Core™ i5 processor and Intel® Xeon® 5600 processor series with AES-NI

Certain desktop processors such as the Intel® Core™ i5-600 processor series, some mobile processors and servers such as the Intel® Xeon® 5600 processor series support the Advanced Encryption Standard New Instructions (AES-NI), six instructions that support operations from the Advanced Encryption Standard, plus a carry-less multiply instruction. These new instructions help to accelerate data encryption and decryption and to improve performance.

AES-NI are supported by version 11 of the Intel C/C++ compiler, and also by Microsoft* Visual Studio* 2008 Service Pack 1 and by gcc version 4.4. The Intel® Integrated Performance Primitives (IPP) Cryptography Library also includes support for AES-NI, see /en-us/articles/aes-ni-support-in-intel-ipp .

The Intel C/C++ compiler version 11 supports the new instructions via intrinsic functions contained in the header file wmmintrin.h, which should be included. The Intel compiler does not generate AES-NI automatically; consequently, no special compiler switch is needed. For further details, see the Intel® C++ Compiler User and Reference Guides in the section "Intrinsics Reference" / "Intrinsics for Carry-less Multiplication Instruction and Advanced Encryption Standard Instructions".

The recommended Intel compiler switch for targeting 32 nm processors such as the Intel® Core™ i3 and Intel® Core™ i5 processors and the Intel® Xeon® 5600 processor series is /QxSSE4.2 (Windows*) or –xsse4.2 (Linux* or Mac OS* X), the same as for the Intel® Core™ i7 processor or the Intel® Xeon® 5500 and Intel® Xeon® 7500 processor series.
Einzelheiten zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.