A64: Implement UMOV
This commit is contained in:
parent
47661b746b
commit
5297027ebe
2 changed files with 20 additions and 1 deletions
|
@ -673,7 +673,7 @@ INST(CMEQ_reg_2, "CMEQ (register)", "0Q101
|
||||||
// Data Processing - FP and SIMD - SIMD Copy
|
// Data Processing - FP and SIMD - SIMD Copy
|
||||||
INST(DUP_gen, "DUP (general)", "0Q001110000iiiii000011nnnnnddddd")
|
INST(DUP_gen, "DUP (general)", "0Q001110000iiiii000011nnnnnddddd")
|
||||||
//INST(SMOV, "SMOV", "0Q001110000iiiii001011nnnnnddddd")
|
//INST(SMOV, "SMOV", "0Q001110000iiiii001011nnnnnddddd")
|
||||||
//INST(UMOV, "UMOV", "0Q001110000iiiii001111nnnnnddddd")
|
INST(UMOV, "UMOV", "0Q001110000iiiii001111nnnnnddddd")
|
||||||
//INST(INS_gen, "INS (general)", "01001110000iiiii000111nnnnnddddd")
|
//INST(INS_gen, "INS (general)", "01001110000iiiii000111nnnnnddddd")
|
||||||
//INST(INS_elt, "INS (element)", "01101110000iiiii0iiii1nnnnnddddd")
|
//INST(INS_elt, "INS (element)", "01101110000iiiii0iiii1nnnnnddddd")
|
||||||
|
|
||||||
|
|
|
@ -36,4 +36,23 @@ bool TranslatorVisitor::DUP_gen(bool Q, Imm<5> imm5, Reg Rn, Vec Vd) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TranslatorVisitor::UMOV(bool Q, Imm<5> imm5, Vec Vn, Reg Rd) {
|
||||||
|
const size_t size = Common::LowestSetBit(imm5.ZeroExtend());
|
||||||
|
if (size < 3 && Q) return UnallocatedEncoding();
|
||||||
|
if (size == 3 && !Q) return UnallocatedEncoding();
|
||||||
|
if (size > 3) return UnallocatedEncoding();
|
||||||
|
|
||||||
|
const size_t idxdsize = imm5.Bit<4>() ? 128 : 64;
|
||||||
|
const size_t index = imm5.ZeroExtend<size_t>() >> (size + 1);
|
||||||
|
const size_t esize = 8 << size;
|
||||||
|
const size_t datasize = Q ? 64 : 32;
|
||||||
|
|
||||||
|
const IR::U128 operand = V(idxdsize, Vn);
|
||||||
|
|
||||||
|
const IR::UAny elem = ir.VectorGetElement(esize, operand, index);
|
||||||
|
X(datasize, Rd, ZeroExtend(elem, datasize));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Dynarmic::A64
|
} // namespace Dynarmic::A64
|
||||||
|
|
Loading…
Reference in a new issue