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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user