diff options
Diffstat (limited to 'gcc/builtins.def')
-rw-r--r-- | gcc/builtins.def | 102 |
1 files changed, 89 insertions, 13 deletions
diff --git a/gcc/builtins.def b/gcc/builtins.def index c214128..4429745 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -112,9 +112,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Like DEF_LIB_BUILTIN, except that the function is only a part of the standard in C99 or above. */ #undef DEF_C99_BUILTIN -#define DEF_C99_BUILTIN(ENUM, NAME, TYPE) \ +#define DEF_C99_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - true, true, !flag_isoc99, ATTR_NOTHROW_LIST) + true, true, !flag_isoc99, ATTRS) /* Like DEF_LIB_BUILTIN, except that the function is expanded in the front-end. */ @@ -169,39 +169,115 @@ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSL, "__builtin_fabsl", BT_FN_LONG_DOUBLE_LONG_DOUBLE) +DEF_LIB_BUILTIN(BUILT_IN_FLOOR, + "__builtin_floor", + BT_FN_DOUBLE_DOUBLE, + ATTR_CONST_NOTHROW_LIST) +DEF_LIB_BUILTIN(BUILT_IN_FLOORF, + "__builtin_floorf", + BT_FN_FLOAT_FLOAT, + ATTR_CONST_NOTHROW_LIST) +DEF_LIB_BUILTIN(BUILT_IN_FLOORL, + "__builtin_floorl", + BT_FN_LONG_DOUBLE_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) + +DEF_LIB_BUILTIN(BUILT_IN_CEIL, + "__builtin_ceil", + BT_FN_DOUBLE_DOUBLE, + ATTR_CONST_NOTHROW_LIST) +DEF_LIB_BUILTIN(BUILT_IN_CEILF, + "__builtin_ceilf", + BT_FN_FLOAT_FLOAT, + ATTR_CONST_NOTHROW_LIST) +DEF_LIB_BUILTIN(BUILT_IN_CEILL, + "__builtin_ceill", + BT_FN_LONG_DOUBLE_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) + +DEF_C99_BUILTIN(BUILT_IN_ROUND, + "__builtin_round", + BT_FN_DOUBLE_DOUBLE, + ATTR_CONST_NOTHROW_LIST) +DEF_C99_BUILTIN(BUILT_IN_ROUNDF, + "__builtin_roundf", + BT_FN_FLOAT_FLOAT, + ATTR_CONST_NOTHROW_LIST) +DEF_C99_BUILTIN(BUILT_IN_ROUNDL, + "__builtin_roundl", + BT_FN_LONG_DOUBLE_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) + +DEF_C99_BUILTIN(BUILT_IN_TRUNC, + "__builtin_trunc", + BT_FN_DOUBLE_DOUBLE, + ATTR_CONST_NOTHROW_LIST) +DEF_C99_BUILTIN(BUILT_IN_TRUNCF, + "__builtin_truncf", + BT_FN_FLOAT_FLOAT, + ATTR_CONST_NOTHROW_LIST) +DEF_C99_BUILTIN(BUILT_IN_TRUNCL, + "__builtin_truncl", + BT_FN_LONG_DOUBLE_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) + +DEF_C99_BUILTIN(BUILT_IN_NEARBYINT, + "__builtin_nearbyint", + BT_FN_DOUBLE_DOUBLE, + ATTR_CONST_NOTHROW_LIST) +DEF_C99_BUILTIN(BUILT_IN_NEARBYINTF, + "__builtin_nearbyintf", + BT_FN_FLOAT_FLOAT, + ATTR_CONST_NOTHROW_LIST) +DEF_C99_BUILTIN(BUILT_IN_NEARBYINTL, + "__builtin_nearbyintl", + BT_FN_LONG_DOUBLE_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) + DEF_C99_BUILTIN(BUILT_IN_LLABS, "__builtin_llabs", - BT_FN_LONGLONG_LONGLONG) + BT_FN_LONGLONG_LONGLONG, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_IMAXABS, "__builtin_imaxabs", - BT_FN_INTMAX_INTMAX) + BT_FN_INTMAX_INTMAX, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CONJ, "__builtin_conj", - BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE) + BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CONJF, "__builtin_conjf", - BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT) + BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CONJL, "__builtin_conjl", - BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE) + BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREAL, "__builtin_creal", - BT_FN_DOUBLE_COMPLEX_DOUBLE) + BT_FN_DOUBLE_COMPLEX_DOUBLE, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREALF, "__builtin_crealf", - BT_FN_FLOAT_COMPLEX_FLOAT) + BT_FN_FLOAT_COMPLEX_FLOAT, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CREALL, "__builtin_creall", - BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE) + BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAG, "__builtin_cimag", - BT_FN_DOUBLE_COMPLEX_DOUBLE) + BT_FN_DOUBLE_COMPLEX_DOUBLE, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAGF, "__builtin_cimagf", - BT_FN_FLOAT_COMPLEX_FLOAT) + BT_FN_FLOAT_COMPLEX_FLOAT, + ATTR_CONST_NOTHROW_LIST) DEF_C99_BUILTIN(BUILT_IN_CIMAGL, "__builtin_cimagl", - BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE) + BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) DEF_UNUSED_BUILTIN(BUILT_IN_DIV) DEF_UNUSED_BUILTIN(BUILT_IN_LDIV) |