(make_decl_rtl): Likewise.
* varasm.c (make_function_rtl): Remove.
(make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather
than from a third parameter.
* tree.h (make_decl_rtl): Remove last parameter.
* c-decl.c (builtin_function): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(start_function): Likewise.
* except.c (call_get_eh_context): Likewise.
* expr.c (emit_block_move): Likewise.
(clear_storage): Likewise.
* profile.c (output_func_start_profiler): Likewise.
* toplev.c (rest_of_decl_compilation): Likewise.
* objc/objc-act.c (create_builtin_decl): Likewise.
(synth_module_prologue): Likewise.
(generate_static_reference): Likewise.
(build_selector_reference_decl): Likewise.
(build_class_reference_decl): Likewise.
(build_objc_string_decl): Likewise.
(build_protocol_reference): Likewise.
* class.c (finish_struct_1): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
* decl.c (builtin_function): Likewise.
(build_cp_library_fn): Likewise.
(check_initializer): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(start_function): Likewise.
* decl2.c (finish_anon_union): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_java_class_ref): Likewise.
* method.c (make_thunk): Likewise.
* pt.c (tsubst_friend_function): Likewise.
* semantics.c (expand_body): Likewise.
* com.c (ffecom_init_zero_): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(ffecom_lookup_label_): Likewise.
(builtin_function): Likewise.
(start_function): Likewise.
* class.c (build_utf8_ref): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(build_class_ref): Likewise.
(build_static_field_ref): Likewise.
(get_dispatch_table): Likewise.
(layout_class_method): Likewise.
(emit_register_classes): Likewise.
* constants.c (build_constant_data_ref): Likewise.
* decl.c (builtin_function): Likewise.
(create_primitive_vtable): Likewise.
* expr.c (build_known_method_def): Likewise.
(build_jni_stub): Likewise.
(java_lang_expand_expr): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38884
138bc75d-0d04-0410-961f-
82ee72b054a4
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+2001-01-10 Mark Mitchell <mark@codesourcery.com>
+
+ * output.h (make_function_rtl): Remove prototype.
+ (make_decl_rtl): Likewise.
+ * varasm.c (make_function_rtl): Remove.
+ (make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather
+ than from a third parameter.
+ * tree.h (make_decl_rtl): Remove last parameter.
+ * c-decl.c (builtin_function): Remove last argument in call to
+ make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
+ (start_function): Likewise.
+ * except.c (call_get_eh_context): Likewise.
+ * expr.c (emit_block_move): Likewise.
+ (clear_storage): Likewise.
+ * profile.c (output_func_start_profiler): Likewise.
+ * toplev.c (rest_of_decl_compilation): Likewise.
+ * objc/objc-act.c (create_builtin_decl): Likewise.
+ (synth_module_prologue): Likewise.
+ (generate_static_reference): Likewise.
+ (build_selector_reference_decl): Likewise.
+ (build_class_reference_decl): Likewise.
+ (build_objc_string_decl): Likewise.
+ (build_protocol_reference): Likewise.
+
2001-01-10 Richard Henderson <rth@redhat.com>
* hwint.h: Revert yesterday's change.
DECL_BUILT_IN_NONANSI (decl) = 1;
if (library_name)
DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
- make_decl_rtl (decl, NULL_PTR, 1);
+ make_decl_rtl (decl, NULL_PTR);
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = class;
DECL_FUNCTION_CODE (decl) = function_code;
declare_parm_level (1);
current_binding_level->subblocks_tag_transparent = 1;
- make_function_rtl (current_function_decl);
+ make_decl_rtl (current_function_decl, NULL);
restype = TREE_TYPE (TREE_TYPE (current_function_decl));
/* Promote the value to int before returning it. */
2001-01-10 Mark Mitchell <mark@codesourcery.com>
+ * class.c (finish_struct_1): Remove last argument in call to
+ make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
+ * decl.c (builtin_function): Likewise.
+ (build_cp_library_fn): Likewise.
+ (check_initializer): Likewise.
+ (make_rtl_for_nonlocal_decl): Likewise.
+ (cp_finish_decl): Likewise.
+ (start_function): Likewise.
+ * decl2.c (finish_anon_union): Likewise.
+ * friend.c (do_friend): Likewise.
+ * init.c (build_java_class_ref): Likewise.
+ * method.c (make_thunk): Likewise.
+ * pt.c (tsubst_friend_function): Likewise.
+ * semantics.c (expand_body): Likewise.
+
+2001-01-10 Mark Mitchell <mark@codesourcery.com>
+
* cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
looking at DECL_CLONED_FUNCTION for non-functions.
&& TREE_TYPE (x) == t)
{
DECL_MODE (x) = TYPE_MODE (t);
- make_decl_rtl (x, NULL, 0);
+ make_decl_rtl (x, NULL);
}
}
function in the namespace. */
if (libname)
DECL_ASSEMBLER_NAME (decl) = get_identifier (libname);
- make_function_rtl (decl);
+ make_decl_rtl (decl, NULL);
/* Warn if a function in the namespace for users
is used without an occasion to consider it declared. */
tree type;
{
tree fn = build_library_fn_1 (name, ERROR_MARK, type);
- make_function_rtl (fn);
+ make_decl_rtl (fn, NULL);
return fn;
}
TREE_NOTHROW (fn) = TYPE_NOTHROW_P (type);
DECL_CONTEXT (fn) = FROB_CONTEXT (current_namespace);
set_mangled_name_for_decl (fn);
- make_function_rtl (fn);
+ make_decl_rtl (fn, NULL);
return fn;
}
else if (!DECL_EXTERNAL (decl) && TREE_CODE (type) == REFERENCE_TYPE)
{
if (TREE_STATIC (decl))
- make_decl_rtl (decl, NULL_PTR, toplevel_bindings_p ());
+ make_decl_rtl (decl, NULL_PTR);
grok_reference_init (decl, type, init);
init = NULL_TREE;
}
/* If we're deferring the variable, just make RTL. Do not actually
emit the variable. */
if (defer_p)
- make_decl_rtl (decl, asmspec, toplev);
+ make_decl_rtl (decl, asmspec);
/* If we're not deferring, go ahead and assemble the variable. */
else
rest_of_decl_compilation (decl, asmspec, toplev, at_eof);
grokclassfn. Lay this out fresh. */
DECL_RTL (TREE_TYPE (decl)) = NULL_RTX;
DECL_ASSEMBLER_NAME (decl) = get_identifier (asmspec);
- make_decl_rtl (decl, asmspec, 0);
+ make_decl_rtl (decl, asmspec);
}
/* Deduce size of array from initialization, if not already known. */
/* We need to do this even if we aren't expanding yet so that
assemble_external works. */
- make_function_rtl (decl1);
+ make_decl_rtl (decl1, NULL);
/* Promote the value to int before returning it. */
if (C_PROMOTING_INTEGER_TYPE_P (restype))
if (static_p)
{
- make_decl_rtl (main_decl, 0, toplevel_bindings_p ());
+ make_decl_rtl (main_decl, 0);
DECL_RTL (anon_union_decl) = DECL_RTL (main_decl);
expand_anon_union_decl (anon_union_decl,
NULL_TREE,
/* Help friends in C++.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
}
}
- make_decl_rtl (decl, NULL_PTR, 1);
+ make_decl_rtl (decl, NULL_PTR);
add_friend (current_class_type,
is_friend_template ? DECL_TI_TEMPLATE (decl) : decl);
DECL_FRIEND_P (decl) = 1;
DECL_ARTIFICIAL (class_decl) = 1;
DECL_IGNORED_P (class_decl) = 1;
pushdecl_top_level (class_decl);
- make_decl_rtl (class_decl, NULL_PTR, 1);
+ make_decl_rtl (class_decl, NULL_PTR);
}
return class_decl;
}
/* So that finish_file can write out any thunks that need to be: */
pushdecl_top_level (thunk);
/* Create RTL for this thunk so that its address can be taken. */
- make_function_rtl (thunk);
+ make_decl_rtl (thunk, NULL);
}
return thunk;
}
{
set_mangled_name_for_decl (new_friend);
DECL_RTL (new_friend) = 0;
- make_decl_rtl (new_friend, NULL_PTR, 1);
+ make_decl_rtl (new_friend, NULL_PTR);
}
if (DECL_NAMESPACE_SCOPE_P (new_friend))
}
DECL_RTL (r) = 0;
- make_decl_rtl (r, NULL_PTR, 1);
+ make_decl_rtl (r, NULL_PTR);
/* Like grokfndecl. If we don't do this, pushdecl will
mess up our TREE_CHAIN because it doesn't find a
building RTL. These routines are used both during actual parsing
and during the instantiation of template functions.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Mark Mitchell (mmitchell@usa.net) based on code found
formerly in parse.y and pt.c.
{
/* Give the function RTL now so that we can assign it to a
function pointer, etc. */
- make_function_rtl (fn);
+ make_decl_rtl (fn, NULL);
/* Set DECL_EXTERNAL so that assemble_external will be called as
necessary. We'll clear it again in finish_file. */
if (!DECL_EXTERNAL (fn))
TREE_PUBLIC (fn) = 1;
DECL_ARTIFICIAL (fn) = 1;
TREE_READONLY (fn) = 1;
- make_decl_rtl (fn, NULL_PTR, 1);
+ make_decl_rtl (fn, NULL_PTR);
assemble_external (fn);
ggc_add_tree_root (&fn, 1);
DECL_EXTERNAL (fn) = 1;
TREE_PUBLIC (fn) = 1;
DECL_ARTIFICIAL (fn) = 1;
- make_decl_rtl (fn, NULL_PTR, 1);
+ make_decl_rtl (fn, NULL_PTR);
assemble_external (fn);
}
DECL_EXTERNAL (fn) = 1;
TREE_PUBLIC (fn) = 1;
DECL_ARTIFICIAL (fn) = 1;
- make_decl_rtl (fn, NULL_PTR, 1);
+ make_decl_rtl (fn, NULL_PTR);
assemble_external (fn);
}
+Wed Jan 10 14:39:45 2001 Mark Mitchell <mark@codesourcery.com>
+
+ * com.c (ffecom_init_zero_): Remove last argument in call to
+ make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
+ (ffecom_lookup_label_): Likewise.
+ (builtin_function): Likewise.
+ (start_function): Likewise.
+
Thu Dec 21 21:19:42 2000 Joseph S. Myers <jsm28@cam.ac.uk>
* g77install.texi, g77.texi: Update last-updated dates for
if (incremental)
{
- make_decl_rtl (decl, NULL, TREE_PUBLIC (decl) ? 1 : 0);
+ make_decl_rtl (decl, NULL);
assemble_variable (decl, TREE_PUBLIC (decl) ? 1 : 0, 0, 1);
}
TREE_STATIC (glabel) = 1;
DECL_CONTEXT (glabel) = 0;
DECL_INITIAL (glabel) = NULL;
- make_decl_rtl (glabel, NULL, 0);
+ make_decl_rtl (glabel, NULL);
expand_decl (glabel);
ffecom_save_tree_forever (glabel);
TREE_PUBLIC (decl) = 1;
if (library_name)
DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
- make_decl_rtl (decl, NULL_PTR, 1);
+ make_decl_rtl (decl, NULL_PTR);
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = class;
DECL_FUNCTION_CODE (decl) = function_code;
if (TREE_CODE (current_function_decl) != ERROR_MARK)
{
- make_function_rtl (current_function_decl);
+ make_decl_rtl (current_function_decl, NULL);
restype = TREE_TYPE (TREE_TYPE (current_function_decl));
DECL_RESULT (current_function_decl)
+2001-01-10 Mark Mitchell <mark@codesourcery.com>
+
+ * class.c (build_utf8_ref): Remove last argument in call to
+ make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
+ (build_class_ref): Likewise.
+ (build_static_field_ref): Likewise.
+ (get_dispatch_table): Likewise.
+ (layout_class_method): Likewise.
+ (emit_register_classes): Likewise.
+ * constants.c (build_constant_data_ref): Likewise.
+ * decl.c (builtin_function): Likewise.
+ (create_primitive_vtable): Likewise.
+ * expr.c (build_known_method_def): Likewise.
+ (build_jni_stub): Likewise.
+ (java_lang_expand_expr): Likewise.
+
2001-01-10 Tom Tromey <tromey@redhat.com>
* jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
/* Functions related to building classes and their related objects.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
pushdecl (decl);
rest_of_decl_compilation (decl, (char*) 0, global_bindings_p (), 0);
utf8_decl_list = decl;
- make_decl_rtl (decl, (char*) 0, 1);
+ make_decl_rtl (decl, (char*) 0);
ref = build1 (ADDR_EXPR, utf8const_ptr_type, decl);
IDENTIFIER_UTF8_REF (name) = ref;
return ref;
DECL_IGNORED_P (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
DECL_ASSEMBLER_NAME (decl) = mangle_class_field (type);
- make_decl_rtl (decl, NULL, 1);
+ make_decl_rtl (decl, NULL);
pushdecl_top_level (decl);
if (is_compiled == 1)
DECL_EXTERNAL (decl) = 1;
decl = build_decl (VAR_DECL, decl_name, class_type_node);
TREE_STATIC (decl) = 1;
TREE_PUBLIC (decl) = 1;
- make_decl_rtl (decl, NULL, 1);
+ make_decl_rtl (decl, NULL);
pushdecl_top_level (decl);
if (is_compiled == 1)
DECL_EXTERNAL (decl) = 1;
{
if (DECL_RTL (fdecl) == 0)
{
- make_decl_rtl (fdecl, NULL, 1);
+ make_decl_rtl (fdecl, NULL);
if (is_compiled == 1)
DECL_EXTERNAL (fdecl) = 1;
}
else
{
if (DECL_RTL (method) == 0)
- make_decl_rtl (method, NULL, 1);
+ make_decl_rtl (method, NULL);
method = build1 (ADDR_EXPR, nativecode_ptr_type_node, method);
}
list = tree_cons (NULL_TREE /*DECL_VINDEX (method) + 2*/,
if (! METHOD_ABSTRACT (method_decl)
|| (CLASS_INTERFACE (TYPE_NAME (this_class))
&& (DECL_CLINIT_P (method_decl))))
- make_function_rtl (method_decl);
+ make_decl_rtl (method_decl, NULL);
obstack_free (&temporary_obstack, asm_name);
if (ID_INIT_P (method_name))
/* DECL_EXTERNAL (init_decl) = 1;*/
TREE_PUBLIC (init_decl) = 1;
pushlevel (0);
- make_function_rtl (init_decl);
+ make_decl_rtl (init_decl, NULL);
init_function_start (init_decl, input_filename, 0);
expand_function_start (init_decl, 0);
/* Handle the constant pool of the Java(TM) Virtual Machine.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
build_array_type (ptr_type_node,
one_elt_array_domain_type));
TREE_STATIC (decl) = 1;
- make_decl_rtl (decl, NULL, 1);
+ make_decl_rtl (decl, NULL);
TYPE_CPOOL_DATA_REF (current_class) = current_constant_pool_data_ref
= build1 (ADDR_EXPR, ptr_type_node, decl);
}
/* Process declarations and variables for the GNU compiler for the
Java(TM) language.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
TREE_PUBLIC (decl) = 1;
if (library_name)
DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
- make_decl_rtl (decl, NULL_PTR, 1);
+ make_decl_rtl (decl, NULL_PTR);
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = class;
DECL_FUNCTION_CODE (decl) = function_code;
sprintf (buf, "_Jv_%sVTable", name);
r = build_decl (VAR_DECL, get_identifier (buf), ptr_type_node);
DECL_EXTERNAL (r) = 1;
- make_decl_rtl (r, buf, 1);
+ make_decl_rtl (r, buf);
return r;
}
/* Process expressions for the GNU compiler for the Java(TM) language.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
tree func;
if (is_compiled_class (self_type))
{
- make_decl_rtl (method, NULL, 1);
+ make_decl_rtl (method, NULL);
func = build1 (ADDR_EXPR, method_ptr_type_node, method);
}
else
TREE_STATIC (meth_var) = 1;
TREE_PUBLIC (meth_var) = 0;
DECL_EXTERNAL (meth_var) = 0;
- make_decl_rtl (meth_var, NULL, 0);
+ make_decl_rtl (meth_var, NULL);
meth_var = pushdecl_top_level (meth_var);
/* One strange way that the front ends are different is that they
DECL_IGNORED_P (init_decl) = 1;
TREE_READONLY (init_decl) = 1;
TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (init_decl)) = 1;
- make_decl_rtl (init_decl, NULL, 1);
+ make_decl_rtl (init_decl, NULL);
init = build1 (ADDR_EXPR, TREE_TYPE (exp), init_decl);
r = expand_expr (init, target, tmode, modifier);
return r;
DECL_IGNORED_P (init_decl) = 1;
TREE_READONLY (init_decl) = 1;
TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (init_decl)) = 1;
- make_decl_rtl (init_decl, NULL, 1);
+ make_decl_rtl (init_decl, NULL);
init = init_decl;
}
expand_assignment (build (COMPONENT_REF, TREE_TYPE (data_fld),
if (code == VAR_DECL)
{
TREE_STATIC (decl) = 1;
- make_decl_rtl (decl, 0, 1);
+ make_decl_rtl (decl, 0);
pushdecl (decl);
}
if (flag_traditional && TAG_MSGSEND[0] != '_')
DECL_BUILT_IN_NONANSI (umsg_decl) = 1;
- make_decl_rtl (umsg_decl, NULL_PTR, 1);
+ make_decl_rtl (umsg_decl, NULL_PTR);
pushdecl (umsg_decl);
}
else
type = build_array_type (build_pointer_type (void_type_node), 0);
decl = build_decl (VAR_DECL, ident, type);
- make_decl_rtl (decl, 0, 1);
+ make_decl_rtl (decl, 0);
TREE_USED (decl) = 1;
decls
= tree_cons (NULL_TREE, build_unary_op (ADDR_EXPR, decl, 1), decls);
DECL_ARTIFICIAL (decl) = 1;
DECL_CONTEXT (decl) = 0;
- make_decl_rtl (decl, 0, 1);
+ make_decl_rtl (decl, 0);
pushdecl_top_level (decl);
return decl;
DECL_CONTEXT (decl) = 0;
DECL_ARTIFICIAL (decl) = 1;
- make_decl_rtl (decl, 0, 1);
+ make_decl_rtl (decl, 0);
pushdecl_top_level (decl);
return decl;
DECL_CONTEXT (decl) = 0;
DECL_ARTIFICIAL (decl) = 1;
- make_decl_rtl (decl, 0, 1);
+ make_decl_rtl (decl, 0);
pushdecl_top_level (decl);
return decl;
TREE_USED (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
- make_decl_rtl (decl, 0, 1);
+ make_decl_rtl (decl, 0);
pushdecl_top_level (decl);
}
/* Tell assembler to switch to the section for the exception table. */
extern void exception_section PARAMS ((void));
-/* Create the rtl to represent a function, for a function definition.
- DECL is a FUNCTION_DECL node which describes which function.
- The rtl is stored into DECL. */
-extern void make_function_rtl PARAMS ((tree));
-
/* Declare DECL to be a weak symbol. */
extern void declare_weak PARAMS ((tree));
#endif /* TREE_CODE */
extern int decode_reg_name PARAMS ((const char *));
#ifdef TREE_CODE
-/* Create the DECL_RTL for a declaration for a static or external variable
- or static or external function.
- ASMSPEC, if not 0, is the string which the user specified
- as the assembler symbol name.
- TOP_LEVEL is nonzero if this is a file-scope variable.
-
- This is never called for PARM_DECL nodes. */
-extern void make_decl_rtl PARAMS ((tree, const char *, int));
-
/* Make the rtl for variable VAR be volatile.
Use this only for static variables. */
extern void make_var_volatile PARAMS ((tree));
announce_function (fndecl);
current_function_decl = fndecl;
DECL_INITIAL (fndecl) = error_mark_node;
- make_function_rtl (fndecl);
+ make_decl_rtl (fndecl, NULL);
init_function_start (fndecl, input_filename, lineno);
pushlevel (0);
expand_function_start (fndecl, 0);
|| TREE_CODE (decl) == FUNCTION_DECL)
{
timevar_push (TV_VARCONST);
- make_decl_rtl (decl, asmspec, top_level);
+ make_decl_rtl (decl, asmspec);
/* Initialized extern variable exists to be replaced
with its value, or represents something that will be
output in another file. */
if (decode_reg_name (asmspec) >= 0)
{
DECL_RTL (decl) = 0;
- make_decl_rtl (decl, asmspec, top_level);
+ make_decl_rtl (decl, asmspec);
}
else
{
error ("invalid register name `%s' for register variable", asmspec);
DECL_REGISTER (decl) = 0;
- make_decl_rtl (decl, NULL, top_level);
+ make_decl_rtl (decl, NULL);
}
}
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
extern void fixup_signed_type PARAMS ((tree));
/* varasm.c */
-extern void make_decl_rtl PARAMS ((tree, const char *, int));
+extern void make_decl_rtl PARAMS ((tree, const char *));
extern void make_decl_one_only PARAMS ((tree));
extern int supports_one_only PARAMS ((void));
extern void variable_section PARAMS ((tree, int));
#endif
}
\f
-/* Create the rtl to represent a function, for a function definition.
- DECL is a FUNCTION_DECL node which describes which function.
- The rtl is stored into DECL. */
-
-void
-make_function_rtl (decl)
- tree decl;
-{
- const char *name;
- const char *new_name;
-
- if (DECL_RTL (decl) != 0)
- {
- /* ??? Another way to do this would be to do what halfpic.c does
- and maintain a hashed table of such critters. */
- /* ??? Another way to do this would be to pass a flag bit to
- ENCODE_SECTION_INFO saying whether this is a new decl or not. */
- /* Let the target reassign the RTL if it wants.
- This is necessary, for example, when one machine specific
- decl attribute overrides another. */
-#ifdef REDO_SECTION_INFO_P
- if (REDO_SECTION_INFO_P (decl))
- ENCODE_SECTION_INFO (decl);
-#endif
- return;
- }
-
- name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
- new_name = name;
-
- /* Rename a nested function to avoid conflicts, unless it's a member of
- a local class, in which case the class name is already unique. */
- if (decl_function_context (decl) != 0
- && ! TYPE_P (DECL_CONTEXT (decl))
- && DECL_INITIAL (decl) != 0
- && DECL_RTL (decl) == 0)
- {
- char *label;
- ASM_FORMAT_PRIVATE_NAME (label, name, var_labelno);
- var_labelno++;
- new_name = label;
- }
- /* When -fprefix-function-name is used, every function name is
- prefixed. Even static functions are prefixed because they
- could be declared latter. Note that a nested function name
- is not prefixed. */
- else if (flag_prefix_function_name)
- {
- size_t name_len = IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (decl));
- char *pname;
-
- pname = alloca (name_len + CHKR_PREFIX_SIZE + 1);
- memcpy (pname, CHKR_PREFIX, CHKR_PREFIX_SIZE);
- memcpy (pname + CHKR_PREFIX_SIZE, name, name_len + 1);
- new_name = pname;
- }
-
- if (name != new_name)
- {
- DECL_ASSEMBLER_NAME (decl) = get_identifier (new_name);
- name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
- }
-
- DECL_RTL (decl)
- = gen_rtx_MEM (DECL_MODE (decl),
- gen_rtx_SYMBOL_REF (Pmode, name));
-
- /* Optionally set flags or add text to the name to record
- information such as that it is a function name. If the name
- is changed, the macro ASM_OUTPUT_LABELREF will have to know
- how to strip this information. */
-#ifdef ENCODE_SECTION_INFO
- ENCODE_SECTION_INFO (decl);
-#endif
-}
-
-
/* Given NAME, a putative register name, discard any customary prefixes. */
static const char *
or static or external function.
ASMSPEC, if not 0, is the string which the user specified
as the assembler symbol name.
- TOP_LEVEL is nonzero if this is a file-scope variable.
This is never called for PARM_DECL nodes. */
void
-make_decl_rtl (decl, asmspec, top_level)
+make_decl_rtl (decl, asmspec)
tree decl;
const char *asmspec;
- int top_level;
{
+ int top_level = (DECL_CONTEXT (decl) == NULL_TREE);
const char *name = 0;
const char *new_name = 0;
int reg_number;
{
int nregs;
- if (DECL_INITIAL (decl) != 0 && top_level)
+ if (DECL_INITIAL (decl) != 0 && !TREE_STATIC (decl))
{
DECL_INITIAL (decl) = 0;
error ("global register variable has initial value");
REGNO (DECL_RTL (decl)) = reg_number;
REG_USERVAR_P (DECL_RTL (decl)) = 1;
- if (top_level)
+ if (TREE_STATIC (decl))
{
/* Make this register global, so not usable for anything
else. */
{
const char *name;
- make_decl_rtl (decl, (char *) 0, 1);
+ make_decl_rtl (decl, (char *) 0);
name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
#ifdef ASM_OUTPUT_DEF