Commit c7319d87 by Richard Earnshaw Committed by Richard Earnshaw

arm.c: Include obstack.h

* arm.c: Include obstack.h
(minipool_obstack, minipool_startobj): Define.
(arm_add_gc_roots): Initialize them.
(create_fix_barrier): Use our new obstack.
(push_minipool_barrier, push_minipool_fix): Likewise.
(arm_reorg): Release obstack memory.

From-SVN: r36860
parent fccf9848
2000-10-13 Richard Earnshaw <rearnsha@arm.com>
* arm.c: Include obstack.h
(minipool_obstack, minipool_startobj): Define.
(arm_add_gc_roots): Initialize them.
(create_fix_barrier): Use our new obstack.
(push_minipool_barrier, push_minipool_fix): Likewise.
(arm_reorg): Release obstack memory.
2000-10-13 Jakub Jelinek <jakub@redhat.com> 2000-10-13 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.md (nonlocal_goto_receiver): Remove. * config/sparc/sparc.md (nonlocal_goto_receiver): Remove.
......
...@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */
#include "system.h" #include "system.h"
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
#include "obstack.h"
#include "regs.h" #include "regs.h"
#include "hard-reg-set.h" #include "hard-reg-set.h"
#include "real.h" #include "real.h"
...@@ -99,6 +100,13 @@ static int current_file_function_operand PARAMS ((rtx)); ...@@ -99,6 +100,13 @@ static int current_file_function_operand PARAMS ((rtx));
#undef Mmode #undef Mmode
#undef Ulong #undef Ulong
/* Obstack for minipool constant handling. */
static struct obstack minipool_obstack;
static char *minipool_startobj;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
/* The maximum number of insns skipped which will be conditionalised if /* The maximum number of insns skipped which will be conditionalised if
possible. */ possible. */
static int max_insns_skipped = 5; static int max_insns_skipped = 5;
...@@ -662,7 +670,9 @@ arm_add_gc_roots () ...@@ -662,7 +670,9 @@ arm_add_gc_roots ()
ggc_add_rtx_root (&arm_compare_op0, 1); ggc_add_rtx_root (&arm_compare_op0, 1);
ggc_add_rtx_root (&arm_compare_op1, 1); ggc_add_rtx_root (&arm_compare_op1, 1);
ggc_add_rtx_root (&arm_target_insn, 1); /* Not sure this is really a root */ ggc_add_rtx_root (&arm_target_insn, 1); /* Not sure this is really a root */
/* XXX: What about the minipool tables? */
gcc_obstack_init(&minipool_obstack);
minipool_startobj = (char *) obstack_alloc (&minipool_obstack, 0);
} }
/* Return 1 if it is possible to return using a single instruction. */ /* Return 1 if it is possible to return using a single instruction. */
...@@ -5375,7 +5385,7 @@ create_fix_barrier (fix, max_address) ...@@ -5375,7 +5385,7 @@ create_fix_barrier (fix, max_address)
emit_label_after (label, barrier); emit_label_after (label, barrier);
/* Create a minipool barrier entry for the new barrier. */ /* Create a minipool barrier entry for the new barrier. */
new_fix = (Mfix *) oballoc (sizeof (* new_fix)); new_fix = (Mfix *) obstack_alloc (&minipool_obstack, sizeof (* new_fix));
new_fix->insn = barrier; new_fix->insn = barrier;
new_fix->address = selected_address; new_fix->address = selected_address;
new_fix->next = fix->next; new_fix->next = fix->next;
...@@ -5391,7 +5401,7 @@ push_minipool_barrier (insn, address) ...@@ -5391,7 +5401,7 @@ push_minipool_barrier (insn, address)
rtx insn; rtx insn;
HOST_WIDE_INT address; HOST_WIDE_INT address;
{ {
Mfix * fix = (Mfix *) oballoc (sizeof (* fix)); Mfix * fix = (Mfix *) obstack_alloc (&minipool_obstack, sizeof (* fix));
fix->insn = insn; fix->insn = insn;
fix->address = address; fix->address = address;
...@@ -5418,7 +5428,7 @@ push_minipool_fix (insn, address, loc, mode, value) ...@@ -5418,7 +5428,7 @@ push_minipool_fix (insn, address, loc, mode, value)
enum machine_mode mode; enum machine_mode mode;
rtx value; rtx value;
{ {
Mfix * fix = (Mfix *) oballoc (sizeof (* fix)); Mfix * fix = (Mfix *) obstack_alloc (&minipool_obstack, sizeof (* fix));
#ifdef AOF_ASSEMBLER #ifdef AOF_ASSEMBLER
/* PIC symbol refereneces need to be converted into offsets into the /* PIC symbol refereneces need to be converted into offsets into the
...@@ -5671,6 +5681,9 @@ arm_reorg (first) ...@@ -5671,6 +5681,9 @@ arm_reorg (first)
directly. This can happen if the RTL gets split during final directly. This can happen if the RTL gets split during final
instruction generation. */ instruction generation. */
after_arm_reorg = 1; after_arm_reorg = 1;
/* Free the minipool memory. */
obstack_free (&minipool_obstack, minipool_startobj);
} }
/* Routines to output assembly language. */ /* Routines to output assembly language. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment