A64: Enable half-precision variants of floating-point FRINT* variants

With all the backing machinery in place, we can remove the fallback
check for half-precision.
This commit is contained in:
Lioncash 2019-04-13 17:53:19 -04:00 committed by MerryMage
parent fb829b9525
commit 24f583c498

View file

@ -149,12 +149,12 @@ bool TranslatorVisitor::FCVT_float(Imm<2> type, Imm<2> opc, Vec Vn, Vec Vd) {
static bool FloatingPointRoundToIntegral(TranslatorVisitor& v, Imm<2> type, Vec Vn, Vec Vd, static bool FloatingPointRoundToIntegral(TranslatorVisitor& v, Imm<2> type, Vec Vn, Vec Vd,
FP::RoundingMode rounding_mode, bool exact) { FP::RoundingMode rounding_mode, bool exact) {
const auto datasize = FPGetDataSize(type); const auto datasize = FPGetDataSize(type);
if (!datasize || *datasize == 16) { if (!datasize) {
return v.UnallocatedEncoding(); return v.UnallocatedEncoding();
} }
const IR::U32U64 operand = v.V_scalar(*datasize, Vn); const IR::U16U32U64 operand = v.V_scalar(*datasize, Vn);
const IR::U32U64 result = v.ir.FPRoundInt(operand, rounding_mode, exact); const IR::U16U32U64 result = v.ir.FPRoundInt(operand, rounding_mode, exact);
v.V_scalar(*datasize, Vd, result); v.V_scalar(*datasize, Vd, result);
return true; return true;
} }