8087 FNINIT initialises control word to 0x3ff. Fixes FPU detection on Xi8088.

This commit is contained in:
SarahW 2020-02-09 17:55:28 +00:00
commit a77fd1e7f5

View file

@ -58,7 +58,10 @@ static int opFINIT(uint32_t fetchdat)
{
FP_ENTER();
cpu_state.pc++;
cpu_state.npxc = 0x37F;
if (fpu_type == FPU_8087)
cpu_state.npxc = 0x3ff;
else
cpu_state.npxc = 0x37f;
codegen_set_rounding_mode(X87_ROUNDING_NEAREST);
cpu_state.npxs = 0;
*(uint64_t *)cpu_state.tag = 0;