This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Missed roots
- To: gcc-patches at gcc dot gnu dot org
- Subject: Missed roots
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 22 Sep 1999 08:11:52 -0600
- Reply-To: law at cygnus dot com
This fixes a variety of weirdness I was experiencing on MIPS platforms. We
forgot to register some roots.
Q. for the GC folks, did anyone go through all the initializer routines that
are called by compile_file to look for possible roots?
Anyway, here's the fix.
* regclass.c (init_regs): Add "top_of_stack" as a garbage
collection root.
Index: regclass.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/regclass.c,v
retrieving revision 1.60
diff -c -3 -p -r1.60 regclass.c
*** regclass.c 1999/09/20 09:59:51 1.60
--- regclass.c 1999/09/22 14:11:11
*************** init_regs ()
*** 460,465 ****
--- 460,466 ----
int i;
for (i = 0; i < MAX_MACHINE_MODE; i++)
top_of_stack[i] = gen_rtx_MEM (i, stack_pointer_rtx);
+ ggc_add_rtx_root (top_of_stack, MAX_MACHINE_MODE);
}
#endif
}