On AMD64, GCC and the ABI expects the x87 unit to be running in 80/64
mode rather than 64/53 mode seen on i386. This corrects errors seen
in long double tests involving runtime calculations. Previously, the
results of these runtime calculations would get rounded due to use
of 53-bit mantissas.
wrmsr(MSR_KGSBASE, 0);
/* Initialize the npx (if any) for the current process. */
- npxinit(__INITIAL_NPXCW__);
+ npxinit(__INITIAL_FPUCW__);
crit_exit();
pcb->pcb_ds = _udatasel;
initializecpu();
/* set up FPU state on the AP */
- npxinit(__INITIAL_NPXCW__);
+ npxinit(__INITIAL_FPUCW__);
/* disable the APIC, just to be SURE */
lapic->svr &= ~APIC_SVR_ENABLE;
crit_enter();
if ((td->td_flags & (TDF_USINGFP | TDF_KERNELFP)) == 0) {
td->td_flags |= TDF_USINGFP;
- npxinit(__INITIAL_NPXCW__);
+ npxinit(__INITIAL_FPUCW__);
didinit = 1;
}
pcb->pcb_fsbase = 0; /* Values loaded from PCB on switch */
pcb->pcb_gsbase = 0;
/* Initialize the npx (if any) for the current process. */
- npxinit(__INITIAL_NPXCW__);
+ npxinit(__INITIAL_FPUCW__);
crit_exit();
/*
int
npx_attach(device_t dev)
{
- npxinit(__INITIAL_NPXCW__);
+ npxinit(__INITIAL_FPUCW__);
return (0);
}
#endif
*/
if ((curthread->td_flags & TDF_USINGFP) == 0) {
curthread->td_flags |= TDF_USINGFP;
- npxinit(__INITIAL_NPXCW__);
+ npxinit(__INITIAL_FPUCW__);
didinit = 1;
}