diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-04 07:11:05 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-04 07:11:05 +0000 |
commit | 1f3233d13f58417984cb2239d328b65e8d172744 (patch) | |
tree | 720630adca0f6b357e05c4feb8cbe33d556925ce /gcc/config/d30v | |
parent | 0dc11899d8781bca1da5f4421327d61890424808 (diff) | |
download | gcc-1f3233d13f58417984cb2239d328b65e8d172744.tar.gz |
Merge from pch-branch up to tag pch-commit-20020603.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54232 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/d30v')
-rw-r--r-- | gcc/config/d30v/d30v-protos.h | 4 | ||||
-rw-r--r-- | gcc/config/d30v/d30v.c | 50 | ||||
-rw-r--r-- | gcc/config/d30v/d30v.h | 4 |
3 files changed, 8 insertions, 50 deletions
diff --git a/gcc/config/d30v/d30v-protos.h b/gcc/config/d30v/d30v-protos.h index 8beaa7aea99..162a7172eb4 100644 --- a/gcc/config/d30v/d30v-protos.h +++ b/gcc/config/d30v/d30v-protos.h @@ -140,8 +140,8 @@ extern void debug_stack_info PARAMS ((d30v_stack_t *)); /* Define the information needed to generate branch and scc insns. This is stored from the compare operation. */ -extern struct rtx_def *d30v_compare_op0; -extern struct rtx_def *d30v_compare_op1; +extern GTY(()) rtx d30v_compare_op0; +extern GTY(()) rtx d30v_compare_op1; /* Define the information needed to modify the epilogue for EH. */ diff --git a/gcc/config/d30v/d30v.c b/gcc/config/d30v/d30v.c index 12ae39ad3b5..2ce3468140b 100644 --- a/gcc/config/d30v/d30v.c +++ b/gcc/config/d30v/d30v.c @@ -47,10 +47,7 @@ static void d30v_print_operand_memory_reference PARAMS ((FILE *, rtx)); static void d30v_build_long_insn PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, rtx, rtx)); -static void d30v_add_gc_roots PARAMS ((void)); -static void d30v_init_machine_status PARAMS ((struct function *)); -static void d30v_mark_machine_status PARAMS ((struct function *)); -static void d30v_free_machine_status PARAMS ((struct function *)); +static struct machine_function * d30v_init_machine_status PARAMS ((void)); static void d30v_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void d30v_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static int d30v_adjust_cost PARAMS ((rtx, rtx, rtx, int)); @@ -298,8 +295,6 @@ override_options () reg_class_from_letter['x'] = F0_REGS; reg_class_from_letter['y'] = F1_REGS; reg_class_from_letter['z'] = OTHER_FLAG_REGS; - - d30v_add_gc_roots (); } @@ -3482,35 +3477,10 @@ d30v_issue_rate () /* Routine to allocate, mark and free a per-function, machine specific structure. */ -static void -d30v_init_machine_status (p) - struct function *p; +static struct machine_function * +d30v_init_machine_status () { - p->machine = - (machine_function *) xcalloc (1, sizeof (machine_function)); -} - -static void -d30v_mark_machine_status (p) - struct function * p; -{ - if (p->machine == NULL) - return; - - ggc_mark_rtx (p->machine->eh_epilogue_sp_ofs); -} - -static void -d30v_free_machine_status (p) - struct function *p; -{ - struct machine_function *machine = p->machine; - - if (machine == NULL) - return; - - free (machine); - p->machine = NULL; + return ggc_alloc_cleared (sizeof (machine_function)); } /* Do anything needed before RTL is emitted for each function. */ @@ -3520,8 +3490,6 @@ d30v_init_expanders () { /* Arrange to save and restore machine status around nested functions. */ init_machine_status = d30v_init_machine_status; - mark_machine_status = d30v_mark_machine_status; - free_machine_status = d30v_free_machine_status; } /* Find the current function's return address. @@ -3536,13 +3504,3 @@ d30v_return_addr () { return get_hard_reg_initial_val (Pmode, GPR_LINK); } - -/* Called to register all of our global variables with the garbage - collector. */ - -static void -d30v_add_gc_roots () -{ - ggc_add_rtx_root (&d30v_compare_op0, 1); - ggc_add_rtx_root (&d30v_compare_op1, 1); -} diff --git a/gcc/config/d30v/d30v.h b/gcc/config/d30v/d30v.h index 122f535abcd..680f7c10cc2 100644 --- a/gcc/config/d30v/d30v.h +++ b/gcc/config/d30v/d30v.h @@ -1929,10 +1929,10 @@ typedef int CUMULATIVE_ARGS; /* A C structure for machine-specific, per-function data. This is added to the cfun structure. */ -typedef struct machine_function +typedef struct machine_function GTY(()) { /* Additionsl stack adjustment in __builtin_eh_throw. */ - struct rtx_def * eh_epilogue_sp_ofs; + rtx eh_epilogue_sp_ofs; } machine_function; |