From c6cfa2bfa09ac95dd01fa7927fa80274f9583823 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Thu, 28 Dec 2017 21:19:12 +0000 Subject: builtins.def: (_Float and _FloatX BUILT_IN_CEIL): Add _Float and _FloatX variants... [gcc] 2017-12-28 Michael Meissner * builtins.def: (_Float and _FloatX BUILT_IN_CEIL): Add _Float and _FloatX variants for rounding built-in functions. (_Float and _FloatX BUILT_IN_FLOOR): Likewise. (_Float and _FloatX BUILT_IN_NEARBYINT): Likewise. (_Float and _FloatX BUILT_IN_RINT): Likewise. (_Float and _FloatX BUILT_IN_ROUND): Likewise. (_Float and _FloatX BUILT_IN_TRUNC): Likewise. * builtins.c (mathfn_built_in_2): Likewise. * internal-fn.def (CEIL): Likewise. (FLOOR): Likewise. (NEARBYINT): Likewise. (RINT): Likewise. (ROUND): Likewise. (TRUNC): Likewise. * convert.c (convert_to_integer_1): Likewise. * fold-const.c (tree_call_nonnegative_warnv_p): Likewise. (integer_valued_real_call_p): Likewise. * fold-const-call.c (fold_const_call_ss): Likewise. * gencfn-macros.c (print_case_cfn): Change CFN and operator printers to take a const char * suffix instead of a bool. (print_define_operator_list): Likewise. (fltall_suffixes): New list of suffixes, that include the traditional suffixes as well as all of the _Float and _FloatX suffixes. (main): For _Float and _FloatX functions, emit both _FN and _ALL variants. The _FN variant only has the _Float and _FloatX case names or operators. The _ALL variant has both the traditional and the _Float/_FloatX case names or operators. * match.pd (COPYSIGN optimizations): Provide optimizations for _Float and _FloatX types where possible. (MIN/MAX optimizations): Likewise. (sqrt optimizations): Likewise. (rounding optimizations): Likewise. [gcc/c] 2017-12-28 Michael Meissner * c-decl.c (header_for_builtin_fn): Add integer rounding _Float and _FloatX built-in functions. From-SVN: r256026 --- gcc/c/ChangeLog | 5 +++++ gcc/c/c-decl.c | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'gcc/c') diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 504205d..f76110a 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2017-12-28 Michael Meissner + + * c-decl.c (header_for_builtin_fn): Add integer rounding _Float + and _FloatX built-in functions. + 2017-12-22 Jakub Jelinek PR debug/83550 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 846098e..d3294c3 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -3168,6 +3168,7 @@ header_for_builtin_fn (enum built_in_function fcode) CASE_FLT_FN (BUILT_IN_ATAN2): CASE_FLT_FN (BUILT_IN_CBRT): CASE_FLT_FN (BUILT_IN_CEIL): + CASE_FLT_FN_FLOATN_NX (BUILT_IN_CEIL): CASE_FLT_FN (BUILT_IN_COPYSIGN): CASE_FLT_FN_FLOATN_NX (BUILT_IN_COPYSIGN): CASE_FLT_FN (BUILT_IN_COS): @@ -3181,6 +3182,7 @@ header_for_builtin_fn (enum built_in_function fcode) CASE_FLT_FN_FLOATN_NX (BUILT_IN_FABS): CASE_FLT_FN (BUILT_IN_FDIM): CASE_FLT_FN (BUILT_IN_FLOOR): + CASE_FLT_FN_FLOATN_NX (BUILT_IN_FLOOR): CASE_FLT_FN (BUILT_IN_FMA): CASE_FLT_FN_FLOATN_NX (BUILT_IN_FMA): CASE_FLT_FN (BUILT_IN_FMAX): @@ -3205,13 +3207,16 @@ header_for_builtin_fn (enum built_in_function fcode) CASE_FLT_FN (BUILT_IN_MODF): CASE_FLT_FN (BUILT_IN_NAN): CASE_FLT_FN (BUILT_IN_NEARBYINT): + CASE_FLT_FN_FLOATN_NX (BUILT_IN_NEARBYINT): CASE_FLT_FN (BUILT_IN_NEXTAFTER): CASE_FLT_FN (BUILT_IN_NEXTTOWARD): CASE_FLT_FN (BUILT_IN_POW): CASE_FLT_FN (BUILT_IN_REMAINDER): CASE_FLT_FN (BUILT_IN_REMQUO): CASE_FLT_FN (BUILT_IN_RINT): + CASE_FLT_FN_FLOATN_NX (BUILT_IN_RINT): CASE_FLT_FN (BUILT_IN_ROUND): + CASE_FLT_FN_FLOATN_NX (BUILT_IN_ROUND): CASE_FLT_FN (BUILT_IN_SCALBLN): CASE_FLT_FN (BUILT_IN_SCALBN): CASE_FLT_FN (BUILT_IN_SIN): @@ -3223,6 +3228,7 @@ header_for_builtin_fn (enum built_in_function fcode) CASE_FLT_FN (BUILT_IN_TANH): CASE_FLT_FN (BUILT_IN_TGAMMA): CASE_FLT_FN (BUILT_IN_TRUNC): + CASE_FLT_FN_FLOATN_NX (BUILT_IN_TRUNC): case BUILT_IN_ISINF: case BUILT_IN_ISNAN: return ""; -- cgit v1.1