Version 5.0 of the ChorusOS operating system provides hardware support for floating point configuration. To facilitate this, two new features and one new tunable have been added. The two new features are FPU and FPU_EMUL. The new tunable is kern.exec.dflThreadFpuCtrl.
For the floating point support to be active, set FPU=true and FPU_EMUL=false. Applications should be built with FFPU=ON. With these settings:
A per thread floating point context is allocated.
The microkernel switches a thread's floating point context on demand.
The sysGetConf(2K) system call has been enhanced to retrieve enabled features. The floating point configuration support applies to the PowerPC platform only.
A new tunable, kern.exec.dflThreadFpuCtrl, has been added to configure default thread behaviour on floating point exceptions. This tunable is a bit field and is the logical OR of MSR(FE0,FE1) bits and FPSCR(24-31) control bits.
The following bits may be set or cleared:
Floating-point exceptions disabled
Floating-point precise exception mode
Invalid operation exception enabled
Overflow exception enabled
Underflow exception enabled
Zero divide exception enabled
Inexact operation exception enabled
Non IEEE mode. This bit should never be set.
Round to nearest
Round toward zero
Round toward +infinity
Round toward -infinity