A64: Implement AESIMC and AESMC

This commit is contained in:
Lioncash 2018-01-30 07:56:18 -05:00 committed by MerryMage
parent 744495e23d
commit a5c4fbc783
9 changed files with 189 additions and 2 deletions

View file

@ -715,6 +715,14 @@ U32 IREmitter::CRC32ISO64(const U32& a, const U64& b) {
return Inst<U32>(Opcode::CRC32ISO64, a, b);
}
U128 IREmitter::AESInverseMixColumns(const U128 &a) {
return Inst<U128>(Opcode::AESInverseMixColumns, a);
}
U128 IREmitter::AESMixColumns(const U128 &a) {
return Inst<U128>(Opcode::AESMixColumns, a);
}
UAny IREmitter::VectorGetElement(size_t esize, const U128& a, size_t index) {
ASSERT_MSG(esize * index < 128, "Invalid index");
switch (esize) {

View file

@ -195,6 +195,9 @@ public:
U32 CRC32ISO32(const U32& a, const U32& b);
U32 CRC32ISO64(const U32& a, const U64& b);
U128 AESInverseMixColumns(const U128& a);
U128 AESMixColumns(const U128& a);
UAny VectorGetElement(size_t esize, const U128& a, size_t index);
U128 VectorAdd8(const U128& a, const U128& b);
U128 VectorAdd16(const U128& a, const U128& b);

View file

@ -178,6 +178,10 @@ OPCODE(CRC32ISO16, T::U32, T::U32, T::U32
OPCODE(CRC32ISO32, T::U32, T::U32, T::U32 )
OPCODE(CRC32ISO64, T::U32, T::U32, T::U64 )
// AES instructions
OPCODE(AESInverseMixColumns, T::U128, T::U128 )
OPCODE(AESMixColumns, T::U128, T::U128 )
// Vector instructions
OPCODE(VectorGetElement8, T::U8, T::U128, T::U8 )
OPCODE(VectorGetElement16, T::U16, T::U128, T::U8 )