Closed DMaroo closed 3 days ago
As a proof of concept, the previously failing test case f80_div_test
now passes when using SoftFloat functions to calculate the result.
Could you push it to a https://github.com/rizinorg/rizin/tree/dist-fuzz-softfloat-integrationdist-fuzz-
branch, so we have an idea how many builds potentially fail?
Builds are ok, tests fail of course. Would be for this change then.
Code looks good at a first glance. Requesting changes for myself to make sure I have tested this on ppc and sparc before we merge.
@thestr4ng3r Thank you! But 80-bit floats are an x87 thing and I don't think SPARC and/or PPC have them, hence the newly added 80-bit float tests wouldn't be run there. However, it is definitely worth testing whether the existing tests pass.
Code looks good at a first glance. Requesting changes for myself to make sure I have tested this on ppc and sparc before we merge.
@thestr4ng3r Thank you! But 80-bit floats are an x87 thing and I don't think SPARC and/or PPC have them, hence the newly added 80-bit float tests wouldn't be run there. However, it is definitely worth testing whether the existing tests pass.
if is an endian problem or similar it could still work especially since i expect this to be software floats.
To whoever merges this, please squash and add a good commit description like "Replace RzFloat implementation by SoftFloat 3e"
Your checklist for this pull request
Detailed description
I have added failing tests when using 80-bit floats (similar to the one outlined in #4252). I have also added a new meson subproject which clones SoftFloat version ~2c~ 3e. It is hosted at https://github.com/rizinorg/softfloat. I have made minor modifications to the original source which include the following:
meson.build
file.Why use version 2c over 3e?
The complete changelog can be found here, but it has mainly to do with bugfixes in the square root algorithm, support for bfloat and a new rounding mode (round to nearest, ties away:
RZ_FLOAT_RMODE_RNA
in Rizin andsoftfloat_round_near_maxMag
in SoftFloat).Test plan
Added new tests for 80-bit floats. Newly added
f80_ieee_{add,sub,mul,div}_test
fail andf80_ieee_sqrt_test
times out with the old implementation, and passes with the new implementation.Closing issues
Closes #4252.