A64: Implement RAX1

This commit is contained in:
Lioncash 2018-04-03 08:12:13 -04:00 committed by MerryMage
parent 7371e63a7b
commit cf81f04ed3
3 changed files with 25 additions and 1 deletions

View file

@ -108,6 +108,7 @@ add_library(dynarmic
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_sha512.cpp
frontend/A64/translate/impl/simd_shift_by_immediate.cpp
frontend/A64/translate/impl/simd_three_different.cpp
frontend/A64/translate/impl/simd_three_same.cpp

View file

@ -859,7 +859,7 @@ INST(USHLL, "USHLL, USHLL2", "0Q101
//INST(SHA512H, "SHA512H", "11001110011mmmmm100000nnnnnddddd")
//INST(SHA512H2, "SHA512H2", "11001110011mmmmm100001nnnnnddddd")
//INST(SHA512SU1, "SHA512SU1", "11001110011mmmmm100010nnnnnddddd")
//INST(RAX1, "RAX1", "11001110011mmmmm100011nnnnnddddd")
INST(RAX1, "RAX1", "11001110011mmmmm100011nnnnnddddd")
//INST(SM3PARTW1, "SM3PARTW1", "11001110011mmmmm110000nnnnnddddd")
//INST(SM3PARTW2, "SM3PARTW2", "11001110011mmmmm110001nnnnnddddd")
//INST(SM4EKEY, "SM4EKEY", "11001110011mmmmm110010nnnnnddddd")

View file

@ -0,0 +1,23 @@
/* 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::RAX1(Vec Vm, Vec Vn, Vec Vd) {
const IR::U128 m = ir.GetQ(Vm);
const IR::U128 n = ir.GetQ(Vn);
const IR::U128 rotated_m = ir.VectorOr(ir.VectorLogicalShiftLeft(64, m, 1),
ir.VectorLogicalShiftRight(64, m, 63));
const IR::U128 result = ir.VectorEor(n, rotated_m);
ir.SetQ(Vd, result);
return true;
}
} // namespace Dynarmic::A64