本文整理汇总了C++中build_function_type_list函数的典型用法代码示例。如果您正苦于以下问题:C++ build_function_type_list函数的具体用法?C++ build_function_type_list怎么用?C++ build_function_type_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了build_function_type_list函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: aarch64_init_builtins
void
aarch64_init_builtins (void)
{
tree ftype_set_fpr
= build_function_type_list (void_type_node, unsigned_type_node, NULL);
tree ftype_get_fpr
= build_function_type_list (unsigned_type_node, NULL);
aarch64_builtin_decls[AARCH64_BUILTIN_GET_FPCR]
= add_builtin_function ("__builtin_aarch64_get_fpcr", ftype_get_fpr,
AARCH64_BUILTIN_GET_FPCR, BUILT_IN_MD, NULL, NULL_TREE);
aarch64_builtin_decls[AARCH64_BUILTIN_SET_FPCR]
= add_builtin_function ("__builtin_aarch64_set_fpcr", ftype_set_fpr,
AARCH64_BUILTIN_SET_FPCR, BUILT_IN_MD, NULL, NULL_TREE);
aarch64_builtin_decls[AARCH64_BUILTIN_GET_FPSR]
= add_builtin_function ("__builtin_aarch64_get_fpsr", ftype_get_fpr,
AARCH64_BUILTIN_GET_FPSR, BUILT_IN_MD, NULL, NULL_TREE);
aarch64_builtin_decls[AARCH64_BUILTIN_SET_FPSR]
= add_builtin_function ("__builtin_aarch64_set_fpsr", ftype_set_fpr,
AARCH64_BUILTIN_SET_FPSR, BUILT_IN_MD, NULL, NULL_TREE);
if (TARGET_SIMD)
aarch64_init_simd_builtins ();
if (TARGET_CRC32)
aarch64_init_crc32_builtins ();
}
开发者ID:rockflying,项目名称:gcc,代码行数:26,代码来源:aarch64-builtins.c
示例2: mudflap_init
/* Initialize the global tree nodes that correspond to mf-runtime.h
declarations. */
void
mudflap_init (void)
{
static bool done = false;
tree mf_const_string_type;
tree mf_cache_array_type;
tree mf_check_register_fntype;
tree mf_unregister_fntype;
tree mf_init_fntype;
tree mf_set_options_fntype;
if (done)
return;
done = true;
mf_uintptr_type = lang_hooks.types.type_for_mode (ptr_mode,
/*unsignedp=*/true);
mf_const_string_type
= build_pointer_type (build_qualified_type
(char_type_node, TYPE_QUAL_CONST));
mf_cache_struct_type = mf_make_mf_cache_struct_type (mf_uintptr_type);
mf_cache_structptr_type = build_pointer_type (mf_cache_struct_type);
mf_cache_array_type = build_array_type (mf_cache_struct_type, 0);
mf_check_register_fntype =
build_function_type_list (void_type_node, ptr_type_node, size_type_node,
integer_type_node, mf_const_string_type, NULL_TREE);
mf_unregister_fntype =
build_function_type_list (void_type_node, ptr_type_node, size_type_node,
integer_type_node, NULL_TREE);
mf_init_fntype =
build_function_type_list (void_type_node, NULL_TREE);
mf_set_options_fntype =
build_function_type_list (integer_type_node, mf_const_string_type, NULL_TREE);
mf_cache_array_decl = mf_make_builtin (VAR_DECL, "__mf_lookup_cache",
mf_cache_array_type);
mf_cache_shift_decl = mf_make_builtin (VAR_DECL, "__mf_lc_shift",
unsigned_char_type_node);
mf_cache_mask_decl = mf_make_builtin (VAR_DECL, "__mf_lc_mask",
mf_uintptr_type);
/* Don't process these in mudflap_enqueue_decl, should they come by
there for some reason. */
mf_mark (mf_cache_array_decl);
mf_mark (mf_cache_shift_decl);
mf_mark (mf_cache_mask_decl);
mf_check_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_check",
mf_check_register_fntype);
mf_register_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_register",
mf_check_register_fntype);
mf_unregister_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_unregister",
mf_unregister_fntype);
mf_init_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_init",
mf_init_fntype);
mf_set_options_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_set_options",
mf_set_options_fntype);
}
开发者ID:ChaosJohn,项目名称:gcc,代码行数:59,代码来源:tree-mudflap.c
示例3: nds32_init_builtins_impl
void
nds32_init_builtins_impl (void)
{
tree pointer_type_node = build_pointer_type (integer_type_node);
tree void_ftype_void = build_function_type (void_type_node,
void_list_node);
tree void_ftype_pint = build_function_type_list (void_type_node,
pointer_type_node,
NULL_TREE);
tree int_ftype_int = build_function_type_list (integer_type_node,
integer_type_node,
NULL_TREE);
tree void_ftype_int_int = build_function_type_list (void_type_node,
integer_type_node,
integer_type_node,
NULL_TREE);
/* Cache. */
add_builtin_function ("__builtin_nds32_isync", void_ftype_pint,
NDS32_BUILTIN_ISYNC,
BUILT_IN_MD, NULL, NULL_TREE);
add_builtin_function ("__builtin_nds32_isb", void_ftype_void,
NDS32_BUILTIN_ISB,
BUILT_IN_MD, NULL, NULL_TREE);
/* Register Transfer. */
add_builtin_function ("__builtin_nds32_mfsr", int_ftype_int,
NDS32_BUILTIN_MFSR,
BUILT_IN_MD, NULL, NULL_TREE);
add_builtin_function ("__builtin_nds32_mfusr", int_ftype_int,
NDS32_BUILTIN_MFUSR,
BUILT_IN_MD, NULL, NULL_TREE);
add_builtin_function ("__builtin_nds32_mtsr", void_ftype_int_int,
NDS32_BUILTIN_MTSR,
BUILT_IN_MD, NULL, NULL_TREE);
add_builtin_function ("__builtin_nds32_mtusr", void_ftype_int_int,
NDS32_BUILTIN_MTUSR,
BUILT_IN_MD, NULL, NULL_TREE);
/* Interrupt. */
add_builtin_function ("__builtin_nds32_setgie_en", void_ftype_void,
NDS32_BUILTIN_SETGIE_EN,
BUILT_IN_MD, NULL, NULL_TREE);
add_builtin_function ("__builtin_nds32_setgie_dis", void_ftype_void,
NDS32_BUILTIN_SETGIE_DIS,
BUILT_IN_MD, NULL, NULL_TREE);
}
开发者ID:earonesty,项目名称:gcc,代码行数:51,代码来源:nds32-intrinsic.c
示例4: lbc_init
void
lbc_init (void)
{
static bool done = false;
tree lbc_init_uninit_rz_fntype;
tree lbc_ensure_sframe_fntype;
tree lbc_is_char_red_fntype;
tree lbc_const_void_ptr_type;
if (done)
return;
done = true;
decl_map = (Pvoid_t) NULL;
DEBUGLOG("LBC Plugin: Building decls\n");
lbc_const_void_ptr_type = build_qualified_type (ptr_type_node, TYPE_QUAL_CONST);
lbc_init_uninit_rz_fntype =
build_function_type_list (void_type_node, ptr_type_node,
unsigned_type_node, NULL_TREE);
/*lbc_ensure_sframe_fntype =
build_function_type_list (void_type_node, ptr_type_node,
ptr_type_node, NULL_TREE);*/
lbc_ensure_sframe_fntype =
build_function_type_list (void_type_node, void_type_node, NULL_TREE);
lbc_is_char_red_fntype =
build_function_type_list (void_type_node, unsigned_type_node,
unsigned_type_node, lbc_const_void_ptr_type, NULL_TREE);
lbc_init_front_rz_fndecl = mf_make_builtin (FUNCTION_DECL, "init_front_redzone",
lbc_init_uninit_rz_fntype);
lbc_uninit_front_rz_fndecl = mf_make_builtin (FUNCTION_DECL, "uninit_front_redzone",
lbc_init_uninit_rz_fntype);
lbc_init_rear_rz_fndecl = mf_make_builtin (FUNCTION_DECL, "init_rear_redzone",
lbc_init_uninit_rz_fntype);
lbc_uninit_rear_rz_fndecl = mf_make_builtin (FUNCTION_DECL, "uninit_rear_redzone",
lbc_init_uninit_rz_fntype);
lbc_ensure_sframe_bitmap_fndecl = mf_make_builtin (FUNCTION_DECL, "ensure_sframe_bitmap",
lbc_ensure_sframe_fntype);
lbc_is_char_red_fndecl = mf_make_builtin (FUNCTION_DECL, "is_char_red",
lbc_is_char_red_fntype);
DEBUGLOG("LBC Plugin: Done Building decls\n");
}
开发者ID:sdzahed,项目名称:LBC-Plugin,代码行数:46,代码来源:plugin_lbc.c
示例5: declare_nothrow_library_fn
static tree
declare_nothrow_library_fn (tree name, tree return_type, tree parm_type)
{
return push_library_fn (name, build_function_type_list (return_type,
parm_type,
NULL_TREE),
empty_except_spec);
}
开发者ID:Samsara00,项目名称:DragonFlyBSD,代码行数:8,代码来源:except.c
示例6: declare_cilk_for_builtin
static tree
declare_cilk_for_builtin (const char *name, tree type,
enum built_in_function code)
{
tree cb, ft, fn;
cb = build_function_type_list (void_type_node,
ptr_type_node, type, type,
NULL_TREE);
cb = build_pointer_type (cb);
ft = build_function_type_list (void_type_node,
cb, ptr_type_node, type,
integer_type_node, NULL_TREE);
fn = install_builtin (name, ft, code, false);
TREE_NOTHROW (fn) = 0;
return fn;
}
开发者ID:krichter722,项目名称:gcc,代码行数:18,代码来源:cilk-common.c
示例7: init_exception_processing
void
init_exception_processing (void)
{
tree tmp;
/* void std::terminate (); */
push_namespace (std_identifier);
tmp = build_function_type_list (void_type_node, NULL_TREE);
terminate_node = build_cp_library_fn_ptr ("terminate", tmp);
TREE_THIS_VOLATILE (terminate_node) = 1;
TREE_NOTHROW (terminate_node) = 1;
pop_namespace ();
/* void __cxa_call_unexpected(void *); */
tmp = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
call_unexpected_node
= push_throw_library_fn (get_identifier ("__cxa_call_unexpected"), tmp);
}
开发者ID:Samsara00,项目名称:DragonFlyBSD,代码行数:18,代码来源:except.c
示例8: declare_library_fn
static tree
declare_library_fn (tree name, tree return_type, tree parm_type, int ecf_flags)
{
return push_library_fn (name, build_function_type_list (return_type,
parm_type,
NULL_TREE),
empty_except_spec,
ecf_flags);
}
开发者ID:crystax,项目名称:android-toolchain-gcc-4-9,代码行数:9,代码来源:except.c
示例9: slang_parse_file
/* parsing language hook */
static void slang_parse_file ()
{
int i;
for(i = 0; i<num_in_fnames; ++i) {
parse_program(in_fnames[i]);
}
#if 0
tree char_p = build_pointer_type (char_type_node);
tree puts_type = build_function_type_list (integer_type_node,
char_p, NULL_TREE);
tree puts_fndecl = build_function_decl ("puts", true, puts_type);
tree main_type = build_function_type_list (integer_type_node, NULL_TREE);
tree main_fndecl = build_function_decl ("main", false, main_type);
const char *msg = "HelloWorld , ... This is pradeeps compiler";
tree hello_str = build_string_literal (strlen(msg) + 1, msg);
tree call = build_call_expr (puts_fndecl,1, hello_str);
tree block = make_node(BLOCK);
tree c1 = build_pointer_type (char_type_node);
tree stmts = NULL_TREE ;//alloc_stmt_list ();
append_to_statement_list (call, &stmts);
build_function (main_fndecl, stmts, block);
FILE *fd = fopen("/home/pradeep/Desktop/dump.txt","w");
gimplify_function_tree (main_fndecl);
dump_function_to_file (main_fndecl, fd, 0);
fclose(fd);
cgraph_finalize_function (main_fndecl, false);
current_function_decl = NULL_TREE;
pop_cfun();
#endif
}
开发者ID:pradeep-subrahmanion,项目名称:SLANG-GCC,代码行数:44,代码来源:slang.c
示例10: init_exception_processing
void
init_exception_processing (void)
{
tree tmp;
/* void std::terminate (); */
push_namespace (std_identifier);
tmp = build_function_type_list (void_type_node, NULL_TREE);
terminate_fn = build_cp_library_fn_ptr ("terminate", tmp,
ECF_NOTHROW | ECF_NORETURN
| ECF_COLD);
gcc_checking_assert (TREE_THIS_VOLATILE (terminate_fn)
&& TREE_NOTHROW (terminate_fn));
pop_namespace ();
/* void __cxa_call_unexpected(void *); */
tmp = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
call_unexpected_fn
= push_throw_library_fn (get_identifier ("__cxa_call_unexpected"), tmp);
}
开发者ID:kusumi,项目名称:DragonFlyBSD,代码行数:20,代码来源:except.c
示例11: tree_init_edge_profiler
static void
tree_init_edge_profiler (void)
{
tree interval_profiler_fn_type;
tree pow2_profiler_fn_type;
tree one_value_profiler_fn_type;
tree gcov_type_ptr;
if (!gcov_type_node)
{
gcov_type_node = get_gcov_type ();
gcov_type_ptr = build_pointer_type (gcov_type_node);
/* void (*) (gcov_type *, gcov_type, int, unsigned) */
interval_profiler_fn_type
= build_function_type_list (void_type_node,
gcov_type_ptr, gcov_type_node,
integer_type_node,
unsigned_type_node, NULL_TREE);
tree_interval_profiler_fn
= build_fn_decl ("__gcov_interval_profiler",
interval_profiler_fn_type);
/* void (*) (gcov_type *, gcov_type) */
pow2_profiler_fn_type
= build_function_type_list (void_type_node,
gcov_type_ptr, gcov_type_node,
NULL_TREE);
tree_pow2_profiler_fn = build_fn_decl ("__gcov_pow2_profiler",
pow2_profiler_fn_type);
/* void (*) (gcov_type *, gcov_type) */
one_value_profiler_fn_type
= build_function_type_list (void_type_node,
gcov_type_ptr, gcov_type_node,
NULL_TREE);
tree_one_value_profiler_fn
= build_fn_decl ("__gcov_one_value_profiler",
one_value_profiler_fn_type);
}
}
开发者ID:mbref,项目名称:gcc-412-microblaze,代码行数:41,代码来源:tree-profile.c
示例12: init_decls
static void init_decls(void)
{
static unsigned int is_once = 0;
tree type;
if (is_once) return ;
is_once = 1;
type = build_function_type_list
(ptr_type_node, size_type_node, NULL_TREE);
kaapi_pushdata_aligned_decl =
build_fn_decl("kaapi_pushdata_aligned", type);
type = build_function_type_list
(void_type_node, ptr_type_node, ptr_type_node, NULL_TREE);
kaapi_pushtask_decl =
build_fn_decl("kaapi_pushtask", type);
type = build_function_type_list
(void_type_node, void_type_node, NULL_TREE);
kaapi_barrier_decl =
build_fn_decl("kaapi_barrier", type);
}
开发者ID:texane,项目名称:xkaapi_gcc_plugin,代码行数:23,代码来源:xkaapi.c
示例13: insert_slimer_init
/* Insert call to __slimer_init to initalize things at runtime */
static void insert_slimer_init(void)
{
int i;
gimple stmt;
tree decl, proto;
proto = build_function_type_list(void_type_node, integer_type_node, NULL_TREE);
decl = build_fn_decl("__slimer_init", proto);
stmt = gsi_stmt(gsi_start_bb(ENTRY_BLOCK_PTR->next_bb));
insert_call(stmt, decl);
for (i=0; i<n_funcs; ++i)
insert_add_fn(stmt, i);
/* Add this fndecl to our list of things we do not process */
VEC_safe_push(tree, gc, analyized_fns, decl);
}
开发者ID:enferex,项目名称:GOAT-Plugs,代码行数:18,代码来源:slimer.c
示例14: create_dummy_adapter
static tree create_dummy_adapter(void)
{
/* create function type */
static tree type = NULL;
static tree decl = NULL;
if (decl != NULL) return decl;
/* create the type void fu(void)*/
type = build_function_type_list
(void_type_node, ptr_type_node, ptr_type_node, NULL_TREE);
/* create the function decl */
decl = build_fn_decl("__xkaapi_dummy_adapter", type);
return decl;
}
开发者ID:texane,项目名称:xkaapi_gcc_plugin,代码行数:17,代码来源:xkaapi.c
示例15: mchp_init_cci_builtins
void mchp_init_cci_builtins(void) {
#define CCI(TARGET, CCI_KIND, CCI_KEYWORD, TGT_FN, N) \
if (TARGET && CCI_KIND == CCI_pragma) \
c_register_pragma(0, CCI_KEYWORD, TGT_FN);
#include CCI_H
/*
* Special case mapping
*
*/
if (IMPORT_MCHP("iar")) {
/* define builtins for the functions that we don't define
* and mark them as unsupported
*/
tree attrib, args;
tree fn_type;
# define MESSAGE "Intrinsic function is unsupported for this target"
args = build_tree_list(NULL_TREE, build_string(strlen(MESSAGE), MESSAGE));
attrib = build_tree_list(get_identifier("target_error"), args);
# undef MESSAGE
fn_type = build_function_type_list(void_type_node, void_type_node,NULL_TREE);
add_builtin_function("__disable_fiq", fn_type, 0, BUILT_IN_MD, NULL, attrib);
/* ^ this should be okay
* because we are going to generate an error for it...
*/
add_builtin_function("__disable_irq", fn_type, 0, BUILT_IN_MD, NULL, attrib);
/* ^ this should be okay
* because we are going to generate an error for it...
*/
add_builtin_function("__enable_fiq", fn_type, 0, BUILT_IN_MD, NULL, attrib);
/* ^ this should be okay
* because we are going to generate an error for it...
*/
add_builtin_function("__enable_irq", fn_type, 0, BUILT_IN_MD, NULL, attrib);
/* ^ this should be okay
* because we are going to generate an error for it...
*/
}
}
开发者ID:fabio-d,项目名称:xc16plusplus-source,代码行数:46,代码来源:cci.c
示例16: insert_instrumentation_fn
// create the function call to a `record_assignment' function and insert it
// before the given statement
static void insert_instrumentation_fn(gimple curr_stmt, tree var_id,
tree new_value)
{
// build function declaration
tree proto = build_function_type_list(
void_type_node, /* return type */
integer_type_node, /* first arg's type */
const_ptr_type_node, /* second arg's type */
NULL_TREE);
tree decl = build_fn_decl("record_assignment", proto);
// build the function call with the new value tree and the variable id tree
// and insert it before the statement that was passed as the first argument
gimple call = gimple_build_call(decl, 2, var_id, new_value);
gimple_stmt_iterator gsi = gsi_for_stmt(curr_stmt);
gsi_insert_before(&gsi, call, GSI_NEW_STMT);
}
开发者ID:GaloisInc,项目名称:ivory-rtverification,代码行数:19,代码来源:instrument_plugin.c
示例17: aarch64_init_crc32_builtins
static void
aarch64_init_crc32_builtins ()
{
tree usi_type = aarch64_simd_builtin_std_type (SImode, qualifier_unsigned);
unsigned int i = 0;
for (i = 0; i < ARRAY_SIZE (aarch64_crc_builtin_data); ++i)
{
aarch64_crc_builtin_datum* d = &aarch64_crc_builtin_data[i];
tree argtype = aarch64_simd_builtin_std_type (d->mode,
qualifier_unsigned);
tree ftype = build_function_type_list (usi_type, usi_type, argtype, NULL_TREE);
tree fndecl = add_builtin_function (d->name, ftype, d->fcode,
BUILT_IN_MD, NULL, NULL_TREE);
aarch64_builtin_decls[d->fcode] = fndecl;
}
}
开发者ID:rockflying,项目名称:gcc,代码行数:18,代码来源:aarch64-builtins.c
示例18: build_function_decl
static tree
build_function_decl (const char *name, tree param_type)
{
tree func_decl, function_type_list;
function_type_list = build_function_type_list (
void_type_node, build_pointer_type (param_type),
build_pointer_type (build_type_variant (char_type_node, true, false)),
NULL_TREE);
func_decl = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL,
get_identifier (name), function_type_list);
if (dump_file)
{
fprintf (dump_file, "begin print built function type %s:\n", name);
print_generic_decl (dump_file, func_decl, TDF_VERBOSE);
fprintf (dump_file, "end print built function type %s:\n", name);
}
TREE_USED (func_decl) = 1;
return func_decl;
}
开发者ID:heyfluke,项目名称:gen-trace,代码行数:21,代码来源:plugin.cpp
示例19: write_resource_constructor
void
write_resource_constructor (tree *list_p)
{
tree decl, t, register_resource_fn;
unsigned ix;
if (resources == NULL)
return;
t = build_function_type_list (void_type_node, ptr_type_node, NULL);
t = build_decl (input_location,
FUNCTION_DECL, get_identifier ("_Jv_RegisterResource"), t);
TREE_PUBLIC (t) = 1;
DECL_EXTERNAL (t) = 1;
register_resource_fn = t;
/* Write out entries in the same order in which they were defined. */
FOR_EACH_VEC_ELT (tree, resources, ix, decl)
{
t = build_fold_addr_expr (decl);
t = build_call_expr (register_resource_fn, 1, t);
append_to_statement_list (t, list_p);
}
开发者ID:BoxianLai,项目名称:moxiedev,代码行数:23,代码来源:resource.c
示例20: write_resource_constructor
void
write_resource_constructor (tree *list_p)
{
tree iter, t, register_resource_fn;
if (resources == NULL)
return;
t = build_function_type_list (void_type_node, ptr_type_node, NULL);
t = build_decl (FUNCTION_DECL, get_identifier ("_Jv_RegisterResource"), t);
TREE_PUBLIC (t) = 1;
DECL_EXTERNAL (t) = 1;
register_resource_fn = t;
/* Write out entries in the same order in which they were defined. */
for (iter = nreverse (resources); iter ; iter = TREE_CHAIN (iter))
{
t = build_fold_addr_expr (TREE_VALUE (iter));
t = tree_cons (NULL, t, NULL);
t = build_function_call_expr (register_resource_fn, t);
append_to_statement_list (t, list_p);
}
}
开发者ID:BackupTheBerlios,项目名称:iphone-binutils-svn,代码行数:23,代码来源:resource.c
注:本文中的build_function_type_list函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论