gas: avoid spurious failures in non-ELF targets in the SPARC testsuite.
[deliverable/binutils-gdb.git] / gas / config / tc-metag.c
index 10ed046e22313f09c9f27ebcb15655f0d2c098ab..bbc34f7ccd699fad6b960a7e763c1f58a75b9761 100644 (file)
@@ -24,7 +24,6 @@
 #include "symcat.h"
 #include "safe-ctype.h"
 #include "hashtab.h"
-#include "libbfd.h"
 
 #include <stdio.h>
 
@@ -6331,7 +6330,7 @@ create_mnemonic_htab (void)
       insn_templates **slot = NULL;
       insn_templates *new_entry;
 
-      new_entry = xmalloc (sizeof (insn_templates));
+      new_entry = XNEW (insn_templates);
 
       new_entry->template = template;
       new_entry->next = NULL;
@@ -6416,7 +6415,7 @@ create_dspreg_htabs (void)
 
       /* Make sure there are no hash table collisions, which would
         require chaining entries.  */
-      BFD_ASSERT (*slot == NULL);
+      gas_assert (*slot == NULL);
       *slot = reg;
     }
 
@@ -6439,7 +6438,7 @@ create_dspreg_htabs (void)
 
          /* Make sure there are no hash table collisions, which would
             require chaining entries.  */
-         BFD_ASSERT (*slot == NULL);
+         gas_assert (*slot == NULL);
          *slot = reg;
        }
     }
@@ -6486,7 +6485,7 @@ create_scond_htab (void)
                                                        scond, INSERT);
       /* Make sure there are no hash table collisions, which would
         require chaining entries.  */
-      BFD_ASSERT (*slot == NULL);
+      gas_assert (*slot == NULL);
       *slot = scond;
     }
 }
@@ -6847,7 +6846,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED,
 void
 metag_handle_align (fragS * fragP)
 {
-  static char const noop[4] = { 0xfe, 0xff, 0xff, 0xa0 };
+  static unsigned char const noop[4] = { 0xfe, 0xff, 0xff, 0xa0 };
   int bytes, fix;
   char *p;
 
@@ -7006,8 +7005,8 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp)
 {
   arelent *reloc;
 
-  reloc                      = (arelent *) xmalloc (sizeof (arelent));
-  reloc->sym_ptr_ptr  = (asymbol **) xmalloc (sizeof (asymbol *));
+  reloc                      = XNEW (arelent);
+  reloc->sym_ptr_ptr  = XNEW (asymbol *);
   *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
   reloc->address      = fixp->fx_frag->fr_address + fixp->fx_where;
 
This page took 0.025465 seconds and 4 git commands to generate.