When using TCG emulation we need emulate the floating point unit of the guest. This is tricky because while most systems follow IEEE 754 this isn't quite comprehensive. Different guests have slightly different propagation rules for things like NaN propagation.
There has been work in recent years to speed up the floating point performance of the system. When we know it is safe to use the hardware we do so otherwise falling back to the software based emulation of the FPU known as SoftFloat.
The code is found in fpu/softfloat.c with guest specific tweaks in fpu/softfloat-specialize.h. The code was originally based on Berkeley Softfloat but has been extensively re-factored since. The re-factoring has a common path for 16/32/64 bit floating point calculations hopefully leading to less bugs.
There is a set of tests which can exercise the Softfloat which can be run by:
It uses a lightly modified and wrapped Berkeley TestFloat.
- Convert x80 and 128 bit floating point routines to new style
User:Ajb has a public fpu/next branch:
|GitLab CI||pipelines||Primary CI, tries to incorporate data from others|||
|Cirrus CI||build history||FreeBSD compiles|||
|Travis||build history||Non-x86_64 hosts|