A64: Implement FABD's scalar single/double precision variant

This commit is contained in:
Lioncash 2018-06-08 20:44:52 -04:00 committed by MerryMage
parent d898d1779d
commit 9e75d08860
2 changed files with 13 additions and 1 deletions

View file

@ -130,6 +130,18 @@ bool TranslatorVisitor::CMTST_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
return true;
}
bool TranslatorVisitor::FABD_2(bool sz, Vec Vm, Vec Vn, Vec Vd) {
const size_t esize = sz ? 64 : 32;
const IR::U128 operand1 = V(esize, Vn);
const IR::U128 operand2 = V(esize, Vm);
const IR::U128 difference = ir.FPVectorAbsoluteDifference(esize, operand1, operand2);
const IR::U128 result = ir.VectorZeroUpper(difference);
V(128, Vd, result);
return true;
}
bool TranslatorVisitor::SSHL_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
if (size != 0b11) {
return ReservedValue();