GCC Middle and Back End API Reference
gencfn-macros.cc File Reference
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
#include "hash-table.h"
#include "hash-set.h"
#include "errors.h"
#include "builtins.def"
#include "internal-fn.def"
Include dependency graph for gencfn-macros.cc:

Macros

#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND)
 
#define DEF_GCC_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_SYNC_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_GCC_FLOATN_NX_BUILTINS(ENUM, NAME, TYPE_MACRO, ATTRS)
 
#define DEF_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_FLOATN_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_EXT_LIB_FLOATN_NX_BUILTINS(ENUM, NAME, TYPE_MACRO, ATTRS)
 
#define DEF_C94_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_C99_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_C11_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_C23_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_C2Y_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_C99_COMPL_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_C99_C90RES_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_EXT_C99RES_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_BUILTIN_STUB(ENUM, NAME)
 
#define DEF_COROUTINE_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_GOACC_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_GOACC_BUILTIN_COMPILER(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_GOACC_BUILTIN_ONLY(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_GOMP_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_GOMP_BUILTIN_COMPILER(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_TM_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define DEF_SANITIZER_BUILTIN(ENUM, NAME, TYPE, ATTRS)
 
#define ATTR_MATHFN_ERRNO
 
#define ATTR_MATHFN_FPROUNDING
 
#define ATTR_MATHFN_FPROUNDING_ERRNO
 
#define ATTR_MATHFN_FPROUNDING_STORE   ATTR_NOTHROW_LEAF_LIST
 
#define ATTR_NOTHROWCALL_LEAF_LIST
 
#define ACOSH_TYPE(F)
 
#define ATAN2_TYPE(F)
 
#define ATANH_TYPE(F)
 
#define CEIL_TYPE(F)
 
#define COPYSIGN_TYPE(F)
 
#define COSH_TYPE(F)
 
#define FABS_TYPE(F)
 
#define FDIM_TYPE(F)
 
#define FLOOR_TYPE(F)
 
#define FMA_TYPE(F)
 
#define FMAX_TYPE(F)
 
#define FMIN_TYPE(F)
 
#define FREXP_TYPE(F)
 
#define HUGE_VAL_TYPE(F)
 
#define HYPOT_TYPE(F)
 
#define ILOGB_TYPE(F)
 
#define INF_TYPE(F)
 
#define LDEXP_TYPE(F)
 
#define LGAMMA_TYPE(F)
 
#define LLRINT_TYPE(F)
 
#define LOG10_TYPE(F)
 
#define LRINT_TYPE(F)
 
#define MODF_TYPE(F)
 
#define NAN_TYPE(F)
 
#define NEARBYINT_TYPE(F)
 
#define NEXTAFTER_TYPE(F)
 
#define REMQUO_TYPE(F)
 
#define RINT_TYPE(F)
 
#define ROUND_TYPE(F)
 
#define ROUNDEVEN_TYPE(F)
 
#define SCALBLN_TYPE(F)
 
#define SCALBN_TYPE(F)
 
#define SINH_TYPE(F)
 
#define SQRT_TYPE(F)
 
#define TRUNC_TYPE(F)
 
#define CABS_TYPE(F)
 
#define CACOSH_TYPE(F)
 
#define CARG_TYPE(F)
 
#define CASINH_TYPE(F)
 
#define CPOW_TYPE(F)
 
#define CPROJ_TYPE(F)
 
#define DEF_INTERNAL_FLT_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC)
 
#define DEF_INTERNAL_OPTAB_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_SIGNED_OPTAB_FN(NAME, FLAGS, SELECTOR, SIGNED_OPTAB, UNSIGNED_OPTAB, TYPE)
 
#define DEF_INTERNAL_FLT_FLOATN_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_INT_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_INT_EXT_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_WIDENING_OPTAB_FN(NAME, FLAGS, SELECTOR, SOPTAB, UOPTAB, TYPE)
 
#define DEF_INTERNAL_COND_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_SIGNED_COND_FN(NAME, FLAGS, SELECTOR, SIGNED_OPTAB, UNSIGNED_OPTAB, TYPE)
 
#define DEF_INTERNAL_INT_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC)
 
#define DEF_INTERNAL_OPTAB_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_SIGNED_OPTAB_FN(NAME, FLAGS, SELECTOR, SIGNED_OPTAB, UNSIGNED_OPTAB, TYPE)
 
#define DEF_INTERNAL_FLT_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_FLT_FLOATN_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_INT_EXT_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_WIDENING_OPTAB_FN(NAME, FLAGS, SELECTOR, SOPTAB, UOPTAB, TYPE)
 
#define DEF_INTERNAL_COND_FN(NAME, FLAGS, OPTAB, TYPE)
 
#define DEF_INTERNAL_SIGNED_COND_FN(NAME, FLAGS, SELECTOR, SIGNED_OPTAB, UNSIGNED_OPTAB, TYPE)
 

Typedefs

typedef hash_set< nofree_string_hashstring_set
 

Functions

static void add_to_set (string_set *set, const char *const *names)
 
static bool is_group (string_set *builtins, const char *name, const char *const *suffixes)
 
static void print_case_cfn (const char *name, bool internal_p, const char *const *suffixes, const char *floatn)
 
static void print_define_operator_list (const char *name, bool internal_p, const char *const *suffixes, const char *floatn)
 
int main (int argc, char **argv)
 

Variables

const char *const builtin_names []
 
const char *const internal_fn_flt_names []
 
const char *const internal_fn_int_names []
 
static const char *const flt_suffixes [] = { "F", "", "L", NULL }
 
static const char *const fltfn_suffixes []
 
static const char *const fltall_suffixes []
 
static const char *const int_suffixes [] = { "", "L", "LL", "IMAX", NULL }
 
static const char *const *const suffix_lists []
 

Macro Definition Documentation

◆ ACOSH_TYPE

#define ACOSH_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ ATAN2_TYPE

#define ATAN2_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F

◆ ATANH_TYPE

#define ATANH_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ ATTR_MATHFN_ERRNO

#define ATTR_MATHFN_ERRNO
Value:
(flag_errno_math ? \
ATTR_ERRNOCONST_NOTHROW_LEAF_LIST : ATTR_CONST_NOTHROW_LEAF_LIST)

◆ ATTR_MATHFN_FPROUNDING

#define ATTR_MATHFN_FPROUNDING
Value:
(flag_rounding_math ? \
ATTR_PURE_NOTHROW_LEAF_LIST : ATTR_CONST_NOTHROW_LEAF_LIST)

◆ ATTR_MATHFN_FPROUNDING_ERRNO

#define ATTR_MATHFN_FPROUNDING_ERRNO
Value:
(flag_errno_math ? \
(flag_rounding_math ? ATTR_ERRNOPURE_NOTHROW_LEAF_LIST \
: ATTR_ERRNOCONST_NOTHROW_LEAF_LIST) : ATTR_MATHFN_FPROUNDING)

◆ ATTR_MATHFN_FPROUNDING_STORE

#define ATTR_MATHFN_FPROUNDING_STORE   ATTR_NOTHROW_LEAF_LIST

◆ ATTR_NOTHROWCALL_LEAF_LIST

#define ATTR_NOTHROWCALL_LEAF_LIST
Value:
(flag_non_call_exceptions ? \
ATTR_LEAF_LIST : ATTR_NOTHROW_LEAF_LIST)

◆ CABS_TYPE

#define CABS_TYPE ( F)
Value:
BT_FN_##F##_COMPLEX_##F

◆ CACOSH_TYPE

#define CACOSH_TYPE ( F)
Value:
BT_FN_COMPLEX_##F##_COMPLEX_##F

◆ CARG_TYPE

#define CARG_TYPE ( F)
Value:
BT_FN_##F##_COMPLEX_##F

◆ CASINH_TYPE

#define CASINH_TYPE ( F)
Value:
BT_FN_COMPLEX_##F##_COMPLEX_##F

◆ CEIL_TYPE

#define CEIL_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ COPYSIGN_TYPE

#define COPYSIGN_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F

◆ COSH_TYPE

#define COSH_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ CPOW_TYPE

#define CPOW_TYPE ( F)
Value:
BT_FN_COMPLEX_##F##_COMPLEX_##F##_COMPLEX_##F

◆ CPROJ_TYPE

#define CPROJ_TYPE ( F)
Value:
BT_FN_COMPLEX_##F##_COMPLEX_##F

◆ DEF_BUILTIN

#define DEF_BUILTIN ( ENUM,
N,
C,
T,
LT,
B,
F,
NA,
AT,
IM,
COND )
Value:
#ENUM,

◆ DEF_BUILTIN_STUB

#define DEF_BUILTIN_STUB ( ENUM,
NAME )
Value:
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, BT_LAST, BT_LAST, false, false, \
false, ATTR_LAST, false, false)

◆ DEF_C11_BUILTIN

#define DEF_C11_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, !flag_isoc11, ATTRS, \
targetm.libc_has_function (function_c11_misc, NULL_TREE), true)

◆ DEF_C23_BUILTIN

#define DEF_C23_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, !flag_isoc23, ATTRS, \
targetm.libc_has_function (function_c23_misc, NULL_TREE), true)

◆ DEF_C2Y_BUILTIN

#define DEF_C2Y_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, !flag_isoc2y, ATTRS, \
targetm.libc_has_function (function_c2y_misc, NULL_TREE), true)

◆ DEF_C94_BUILTIN

#define DEF_C94_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, !flag_isoc94, ATTRS, \
targetm.libc_has_function (function_c94, NULL_TREE), true)

◆ DEF_C99_BUILTIN

#define DEF_C99_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, !flag_isoc99, ATTRS, \
targetm.libc_has_function (function_c99_misc, NULL_TREE), true)

◆ DEF_C99_C90RES_BUILTIN

#define DEF_C99_C90RES_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, !flag_isoc99, ATTRS, \
targetm.libc_has_function (function_c99_misc, NULL_TREE), true)

◆ DEF_C99_COMPL_BUILTIN

#define DEF_C99_COMPL_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, !flag_isoc99, ATTRS, \
targetm.libc_has_function (function_c99_math_complex, \
NULL_TREE), \
true)

◆ DEF_COROUTINE_BUILTIN

#define DEF_COROUTINE_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_coro_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, true, ATTRS, true, flag_coroutines)

◆ DEF_EXT_C99RES_BUILTIN

#define DEF_EXT_C99RES_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, true, ATTRS, false, true)

◆ DEF_EXT_LIB_BUILTIN

#define DEF_EXT_LIB_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, true, ATTRS, false, true)

◆ DEF_EXT_LIB_FLOATN_NX_BUILTINS

#define DEF_EXT_LIB_FLOATN_NX_BUILTINS ( ENUM,
NAME,
TYPE_MACRO,
ATTRS )
Value:
DEF_FLOATN_BUILTIN (ENUM ## F16, NAME "f16", TYPE_MACRO (FLOAT16), ATTRS) \
DEF_FLOATN_BUILTIN (ENUM ## F32, NAME "f32", TYPE_MACRO (FLOAT32), ATTRS) \
DEF_FLOATN_BUILTIN (ENUM ## F64, NAME "f64", TYPE_MACRO (FLOAT64), ATTRS) \
DEF_FLOATN_BUILTIN (ENUM ## F128, NAME "f128", TYPE_MACRO (FLOAT128), ATTRS) \
DEF_FLOATN_BUILTIN (ENUM ## F32X, NAME "f32x", TYPE_MACRO (FLOAT32X), ATTRS) \
DEF_FLOATN_BUILTIN (ENUM ## F64X, NAME "f64x", TYPE_MACRO (FLOAT64X), ATTRS) \
DEF_FLOATN_BUILTIN (ENUM ## F128X, NAME "f128x", TYPE_MACRO (FLOAT128X), \
ATTRS)

◆ DEF_FLOATN_BUILTIN

#define DEF_FLOATN_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
targetm.floatn_builtin_p ((int) ENUM), true, true, ATTRS, \
false, true)

◆ DEF_GCC_BUILTIN

#define DEF_GCC_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \
false, false, false, ATTRS, true, true)

◆ DEF_GCC_FLOATN_NX_BUILTINS

#define DEF_GCC_FLOATN_NX_BUILTINS ( ENUM,
NAME,
TYPE_MACRO,
ATTRS )
Value:
DEF_GCC_BUILTIN (ENUM ## F16, NAME "f16", TYPE_MACRO (FLOAT16), ATTRS) \
DEF_GCC_BUILTIN (ENUM ## F32, NAME "f32", TYPE_MACRO (FLOAT32), ATTRS) \
DEF_GCC_BUILTIN (ENUM ## F64, NAME "f64", TYPE_MACRO (FLOAT64), ATTRS) \
DEF_GCC_BUILTIN (ENUM ## F128, NAME "f128", TYPE_MACRO (FLOAT128), ATTRS) \
DEF_GCC_BUILTIN (ENUM ## F32X, NAME "f32x", TYPE_MACRO (FLOAT32X), ATTRS) \
DEF_GCC_BUILTIN (ENUM ## F64X, NAME "f64x", TYPE_MACRO (FLOAT64X), ATTRS) \
DEF_GCC_BUILTIN (ENUM ## F128X, NAME "f128x", TYPE_MACRO (FLOAT128X), ATTRS)

◆ DEF_GOACC_BUILTIN

#define DEF_GOACC_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
false, true, true, ATTRS, false, \
flag_openacc)

◆ DEF_GOACC_BUILTIN_COMPILER

#define DEF_GOACC_BUILTIN_COMPILER ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
flag_openacc, true, true, ATTRS, false, true)

◆ DEF_GOACC_BUILTIN_ONLY

#define DEF_GOACC_BUILTIN_ONLY ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \
false, false, true, ATTRS, false, flag_openacc)

◆ DEF_GOMP_BUILTIN

#define DEF_GOMP_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
false, true, true, ATTRS, false, \
(flag_openacc \
|| flag_openmp \
|| flag_tree_parallelize_loops > 1))

◆ DEF_GOMP_BUILTIN_COMPILER

#define DEF_GOMP_BUILTIN_COMPILER ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
flag_openmp, true, true, ATTRS, false, flag_openmp)

◆ DEF_INTERNAL_COND_FN [1/2]

#define DEF_INTERNAL_COND_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_OPTAB_FN (COND_##NAME, FLAGS, cond_##OPTAB, cond_##TYPE) \
DEF_INTERNAL_OPTAB_FN (COND_LEN_##NAME, FLAGS, cond_len_##OPTAB, \
cond_len_##TYPE)

◆ DEF_INTERNAL_COND_FN [2/2]

#define DEF_INTERNAL_COND_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_OPTAB_FN (COND_##NAME, FLAGS, cond_##OPTAB, cond_##TYPE) \
DEF_INTERNAL_OPTAB_FN (COND_LEN_##NAME, FLAGS, cond_len_##OPTAB, \
cond_len_##TYPE)

◆ DEF_INTERNAL_FLT_FLOATN_FN [1/2]

#define DEF_INTERNAL_FLT_FLOATN_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_FLT_FN (NAME, FLAGS, OPTAB, TYPE)

◆ DEF_INTERNAL_FLT_FLOATN_FN [2/2]

#define DEF_INTERNAL_FLT_FLOATN_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_FLT_FN (NAME, FLAGS, OPTAB, TYPE)

◆ DEF_INTERNAL_FLT_FN [1/2]

#define DEF_INTERNAL_FLT_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
#NAME,

◆ DEF_INTERNAL_FLT_FN [2/2]

#define DEF_INTERNAL_FLT_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_OPTAB_FN (NAME, FLAGS, OPTAB, TYPE)

◆ DEF_INTERNAL_FN [1/2]

#define DEF_INTERNAL_FN ( CODE,
FLAGS,
FNSPEC )

◆ DEF_INTERNAL_FN [2/2]

#define DEF_INTERNAL_FN ( CODE,
FLAGS,
FNSPEC )

◆ DEF_INTERNAL_INT_EXT_FN [1/2]

#define DEF_INTERNAL_INT_EXT_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_INT_FN (NAME, FLAGS, OPTAB, TYPE)

◆ DEF_INTERNAL_INT_EXT_FN [2/2]

#define DEF_INTERNAL_INT_EXT_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_INT_FN (NAME, FLAGS, OPTAB, TYPE)

◆ DEF_INTERNAL_INT_FN [1/2]

#define DEF_INTERNAL_INT_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
#NAME,

◆ DEF_INTERNAL_INT_FN [2/2]

#define DEF_INTERNAL_INT_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_OPTAB_FN (NAME, FLAGS, OPTAB, TYPE)

◆ DEF_INTERNAL_OPTAB_FN [1/2]

#define DEF_INTERNAL_OPTAB_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_FN (NAME, FLAGS | ECF_LEAF, NULL)

◆ DEF_INTERNAL_OPTAB_FN [2/2]

#define DEF_INTERNAL_OPTAB_FN ( NAME,
FLAGS,
OPTAB,
TYPE )
Value:
DEF_INTERNAL_FN (NAME, FLAGS | ECF_LEAF, NULL)

◆ DEF_INTERNAL_SIGNED_COND_FN [1/2]

#define DEF_INTERNAL_SIGNED_COND_FN ( NAME,
FLAGS,
SELECTOR,
SIGNED_OPTAB,
UNSIGNED_OPTAB,
TYPE )
Value:
DEF_INTERNAL_SIGNED_OPTAB_FN (COND_##NAME, FLAGS, SELECTOR, \
cond_##SIGNED_OPTAB, cond_##UNSIGNED_OPTAB, \
cond_##TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (COND_LEN_##NAME, FLAGS, SELECTOR, \
cond_len_##SIGNED_OPTAB, \
cond_len_##UNSIGNED_OPTAB, cond_len_##TYPE)

◆ DEF_INTERNAL_SIGNED_COND_FN [2/2]

#define DEF_INTERNAL_SIGNED_COND_FN ( NAME,
FLAGS,
SELECTOR,
SIGNED_OPTAB,
UNSIGNED_OPTAB,
TYPE )
Value:
DEF_INTERNAL_SIGNED_OPTAB_FN (COND_##NAME, FLAGS, SELECTOR, \
cond_##SIGNED_OPTAB, cond_##UNSIGNED_OPTAB, \
cond_##TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (COND_LEN_##NAME, FLAGS, SELECTOR, \
cond_len_##SIGNED_OPTAB, \
cond_len_##UNSIGNED_OPTAB, cond_len_##TYPE)

◆ DEF_INTERNAL_SIGNED_OPTAB_FN [1/2]

#define DEF_INTERNAL_SIGNED_OPTAB_FN ( NAME,
FLAGS,
SELECTOR,
SIGNED_OPTAB,
UNSIGNED_OPTAB,
TYPE )
Value:
DEF_INTERNAL_FN (NAME, FLAGS | ECF_LEAF, NULL)

◆ DEF_INTERNAL_SIGNED_OPTAB_FN [2/2]

#define DEF_INTERNAL_SIGNED_OPTAB_FN ( NAME,
FLAGS,
SELECTOR,
SIGNED_OPTAB,
UNSIGNED_OPTAB,
TYPE )
Value:
DEF_INTERNAL_FN (NAME, FLAGS | ECF_LEAF, NULL)

◆ DEF_INTERNAL_WIDENING_OPTAB_FN [1/2]

#define DEF_INTERNAL_WIDENING_OPTAB_FN ( NAME,
FLAGS,
SELECTOR,
SOPTAB,
UOPTAB,
TYPE )
Value:
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME, FLAGS, SELECTOR, SOPTAB, UOPTAB, TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME ## _LO, FLAGS, SELECTOR, SOPTAB##_lo, UOPTAB##_lo, TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME ## _HI, FLAGS, SELECTOR, SOPTAB##_hi, UOPTAB##_hi, TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME ## _EVEN, FLAGS, SELECTOR, SOPTAB##_even, UOPTAB##_even, TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME ## _ODD, FLAGS, SELECTOR, SOPTAB##_odd, UOPTAB##_odd, TYPE)

◆ DEF_INTERNAL_WIDENING_OPTAB_FN [2/2]

#define DEF_INTERNAL_WIDENING_OPTAB_FN ( NAME,
FLAGS,
SELECTOR,
SOPTAB,
UOPTAB,
TYPE )
Value:
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME, FLAGS, SELECTOR, SOPTAB, UOPTAB, TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME ## _LO, FLAGS, SELECTOR, SOPTAB##_lo, UOPTAB##_lo, TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME ## _HI, FLAGS, SELECTOR, SOPTAB##_hi, UOPTAB##_hi, TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME ## _EVEN, FLAGS, SELECTOR, SOPTAB##_even, UOPTAB##_even, TYPE) \
DEF_INTERNAL_SIGNED_OPTAB_FN (NAME ## _ODD, FLAGS, SELECTOR, SOPTAB##_odd, UOPTAB##_odd, TYPE)

◆ DEF_LIB_BUILTIN

#define DEF_LIB_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, false, ATTRS, true, true)

◆ DEF_SANITIZER_BUILTIN

#define DEF_SANITIZER_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, true, ATTRS, true, \
(flag_sanitize & (SANITIZE_ADDRESS | SANITIZE_THREAD \
| SANITIZE_HWADDRESS \
| SANITIZE_UNDEFINED \
| SANITIZE_UNDEFINED_NONDEFAULT) \
|| flag_sanitize_coverage))

◆ DEF_SYNC_BUILTIN

#define DEF_SYNC_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \
false, false, false, ATTRS, true, true)

◆ DEF_TM_BUILTIN

#define DEF_TM_BUILTIN ( ENUM,
NAME,
TYPE,
ATTRS )
Value:
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \
false, true, true, ATTRS, false, flag_tm)

◆ FABS_TYPE

#define FABS_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ FDIM_TYPE

#define FDIM_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F

◆ FLOOR_TYPE

#define FLOOR_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ FMA_TYPE

#define FMA_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F##_##F

◆ FMAX_TYPE

#define FMAX_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F

◆ FMIN_TYPE

#define FMIN_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F

◆ FREXP_TYPE

#define FREXP_TYPE ( F)
Value:
BT_FN_##F##_##F##_INTPTR

◆ HUGE_VAL_TYPE

#define HUGE_VAL_TYPE ( F)
Value:
BT_FN_##F

◆ HYPOT_TYPE

#define HYPOT_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F

◆ ILOGB_TYPE

#define ILOGB_TYPE ( F)
Value:
BT_FN_INT_##F

◆ INF_TYPE

#define INF_TYPE ( F)
Value:
BT_FN_##F

◆ LDEXP_TYPE

#define LDEXP_TYPE ( F)
Value:
BT_FN_##F##_##F##_INT

◆ LGAMMA_TYPE

#define LGAMMA_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ LLRINT_TYPE

#define LLRINT_TYPE ( F)
Value:
BT_FN_LONGLONG_##F

◆ LOG10_TYPE

#define LOG10_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ LRINT_TYPE

#define LRINT_TYPE ( F)
Value:
BT_FN_LONG_##F

◆ MODF_TYPE

#define MODF_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F##PTR

◆ NAN_TYPE

#define NAN_TYPE ( F)
Value:
BT_FN_##F##_CONST_STRING

◆ NEARBYINT_TYPE

#define NEARBYINT_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ NEXTAFTER_TYPE

#define NEXTAFTER_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F

◆ REMQUO_TYPE

#define REMQUO_TYPE ( F)
Value:
BT_FN_##F##_##F##_##F##_INTPTR

◆ RINT_TYPE

#define RINT_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ ROUND_TYPE

#define ROUND_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ ROUNDEVEN_TYPE

#define ROUNDEVEN_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ SCALBLN_TYPE

#define SCALBLN_TYPE ( F)
Value:
BT_FN_##F##_##F##_LONG

◆ SCALBN_TYPE

#define SCALBN_TYPE ( F)
Value:
BT_FN_##F##_##F##_INT

◆ SINH_TYPE

#define SINH_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ SQRT_TYPE

#define SQRT_TYPE ( F)
Value:
BT_FN_##F##_##F

◆ TRUNC_TYPE

#define TRUNC_TYPE ( F)
Value:
BT_FN_##F##_##F

Typedef Documentation

◆ string_set

Generate macros based on the combined_fn enum.
   Copyright (C) 2015-2024 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
Automatically generate code fragments related to combined_fn.

The program looks for math built-in functions that have float, double
and long double variants, such as {sqrtf, sqrt, sqrtl}, and that may
or may not have an associated internal function as well.  It also looks
for integer built-in functions that have int, long, long long and
intmax_t variants, such as {clz, clzl, clzll, clzimax}, and that
again may or may not have an associated internal function as well.

When run with -c, the generator prints a list of macros such as:

   CASE_CFN_SQRT

for each group of functions described above, with 'case CFN_*'
statements for each built-in and internal function in the group.
For example, there are both built-in and internal implementations
of SQRT, so "CASE_CFN_SQRT:" is equivalent to:

   case CFN_BUILT_IN_SQRTF:
   case CFN_BUILT_IN_SQRT:
   case CFN_BUILT_IN_SQRTL:
   case CFN_SQRT:

The macros for groups with no internal function drop the last line.

When run with -o, the generator prints a similar list of
define_operator_list directives, for use by match.pd.  Each operator
list starts with the built-in functions, in order of ascending type width.
This is followed by an entry for the internal function, or "null" if there
is no internal function for the group.  For example:

  (define_operator_list SQRT
      BUILT_IN_SQRTF
      BUILT_IN_SQRT
      BUILT_IN_SQRTL
      IFN_SQRT)

and:

  (define_operator_list CABS
      BUILT_IN_CABSF
      BUILT_IN_CABS
      BUILT_IN_CABSL
      null)   

Function Documentation

◆ add_to_set()

static void add_to_set ( string_set * set,
const char *const * names )
static
Add all names in null-terminated list NAMES to SET.   

References i, and names.

Referenced by main().

◆ is_group()

static bool is_group ( string_set * builtins,
const char * name,
const char *const * suffixes )
static
Return true if *BUILTINS contains BUILT_IN_<NAME><SUFFIX> for all
suffixes in null-terminated list SUFFIXES.   

References hash_set< KeyId, Lazy, Traits >::contains(), i, and NULL.

Referenced by main().

◆ main()

◆ print_case_cfn()

static void print_case_cfn ( const char * name,
bool internal_p,
const char *const * suffixes,
const char * floatn )
static
Print a macro for all combined functions related to NAME, with the
null-terminated list of suffixes in SUFFIXES.  INTERNAL_P says whether
CFN_<NAME> also exists.  FLOATN_P is a suffix to the operator name, blank
for normal operators, "_FN" for _Float<N>/_Float<N>X operators only, and
"_ALL" for both the traditional operators and the _Float<N>/_Float<N>X
operators.   

References i.

Referenced by main().

◆ print_define_operator_list()

static void print_define_operator_list ( const char * name,
bool internal_p,
const char *const * suffixes,
const char * floatn )
static
Print an operator list for all combined functions related to NAME, with the
null-terminated list of suffixes in SUFFIXES.  INTERNAL_P says whether
CFN_<NAME> also exists.  FLOATN_P is a suffix to the operator name, blank
for normal operators, "_FN" for _Float<N>/_Float<N>X operators only, and
"_ALL" for both the traditional operators and the _Float<N>/_Float<N>X
operators.   

References i.

Referenced by main().

Variable Documentation

◆ builtin_names

const char* const builtin_names[]

Referenced by main().

◆ flt_suffixes

const char* const flt_suffixes[] = { "F", "", "L", NULL }
static

Referenced by main().

◆ fltall_suffixes

const char* const fltall_suffixes[]
static
Initial value:
= { "F", "", "L", "F16", "F32",
"F64", "F128", "F32X", "F64X",
"F128X", NULL }
#define NULL
Definition system.h:50

Referenced by main().

◆ fltfn_suffixes

const char* const fltfn_suffixes[]
static
Initial value:
= { "F16", "F32", "F64", "F128",
"F32X", "F64X", "F128X", NULL }

Referenced by main().

◆ int_suffixes

const char* const int_suffixes[] = { "", "L", "LL", "IMAX", NULL }
static

Referenced by main().

◆ internal_fn_flt_names

const char* const internal_fn_flt_names[]

Referenced by main().

◆ internal_fn_int_names

const char* const internal_fn_int_names[]

Referenced by main().

◆ suffix_lists

const char* const* const suffix_lists[]
static
Initial value:
= {
}
static const char *const int_suffixes[]
Definition gencfn-macros.cc:163
static const char *const flt_suffixes[]
Definition gencfn-macros.cc:157

Referenced by main().