Features/Softfloat

From QEMU
Revision as of 11:08, 13 March 2019 by Ajb (talk | contribs) (Add a little detail about Softfloat)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

The code is found in {{{src:fpu/softfloat.c}}} with guest specific tweaks in {{{src: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:

 make check-softfloat

It uses a lightly modified and wrapped Berkeley TestFloat.

Outstanding Tasks

  • Covert x80 and 128bit floating point routines to new style

Maintainer Branches

Users:Alex has a public *fpu/next* branch:

{CustomCIStatus|user=stsquad|repo=qemu|branch=fpu/next|ship_proj=5885eac43b653a0f00fa97f5}}


[Category:Completed Features]