sparc: Fix llrint and llround missing exceptions on SPARC V8
commita8f7c7797063d465c5b04b4e7c18d6f9d33007cb
authorDaniel Cederman <cederman@gaisler.com>
Tue, 16 Jan 2024 08:31:40 +0000 (16 09:31 +0100)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 18 Jan 2024 11:27:44 +0000 (18 08:27 -0300)
treef098378b14932607e5d9deb90d558747bab843ef
parent7bd06985c0a143cdcba2762bfe020e53514a53de
sparc: Fix llrint and llround missing exceptions on SPARC V8

Conversions from a float to a long long on SPARC v8 uses a libgcc function
that may not raise the correct exceptions on overflow. It also may raise
spurious "inexact" exceptions on non overflow cases. This patch fixes the
problem in the same way as for RV32.

Signed-off-by: Daniel Cederman <cederman@gaisler.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/sparc/sparc32/fpu/fix-fp-int-convert-overflow.h [new file with mode: 0644]