This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Missed roots



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
  }






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]