CMPtype __unorddf2(DFtype a, DFtype b) { FP_DECL_D(A); FP_DECL_D(B); CMPtype r; FP_UNPACK_RAW_D(A, a); FP_UNPACK_RAW_D(B, b); FP_CMP_UNORD_D(r, A, B); return r; }
CMPtype __c6xabi_eqd(DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_D(B); CMPtype r; FP_UNPACK_RAW_D(A, a); FP_UNPACK_RAW_D(B, b); FP_CMP_EQ_D(r, A, B, 1); FP_HANDLE_EXCEPTIONS; return !r; }
CMPtype __c6xabi_ged(DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_D(B); CMPtype r; FP_UNPACK_RAW_D(A, a); FP_UNPACK_RAW_D(B, b); FP_CMP_D(r, A, B, -2, 2); FP_HANDLE_EXCEPTIONS; return r >= 0; }
CMPtype __c6xabi_ltd(DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_D(B); CMPtype r; FP_UNPACK_RAW_D(A, a); FP_UNPACK_RAW_D(B, b); FP_CMP_D(r, A, B, 2); if (r == 2 && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B))) FP_SET_EXCEPTION(FP_EX_INVALID); FP_HANDLE_EXCEPTIONS; return r < 0; }
int __gedf2(double a, double b) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_D(B); int r; FP_UNPACK_RAW_D(A, a); FP_UNPACK_RAW_D(B, b); FP_CMP_D(r, A, B, -2); if (r == -2 && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B))) FP_SET_EXCEPTION(FP_EX_INVALID); FP_HANDLE_EXCEPTIONS; return r; }
int __eqdf2(DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_D(B); int r; FP_UNPACK_RAW_D(A, a); FP_UNPACK_RAW_D(B, b); FP_CMP_EQ_D(r, A, B); if (r && (FP_ISSIGNAN_D(A) || FP_ISSIGNAN_D(B))) FP_SET_EXCEPTION(FP_EX_INVALID); FP_HANDLE_EXCEPTIONS; return r; }
CMPtype __gedf2 (DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D (A); FP_DECL_D (B); CMPtype r; FP_INIT_EXCEPTIONS; FP_UNPACK_RAW_D (A, a); FP_UNPACK_RAW_D (B, b); FP_CMP_D (r, A, B, -2, 2); FP_HANDLE_EXCEPTIONS; return r; }
CMPtype __gedf2 (DFtype a, DFtype b) { FP_DECL_EX; FP_DECL_D (A); FP_DECL_D (B); CMPtype r; FP_INIT_EXCEPTIONS; FP_UNPACK_RAW_D (A, a); FP_UNPACK_RAW_D (B, b); FP_CMP_D (r, A, B, -2); if (r == -2) FP_SET_EXCEPTION (FP_EX_INVALID); FP_HANDLE_EXCEPTIONS; return r; }
UDItype __fixunsdfdi(DFtype a) { FP_DECL_EX; FP_DECL_D(A); UDItype r; FP_UNPACK_RAW_D(A, a); FP_TO_INT_D(r, A, DI_BITS, 0); FP_HANDLE_EXCEPTIONS; return r; }
SItype __fixdfsi(DFtype a) { FP_DECL_EX; FP_DECL_D(A); USItype r; FP_UNPACK_RAW_D(A, a); FP_TO_INT_D(r, A, SI_BITS, 1); FP_HANDLE_EXCEPTIONS; return r; }
DFtype __negdf2 (DFtype a) { FP_DECL_D (A); FP_DECL_D (R); DFtype r; FP_UNPACK_RAW_D (A, a); FP_NEG_D (R, A); FP_PACK_RAW_D (r, R); return r; }
long double _q_dtoq(const double a) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_Q(C); long double c; FP_INIT_ROUNDMODE; FP_UNPACK_RAW_D(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q FP_EXTEND(Q,D,4,2,C,A); #else FP_EXTEND(Q,D,2,1,C,A); #endif FP_PACK_RAW_Q(c, C); FP_HANDLE_EXCEPTIONS; return c; }
TFtype __extenddftf2(DFtype a) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_Q(R); TFtype r; FP_INIT_ROUNDMODE; FP_UNPACK_RAW_D(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q FP_EXTEND(Q,D,4,2,R,A); #else FP_EXTEND(Q,D,2,1,R,A); #endif FP_PACK_RAW_Q(r, R); FP_HANDLE_EXCEPTIONS; return r; }
void _Qp_dtoq(long double *c, const double a) { FP_DECL_EX; FP_DECL_D(A); FP_DECL_Q(C); FP_INIT_ROUNDMODE; FP_UNPACK_RAW_D(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q FP_EXTEND(Q,D,4,2,C,A); #else FP_EXTEND(Q,D,2,1,C,A); #endif FP_PACK_RAW_QP(c, C); QP_HANDLE_EXCEPTIONS(__asm ( " fdtoq %1, %%f60\n" " std %%f60, [%0]\n" " std %%f62, [%0+8]\n" " " : : "r" (c), "e" (a) : QP_CLOBBER)); }
TFtype __extenddftf2 (DFtype a) { FP_DECL_EX; FP_DECL_D (A); FP_DECL_Q (R); TFtype r; FP_INIT_EXCEPTIONS; FP_UNPACK_RAW_D (A, a); #if _FP_W_TYPE_SIZE < 64 FP_EXTEND (Q, D, 4, 2, R, A); #else FP_EXTEND (Q, D, 2, 1, R, A); #endif FP_PACK_RAW_Q (r, R); FP_HANDLE_EXCEPTIONS; return r; }