__wmmintrin_aes.h revision 243791
1243791Sdim/*===---- __wmmintrin_aes.h - AES intrinsics -------------------------------=== 2243791Sdim * 3243791Sdim * Permission is hereby granted, free of charge, to any person obtaining a copy 4243791Sdim * of this software and associated documentation files (the "Software"), to deal 5243791Sdim * in the Software without restriction, including without limitation the rights 6243791Sdim * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7243791Sdim * copies of the Software, and to permit persons to whom the Software is 8243791Sdim * furnished to do so, subject to the following conditions: 9243791Sdim * 10243791Sdim * The above copyright notice and this permission notice shall be included in 11243791Sdim * all copies or substantial portions of the Software. 12243791Sdim * 13243791Sdim * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14243791Sdim * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15243791Sdim * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16243791Sdim * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17243791Sdim * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18243791Sdim * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19243791Sdim * THE SOFTWARE. 20243791Sdim * 21243791Sdim *===-----------------------------------------------------------------------=== 22243791Sdim */ 23243791Sdim#ifndef _WMMINTRIN_AES_H 24243791Sdim#define _WMMINTRIN_AES_H 25243791Sdim 26243791Sdim#include <emmintrin.h> 27243791Sdim 28243791Sdim#if !defined (__AES__) 29243791Sdim# error "AES instructions not enabled" 30243791Sdim#else 31243791Sdim 32243791Sdimstatic __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) 33243791Sdim_mm_aesenc_si128(__m128i __V, __m128i __R) 34243791Sdim{ 35243791Sdim return (__m128i)__builtin_ia32_aesenc128(__V, __R); 36243791Sdim} 37243791Sdim 38243791Sdimstatic __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) 39243791Sdim_mm_aesenclast_si128(__m128i __V, __m128i __R) 40243791Sdim{ 41243791Sdim return (__m128i)__builtin_ia32_aesenclast128(__V, __R); 42243791Sdim} 43243791Sdim 44243791Sdimstatic __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) 45243791Sdim_mm_aesdec_si128(__m128i __V, __m128i __R) 46243791Sdim{ 47243791Sdim return (__m128i)__builtin_ia32_aesdec128(__V, __R); 48243791Sdim} 49243791Sdim 50243791Sdimstatic __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) 51243791Sdim_mm_aesdeclast_si128(__m128i __V, __m128i __R) 52243791Sdim{ 53243791Sdim return (__m128i)__builtin_ia32_aesdeclast128(__V, __R); 54243791Sdim} 55243791Sdim 56243791Sdimstatic __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) 57243791Sdim_mm_aesimc_si128(__m128i __V) 58243791Sdim{ 59243791Sdim return (__m128i)__builtin_ia32_aesimc128(__V); 60243791Sdim} 61243791Sdim 62243791Sdim#define _mm_aeskeygenassist_si128(C, R) \ 63243791Sdim __builtin_ia32_aeskeygenassist128((C), (R)) 64243791Sdim 65243791Sdim#endif 66243791Sdim 67243791Sdim#endif /* _WMMINTRIN_AES_H */ 68