This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: BUILT_IN usage in tree-nested.c
- From: Steven Bosscher <stevenb at suse dot de>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner),pinskia at physics dot uc dot edu
- Cc: gcc at gcc dot gnu dot org, rth at redhat dot com
- Date: Sat, 5 Jun 2004 18:39:16 +0200
- Subject: Re: BUILT_IN usage in tree-nested.c
- Organization: SUSE Labs
- References: <10406051634.AA23862@vlsi1.ultra.nyu.edu>
On Saturday 05 June 2004 18:34, Richard Kenner wrote:
> Java initializes them in initialize_builtins in java/builtins.c.
>
> But as far as I can tell, it doesn't. It only initializes *some* of
> them. For example BUILT_IN_ADJUST_TRAMPOLINE is needed but its entry
> doesn't seem to be initialized in java/builtins.c. What am I missing?
Why would Java need trampolines, isn't that only needed if
you have nested functions?
As Andrew said, f95-lang.c is where you probably can see
more of what you need to do. Specifically, look at and
copy from f95-lang.c:gfc_init_builtin_functions (void):
static void
gfc_init_builtin_functions (void)
{
tree mfunc_float[2];
tree mfunc_double[2];
tree ftype;
tree tmp;
/* Various Fortran specific stuff before this. In particular, some
math builtin defines. */
tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
ftype = build_function_type (void_type_node, tmp);
gfc_define_builtin ("__builtin_init_trampoline", ftype,
BUILT_IN_INIT_TRAMPOLINE, "init_trampoline", false);
tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
ftype = build_function_type (pvoid_type_node, tmp);
gfc_define_builtin ("__builtin_adjust_trampoline", ftype,
BUILT_IN_ADJUST_TRAMPOLINE, "adjust_trampoline", true);
/* More Fortran specific stuff following this. */
}
Gr.
Steven