A64: Implement REV16 (vector)

This commit is contained in:
Lioncash 2018-03-15 16:59:48 -04:00 committed by MerryMage
parent 6177c2c63d
commit 6ad1bce5e0
2 changed files with 17 additions and 1 deletions

View file

@ -8,6 +8,22 @@
namespace Dynarmic::A64 {
bool TranslatorVisitor::REV16_asimd(bool Q, Imm<2> size, Vec Vn, Vec Vd) {
if (size != 0) {
return UnallocatedEncoding();
}
const size_t datasize = Q ? 128 : 64;
constexpr size_t esize = 16;
const IR::U128 data = V(datasize, Vn);
const IR::U128 result = ir.VectorOr(ir.VectorLogicalShiftRight(esize, data, 8),
ir.VectorLogicalShiftLeft(esize, data, 8));
V(datasize, Vd, result);
return true;
}
bool TranslatorVisitor::UCVTF_int_2(bool sz, Vec Vn, Vec Vd) {
const auto esize = sz ? 64 : 32;