From: Joseph Myers Date: Thu, 10 Oct 2013 11:40:25 +0000 (+0000) Subject: soft-fp: split FP_INIT_EXCEPTIONS from FP_INIT_ROUNDMODE. X-Git-Tag: upstream/2.20~1544 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dcc2dd3f46e6cd532527ed041103633f99efb611;p=platform%2Fupstream%2Flinaro-glibc.git soft-fp: split FP_INIT_EXCEPTIONS from FP_INIT_ROUNDMODE. --- diff --git a/ChangeLog b/ChangeLog index 7367bab..521f675 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2013-10-10 Joseph Myers + * soft-fp/soft-fp.h (FP_INIT_EXCEPTIONS): New macro. + * soft-fp/extenddftf2.c (__extenddftf2): Use FP_INIT_EXCEPTIONS + instead of FP_INIT_ROUNDMODE. + * soft-fp/extendsfdf2.c (__extendsfdf2): Likewise. + * soft-fp/extendsftf2.c (__extendsftf2): Likewise. + [BZ #16034] * soft-fp/op-common.h (_FP_NEG): Document input as raw. Do not copy class of input value. diff --git a/soft-fp/extenddftf2.c b/soft-fp/extenddftf2.c index ff76a8c..fd4f9dd 100644 --- a/soft-fp/extenddftf2.c +++ b/soft-fp/extenddftf2.c @@ -39,7 +39,7 @@ TFtype __extenddftf2(DFtype a) FP_DECL_Q(R); TFtype r; - FP_INIT_ROUNDMODE; + FP_INIT_EXCEPTIONS; FP_UNPACK_RAW_D(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q FP_EXTEND(Q,D,4,2,R,A); diff --git a/soft-fp/extendsfdf2.c b/soft-fp/extendsfdf2.c index 7fc4046..614da79 100644 --- a/soft-fp/extendsfdf2.c +++ b/soft-fp/extendsfdf2.c @@ -39,7 +39,7 @@ DFtype __extendsfdf2(SFtype a) FP_DECL_D(R); DFtype r; - FP_INIT_ROUNDMODE; + FP_INIT_EXCEPTIONS; FP_UNPACK_RAW_S(A, a); #if _FP_W_TYPE_SIZE < _FP_FRACBITS_D FP_EXTEND(D,S,2,1,R,A); diff --git a/soft-fp/extendsftf2.c b/soft-fp/extendsftf2.c index 8271a88..b1ab593 100644 --- a/soft-fp/extendsftf2.c +++ b/soft-fp/extendsftf2.c @@ -39,7 +39,7 @@ TFtype __extendsftf2(SFtype a) FP_DECL_Q(R); TFtype r; - FP_INIT_ROUNDMODE; + FP_INIT_EXCEPTIONS; FP_UNPACK_RAW_S(A, a); #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q FP_EXTEND(Q,S,4,1,R,A); diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h index b1c6e61..8a22a11 100644 --- a/soft-fp/soft-fp.h +++ b/soft-fp/soft-fp.h @@ -101,10 +101,18 @@ #define FP_DECL_EX int _fex = 0 #endif +/* Initialize any machine-specific state used in FP_ROUNDMODE, + FP_TRAPPING_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. */ #ifndef FP_INIT_ROUNDMODE #define FP_INIT_ROUNDMODE do {} while (0) #endif +/* Initialize any machine-specific state used in + FP_HANDLE_EXCEPTIONS. */ +#ifndef FP_INIT_EXCEPTIONS +#define FP_INIT_EXCEPTIONS FP_INIT_ROUNDMODE +#endif + #ifndef FP_HANDLE_EXCEPTIONS #define FP_HANDLE_EXCEPTIONS do {} while (0) #endif