diff options
author | Bernd Schmidt <bernds@cygnus.co.uk> | 1999-09-06 21:28:22 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-09-06 21:28:22 +0000 |
commit | 1526a0606bb9b5ea571f0b1b68f2181fdbd2e12f (patch) | |
tree | 2092d851d6543942e355d2ca28226abc3bbe2721 /gcc/config/i386/i386.c | |
parent | 2e28f042c025317bc5c73b736cb0bd8e62f6ac60 (diff) | |
download | gcc-1526a0606bb9b5ea571f0b1b68f2181fdbd2e12f.tar.gz |
Makefile.in (C_AND_OBJC_OBJS): Remove ggc-callbacks.o.
* Makefile.in (C_AND_OBJC_OBJS): Remove ggc-callbacks.o.
(c-parse.o, c-decl.o, c-lang.o, c-lex.o, c-common.o,
$(out_object_file)): Depend on ggc.h.
* c-common.c: Include "ggc.h".
(combine_strings): If doing GC, use ggc_alloc_string.
* c-decl.c: Include "ggc.h".
(ggc_p): Define with value 0.
(mark_binding_level): New function.
(init_decl_processing): Add GC roots.
(mark_c_function_context): New function.
(lang_mark_false_label_stack): New function.
(lang_mark_tree): New function.
(lang_cleanup_tree): New function.
* c-lang.c: Include "ggc.h".
(lang_init): Call c_parse_init.
* c-lex.c: Include "ggc.h".
(check_linenum): If doing GC, don't copy filenames to permanent
obstack.
* c-parse.in: Include "ggc.h".
(c_parse_init): New function.
* c-tree.h (c_parse_init, mark_c_function_context): Declare.
* objc/Make-lang.in (objc-parse.o): Depend on ggc.h.
* except.c (mark_eh_state): Mark more state.
* function.c (mark_function_state): Likewise.
* ggc-simple.c (ggc_alloc_rtvec): Bring in sync with non-gc version.
(ggc_alloc_string) [GGC_DUMP]: Fix typo.
* toplev.c (mark_file_stack): New function.
(compile_file): If doing GC, use ggc_alloc_string on input filename.
(main): Add root for input_file_stack.
* i386.c: Include "ggc.h".
(ix86_mark_machine_status): New function.
(override_options): Set mark_machine_status.
From-SVN: r29143
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r-- | gcc/config/i386/i386.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 04b79b8d7e8..4c1460cc9bf 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */ #include "expr.h" #include "toplev.h" #include "basic-block.h" +#include "ggc.h" #ifdef EXTRA_CONSTRAINT /* If EXTRA_CONSTRAINT is defined, then the 'S' @@ -248,6 +249,7 @@ static void ix86_reorder_insn PROTO ((rtx *, rtx *)); static rtx * ix86_pent_find_pair PROTO ((rtx *, rtx *, enum attr_pent_pair, rtx)); static void ix86_init_machine_status PROTO ((struct function *)); +static void ix86_mark_machine_status PROTO ((struct function *)); struct ix86_address { @@ -353,6 +355,7 @@ override_options () /* Arrange to set up i386_stack_locals for all functions. */ init_machine_status = ix86_init_machine_status; + mark_machine_status = ix86_mark_machine_status; /* Validate registers in register allocation order. */ if (ix86_reg_alloc_order) @@ -4962,7 +4965,7 @@ ix86_expand_strlensi_unroll_1 (out, align_rtx, scratch) static void ix86_init_machine_status (p) - struct function *p; + struct function *p; { enum machine_mode mode; int n; @@ -4975,6 +4978,20 @@ ix86_init_machine_status (p) ix86_stack_locals[(int) mode][n] = NULL_RTX; } +/* Mark machine specific bits of P for GC. */ +static void +ix86_mark_machine_status (p) + struct function *p; +{ + enum machine_mode mode; + int n; + + for (mode = VOIDmode; (int) mode < (int) MAX_MACHINE_MODE; + mode = (enum machine_mode) ((int) mode + 1)) + for (n = 0; n < MAX_386_STACK_LOCALS; n++) + ggc_mark_rtx (p->machine->stack_locals[(int) mode][n]); +} + /* Return a MEM corresponding to a stack slot with mode MODE. Allocate a new slot if necessary. |