A64: Implement XAR
This commit is contained in:
parent
0b1b131ec2
commit
b719a6b3f7
3 changed files with 13 additions and 0 deletions
|
@ -865,6 +865,7 @@ INST(RAX1, "RAX1", "11001
|
|||
INST(SM3PARTW1, "SM3PARTW1", "11001110011mmmmm110000nnnnnddddd")
|
||||
INST(SM3PARTW2, "SM3PARTW2", "11001110011mmmmm110001nnnnnddddd")
|
||||
//INST(SM4EKEY, "SM4EKEY", "11001110011mmmmm110010nnnnnddddd")
|
||||
INST(XAR, "XAR", "11001110100mmmmmiiiiiinnnnnddddd")
|
||||
|
||||
// Data Processing - FP and SIMD - Cryptographic four register
|
||||
INST(EOR3, "EOR3", "11001110000mmmmm0aaaaannnnnddddd")
|
||||
|
|
|
@ -933,6 +933,7 @@ struct TranslatorVisitor final {
|
|||
bool SHA512H2(Vec Vm, Vec Vn, Vec Vd);
|
||||
bool SHA512SU1(Vec Vm, Vec Vn, Vec Vd);
|
||||
bool RAX1(Vec Vm, Vec Vn, Vec Vd);
|
||||
bool XAR(Vec Vm, Imm<6> imm6, Vec Vn, Vec Vd);
|
||||
bool SM3PARTW1(Vec Vm, Vec Vn, Vec Vd);
|
||||
bool SM3PARTW2(Vec Vm, Vec Vn, Vec Vd);
|
||||
bool SM4EKEY(Vec Vm, Vec Vn, Vec Vd);
|
||||
|
|
|
@ -167,6 +167,17 @@ bool TranslatorVisitor::RAX1(Vec Vm, Vec Vn, Vec Vd) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::XAR(Vec Vm, Imm<6> imm6, Vec Vn, Vec Vd) {
|
||||
const IR::U128 m = ir.GetQ(Vm);
|
||||
const IR::U128 n = ir.GetQ(Vn);
|
||||
|
||||
const IR::U128 tmp = ir.VectorEor(m, n);
|
||||
const IR::U128 result = ir.VectorRotateRight(64, tmp, imm6.ZeroExtend<u8>());
|
||||
|
||||
ir.SetQ(Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SM3PARTW1(Vec Vm, Vec Vn, Vec Vd) {
|
||||
const IR::U128 d = ir.GetQ(Vd);
|
||||
const IR::U128 m = ir.GetQ(Vm);
|
||||
|
|
Loading…
Reference in a new issue