A64: Implement SHA1H
This is a fairly trivial instruction it's essentially: result = ROL(data, 30);
This commit is contained in:
parent
3985f7bf84
commit
94f0fba16b
3 changed files with 23 additions and 1 deletions
|
@ -106,6 +106,7 @@ add_library(dynarmic
|
|||
frontend/A64/translate/impl/simd_scalar_pairwise.cpp
|
||||
frontend/A64/translate/impl/simd_scalar_three_same.cpp
|
||||
frontend/A64/translate/impl/simd_scalar_two_register_misc.cpp
|
||||
frontend/A64/translate/impl/simd_sha.cpp
|
||||
frontend/A64/translate/impl/simd_shift_by_immediate.cpp
|
||||
frontend/A64/translate/impl/simd_three_same.cpp
|
||||
frontend/A64/translate/impl/simd_two_register_misc.cpp
|
||||
|
|
|
@ -329,7 +329,7 @@ INST(AESIMC, "AESIMC", "01001
|
|||
//INST(SHA256H, "SHA256H", "01011110000mmmmm010000nnnnnddddd")
|
||||
//INST(SHA256H2, "SHA256H2", "01011110000mmmmm010100nnnnnddddd")
|
||||
//INST(SHA256SU1, "SHA256SU1", "01011110000mmmmm011000nnnnnddddd")
|
||||
//INST(SHA1H, "SHA1H", "0101111000101000000010nnnnnddddd")
|
||||
INST(SHA1H, "SHA1H", "0101111000101000000010nnnnnddddd")
|
||||
//INST(SHA1SU1, "SHA1SU1", "0101111000101000000110nnnnnddddd")
|
||||
//INST(SHA256SU0, "SHA256SU0", "0101111000101000001010nnnnnddddd")
|
||||
|
||||
|
|
21
src/frontend/A64/translate/impl/simd_sha.cpp
Normal file
21
src/frontend/A64/translate/impl/simd_sha.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* This file is part of the dynarmic project.
|
||||
* Copyright (c) 2018 MerryMage
|
||||
* This software may be used and distributed according to the terms of the GNU
|
||||
* General Public License version 2 or any later version.
|
||||
*/
|
||||
|
||||
#include "frontend/A64/translate/impl/impl.h"
|
||||
|
||||
namespace Dynarmic::A64 {
|
||||
|
||||
bool TranslatorVisitor::SHA1H(Vec Vn, Vec Vd) {
|
||||
const IR::U128 data = ir.GetS(Vn);
|
||||
|
||||
const IR::U128 result = ir.VectorOr(ir.VectorLogicalShiftLeft(32, data, 30),
|
||||
ir.VectorLogicalShiftRight(32, data, 2));
|
||||
|
||||
ir.SetS(Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Dynarmic::A64
|
Loading…
Reference in a new issue