Configuring for floating point

If full IEEE 754 support is required by an application (to support the full IEEE 754 standard), the PPC SPE embedded floating point (EFP) fpassist.so library must be on the dynamic loader search path. The PPC floating point library, fpemu.so, shouldn't be installed (it's not used by an SPE libc even if it's installed). By default, the EFP hardware is reasonable for handling floating point. In addition, as with all software implementations, you'll need to be aware of the significant performance decrease when you use full IEEE 754 compliance.

You'll need to review the e500 documentation to determine if the default hardware behaviour is adequate for your needs. The features that aren't available from the hardware include, but are not limited to the following:

Note: Every thread that requires full IEEE 754 behaviour must call any of the various QNX Neutrino math library functions that control the floating point exception environment.

If the PPC SPE embedded floating point (EFP) fpassist.so library isn't part of the image, you won't have full IEEE compliance. However, you should use this library only when you require full compliance because using this library is slower, and there are also other performance tradeoffs to consider.

For SPE floating Point instructions, fpemu.so supports the classic instructions only. This means that fpemu.so is present for non-SPE configurations (builds), and that fpassist.so is present for SPE configurations. So, fpemu.so and fpassist.so are mutually exclusive; you can only use one at a time. However, if you use SPE libc, fpemu.so will be completely ignored.

If fpassist.so is installed and you call any of the functions below, the first call will place the thread into full IEEE 754 mode; however at present, there is no way to turn off this mode; once placed into full IEEE 754 mode, it remains set.

The most basic functions that set the floating point environment to trigger IEEE behaviour are:

Note: The fe*() functions are from the Dinkum C99 interface; they are also supported by QNX Neutrino in C90. However, the Dinkum C99 FENV_ACCESS() pragma isn't supported.

The fp*() functions are QNX Neutrino specific, and are all implemented in terms of the Dinkum C99 interface.

In full IEEE 754 mode, SIGFPE will still be delivered to the faulting thread for operations that result in IEEE 754 exceptions that are unmasked.