musl itself expects to be configured to compile with either -ffloat-store or -fexcess-precision=standard - but when imported into Wine, those flags aren't used.
This seems to be essential for getting reasonable precision from some math functions such as exp2() - without the expected precision truncation, the output value of exp2() can be off by as much as 0.2% in some cases.
As Wine doesn't build the musl sources with those flags, use volatile to force storing/reloading floats in order to limit their intermediate precision, as musl expects. Only do this on i386 where this is known be required.
This fixes https://bugs.winehq.org/show_bug.cgi?id=56372.
Apparently this issue only appears when compiled with GCC; with Clang, this already works as expected.
Signed-off-by: Martin Storsjö martin@martin.st