// ***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
// AES Intrinsics
HARDWARE_INTRINSIC(AES_IsSupported, "get_IsSupported", AES, -1, 0, 0, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IsSupportedProperty, HW_Flag_NoFlag)
+HARDWARE_INTRINSIC(AES_Decrypt, "Decrypt", AES, -1, 16, 2, {INS_invalid, INS_aesdec, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag)
+HARDWARE_INTRINSIC(AES_DecryptLast, "DecryptLast", AES, -1, 16, 2, {INS_invalid, INS_aesdeclast, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag)
+HARDWARE_INTRINSIC(AES_Encrypt, "Encrypt", AES, -1, 16, 2, {INS_invalid, INS_aesenc, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag)
+HARDWARE_INTRINSIC(AES_EncryptLast, "EncryptLast", AES, -1, 16, 2, {INS_invalid, INS_aesenclast, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag)
+HARDWARE_INTRINSIC(AES_InverseMixColumns, "InverseMixColumns", AES, -1, 16, 1, {INS_invalid, INS_aesimc, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SimpleSIMD, HW_Flag_NoFlag)
+HARDWARE_INTRINSIC(AES_KeygenAssist, "KeygenAssist", AES, -1, 16, 2, {INS_invalid, INS_aeskeygenassist,INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_IMM, HW_Flag_FullRangeIMM)
// ***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
// Intrinsic ID Function name ISA ival SIMD size NumArg instructions Category Flags
INST3( pextrw_sse41, "pextrw" , 0, IUM_WR, 0, 0, SSE3A(0x15), BAD_CODE, BAD_CODE) // Extract Word
INST3( extractps, "extractps" , 0, IUM_WR, 0, 0, SSE3A(0x17), BAD_CODE, BAD_CODE) // Extract Packed Floating-Point Values
+//AES instructions
+INST3(aesdec, "aesdec" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, SSE38(0xDE)) // Perform one round of an AES decryption flow
+INST3(aesdeclast, "aesdeclast" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, SSE38(0xDF)) // Perform last round of an AES decryption flow
+INST3(aesenc, "aesenc" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, SSE38(0xDC)) // Perform one round of an AES encryption flow
+INST3(aesenclast, "aesenclast" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, SSE38(0xDD)) // Perform last round of an AES encryption flow
+INST3(aesimc, "aesimc" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, SSE38(0xDB)) // Perform the AES InvMixColumn Transformation
+INST3(aeskeygenassist,"aeskeygenassist" , 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, SSE3A(0xDF)) // AES Round Key Generation Assist
+
INST3(LAST_SSE4_INSTRUCTION, "LAST_SSE4_INSTRUCTION", 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, BAD_CODE)
INST3(FIRST_AVX_INSTRUCTION, "FIRST_AVX_INSTRUCTION", 0, IUM_WR, 0, 0, BAD_CODE, BAD_CODE, BAD_CODE)