aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>1999-09-08 07:11:02 +0000
committerMichael Hayes <m.hayes@gcc.gnu.org>1999-09-08 07:11:02 +0000
commit7eb3fb5f9254d58fc95adc94fd1c8901e542e4e9 (patch)
tree8095b6f2570cd5d4c7f7e79dab4f6e2128c3a82a
parent64f8a718302d9cb98a8a138c2c0eb698aa40d981 (diff)
downloadgcc-7eb3fb5f9254d58fc95adc94fd1c8901e542e4e9.zip
gcc-7eb3fb5f9254d58fc95adc94fd1c8901e542e4e9.tar.gz
gcc-7eb3fb5f9254d58fc95adc94fd1c8901e542e4e9.tar.bz2
c4x.c: Include ggc.h.
* config/c4x/c4x.c: Include ggc.h. (c4x_add_gc_roots): New function. (c4x_override_options): Call c4x_add_gc_roots. From-SVN: r29195
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/c4x/c4x.c29
2 files changed, 28 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cc5a1ab..93c0fd5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Wed Sep 8 18:55:17 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * config/c4x/c4x.c: Include ggc.h.
+ (c4x_add_gc_roots): New function.
+ (c4x_override_options): Call c4x_add_gc_roots.
+
Wed Sep 8 00:00:16 1999 Richard Henderson <rth@cygnus.com>
* defaults.h (TARGET_ESC): Move ...
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 677c38c..58c214a 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -43,6 +43,7 @@
#include "loop.h"
#include "recog.h"
#include "c-tree.h"
+#include "ggc.h"
static int c4x_leaf_function;
@@ -135,17 +136,27 @@ struct rtx_def *c4x_compare_op0 = NULL_RTX;
struct rtx_def *c4x_compare_op1 = NULL_RTX;
char *c4x_rpts_cycles_string;
-int c4x_rpts_cycles = 0; /* Max. cycles for RPTS */
+int c4x_rpts_cycles = 0; /* Max. cycles for RPTS. */
char *c4x_cpu_version_string;
-int c4x_cpu_version = 40; /* CPU version C30/31/32/40/44 */
+int c4x_cpu_version = 40; /* CPU version C30/31/32/40/44. */
/* Pragma definitions. */
-tree code_tree = NULL_TREE;
-tree data_tree = NULL_TREE;
-tree pure_tree = NULL_TREE;
-tree noreturn_tree = NULL_TREE;
-tree interrupt_tree = NULL_TREE;
+static tree code_tree = NULL_TREE;
+static tree data_tree = NULL_TREE;
+static tree pure_tree = NULL_TREE;
+static tree noreturn_tree = NULL_TREE;
+static tree interrupt_tree = NULL_TREE;
+
+/* Called to register all of our global variables with the garbage
+ collector. */
+
+static void
+c4x_add_gc_roots ()
+{
+ ggc_add_rtx_root (&c4x_compare_op0, 1);
+ ggc_add_rtx_root (&c4x_compare_op1, 1);
+}
/* Override command line options.
@@ -205,8 +216,12 @@ c4x_override_options ()
This provides compatibility with the old -mno-aliases option. */
if (! TARGET_ALIASES && ! flag_argument_noalias)
flag_argument_noalias = 1;
+
+ /* Register global variables with the garbage collector. */
+ c4x_add_gc_roots ();
}
+
/* This is called before c4x_override_options. */
void
c4x_optimization_options (level, size)