1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

soft-fp: make __unord* raise "invalid" for signaling NaNs (bug 16036).

This commit is contained in:
Joseph Myers
2013-10-12 12:23:28 +00:00
parent 8a50944770
commit b7ea74f074
5 changed files with 22 additions and 1 deletions

View File

@@ -32,13 +32,18 @@
CMPtype __unordsf2(SFtype a, SFtype b)
{
FP_DECL_EX;
FP_DECL_S(A);
FP_DECL_S(B);
CMPtype r;
FP_INIT_EXCEPTIONS;
FP_UNPACK_RAW_S(A, a);
FP_UNPACK_RAW_S(B, b);
FP_CMP_UNORD_S(r, A, B);
if (r && (FP_ISSIGNAN_S(A) || FP_ISSIGNAN_S(B)))
FP_SET_EXCEPTION(FP_EX_INVALID);
FP_HANDLE_EXCEPTIONS;
return r;
}