diff --git a/src/frontend/A64/decoder/a64.inc b/src/frontend/A64/decoder/a64.inc index 38494aaa..94bb6e8b 100644 --- a/src/frontend/A64/decoder/a64.inc +++ b/src/frontend/A64/decoder/a64.inc @@ -910,8 +910,8 @@ INST(FRINTP_float, "FRINTP (scalar)", "00011 INST(FRINTM_float, "FRINTM (scalar)", "00011110yy100101010000nnnnnddddd") INST(FRINTZ_float, "FRINTZ (scalar)", "00011110yy100101110000nnnnnddddd") INST(FRINTA_float, "FRINTA (scalar)", "00011110yy100110010000nnnnnddddd") -//INST(FRINTX_float, "FRINTX (scalar)", "00011110yy100111010000nnnnnddddd") -//INST(FRINTI_float, "FRINTI (scalar)", "00011110yy100111110000nnnnnddddd") +INST(FRINTX_float, "FRINTX (scalar)", "00011110yy100111010000nnnnnddddd") +INST(FRINTI_float, "FRINTI (scalar)", "00011110yy100111110000nnnnnddddd") // Data Processing - FP and SIMD - Floating point compare INST(FCMP_float, "FCMP", "00011110yy1mmmmm001000nnnnn0o000") 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 fd9d7467..27bf35b2 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 @@ -184,4 +184,12 @@ bool TranslatorVisitor::FRINTA_float(Imm<2> type, Vec Vn, Vec Vd) { return FloatingPointRoundToIntegral(*this, type, Vn, Vd, FP::RoundingMode::ToNearest_TieAwayFromZero, false); } +bool TranslatorVisitor::FRINTX_float(Imm<2> type, Vec Vn, Vec Vd) { + return FloatingPointRoundToIntegral(*this, type, Vn, Vd, ir.current_location->FPCR().RMode(), true); +} + +bool TranslatorVisitor::FRINTI_float(Imm<2> type, Vec Vn, Vec Vd) { + return FloatingPointRoundToIntegral(*this, type, Vn, Vd, ir.current_location->FPCR().RMode(), false); +} + } // namespace Dynarmic::A64