Fix memory leaks for IA-64 opcode idescs.
authorJim Wilson <wilson@tuliptree.org>
Wed, 2 Aug 2000 21:24:54 +0000 (21:24 +0000)
committerJim Wilson <wilson@tuliptree.org>
Wed, 2 Aug 2000 21:24:54 +0000 (21:24 +0000)
gas/
* config/tc-ia64.c (emit_one_bundle): Call ia64_free_opcode
before ia64_find_opcode.
(md_assemble): Likewise.
opcodes/
* ia64-dis.c (print_insn_ia64): Call ia64_free_opcode at end.

gas/ChangeLog
gas/config/tc-ia64.c
opcodes/ChangeLog
opcodes/ia64-dis.c

index 57f6fde160662c4eab56c827838893e65519ea05..be071af7bf2d03d1eb4266ee02af5e1346e09467 100644 (file)
@@ -1,3 +1,9 @@
+2000-08-02  Jim Wilson  <wilson@cygnus.com>
+
+       * config/tc-ia64.c (emit_one_bundle): Call ia64_free_opcode
+       before ia64_find_opcode.
+       (md_assemble): Likewise.
+
 2000-08-01  Nick Clifton  <nickc@cygnus.com>
 
        * config/tc-arm.c (do_mrs): Fix skip fo 'cpsr_all' flag.
index abcfe63cb0c0165899ae1ad1ef500d33f50c7fd8..c704cc68df3d5f368e26628ccbbdef376297c526 100644 (file)
@@ -5390,6 +5390,7 @@ emit_one_bundle ()
            as_fatal ("emit_one_bundle: unexpected dynamic op");
 
          sprintf (mnemonic, "%s.%c", idesc->name, "?imbf??"[insn_unit]);
+         ia64_free_opcode (idesc);
          md.slot[curr].idesc = idesc = ia64_find_opcode (mnemonic);
 #if 0
          know (!idesc->next);  /* no resolved dynamic ops have collisions */
@@ -8493,6 +8494,7 @@ md_assemble (str)
            mnemonic = "addl";
          else
            mnemonic = "adds";
+         ia64_free_opcode (idesc);
          idesc = ia64_find_opcode (mnemonic);
 #if 0
          know (!idesc->next);
@@ -8516,6 +8518,7 @@ md_assemble (str)
            mnemonic = "mov.i";
          else
            mnemonic = "mov.m";
+         ia64_free_opcode (idesc);
          idesc = ia64_find_opcode (mnemonic);
          while (idesc != NULL
                 && (idesc->operands[0] != opnd1
index 4d34acaeb7ebedca4c4fb91905f27e49513cda6b..d4af2a2395fe9f9e6d5ea271c4211dcb58c4bad1 100644 (file)
@@ -1,3 +1,7 @@
+2000-08-02  Jim Wilson  <wilson@cygnus.com>
+       
+       * ia64-dis.c (print_insn_ia64): Call ia64_free_opcode at end.
+
 2000-07-28  Ben Elliston  <bje@redhat.com>
 
        * Makefile.am (CGEN, CGENDEPS, CGENDIR, CGENFLAGS): New.
index 7a68597de1502af8b70bf750bfe29e6157e413f8..d4ea62b505dfff86bc4dbbd622ad957e6aa4e0e8 100644 (file)
@@ -254,6 +254,7 @@ print_insn_ia64 (bfd_vma memaddr, struct disassemble_info *info)
     (*info->fprintf_func) (info->stream, ";;");
 
  done:
+  ia64_free_opcode (idesc);
   if (slotnum == 2)
     retval += 16 - 3*slot_multiplier;
   return retval;