diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/alpha/soft-fp/ots_cmpe.c | 9 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/q_cmp.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/q_cmpe.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/q_feq.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/q_fge.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/q_fgt.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/q_fle.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/q_flt.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/q_fne.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/qp_cmp.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/qp_feq.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/qp_fge.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/qp_fgt.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/qp_fle.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/qp_flt.c | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/qp_fne.c | 4 |
17 files changed, 18 insertions, 55 deletions
diff --git a/sysdeps/alpha/soft-fp/ots_cmpe.c b/sysdeps/alpha/soft-fp/ots_cmpe.c index adeda848f4..41586eee26 100644 --- a/sysdeps/alpha/soft-fp/ots_cmpe.c +++ b/sysdeps/alpha/soft-fp/ots_cmpe.c @@ -29,14 +29,9 @@ internal_compare (long al, long ah, long bl, long bh) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_Q (r, A, B, 2); + FP_CMP_Q (r, A, B, 2, 2); - /* Relative comparisons signal invalid operation if either operand is NaN. */ - if (r == 2) - { - FP_SET_EXCEPTION(FP_EX_INVALID); - FP_HANDLE_EXCEPTIONS; - } + FP_HANDLE_EXCEPTIONS; return r; } diff --git a/sysdeps/sparc/sparc32/soft-fp/q_cmp.c b/sysdeps/sparc/sparc32/soft-fp/q_cmp.c index 837b3dd091..acc1d1d1b1 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_cmp.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_cmp.c @@ -30,10 +30,8 @@ int _Q_cmp(const long double a, const long double b) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_Q(r, B, A, 3); + FP_CMP_Q(r, B, A, 3, 1); if (r == -1) r = 2; - if (r == 3 && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) - FP_SET_EXCEPTION(FP_EX_INVALID); FP_HANDLE_EXCEPTIONS; return r; diff --git a/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c b/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c index d4ac7bd67c..a5d46705b3 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c @@ -31,10 +31,8 @@ int _Q_cmpe(const long double a, const long double b) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_Q(r, B, A, 3); + FP_CMP_Q(r, B, A, 3, 2); if (r == -1) r = 2; - if (r == 3) - FP_SET_EXCEPTION(FP_EX_INVALID); FP_HANDLE_EXCEPTIONS; return r; diff --git a/sysdeps/sparc/sparc32/soft-fp/q_feq.c b/sysdeps/sparc/sparc32/soft-fp/q_feq.c index 61a8ff1b18..cb7db6dcaa 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_feq.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_feq.c @@ -30,9 +30,7 @@ int _Q_feq(const long double a, const long double b) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_EQ_Q(r, A, B); - if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_EQ_Q(r, A, B, 1); FP_HANDLE_EXCEPTIONS; return !r; diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fge.c b/sysdeps/sparc/sparc32/soft-fp/q_fge.c index 7fca34926a..cca1003dfb 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_fge.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_fge.c @@ -30,9 +30,7 @@ int _Q_fge(const long double a, const long double b) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_Q(r, B, A, 3); - if (r == 3) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_Q(r, B, A, 3, 2); FP_HANDLE_EXCEPTIONS; return (r <= 0); diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fgt.c b/sysdeps/sparc/sparc32/soft-fp/q_fgt.c index f5b2acf4c4..00f837d02e 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_fgt.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_fgt.c @@ -30,9 +30,7 @@ int _Q_fgt(const long double a, const long double b) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_Q(r, B, A, 3); - if (r == 3) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_Q(r, B, A, 3, 2); FP_HANDLE_EXCEPTIONS; return (r == -1); diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fle.c b/sysdeps/sparc/sparc32/soft-fp/q_fle.c index c108fb9e3f..b44f4484d8 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_fle.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_fle.c @@ -30,9 +30,7 @@ int _Q_fle(const long double a, const long double b) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_Q(r, B, A, -2); - if (r == -2) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_Q(r, B, A, -2, 2); FP_HANDLE_EXCEPTIONS; return (r >= 0); diff --git a/sysdeps/sparc/sparc32/soft-fp/q_flt.c b/sysdeps/sparc/sparc32/soft-fp/q_flt.c index 56d140e6e9..caa188d72c 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_flt.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_flt.c @@ -30,9 +30,7 @@ int _Q_flt(const long double a, const long double b) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_Q(r, B, A, 3); - if (r == 3) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_Q(r, B, A, 3, 2); FP_HANDLE_EXCEPTIONS; return (r == 1); diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fne.c b/sysdeps/sparc/sparc32/soft-fp/q_fne.c index 78c2d6f971..e22f6c987a 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_fne.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_fne.c @@ -30,9 +30,7 @@ int _Q_fne(const long double a, const long double b) FP_UNPACK_RAW_Q(A, a); FP_UNPACK_RAW_Q(B, b); - FP_CMP_EQ_Q(r, A, B); - if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_EQ_Q(r, A, B, 1); FP_HANDLE_EXCEPTIONS; return r; diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_cmp.c b/sysdeps/sparc/sparc64/soft-fp/qp_cmp.c index 1929a082c2..dadb36909d 100644 --- a/sysdeps/sparc/sparc64/soft-fp/qp_cmp.c +++ b/sysdeps/sparc/sparc64/soft-fp/qp_cmp.c @@ -31,10 +31,8 @@ int _Qp_cmp(const long double *a, const long double *b) FP_INIT_ROUNDMODE; FP_UNPACK_RAW_QP(A, a); FP_UNPACK_RAW_QP(B, b); - FP_CMP_Q(r, B, A, 3); + FP_CMP_Q(r, B, A, 3, 1); if (r == -1) r = 2; - if (r == 3 && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) - FP_SET_EXCEPTION(FP_EX_INVALID); QP_HANDLE_EXCEPTIONS( __asm ( " ldd [%0], %%f52\n" diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c b/sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c index ee25b5e8b1..c56d623947 100644 --- a/sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c +++ b/sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c @@ -32,10 +32,8 @@ int _Qp_cmpe(const long double *a, const long double *b) FP_INIT_ROUNDMODE; FP_UNPACK_RAW_QP(A, a); FP_UNPACK_RAW_QP(B, b); - FP_CMP_Q(r, B, A, 3); + FP_CMP_Q(r, B, A, 3, 2); if (r == -1) r = 2; - if (r == 3) - FP_SET_EXCEPTION(FP_EX_INVALID); QP_HANDLE_EXCEPTIONS( __asm ( " ldd [%0], %%f52\n" diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_feq.c b/sysdeps/sparc/sparc64/soft-fp/qp_feq.c index 36eef5aa8a..67b6b877f0 100644 --- a/sysdeps/sparc/sparc64/soft-fp/qp_feq.c +++ b/sysdeps/sparc/sparc64/soft-fp/qp_feq.c @@ -31,9 +31,7 @@ int _Qp_feq(const long double *a, const long double *b) FP_INIT_ROUNDMODE; FP_UNPACK_RAW_QP(A, a); FP_UNPACK_RAW_QP(B, b); - FP_CMP_EQ_Q(r, A, B); - if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_EQ_Q(r, A, B, 1); QP_HANDLE_EXCEPTIONS( __asm ( diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_fge.c b/sysdeps/sparc/sparc64/soft-fp/qp_fge.c index 3f0c16b416..690a741d1b 100644 --- a/sysdeps/sparc/sparc64/soft-fp/qp_fge.c +++ b/sysdeps/sparc/sparc64/soft-fp/qp_fge.c @@ -31,9 +31,7 @@ int _Qp_fge(const long double *a, const long double *b) FP_INIT_ROUNDMODE; FP_UNPACK_RAW_QP(A, a); FP_UNPACK_RAW_QP(B, b); - FP_CMP_Q(r, B, A, 3); - if (r == 3) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_Q(r, B, A, 3, 2); QP_HANDLE_EXCEPTIONS( __asm ( diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_fgt.c b/sysdeps/sparc/sparc64/soft-fp/qp_fgt.c index 2b915be37d..423bd5a922 100644 --- a/sysdeps/sparc/sparc64/soft-fp/qp_fgt.c +++ b/sysdeps/sparc/sparc64/soft-fp/qp_fgt.c @@ -31,9 +31,7 @@ int _Qp_fgt(const long double *a, const long double *b) FP_INIT_ROUNDMODE; FP_UNPACK_RAW_QP(A, a); FP_UNPACK_RAW_QP(B, b); - FP_CMP_Q(r, B, A, 3); - if (r == 3) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_Q(r, B, A, 3, 2); QP_HANDLE_EXCEPTIONS( __asm ( diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_fle.c b/sysdeps/sparc/sparc64/soft-fp/qp_fle.c index 74f80f4131..f9151524f9 100644 --- a/sysdeps/sparc/sparc64/soft-fp/qp_fle.c +++ b/sysdeps/sparc/sparc64/soft-fp/qp_fle.c @@ -31,9 +31,7 @@ int _Qp_fle(const long double *a, const long double *b) FP_INIT_ROUNDMODE; FP_UNPACK_RAW_QP(A, a); FP_UNPACK_RAW_QP(B, b); - FP_CMP_Q(r, B, A, -2); - if (r == -2) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_Q(r, B, A, -2, 2); QP_HANDLE_EXCEPTIONS( __asm ( diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_flt.c b/sysdeps/sparc/sparc64/soft-fp/qp_flt.c index a4c8e05a0a..c03cd72516 100644 --- a/sysdeps/sparc/sparc64/soft-fp/qp_flt.c +++ b/sysdeps/sparc/sparc64/soft-fp/qp_flt.c @@ -31,9 +31,7 @@ int _Qp_flt(const long double *a, const long double *b) FP_INIT_ROUNDMODE; FP_UNPACK_RAW_QP(A, a); FP_UNPACK_RAW_QP(B, b); - FP_CMP_Q(r, B, A, 3); - if (r == 3) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_Q(r, B, A, 3, 2); QP_HANDLE_EXCEPTIONS( __asm ( diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_fne.c b/sysdeps/sparc/sparc64/soft-fp/qp_fne.c index 828c394f29..948077c425 100644 --- a/sysdeps/sparc/sparc64/soft-fp/qp_fne.c +++ b/sysdeps/sparc/sparc64/soft-fp/qp_fne.c @@ -31,9 +31,7 @@ int _Qp_fne(const long double *a, const long double *b) FP_INIT_ROUNDMODE; FP_UNPACK_RAW_QP(A, a); FP_UNPACK_RAW_QP(B, b); - FP_CMP_EQ_Q(r, A, B); - if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) - FP_SET_EXCEPTION(FP_EX_INVALID); + FP_CMP_EQ_Q(r, A, B, 1); QP_HANDLE_EXCEPTIONS( __asm ( |