+Thu Sep 9 15:24:59 BST 1999 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm.c: Include "ggc.h".
+ (arm_add_gc_roots): New function.
+ (arm_override_options): Call it.
+ (aof_pic_entry): Add a GC root for aof_pic_label when it's allocated.
+
+ * arm.md (define_asm_attributes): Add a pool_range attribute.
+
Thu Sep 9 12:32:57 BST 1999 Nathan Sidwell <nathan@acm.org>
* extend.texi (Volatiles): New node.
#include "expr.h"
#include "toplev.h"
#include "recog.h"
+#include "ggc.h"
/* The maximum number of insns skipped which will be conditionalised if
possible. */
static void emit_sfm PROTO ((int, int));
static enum arm_cond_code get_arm_condition_code PROTO ((rtx));
static int const_ok_for_op RTX_CODE_PROTO ((HOST_WIDE_INT, Rcode));
+static void arm_add_gc_roots PROTO ((void));
/* True if we are currently building a constant table. */
int making_const_table;
max_insns_skipped = 6;
else if (arm_is_strong)
max_insns_skipped = 3;
+
+ /* Register global variables with the garbage collector. */
+ arm_add_gc_roots ();
+}
+
+static void
+arm_add_gc_roots ()
+{
+ ggc_add_rtx_root (&arm_compare_op0, 1);
+ ggc_add_rtx_root (&arm_compare_op1, 1);
+ ggc_add_rtx_root (&arm_target_insn, 1); /* Not sure this is really a root */
+ /* XXX: What about the minipool tables? */
}
+
\f
/* Return 1 if it is possible to return using a single instruction */
if (aof_pic_label == NULL_RTX)
{
+ /* We mark this here and not in arm_add_gc_roots() to avoid
+ polluting even more code with ifdefs, and because it never
+ contains anything useful until we assign to it here. */
+ ggc_add_rtx_root (&aof_pic_label, 1);
/* This needs to persist throughout the compilation. */
end_temporary_allocation ();
aof_pic_label = gen_rtx_SYMBOL_REF (Pmode, "x$adcons");
(define_attr "pool_range" "" (const_int 0))
; An assembler sequence may clobber the condition codes without us knowing
+; If such an insn references the pool, then we have no way of knowing how,
+; so use the most conservative value for pool_range.
(define_asm_attributes
[(set_attr "conds" "clob")
- (set_attr "length" "4")])
+ (set_attr "length" "4")
+ (set_attr "pool_range" "250")])
; TYPE attribute is used to detect floating point instructions which, if
; running on a co-processor can run in parallel with other, basic instructions