ChorusOS 5.0 Transition Guide

Support for Floating Point Configuration

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:


Note -

The sysGetConf(2K) system call has been enhanced to retrieve enabled features. The floating point configuration support applies to the PowerPC platform only.


Support for FPU Exception Handling

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:

MSR(FE0,FE1)=0x00000000

Floating-point exceptions disabled

MSR(FE0,FE1)=0x00000900

Floating-point precise exception mode

FPSCR(VE)=0x00000080

Invalid operation exception enabled

FPSCR(OE)=0x00000040

Overflow exception enabled

FPSCR(UE)=0x00000020

Underflow exception enabled

FPSCR(ZE)=0x00000010

Zero divide exception enabled

FPSCR(XE)=0x00000008

Inexact operation exception enabled

FPSCR(NI)=0x00000004

Non IEEE mode. This bit should never be set.

FPSCR(RN)=0x00000000

Round to nearest

FPSCR(RN)=0x00000001

Round toward zero

FPSCR(RN)=0x00000002

Round toward +infinity

FPSCR(RN)=0x00000003

Round toward -infinity