A64: Implement FRINTX, FRINTI (scalar)

This commit is contained in:
MerryMage 2018-07-16 14:10:06 +01:00
parent 962fa3b65e
commit a40127a054
2 changed files with 10 additions and 2 deletions

View file

@ -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")

View file

@ -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