|
|
|
| 1 |
|
/** |
| 2 |
|
*** Copyright (C) 1985-2008 Intel Corporation. All rights reserved. |
| 3 |
|
*** |
| 4 |
|
*** The information and source code contained herein is the exclusive |
| 5 |
|
*** property of Intel Corporation and may not be disclosed, examined |
| 6 |
|
*** or reproduced in whole or in part without explicit written authorization |
| 7 |
|
*** from the company. |
| 8 |
|
*** |
| 9 |
|
**/ |
| 10 |
|
|
| 11 |
|
/* |
| 12 |
|
* wmmintrin.h |
| 13 |
|
* |
| 14 |
|
* Principal header file for Intel(R) AES and PCLMULQDQ intrinsics. |
| 15 |
|
*/ |
| 16 |
|
|
| 17 |
|
#pragma once |
| 18 |
|
#ifndef __midl |
| 19 |
|
#ifndef _INCLUDED_WMM |
| 20 |
|
#define _INCLUDED_WMM |
| 21 |
|
|
| 22 |
|
#if defined(_M_CEE_PURE) |
| 23 |
|
#error ERROR: EMM intrinsics not supported in the pure mode! |
| 24 |
|
#else |
| 25 |
|
|
| 26 |
|
#include <nmmintrin.h> |
| 27 |
|
|
| 28 |
|
|
| 29 |
|
#if __cplusplus |
| 30 |
|
extern "C" { |
| 31 |
|
#endif |
| 32 |
|
|
| 33 |
|
/* |
| 34 |
|
* Performs 1 round of AES decryption of the first m128i using |
| 35 |
|
* the second m128i as a round key. |
| 36 |
|
*/ |
| 37 |
|
extern __m128i _mm_aesdec_si128(__m128i v, __m128i rkey); |
| 38 |
|
|
| 39 |
|
/* |
| 40 |
|
* Performs the last round of AES decryption of the first m128i |
| 41 |
|
* using the second m128i as a round key. |
| 42 |
|
*/ |
| 43 |
|
extern __m128i _mm_aesdeclast_si128(__m128i v, __m128i rkey); |
| 44 |
|
|
| 45 |
|
/* |
| 46 |
|
* Performs 1 round of AES encryption of the first m128i using |
| 47 |
|
* the second m128i as a round key. |
| 48 |
|
*/ |
| 49 |
|
extern __m128i _mm_aesenc_si128(__m128i v, __m128i rkey); |
| 60 |
|
*/ |
| 61 |
|
extern __m128i _mm_aesimc_si128(__m128i v); |
| 62 |
|
|
| 63 |
|
/* |
| 64 |
|
* Generates a m128i round key for the input m128i |
| 65 |
|
* AES cipher key and byte round constant. |
| 66 |
|
* The second parameter must be a compile time constant. |
| 67 |
|
*/ |
| 68 |
|
extern __m128i _mm_aeskeygenassist_si128(__m128i ckey, const int rcon); |
| 69 |
|
|
| 70 |
|
/* |
| 71 |
|
* Performs carry-less integer multiplication of 64-bit halves |
| 72 |
|
* of 128-bit input operands. |
| 73 |
|
* The third parameter inducates which 64-bit haves of the input parameters |
| 74 |
|
* v1 and v2 should be used. It must be a compile time constant. |
| 75 |
|
*/ |
| 76 |
|
extern __m128i _mm_clmulepi64_si128(__m128i v1, __m128i v2, |
| 77 |
|
const int imm8); |
| 78 |
|
|
| 79 |
|
|
| 80 |
|
#if defined __cplusplus |
| 81 |
|
}; /* End "C" */ |
| 82 |
|
#endif /* __cplusplus */ |
| 83 |
|
|
| 84 |
|
#endif /* defined(_M_CEE_PURE) */ |
| 85 |
|
|
| 86 |
|
#endif |
| 87 |
|
#endif /* _INCLUDED_WMM */ |
| 88 |
|
|
|
|
|