Add some machine-dependent GC roots.
* sparc.c: Include ggc.h. (sparc_add_gc_roots): New function. (mark_ultrasparc_pipeline_state): Likewise. (override_options): Call sparc_add_gc_roots. * pa.c: Include ggc.h. (pa_add_gc_roots): New function. (mark_deferred_plabels): Likewise. (override_options): Call pa_add_gc_roots. * mips.c: Include ggc.h. (mips_add_gc_roots): New function. (override_options): Use it. From-SVN: r29176
This commit is contained in:
parent
66815bff31
commit
d07d525a85
@ -1,3 +1,18 @@
|
||||
Tue Sep 7 17:15:21 1999 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
Add some machine-dependent GC roots.
|
||||
* sparc.c: Include ggc.h.
|
||||
(sparc_add_gc_roots): New function.
|
||||
(mark_ultrasparc_pipeline_state): Likewise.
|
||||
(override_options): Call sparc_add_gc_roots.
|
||||
* pa.c: Include ggc.h.
|
||||
(pa_add_gc_roots): New function.
|
||||
(mark_deferred_plabels): Likewise.
|
||||
(override_options): Call pa_add_gc_roots.
|
||||
* mips.c: Include ggc.h.
|
||||
(mips_add_gc_roots): New function.
|
||||
(override_options): Use it.
|
||||
|
||||
Tue Sep 7 11:39:41 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* cpperror.c (cpp_file_line_for_message): Constify a char*.
|
||||
|
@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "flags.h"
|
||||
#include "reload.h"
|
||||
#include "output.h"
|
||||
#include "ggc.h"
|
||||
|
||||
#if defined(USG) || !defined(HAVE_STAB_H)
|
||||
#include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */
|
||||
@ -107,6 +108,7 @@ static rtx mips_find_symbol PROTO ((rtx));
|
||||
static void abort_with_insn PROTO ((rtx, const char *))
|
||||
ATTRIBUTE_NORETURN;
|
||||
static int symbolic_expression_p PROTO ((rtx));
|
||||
static void mips_add_gc_roots PROTO ((void));
|
||||
|
||||
/* Global variables for machine-dependent things. */
|
||||
|
||||
@ -4509,6 +4511,9 @@ override_options ()
|
||||
if (align_functions == 0)
|
||||
align_functions = 8;
|
||||
}
|
||||
|
||||
/* Register global variables with the garbage collector. */
|
||||
mips_add_gc_roots ();
|
||||
}
|
||||
|
||||
/* On the mips16, we want to allocate $24 (T_REG) before other
|
||||
@ -8922,3 +8927,18 @@ mips_output_conditional_branch (insn,
|
||||
/* NOTREACHED */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Called to register all of our global variables with the garbage
|
||||
collector. */
|
||||
|
||||
static void
|
||||
mips_add_gc_roots ()
|
||||
{
|
||||
ggc_add_rtx_root (&mips_load_reg, 1);
|
||||
ggc_add_rtx_root (&mips_load_reg2, 1);
|
||||
ggc_add_rtx_root (&mips_load_reg3, 1);
|
||||
ggc_add_rtx_root (&mips_load_reg4, 1);
|
||||
ggc_add_rtx_root (branch_cmp, sizeof (branch_cmp) / sizeof (rtx));
|
||||
ggc_add_rtx_root (&embedded_pic_fnaddr_rtx, 1);
|
||||
ggc_add_rtx_root (&mips16_gp_pseudo_rtx, 1);
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "expr.h"
|
||||
#include "obstack.h"
|
||||
#include "toplev.h"
|
||||
#include "ggc.h"
|
||||
|
||||
static void restore_unscaled_index_insn_codes PROTO((rtx));
|
||||
static void record_unscaled_index_insn_codes PROTO((rtx));
|
||||
@ -45,6 +46,8 @@ static void pa_combine_instructions PROTO((rtx));
|
||||
static int pa_can_combine_p PROTO((rtx, rtx, rtx, int, rtx, rtx, rtx));
|
||||
static int forward_branch_p PROTO((rtx));
|
||||
static int shadd_constant_p PROTO((int));
|
||||
static void pa_add_gc_roots PROTO((void));
|
||||
static void mark_deferred_plabels PROTO((void *));
|
||||
|
||||
/* Save the operands last given to a compare for use when we
|
||||
generate a scc or bcc insn. */
|
||||
@ -176,6 +179,9 @@ override_options ()
|
||||
warning ("-g option disabled.");
|
||||
write_symbols = NO_DEBUG;
|
||||
}
|
||||
|
||||
/* Register global variables with the garbage collector. */
|
||||
pa_add_gc_roots ();
|
||||
}
|
||||
|
||||
|
||||
@ -6516,3 +6522,29 @@ insn_sets_and_refs_are_delayed (insn)
|
||||
&& GET_CODE (PATTERN (insn)) != CLOBBER
|
||||
&& get_attr_type (insn) == TYPE_MILLI));
|
||||
}
|
||||
|
||||
/* Mark ARG (which is really a struct deferred_plabel **) for GC. */
|
||||
|
||||
static void
|
||||
mark_deferred_plabels (arg)
|
||||
void *arg;
|
||||
{
|
||||
struct deferred_plabel *dp = *(struct deferred_plabel **) arg;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_deferred_plabels; ++i)
|
||||
ggc_mark_rtx (dp[i].internal_label);
|
||||
}
|
||||
|
||||
/* Called to register all of our global variables with the garbage
|
||||
collector. */
|
||||
|
||||
static void
|
||||
pa_add_gc_roots ()
|
||||
{
|
||||
ggc_add_rtx_root (&hppa_compare_op0, 1);
|
||||
ggc_add_rtx_root (&hppa_compare_op1, 1);
|
||||
ggc_add_rtx_root (&hp_profile_label_rtx, 1);
|
||||
ggc_add_root (&deferred_plabels, sizeof (&deferred_plabels), 1,
|
||||
&mark_deferred_plabels);
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "expr.h"
|
||||
#include "recog.h"
|
||||
#include "toplev.h"
|
||||
#include "ggc.h"
|
||||
|
||||
/* 1 if the caller has placed an "unimp" insn immediately after the call.
|
||||
This is used in v8 code when calling a function that returns a structure.
|
||||
@ -119,7 +120,8 @@ static int ultrasparc_adjust_cost PROTO((rtx, rtx, rtx, int));
|
||||
static void sparc_output_addr_vec PROTO((rtx));
|
||||
static void sparc_output_addr_diff_vec PROTO((rtx));
|
||||
static void sparc_output_deferred_case_vectors PROTO((void));
|
||||
|
||||
static void sparc_add_gc_roots PROTO ((void));
|
||||
static void mark_ultrasparc_pipeline_state PROTO ((void *));
|
||||
|
||||
#ifdef DWARF2_DEBUGGING_INFO
|
||||
extern char *dwarf2out_cfi_label ();
|
||||
@ -331,6 +333,9 @@ sparc_override_options ()
|
||||
{
|
||||
error ("profiling does not support code models other than medlow");
|
||||
}
|
||||
|
||||
/* Register global variables with the garbage collector. */
|
||||
sparc_add_gc_roots ();
|
||||
}
|
||||
|
||||
/* Miscellaneous utilities. */
|
||||
@ -7908,3 +7913,37 @@ sparc_function_block_profiler_exit(file)
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
||||
/* Mark ARG, which is really a struct ultrasparc_pipline_state *, for
|
||||
GC. */
|
||||
|
||||
static void
|
||||
mark_ultrasparc_pipeline_state (arg)
|
||||
void *arg;
|
||||
{
|
||||
struct ultrasparc_pipeline_state *ups;
|
||||
size_t i;
|
||||
|
||||
ups = (struct ultrasparc_pipeline_state *) arg;
|
||||
for (i = 0; i < sizeof (ups->group) / sizeof (rtx); ++i)
|
||||
ggc_mark_rtx (ups->group[i]);
|
||||
}
|
||||
|
||||
/* Called to register all of our global variables with the garbage
|
||||
collector. */
|
||||
|
||||
static void
|
||||
sparc_add_gc_roots ()
|
||||
{
|
||||
ggc_add_rtx_root (&sparc_compare_op0, 1);
|
||||
ggc_add_rtx_root (&sparc_compare_op1, 1);
|
||||
ggc_add_rtx_root (&leaf_label, 1);
|
||||
ggc_add_rtx_root (&global_offset_table, 1);
|
||||
ggc_add_rtx_root (&get_pc_symbol, 1);
|
||||
ggc_add_rtx_root (&sparc_addr_diff_list, 1);
|
||||
ggc_add_rtx_root (&sparc_addr_list, 1);
|
||||
ggc_add_root (ultra_pipe_hist,
|
||||
sizeof (ultra_pipe_hist) / sizeof (ultra_pipe_hist[0]),
|
||||
sizeof (ultra_pipe_hist[0]),
|
||||
&mark_ultrasparc_pipeline_state);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user