aboutsummaryrefslogtreecommitdiff
path: root/opcodes/openrisc-desc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-05-15 20:54:50 +0000
committerNick Clifton <nickc@redhat.com>2002-05-15 20:54:50 +0000
commita978a3e5d8dec1a24c0851ecf16e241f7a23f946 (patch)
treedf41ce89873e433333215fc9550a1d411a2ab157 /opcodes/openrisc-desc.c
parentc899585bc7835ebb2c56947f13ebbfc7ea8e6b7d (diff)
downloadgdb-a978a3e5d8dec1a24c0851ecf16e241f7a23f946.zip
gdb-a978a3e5d8dec1a24c0851ecf16e241f7a23f946.tar.gz
gdb-a978a3e5d8dec1a24c0851ecf16e241f7a23f946.tar.bz2
Regernate cgen built files.
Diffstat (limited to 'opcodes/openrisc-desc.c')
-rw-r--r--opcodes/openrisc-desc.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/opcodes/openrisc-desc.c b/opcodes/openrisc-desc.c
index e5eded9..f66514c 100644
--- a/opcodes/openrisc-desc.c
+++ b/opcodes/openrisc-desc.c
@@ -1017,10 +1017,43 @@ void
openrisc_cgen_cpu_close (cd)
CGEN_CPU_DESC cd;
{
+ unsigned int i;
+ CGEN_INSN *insns;
+
+ if (cd->macro_insn_table.init_entries)
+ {
+ insns = cd->macro_insn_table.init_entries;
+ for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns)
+ {
+ if (CGEN_INSN_RX ((insns)))
+ regfree(CGEN_INSN_RX (insns));
+ }
+ }
+
+ if (cd->insn_table.init_entries)
+ {
+ insns = cd->insn_table.init_entries;
+ for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns)
+ {
+ if (CGEN_INSN_RX (insns))
+ regfree(CGEN_INSN_RX (insns));
+ }
+ }
+
+
+
+ if (cd->macro_insn_table.init_entries)
+ free ((CGEN_INSN *) cd->macro_insn_table.init_entries);
+
if (cd->insn_table.init_entries)
free ((CGEN_INSN *) cd->insn_table.init_entries);
+
if (cd->hw_table.entries)
free ((CGEN_HW_ENTRY *) cd->hw_table.entries);
+
+ if (cd->operand_table.entries)
+ free ((CGEN_HW_ENTRY *) cd->operand_table.entries);
+
free (cd);
}