m68kfpu: eplicitly set rounding mode for frem

This commit is contained in:
Patrick Mackinlay 2020-07-13 15:28:41 +07:00
parent 489861eece
commit 12eda4acf1

View File

@ -1514,8 +1514,11 @@ void fpgen_rm_reg(u16 w2)
} }
case 0x25: // FREM case 0x25: // FREM
{ {
s8 const mode = float_rounding_mode;
float_rounding_mode = float_round_nearest_even;
m_fpr[dst] = floatx80_rem(m_fpr[dst], source); m_fpr[dst] = floatx80_rem(m_fpr[dst], source);
SET_CONDITION_CODES(m_fpr[dst]); SET_CONDITION_CODES(m_fpr[dst]);
float_rounding_mode = mode;
m_icount -= 43; // guess m_icount -= 43; // guess
break; break;
} }