8087 FNINIT initialises control word to 0x3ff. Fixes FPU detection on Xi8088.
This commit is contained in:
parent
11c1996539
commit
a77fd1e7f5
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue