__wmmintrin_aes.h revision 288943
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 32288943Sdim/* Define the default attributes for the functions in this file. */ 33288943Sdim#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) 34288943Sdim 35288943Sdimstatic __inline__ __m128i __DEFAULT_FN_ATTRS 36243791Sdim_mm_aesenc_si128(__m128i __V, __m128i __R) 37243791Sdim{ 38243791Sdim return (__m128i)__builtin_ia32_aesenc128(__V, __R); 39243791Sdim} 40243791Sdim 41288943Sdimstatic __inline__ __m128i __DEFAULT_FN_ATTRS 42243791Sdim_mm_aesenclast_si128(__m128i __V, __m128i __R) 43243791Sdim{ 44243791Sdim return (__m128i)__builtin_ia32_aesenclast128(__V, __R); 45243791Sdim} 46243791Sdim 47288943Sdimstatic __inline__ __m128i __DEFAULT_FN_ATTRS 48243791Sdim_mm_aesdec_si128(__m128i __V, __m128i __R) 49243791Sdim{ 50243791Sdim return (__m128i)__builtin_ia32_aesdec128(__V, __R); 51243791Sdim} 52243791Sdim 53288943Sdimstatic __inline__ __m128i __DEFAULT_FN_ATTRS 54243791Sdim_mm_aesdeclast_si128(__m128i __V, __m128i __R) 55243791Sdim{ 56243791Sdim return (__m128i)__builtin_ia32_aesdeclast128(__V, __R); 57243791Sdim} 58243791Sdim 59288943Sdimstatic __inline__ __m128i __DEFAULT_FN_ATTRS 60243791Sdim_mm_aesimc_si128(__m128i __V) 61243791Sdim{ 62243791Sdim return (__m128i)__builtin_ia32_aesimc128(__V); 63243791Sdim} 64243791Sdim 65243791Sdim#define _mm_aeskeygenassist_si128(C, R) \ 66243791Sdim __builtin_ia32_aeskeygenassist128((C), (R)) 67243791Sdim 68288943Sdim#undef __DEFAULT_FN_ATTRS 69288943Sdim 70243791Sdim#endif 71243791Sdim 72243791Sdim#endif /* _WMMINTRIN_AES_H */ 73