Skip to content

Conversation

@keith-packard
Copy link
Contributor

@keith-packard keith-packard commented Oct 4, 2024

It would be lovely if the soft float implementation were extended to fully support all IEEE exceptions and rounding modes. However, at present, there is only a single place where one exception might be raised: the C version of addition raises Inexact when the result differs from the precise value.

This affects targets which have hardware support for some formats and rely on software for other formats; those will expose an implementation of __fe_raise_inexact() that modifies the FPU status register.

Removing the Inexact exception generation from the C version of FP addition makes the implementation consistent across all operations and formats on all targets. In addition, it makes the implementation match the semantics of libgcc on 32-bit arm.

@github-actions
Copy link

github-actions bot commented Oct 4, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

It would be lovely if the soft float implementation were extended to
fully support all IEEE exceptions and rounding modes. However, at
present, there is only a single place where one exception might be
raised: the C version of addition raises Inexact when the result
differs from the precise value.

This affects targets which have hardware support for some formats and
rely on software for other formats; those will expose an
implementation of __fe_raise_inexact() that modifies the FPU status
register.

Removing the Inexact exception generation from the C version of FP
addition makes the implementation consistent across all operations and
formats on all targets. In addition, it makes the implementation match
the semantics of libgcc.

Signed-off-by: Keith Packard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants