c-decl.c (builtin_decls): Replace with first_builtin_decl and last_builtin_decl.

* c-decl.c (builtin_decls): Replace with first_builtin_decl
	and last_builtin_decl.
	(c_init_decl_processing): Initialize both.
	(c_reset_state): Iterate from first_builtin_decl to
	last_builtin_decl inclusive to reintroduce builtins.

From-SVN: r70218
This commit is contained in:
Zack Weinberg 2003-08-07 03:12:09 +00:00
parent 7c6e92558c
commit fdc49e10e6
2 changed files with 44 additions and 32 deletions

View File

@ -1,29 +1,37 @@
2003-08-06 Zack Weinberg <zack@codesourcery.com>
* c-decl.c (builtin_decls): Replace with first_builtin_decl
and last_builtin_decl.
(c_init_decl_processing): Initialize both.
(c_reset_state): Iterate from first_builtin_decl to
last_builtin_decl inclusive to reintroduce builtins.
2003-08-06 David Mosberger <davidm@hpl.hp.com>
* doc/extend.texi (Function Attributes): Document the IA-64 version
of the "model" attribute.
* doc/extend.texi (Function Attributes): Document the IA-64 version
of the "model" attribute.
* config/ia64/ia64.h (SYMBOL_FLAG_SMALL_ADDR): New macro.
(SYMBOL_REF_SMALL_ADDR_P): Ditto.
(PREDICATE_CODES): Mention "small_addr_symbolic_operand".
* config/ia64/ia64.h (SYMBOL_FLAG_SMALL_ADDR): New macro.
(SYMBOL_REF_SMALL_ADDR_P): Ditto.
(PREDICATE_CODES): Mention "small_addr_symbolic_operand".
* config/ia64/ia64.c (ia64_handle_model_attribute): New function.
(ia64_encode_section_info): Likewise.
(ia64_attribute_table): Add "model" attribute.
(TARGET_ENCODE_SECTION_INFO): Define.
(small_addr_symbolic_operand): New function.
(got_symbolic_operand): Return 0 for a symbolref to an object
in the small address area.
(enum ia64_addr_area): New type.
(small_ident1): New variable.
(small_ident2): Likewise.
(init_idents): New function.
(ia64_get_addr_area): Likewise.
(ia64_encode_addr_area): Likewise.
(ia64_encode_section_info): Likewise.
(ia64_expand_load_address): For symbolic references to objects in
the small-address-area, load the address via gen_rtx_SET() (which,
eventually, will expand into "addl").
* config/ia64/ia64.c (ia64_handle_model_attribute): New function.
(ia64_encode_section_info): Likewise.
(ia64_attribute_table): Add "model" attribute.
(TARGET_ENCODE_SECTION_INFO): Define.
(small_addr_symbolic_operand): New function.
(got_symbolic_operand): Return 0 for a symbolref to an object
in the small address area.
(enum ia64_addr_area): New type.
(small_ident1): New variable.
(small_ident2): Likewise.
(init_idents): New function.
(ia64_get_addr_area): Likewise.
(ia64_encode_addr_area): Likewise.
(ia64_encode_section_info): Likewise.
(ia64_expand_load_address): For symbolic references to objects in
the small-address-area, load the address via gen_rtx_SET() (which,
eventually, will expand into "addl").
2003-08-06 Per Bothner <pbothner@apple.com>

View File

@ -130,9 +130,10 @@ static GTY(()) tree c_scope_stmt_stack;
some other global meaning for that identifier. */
static GTY(()) tree truly_local_externals;
/* A list of the builtin file-scope DECLs. */
/* All the builtins; this is a subset of the entries of global_scope. */
static GTY(()) tree builtin_decls;
static GTY(()) tree first_builtin_decl;
static GTY(()) tree last_builtin_decl;
/* A DECL for the current file-scope context. */
@ -2288,7 +2289,8 @@ c_init_decl_processing (void)
make_fname_decl = c_make_fname_decl;
start_fname_decls ();
builtin_decls = global_scope->names;
first_builtin_decl = global_scope->names;
last_builtin_decl = global_scope->names_last;
}
/* Create the VAR_DECL for __FUNCTION__ etc. ID is the name to give the
@ -6869,8 +6871,10 @@ c_reset_state (void)
current_file_decl = build_decl (TRANSLATION_UNIT_DECL, NULL, NULL);
TREE_CHAIN (current_file_decl) = file_scope_decl;
/* Reintroduce the global declarations. */
for (link = builtin_decls; link; link = TREE_CHAIN (link))
/* Reintroduce the builtin declarations. */
for (link = first_builtin_decl;
link != TREE_CHAIN (last_builtin_decl);
link = TREE_CHAIN (link))
pushdecl (copy_node (link));
}