From 16de99d3e3ab38ab2dd7baf18975e340a1655694 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 23 Mar 2019 10:16:20 -0400 Subject: [PATCH] A64: Enable FCVT floating-point conversions for half-precision With this, we no longer have to fall back to the interpreter in any of the FCVT floating-point conversion instructions. --- .../floating_point_data_processing_one_register.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/frontend/A64/translate/impl/floating_point_data_processing_one_register.cpp b/src/frontend/A64/translate/impl/floating_point_data_processing_one_register.cpp index 342fd4c4..2b26d85f 100644 --- a/src/frontend/A64/translate/impl/floating_point_data_processing_one_register.cpp +++ b/src/frontend/A64/translate/impl/floating_point_data_processing_one_register.cpp @@ -112,15 +112,18 @@ bool TranslatorVisitor::FCVT_float(Imm<2> type, Imm<2> opc, Vec Vn, Vec Vd) { case 16: switch (*dstsize) { case 32: - return InterpretThisInstruction(); + result = ir.FPHalfToSingle(operand, rounding_mode); + break; case 64: - return InterpretThisInstruction(); + result = ir.FPHalfToDouble(operand, rounding_mode); + break; } break; case 32: switch (*dstsize) { case 16: - return InterpretThisInstruction(); + result = ir.FPSingleToHalf(operand, rounding_mode); + break; case 64: result = ir.FPSingleToDouble(operand, rounding_mode); break; @@ -129,7 +132,8 @@ bool TranslatorVisitor::FCVT_float(Imm<2> type, Imm<2> opc, Vec Vn, Vec Vd) { case 64: switch (*dstsize) { case 16: - return InterpretThisInstruction(); + result = ir.FPDoubleToHalf(operand, rounding_mode); + break; case 32: result = ir.FPDoubleToSingle(operand, rounding_mode); break;