A64: Handle half-precision floating point in scalar FABS

Now that we have the half-precision variant of the opcode added, we can
simply handle the instruction instead of treating it as undefined.
This commit is contained in:
Lioncash 2019-03-23 13:39:22 -04:00 committed by MerryMage
parent 8309ec7a9f
commit fe84ecb780

View file

@ -24,12 +24,12 @@ bool TranslatorVisitor::FMOV_float(Imm<2> type, Vec Vn, Vec Vd) {
bool TranslatorVisitor::FABS_float(Imm<2> type, Vec Vn, Vec Vd) { bool TranslatorVisitor::FABS_float(Imm<2> type, Vec Vn, Vec Vd) {
const auto datasize = FPGetDataSize(type); const auto datasize = FPGetDataSize(type);
if (!datasize || *datasize == 16) { if (!datasize) {
return UnallocatedEncoding(); return UnallocatedEncoding();
} }
const IR::U32U64 operand = V_scalar(*datasize, Vn); const IR::U16U32U64 operand = V_scalar(*datasize, Vn);
const IR::U32U64 result = ir.FPAbs(operand); const IR::U16U32U64 result = ir.FPAbs(operand);
V_scalar(*datasize, Vd, result); V_scalar(*datasize, Vd, result);
return true; return true;
} }