OSDN Git Service

* gas/app, gas/as.c, gas/as.h, gas/atof-generic.c, gas/cgen.c,
authorNick Clifton <nickc@redhat.com>
Mon, 22 Jun 2009 17:56:02 +0000 (17:56 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 22 Jun 2009 17:56:02 +0000 (17:56 +0000)
        gas/config/atof-ieee.c, gas/config/obj-aout.c,
        gas/config/obj-coff.c, gas/config/obj-ecoff.c,
        gas/config/obj-elf.c, gas/config/obj-som.c, gas/config/tc-alpha.c,
        gas/config/tc-arc.c, gas/config/tc-arm.c, gas/config/tc-cr16.c,
        gas/config/tc-cris.c, gas/config/tc-crx.c, gas/config/tc-d30v.c,
        gas/config/tc-dlx.c, gas/config/tc-hppa.c, gas/config/tc-i370.c,
        gas/config/tc-i386-intel.c, gas/config/tc-i386.c,
        gas/config/tc-i860.c, gas/config/tc-i960.c, gas/config/tc-ia64.c,
        gas/config/tc-iq2000.c, gas/config/tc-m32c.c,
        gas/config/tc-m32r.c, gas/config/tc-m68hc11.c,
        gas/config/tc-m68k.c, gas/config/tc-maxq.c, gas/config/tc-mcore.c,
        gas/config/tc-mep.c, gas/config/tc-mips.c, gas/config/tc-mmix.c,
        gas/config/tc-mn10300.c, gas/config/tc-moxie.c,
        gas/config/tc-ns32k.c, gas/config/tc-pj.c, gas/config/tc-ppc.c,
        gas/config/tc-s390.c, gas/config/tc-score.c,
        gas/config/tc-score7.c, gas/config/tc-sh.c, gas/config/tc-sparc.c,
        gas/config/tc-spu.c, gas/config/tc-tic30.c, gas/config/tc-vax.c,
        gas/config/tc-xtensa.c, gas/config/xtensa-relax.c,
        gas/dw2gencfi.c, gas/dwarf2dbg.c, gas/ehopt.c, gas/expr.c,
        gas/frags.c, gas/input-file.c, gas/read.c, gas/sb.c,
        gas/subsegs.c, gas/symbols.c, gas/write.c: Change the name of the
        gas macro `assert' to `gas_assert'.

65 files changed:
gas/ChangeLog
gas/app.c
gas/as.c
gas/as.h
gas/atof-generic.c
gas/cgen.c
gas/config/atof-ieee.c
gas/config/obj-aout.c
gas/config/obj-coff.c
gas/config/obj-ecoff.c
gas/config/obj-elf.c
gas/config/obj-som.c
gas/config/tc-alpha.c
gas/config/tc-arc.c
gas/config/tc-arm.c
gas/config/tc-bfin.c
gas/config/tc-cr16.c
gas/config/tc-cris.c
gas/config/tc-crx.c
gas/config/tc-d30v.c
gas/config/tc-dlx.c
gas/config/tc-hppa.c
gas/config/tc-i370.c
gas/config/tc-i386-intel.c
gas/config/tc-i386.c
gas/config/tc-i860.c
gas/config/tc-i960.c
gas/config/tc-ia64.c
gas/config/tc-iq2000.c
gas/config/tc-m32c.c
gas/config/tc-m32r.c
gas/config/tc-m68hc11.c
gas/config/tc-m68k.c
gas/config/tc-maxq.c
gas/config/tc-mcore.c
gas/config/tc-mep.c
gas/config/tc-mips.c
gas/config/tc-mmix.c
gas/config/tc-mn10300.c
gas/config/tc-moxie.c
gas/config/tc-ns32k.c
gas/config/tc-pj.c
gas/config/tc-ppc.c
gas/config/tc-s390.c
gas/config/tc-score.c
gas/config/tc-score7.c
gas/config/tc-sh.c
gas/config/tc-sparc.c
gas/config/tc-spu.c
gas/config/tc-tic30.c
gas/config/tc-vax.c
gas/config/tc-xtensa.c
gas/config/xtensa-relax.c
gas/dw2gencfi.c
gas/dwarf2dbg.c
gas/ehopt.c
gas/expr.c
gas/frags.c
gas/input-file.c
gas/itbl-ops.c
gas/read.c
gas/sb.c
gas/subsegs.c
gas/symbols.c
gas/write.c

index 074e239..311d75b 100644 (file)
@@ -1,3 +1,29 @@
+2009-06-22  Martin Thuresson  <martin@mtme.org>
+       
+       * gas/app, gas/as.c, gas/as.h, gas/atof-generic.c, gas/cgen.c,
+       gas/config/atof-ieee.c, gas/config/obj-aout.c,
+       gas/config/obj-coff.c, gas/config/obj-ecoff.c,
+       gas/config/obj-elf.c, gas/config/obj-som.c, gas/config/tc-alpha.c,
+       gas/config/tc-arc.c, gas/config/tc-arm.c, gas/config/tc-cr16.c,
+       gas/config/tc-cris.c, gas/config/tc-crx.c, gas/config/tc-d30v.c,
+       gas/config/tc-dlx.c, gas/config/tc-hppa.c, gas/config/tc-i370.c,
+       gas/config/tc-i386-intel.c, gas/config/tc-i386.c,
+       gas/config/tc-i860.c, gas/config/tc-i960.c, gas/config/tc-ia64.c,
+       gas/config/tc-iq2000.c, gas/config/tc-m32c.c,
+       gas/config/tc-m32r.c, gas/config/tc-m68hc11.c,
+       gas/config/tc-m68k.c, gas/config/tc-maxq.c, gas/config/tc-mcore.c,
+       gas/config/tc-mep.c, gas/config/tc-mips.c, gas/config/tc-mmix.c,
+       gas/config/tc-mn10300.c, gas/config/tc-moxie.c,
+       gas/config/tc-ns32k.c, gas/config/tc-pj.c, gas/config/tc-ppc.c,
+       gas/config/tc-s390.c, gas/config/tc-score.c,
+       gas/config/tc-score7.c, gas/config/tc-sh.c, gas/config/tc-sparc.c,
+       gas/config/tc-spu.c, gas/config/tc-tic30.c, gas/config/tc-vax.c,
+       gas/config/tc-xtensa.c, gas/config/xtensa-relax.c,
+       gas/dw2gencfi.c, gas/dwarf2dbg.c, gas/ehopt.c, gas/expr.c,
+       gas/frags.c, gas/input-file.c, gas/read.c, gas/sb.c,
+       gas/subsegs.c, gas/symbols.c, gas/write.c: Change the name of the
+       gas macro `assert' to `gas_assert'.
+
 2009-06-22  Daniel Gutson <dgutson@codesourcery.com>
 
        * config/tc-arm.c (implicit_it_mode): New enum.
index b9832d1..53ca221 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -294,7 +294,7 @@ app_pop (char *arg)
     saved_input = NULL;
   else
     {
-      assert (saved->saved_input_len <= (int) (sizeof input_buffer));
+      gas_assert (saved->saved_input_len <= (int) (sizeof input_buffer));
       memcpy (input_buffer, saved->saved_input, saved->saved_input_len);
       saved_input = input_buffer;
       saved_input_len = saved->saved_input_len;
index 87e88da..cc945c6 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -1150,7 +1150,7 @@ main (int argc, char ** argv)
   PROGRESS (1);
 
   output_file_create (out_file_name);
-  assert (stdoutput != 0);
+  gas_assert (stdoutput != 0);
 
 #ifdef tc_init_after_args
   tc_init_after_args ();
index ba526dc..9494cd4 100644 (file)
--- a/gas/as.h
+++ b/gas/as.h
@@ -108,7 +108,7 @@ typedef int * va_list;
 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
 #define __PRETTY_FUNCTION__  ((char*)0)
 #endif
-#define assert(P) \
+#define gas_assert(P) \
   ((void) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)))
 #undef abort
 #define abort()                as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
@@ -235,7 +235,7 @@ typedef addressT valueT;
 
 #if ENABLE_CHECKING || defined (DEBUG)
 #ifndef know
-#define know(p) assert(p)      /* Verify our assumptions!  */
+#define know(p) gas_assert(p)  /* Verify our assumptions!  */
 #endif /* not yet defined */
 #else
 #define know(p)                        /* know() checks are no-op.ed  */
index 6b5db35..1b3fad6 100644 (file)
@@ -101,7 +101,7 @@ atof_generic (/* return pointer to just AFTER number we read.  */
   int seen_significant_digit;
 
 #ifdef ASSUME_DECIMAL_MARK_IS_DOT
-  assert (string_of_decimal_marks[0] == '.'
+  gas_assert (string_of_decimal_marks[0] == '.'
          && string_of_decimal_marks[1] == 0);
 #define IS_DECIMAL_MARK(c)     ((c) == '.')
 #else
index 79a46f6..950bda1 100644 (file)
@@ -1035,7 +1035,7 @@ gas_cgen_tc_gen_reloc (section, fixP)
       return NULL;
     }
 
-  assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
   reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
   *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
@@ -1062,4 +1062,3 @@ gas_cgen_begin ()
   else
     cgen_clear_signed_overflow_ok (gas_cgen_cpu_desc);
 }
-
index d901f31..cff06f7 100644 (file)
@@ -784,7 +784,7 @@ ieee_md_atof (int type,
       return _("Unrecognized or unsupported floating point constant");
     }
 
-  assert (prec <= MAX_LITTLENUMS);
+  gas_assert (prec <= MAX_LITTLENUMS);
 
   t = atof_ieee (input_line_pointer, type, words);
   if (t)
index c122c6b..0c89ba2 100644 (file)
@@ -132,7 +132,7 @@ obj_aout_frob_file_before_fix (void)
     x = bfd_set_section_contents (stdoutput, data_section, &b, (file_ptr) 0,
                                  (bfd_size_type) 1);
 
-  assert (x);
+  gas_assert (x);
 }
 
 static void
index 98d8d6c..c184cbb 100644 (file)
@@ -248,7 +248,7 @@ fetch_coff_debug_section (void)
       const asymbol *s;
 
       s = bfd_make_debug_symbol (stdoutput, NULL, 0);
-      assert (s != 0);
+      gas_assert (s != 0);
       debug_section = s->section;
     }
   return debug_section;
@@ -1098,7 +1098,7 @@ weak_altname2name (const char * name)
   char * weak_name;
   char * dot;
 
-  assert (weak_is_altname (name));
+  gas_assert (weak_is_altname (name));
 
   weak_name = xstrdup (name + 6);
   if ((dot = strchr (weak_name, '.')))
@@ -1119,7 +1119,7 @@ weak_uniquify (const char * name)
   if (an_external_name != NULL)
     unique = an_external_name;
 #endif
-  assert (weak_is_altname (name));
+  gas_assert (weak_is_altname (name));
 
   if (strchr (name + sizeof (weak_altprefix), '.'))
     return name;
@@ -1249,8 +1249,8 @@ coff_frob_symbol (symbolS *symp, int *punt)
       symbolS *weakp = symbol_find_noref (weak_altname2name
                                          (S_GET_NAME (symp)), 1);
 
-      assert (weakp);
-      assert (S_GET_NUMBER_AUXILIARY (weakp) == 1);
+      gas_assert (weakp);
+      gas_assert (S_GET_NUMBER_AUXILIARY (weakp) == 1);
 
       if (! S_IS_WEAK (weakp))
        {
@@ -1332,7 +1332,7 @@ coff_frob_symbol (symbolS *symp, int *punt)
 
       if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp))
        {
-         assert (S_GET_VALUE (symp) == 0);
+         gas_assert (S_GET_VALUE (symp) == 0);
          if (S_IS_WEAKREFD (symp))
            *punt = 1;
          else
@@ -1790,7 +1790,7 @@ coff_frob_section (segT sec)
   fragp = seg_info (sec)->frchainP->frch_root;
   while (fragp && fragp->fr_fix == 0)
     fragp = fragp->fr_next;
-  assert (fragp != 0 && fragp->fr_fix >= 12);
+  gas_assert (fragp != 0 && fragp->fr_fix >= 12);
 
   /* Store the values.  */
   p = fragp->fr_literal;
index 0c61ee3..35991da 100644 (file)
@@ -146,7 +146,7 @@ ecoff_frob_file (void)
   char *set;
 
   /* Build the ECOFF debugging information.  */
-  assert (ecoff_data (stdoutput) != 0);
+  gas_assert (ecoff_data (stdoutput) != 0);
   hdr = &ecoff_data (stdoutput)->debug_info.symbolic_header;
   ecoff_build_debug (hdr, &buf, debug_swap);
 
index 3d80ecc..3c72326 100644 (file)
@@ -459,7 +459,7 @@ obj_elf_visibility (int visibility)
       bfdsym = symbol_get_bfdsym (symbolP);
       elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
 
-      assert (elfsym);
+      gas_assert (elfsym);
 
       elfsym->internal_elf_sym.st_other &= ~3;
       elfsym->internal_elf_sym.st_other |= visibility;
@@ -1346,7 +1346,7 @@ obj_elf_vtable_inherit (int ignore ATTRIBUTE_UNUSED)
   if (bad)
     return NULL;
 
-  assert (symbol_get_value_expression (csym)->X_op == O_constant);
+  gas_assert (symbol_get_value_expression (csym)->X_op == O_constant);
   return fix_new (symbol_get_frag (csym),
                  symbol_get_value_expression (csym)->X_add_number,
                  0, psym, 0, 0, BFD_RELOC_VTABLE_INHERIT);
@@ -1779,7 +1779,7 @@ adjust_stab_sections (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
   nsyms = bfd_section_size (abfd, sec) / 12 - 1;
 
   p = seg_info (sec)->stabu.p;
-  assert (p != 0);
+  gas_assert (p != 0);
 
   bfd_h_put_16 (abfd, nsyms, p + 6);
   bfd_h_put_32 (abfd, strsz, p + 8);
@@ -2190,7 +2190,7 @@ elf_frob_file_after_relocs (void)
                  bfd_errmsg (bfd_get_error ()));
 
       sec = bfd_get_section_by_name (stdoutput, ".mdebug");
-      assert (sec != NULL);
+      gas_assert (sec != NULL);
 
       know (!stdoutput->output_has_begun);
 
index 99397a6..1d51283 100644 (file)
@@ -280,7 +280,7 @@ adjust_stab_sections (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
   nsyms = bfd_section_size (abfd, sec) / 12 - 1;
 
   p = seg_info (sec)->stabu.p;
-  assert (p != 0);
+  gas_assert (p != 0);
 
   bfd_h_put_16 (abfd, (bfd_vma) nsyms, (bfd_byte *) p + 6);
   bfd_h_put_32 (abfd, (bfd_vma) strsz, (bfd_byte *) p + 8);
index 1621c86..089c249 100644 (file)
@@ -1280,7 +1280,7 @@ load_expression (int targreg,
 
        assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
 
-       assert (insn.nfixups == 1);
+       gas_assert (insn.nfixups == 1);
        insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITERAL;
        insn.sequence = emit_lituse = next_sequence_num--;
 #endif /* OBJ_ECOFF */
@@ -1316,7 +1316,7 @@ load_expression (int targreg,
 
        assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
 
-       assert (insn.nfixups == 1);
+       gas_assert (insn.nfixups == 1);
        insn.fixups[0].reloc = BFD_RELOC_ALPHA_ELF_LITERAL;
        insn.sequence = emit_lituse = next_sequence_num--;
 #endif /* OBJ_ELF */
@@ -1376,7 +1376,7 @@ load_expression (int targreg,
                    memcpy (ensymname, ptr1, ptr2 - ptr1);
                    memcpy (ensymname + (ptr2 - ptr1), "..en", 5);
 
-                   assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
+                   gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
                    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_NOP;
                    ensym = symbol_find_or_make (ensymname);
                    ensym->sy_used = 1;
@@ -1405,7 +1405,7 @@ load_expression (int targreg,
                    psymname = (char *) xmalloc (ptr2 - ptr1 + 1);
                    memcpy (psymname, ptr1, ptr2 - ptr1);
                    psymname [ptr2 - ptr1] = 0;
-                   assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
+                   gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
                    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_LDA;
                    psym = symbol_find_or_make (psymname);
                    psym->sy_used = 1;
@@ -1544,7 +1544,7 @@ load_expression (int targreg,
 
       assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
 
-      assert (insn.nfixups == 1);
+      gas_assert (insn.nfixups == 1);
 #ifdef OBJ_ECOFF
       insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITERAL;
 #endif
@@ -1562,7 +1562,7 @@ load_expression (int targreg,
 
       assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
 
-      assert (insn.nfixups < MAX_INSN_FIXUPS);
+      gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
       insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
       insn.fixups[insn.nfixups].exp.X_op = O_absent;
       insn.nfixups++;
@@ -1765,7 +1765,7 @@ emit_insn (struct alpha_insn *insn)
        {
          reloc_howto_type *reloc_howto
            = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
-         assert (reloc_howto);
+         gas_assert (reloc_howto);
 
          size = bfd_get_reloc_size (reloc_howto);
 
@@ -1779,7 +1779,7 @@ emit_insn (struct alpha_insn *insn)
              break;
 #endif
            default:
-             assert (size >= 1 && size <= 4);
+             gas_assert (size >= 1 && size <= 4);
            }
  
          pcrel = reloc_howto->pc_relative;
@@ -2060,7 +2060,7 @@ assemble_insn (const struct alpha_opcode *opcode,
 
        case O_constant:
          image = insert_operand (image, operand, t->X_add_number, NULL, 0);
-         assert (reloc_operand == NULL);
+         gas_assert (reloc_operand == NULL);
          reloc_operand = operand;
          reloc_exp = t;
          break;
@@ -2090,7 +2090,7 @@ assemble_insn (const struct alpha_opcode *opcode,
              if (reloc == BFD_RELOC_UNUSED)
                reloc = operand->default_reloc;
 
-             assert (reloc_operand == NULL);
+             gas_assert (reloc_operand == NULL);
              reloc_operand = operand;
              reloc_exp = t;
            }
@@ -2180,7 +2180,7 @@ emit_ir_load (const expressionS *tok,
 
   if (lituse)
     {
-      assert (insn.nfixups < MAX_INSN_FIXUPS);
+      gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
       insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
       insn.fixups[insn.nfixups].exp.X_op = O_absent;
       insn.nfixups++;
@@ -2229,7 +2229,7 @@ emit_loadstore (const expressionS *tok,
 
   if (lituse)
     {
-      assert (insn.nfixups < MAX_INSN_FIXUPS);
+      gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
       insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
       insn.fixups[insn.nfixups].exp.X_op = O_absent;
       insn.nfixups++;
@@ -2275,7 +2275,7 @@ emit_ldXu (const expressionS *tok,
 
       if (lituse)
        {
-         assert (insn.nfixups < MAX_INSN_FIXUPS);
+         gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
          insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
          insn.fixups[insn.nfixups].exp.X_op = O_absent;
          insn.nfixups++;
@@ -2291,7 +2291,7 @@ emit_ldXu (const expressionS *tok,
 
       if (lituse)
        {
-         assert (insn.nfixups < MAX_INSN_FIXUPS);
+         gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
          insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
          insn.fixups[insn.nfixups].exp.X_op = O_absent;
          insn.nfixups++;
@@ -2427,7 +2427,7 @@ emit_stX (const expressionS *tok,
 
       if (lituse)
        {
-         assert (insn.nfixups < MAX_INSN_FIXUPS);
+         gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
          insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
          insn.fixups[insn.nfixups].exp.X_op = O_absent;
          insn.nfixups++;
@@ -2444,7 +2444,7 @@ emit_stX (const expressionS *tok,
 
       if (lituse)
        {
-         assert (insn.nfixups < MAX_INSN_FIXUPS);
+         gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
          insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
          insn.fixups[insn.nfixups].exp.X_op = O_absent;
          insn.nfixups++;
@@ -2460,7 +2460,7 @@ emit_stX (const expressionS *tok,
 
       if (lituse)
        {
-         assert (insn.nfixups < MAX_INSN_FIXUPS);
+         gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
          insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
          insn.fixups[insn.nfixups].exp.X_op = O_absent;
          insn.nfixups++;
@@ -2480,7 +2480,7 @@ emit_stX (const expressionS *tok,
 
       if (lituse)
        {
-         assert (insn.nfixups < MAX_INSN_FIXUPS);
+         gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
          insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
          insn.fixups[insn.nfixups].exp.X_op = O_absent;
          insn.nfixups++;
@@ -2845,7 +2845,7 @@ emit_jsrjmp (const expressionS *tok,
 
   if (lituse)
     {
-      assert (insn.nfixups < MAX_INSN_FIXUPS);
+      gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
       insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_JSR;
       insn.fixups[insn.nfixups].exp.X_op = O_absent;
       insn.nfixups++;
@@ -2866,7 +2866,7 @@ emit_jsrjmp (const expressionS *tok,
       memcpy (ensymname, symname, symlen);
       memcpy (ensymname + symlen, "..en", 5);
 
-      assert (insn.nfixups < MAX_INSN_FIXUPS);
+      gas_assert (insn.nfixups < MAX_INSN_FIXUPS);
       if (insn.nfixups > 0)
        {
          memmove (&insn.fixups[1], &insn.fixups[0],
@@ -4008,7 +4008,7 @@ s_alpha_coff_wrapper (int which)
     ecoff_directive_val,
   };
 
-  assert (which >= 0 && which < (int) (sizeof (fns)/sizeof (*fns)));
+  gas_assert (which >= 0 && which < (int) (sizeof (fns)/sizeof (*fns)));
 
   if (ECOFF_DEBUGGING)
     (*fns[which]) (0);
@@ -5294,7 +5294,7 @@ maybe_set_gp (asection *sec)
 static void
 select_gp_value (void)
 {
-  assert (alpha_gp_value == 0);
+  gas_assert (alpha_gp_value == 0);
 
   /* Get minus-one in whatever width...  */
   alpha_gp_value = 0;
@@ -5401,7 +5401,7 @@ md_begin (void)
     expressionS e;
 
     e.X_op = O_max;
-    assert (e.X_op == O_max);
+    gas_assert (e.X_op == O_max);
   }
 
   /* Create the opcode hash table.  */
@@ -5782,7 +5782,7 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg)
 
 #ifdef OBJ_ECOFF
     case BFD_RELOC_GPREL32:
-      assert (fixP->fx_subsy == alpha_gp_symbol);
+      gas_assert (fixP->fx_subsy == alpha_gp_symbol);
       fixP->fx_subsy = 0;
       /* FIXME: inherited this obliviousness of `value' -- why?  */
       md_number_to_chars (fixpos, -alpha_gp_value, 4);
@@ -5928,7 +5928,7 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg)
          as_fatal (_("unhandled relocation type %s"),
                    bfd_get_reloc_code_name (fixP->fx_r_type));
 
-       assert (-(int) fixP->fx_r_type < (int) alpha_num_operands);
+       gas_assert (-(int) fixP->fx_r_type < (int) alpha_num_operands);
        operand = &alpha_operands[-(int) fixP->fx_r_type];
 
        /* The rest of these fixups only exist internally during symbol
@@ -6213,7 +6213,7 @@ tc_gen_reloc (asection *sec ATTRIBUTE_UNUSED,
 
   /* Make sure none of our internal relocations make it this far.
      They'd better have been fully resolved by this point.  */
-  assert ((int) fixp->fx_r_type > 0);
+  gas_assert ((int) fixp->fx_r_type > 0);
 
   reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
   if (reloc->howto == NULL)
@@ -6228,7 +6228,7 @@ tc_gen_reloc (asection *sec ATTRIBUTE_UNUSED,
     as_fatal (_("internal error? cannot generate `%s' relocation"),
              bfd_get_reloc_code_name (fixp->fx_r_type));
 
-  assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);
 
 #ifdef OBJ_ECOFF
   if (fixp->fx_r_type == BFD_RELOC_ALPHA_LITERAL)
index 7de6881..f66782b 100644 (file)
@@ -889,7 +889,7 @@ arc_common (int localScope)
       as_warn (_("length of symbol \"%s\" already %ld, ignoring %d"),
               S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
     }
-  assert (symbolP->sy_frag == &zero_address_frag);
+  gas_assert (symbolP->sy_frag == &zero_address_frag);
 
   /* Now parse the alignment field.  This field is optional for
      local and global symbols. Default alignment is zero.  */
@@ -1283,21 +1283,21 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg)
         limm values.  */
       if (operand->fmt == 'B')
        {
-         assert ((operand->flags & ARC_OPERAND_RELATIVE_BRANCH) != 0
+         gas_assert ((operand->flags & ARC_OPERAND_RELATIVE_BRANCH) != 0
                  && operand->bits == 20
                  && operand->shift == 7);
          fixP->fx_r_type = BFD_RELOC_ARC_B22_PCREL;
        }
       else if (operand->fmt == 'J')
        {
-         assert ((operand->flags & ARC_OPERAND_ABSOLUTE_BRANCH) != 0
+         gas_assert ((operand->flags & ARC_OPERAND_ABSOLUTE_BRANCH) != 0
                  && operand->bits == 24
                  && operand->shift == 32);
          fixP->fx_r_type = BFD_RELOC_ARC_B26;
        }
       else if (operand->fmt == 'L')
        {
-         assert ((operand->flags & ARC_OPERAND_LIMM) != 0
+         gas_assert ((operand->flags & ARC_OPERAND_LIMM) != 0
                  && operand->bits == 32
                  && operand->shift == 32);
          fixP->fx_r_type = BFD_RELOC_32;
@@ -1365,7 +1365,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED,
       return NULL;
     }
 
-  assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
   /* Set addend to account for PC being advanced one insn before the
      target address is computed.  */
index c3f775c..e853f23 100644 (file)
@@ -3468,7 +3468,7 @@ s_arm_unwind_save_vfp_armv6 (void)
 
   /* Generate opcode for registers numbered in the range 0 .. 15.  */
   num_regs_below_16 = num_vfpv3_regs > 0 ? 16 - (int) start : count;
-  assert (num_regs_below_16 + num_vfpv3_regs == count);
+  gas_assert (num_regs_below_16 + num_vfpv3_regs == count);
   if (num_regs_below_16 > 0)
     {
       op = 0xc900 | (start << 4) | (num_regs_below_16 - 1);
@@ -4125,7 +4125,7 @@ parse_big_immediate (char **str, int i)
       /* Bignums have their least significant bits in
          generic_bignum[0]. Make sure we put 32 bits in imm and
          32 bits in reg,  in a (hopefully) portable way.  */
-      assert (parts != 0);
+      gas_assert (parts != 0);
       inst.operands[i].imm = 0;
       for (j = 0; j < parts; j++, idx++)
         inst.operands[i].imm |= generic_bignum[idx]
@@ -4643,7 +4643,7 @@ parse_shifter_operand_group_reloc (char **str, int i)
 
       /* Record the relocation type (always the ALU variant here).  */
       inst.reloc.type = entry->alu_code;
-      assert (inst.reloc.type != 0);
+      gas_assert (inst.reloc.type != 0);
 
       return PARSE_OPERAND_SUCCESS;
     }
@@ -4802,7 +4802,7 @@ parse_address_main (char **str, int i, int group_relocations,
                     break;
 
                   default:
-                    assert (0);
+                    gas_assert (0);
                 }
 
               if (inst.reloc.type == 0)
@@ -5675,7 +5675,7 @@ parse_operands (char *str, const unsigned char *pattern)
       if (upat[i] >= OP_FIRST_OPTIONAL)
        {
          /* Remember where we are in case we need to backtrack.  */
-         assert (!backtrack_pos);
+         gas_assert (!backtrack_pos);
          backtrack_pos = str;
          backtrack_error = inst.error;
          backtrack_index = i;
@@ -6380,7 +6380,7 @@ encode_arm_shifter_operand (int i)
 static void
 encode_arm_addr_mode_common (int i, bfd_boolean is_t)
 {
-  assert (inst.operands[i].isreg);
+  gas_assert (inst.operands[i].isreg);
   inst.instruction |= inst.operands[i].reg << 16;
 
   if (inst.operands[i].preind)
@@ -6397,7 +6397,7 @@ encode_arm_addr_mode_common (int i, bfd_boolean is_t)
     }
   else if (inst.operands[i].postind)
     {
-      assert (inst.operands[i].writeback);
+      gas_assert (inst.operands[i].writeback);
       if (is_t)
        inst.instruction |= WRITE_BACK;
     }
@@ -6491,11 +6491,11 @@ encode_arm_cp_address (int i, int wb_ok, int unind_ok, int reloc_override)
 {
   inst.instruction |= inst.operands[i].reg << 16;
 
-  assert (!(inst.operands[i].preind && inst.operands[i].postind));
+  gas_assert (!(inst.operands[i].preind && inst.operands[i].postind));
 
   if (!inst.operands[i].preind && !inst.operands[i].postind) /* unindexed */
     {
-      assert (!inst.operands[i].writeback);
+      gas_assert (!inst.operands[i].writeback);
       if (!unind_ok)
        {
          inst.error = _("instruction does not support unindexed addressing");
@@ -8432,7 +8432,7 @@ encode_thumb32_addr_mode (int i, bfd_boolean is_t, bfd_boolean is_d)
     }
   else if (inst.operands[i].postind)
     {
-      assert (inst.operands[i].writeback);
+      gas_assert (inst.operands[i].writeback);
       constraint (is_pc, _("cannot use post-indexing with PC-relative addressing"));
       constraint (is_t, _("cannot use post-indexing with this instruction"));
 
@@ -9138,7 +9138,7 @@ do_t_branch (void)
        inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH25;
       else
        {
-         assert (cond != 0xF);
+         gas_assert (cond != 0xF);
          inst.instruction |= cond << 22;
          inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH20;
        }
@@ -11402,7 +11402,7 @@ neon_type_promote (struct neon_type_el *key, unsigned thisarg)
 {
   struct neon_type_el dest = *key;
 
-  assert ((thisarg & N_EQK) != 0);
+  gas_assert ((thisarg & N_EQK) != 0);
 
   neon_modify_type_size (thisarg, &dest.type, &dest.size);
 
@@ -13603,7 +13603,7 @@ do_neon_rev (void)
      extract it here to check the elements to be reversed are smaller.
      Otherwise we'd get a reserved instruction.  */
   unsigned elsize = (op == 2) ? 16 : (op == 1) ? 32 : (op == 0) ? 64 : 0;
-  assert (elsize != 0);
+  gas_assert (elsize != 0);
   constraint (et.size >= elsize,
               _("elements must be smaller than reversal region"));
   neon_two_same (neon_quad (rs), 1, et.size);
@@ -14309,7 +14309,7 @@ do_neon_ld_dup (void)
   switch ((inst.instruction >> 8) & 3)
     {
     case 0:  /* VLD1.  */
-      assert (NEON_REG_STRIDE (inst.operands[0].imm) != 2);
+      gas_assert (NEON_REG_STRIDE (inst.operands[0].imm) != 2);
       align_good = neon_alignment_bit (et.size, inst.operands[1].imm >> 8,
                                        &do_align, 16, 16, 32, 32, -1);
       if (align_good == FAIL)
@@ -14525,12 +14525,12 @@ output_inst (const char * str)
 
   if (thumb_mode && (inst.size > THUMB_SIZE))
     {
-      assert (inst.size == (2 * THUMB_SIZE));
+      gas_assert (inst.size == (2 * THUMB_SIZE));
       put_thumb32_insn (to, inst.instruction);
     }
   else if (inst.size > INSN_SIZE)
     {
-      assert (inst.size == (2 * INSN_SIZE));
+      gas_assert (inst.size == (2 * INSN_SIZE));
       md_number_to_chars (to, inst.instruction, INSN_SIZE);
       md_number_to_chars (to + INSN_SIZE, inst.instruction, INSN_SIZE);
     }
@@ -14720,7 +14720,7 @@ opcode_lookup (char **str)
        as_warn (_("conditional infixes are deprecated in unified syntax"));
       affix = base + (opcode->tag - OT_odd_infix_0);
       cond = hash_find_n (arm_cond_hsh, affix, 2);
-      assert (cond);
+      gas_assert (cond);
 
       inst.cond = cond->value;
       return opcode;
@@ -15211,7 +15211,7 @@ md_assemble (char *str)
 
       if (!(inst.error || inst.relax))
        {
-         assert (inst.instruction < 0xe800 || inst.instruction > 0xffff);
+         gas_assert (inst.instruction < 0xe800 || inst.instruction > 0xffff);
          inst.size = (inst.instruction > 0xffff ? 4 : 2);
          if (inst.size_req && inst.size_req != inst.size)
            {
@@ -15222,7 +15222,7 @@ md_assemble (char *str)
 
       /* Something has gone badly wrong if we try to relax a fixed size
          instruction.  */
-      assert (inst.size_req == 0 || !inst.relax);
+      gas_assert (inst.size_req == 0 || !inst.relax);
 
       ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
                              *opcode->tvariant);
@@ -18082,7 +18082,7 @@ arm_handle_align (fragS * fragP)
   if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE)
     bytes &= MAX_MEM_FOR_RS_ALIGN_CODE;
 
-  assert ((fragP->tc_frag_data & MODE_RECORDED) != 0);
+  gas_assert ((fragP->tc_frag_data & MODE_RECORDED) != 0);
 
   if (fragP->tc_frag_data & (~ MODE_RECORDED))
     {
@@ -18792,7 +18792,7 @@ validate_immediate_twopart (unsigned int   val,
          }
        else
          {
-           assert (a & 0xff000000);
+           gas_assert (a & 0xff000000);
            * highpart = (a >> 24) | ((i + 8) << 7);
          }
 
@@ -19021,7 +19021,7 @@ md_apply_fix (fixS *    fixP,
   int           sign;
   char *        buf = fixP->fx_where + fixP->fx_frag->fr_literal;
 
-  assert (fixP->fx_r_type <= BFD_RELOC_UNUSED);
+  gas_assert (fixP->fx_r_type <= BFD_RELOC_UNUSED);
 
   /* Note whether this will delete the relocation.  */
 
@@ -20071,7 +20071,7 @@ md_apply_fix (fixS *    fixP,
    case BFD_RELOC_ARM_ALU_SB_G1_NC:
    case BFD_RELOC_ARM_ALU_SB_G1:
    case BFD_RELOC_ARM_ALU_SB_G2:
-     assert (!fixP->fx_done);
+     gas_assert (!fixP->fx_done);
      if (!seg->use_rela_p)
        {
          bfd_vma insn;
@@ -20113,7 +20113,7 @@ md_apply_fix (fixS *    fixP,
     case BFD_RELOC_ARM_LDR_SB_G0:
     case BFD_RELOC_ARM_LDR_SB_G1:
     case BFD_RELOC_ARM_LDR_SB_G2:
-      assert (!fixP->fx_done);
+      gas_assert (!fixP->fx_done);
       if (!seg->use_rela_p)
         {
           bfd_vma insn;
@@ -20152,7 +20152,7 @@ md_apply_fix (fixS *    fixP,
     case BFD_RELOC_ARM_LDRS_SB_G0:
     case BFD_RELOC_ARM_LDRS_SB_G1:
     case BFD_RELOC_ARM_LDRS_SB_G2:
-      assert (!fixP->fx_done);
+      gas_assert (!fixP->fx_done);
       if (!seg->use_rela_p)
         {
           bfd_vma insn;
@@ -20192,7 +20192,7 @@ md_apply_fix (fixS *    fixP,
     case BFD_RELOC_ARM_LDC_SB_G0:
     case BFD_RELOC_ARM_LDC_SB_G1:
     case BFD_RELOC_ARM_LDC_SB_G2:
-      assert (!fixP->fx_done);
+      gas_assert (!fixP->fx_done);
       if (!seg->use_rela_p)
         {
           bfd_vma insn;
@@ -22286,5 +22286,3 @@ arm_apply_sym_value (struct fix * fixP)
   return 0;
 }
 #endif /* OBJ_ELF */
-
-
index c3b8aef..271709e 100644 (file)
@@ -903,8 +903,6 @@ bfin_start_line_hook ()
 
 /* Special extra functions that help bfin-parse.y perform its job.  */
 
-#include <assert.h>
-
 struct obstack mempool;
 
 INSTR_T
@@ -933,7 +931,7 @@ INSTR_T
 note_reloc (INSTR_T code, Expr_Node * symbol, int reloc, int pcrel)
 {
   /* Assert that the symbol is not an operator.  */
-  assert (symbol->type == Expr_Node_Reloc);
+  gas_assert (symbol->type == Expr_Node_Reloc);
 
   return note_reloc1 (code, symbol->value.s_value, reloc, pcrel);
 
index 171e3f3..1955775 100644 (file)
@@ -586,7 +586,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
        }
 #endif
 
-  assert ((int) fixP->fx_r_type > 0);
+  gas_assert ((int) fixP->fx_r_type > 0);
   reloc->howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
 
   if (reloc->howto == NULL)
@@ -597,7 +597,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
                     bfd_get_reloc_code_name (fixP->fx_r_type));
       return NULL;
     }
-  assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
   return reloc;
 }
index 7b1a360..1559e57 100644 (file)
@@ -3939,7 +3939,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
     }
 
   relP = (arelent *) xmalloc (sizeof (arelent));
-  assert (relP != 0);
+  gas_assert (relP != 0);
   relP->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
   *relP->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
   relP->address = fixP->fx_frag->fr_address + fixP->fx_where;
index d74494b..67c841d 100644 (file)
@@ -351,7 +351,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
        }
     }
 
-  assert ((int) fixP->fx_r_type > 0);
+  gas_assert ((int) fixP->fx_r_type > 0);
   reloc->howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
 
   if (reloc->howto == (reloc_howto_type *) NULL)
@@ -362,7 +362,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
                    bfd_get_reloc_code_name (fixP->fx_r_type));
       return NULL;
     }
-  assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
   return reloc;
 }
index 4dfa197..53bbeeb 100644 (file)
@@ -1516,7 +1516,7 @@ d30v_align (int n, char *pfill, symbolS *label)
       valueT       old_value;
       valueT       new_value;
 
-      assert (S_GET_SEGMENT (label) == now_seg);
+      gas_assert (S_GET_SEGMENT (label) == now_seg);
 
       old_frag  = symbol_get_frag (label);
       old_value = S_GET_VALUE (label);
@@ -2113,4 +2113,3 @@ const pseudo_typeS md_pseudo_table[] =
   { "sect.s", s_d30v_section, 0 },
   { NULL, NULL, 0 }
 };
-
index 19539bf..e6a8e87 100644 (file)
@@ -1203,7 +1203,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED,
       return NULL;
     }
 
-  assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
   reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
   *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
@@ -1235,4 +1235,3 @@ dlx_pop_insert (void)
   pop_insert (dlx_pseudo_table);
   return ;
 }
-
index 1393a7c..54da436 100644 (file)
@@ -1388,8 +1388,8 @@ tc_gen_reloc (asection *section, fixS *fixp)
   if (fixp->fx_addsy == 0)
     return &no_relocs;
 
-  assert (hppa_fixp != 0);
-  assert (section != 0);
+  gas_assert (hppa_fixp != 0);
+  gas_assert (section != 0);
 
   reloc = xmalloc (sizeof (arelent));
 
@@ -1434,7 +1434,7 @@ tc_gen_reloc (asection *section, fixS *fixp)
   switch (fixp->fx_r_type)
     {
     default:
-      assert (n_relocs == 1);
+      gas_assert (n_relocs == 1);
 
       code = *codes[0];
 
@@ -1488,7 +1488,7 @@ tc_gen_reloc (asection *section, fixS *fixp)
                                            (bfd_reloc_code_real_type) code);
       reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
 
-      assert (reloc->howto && (unsigned int) code == reloc->howto->type);
+      gas_assert (reloc->howto && (unsigned int) code == reloc->howto->type);
       break;
     }
 #else /* OBJ_SOM */
@@ -1511,7 +1511,7 @@ tc_gen_reloc (asection *section, fixS *fixp)
          /* The only time we ever use a R_COMP2 fixup is for the difference
             of two symbols.  With that in mind we fill in all four
             relocs now and break out of the loop.  */
-         assert (i == 1);
+         gas_assert (i == 1);
          relocs[0]->sym_ptr_ptr
            = (asymbol **) bfd_abs_section_ptr->symbol_ptr_ptr;
          relocs[0]->howto
@@ -5728,7 +5728,7 @@ md_assemble (char *str)
   char *to;
 
   /* The had better be something to assemble.  */
-  assert (str);
+  gas_assert (str);
 
   /* If we are within a procedure definition, make sure we've
      defined a label for the procedure; handle case where the
@@ -6433,7 +6433,7 @@ hppa_elf_mark_end_of_function (void)
          symbolP = symbol_new (name, now_seg, (valueT) (frag_now_fix () - 4),
                                frag_now);
 
-         assert (symbolP);
+         gas_assert (symbolP);
          S_CLEAR_EXTERNAL (symbolP);
          symbol_table_insert (symbolP);
        }
@@ -8465,7 +8465,7 @@ hppa_force_relocation (struct fix *fixp)
     return 1;
 #endif
 
-  assert (fixp->fx_addsy != NULL);
+  gas_assert (fixp->fx_addsy != NULL);
 
   /* Ensure we emit a relocation for global symbols so that dynamic
      linking works.  */
index af3b284..c02eae6 100644 (file)
@@ -1923,7 +1923,7 @@ md_assemble (char *str)
     {
       const struct i370_macro *macro;
 
-      assert (i370_macro_hash);
+      gas_assert (i370_macro_hash);
       macro = (const struct i370_macro *) hash_find (i370_macro_hash, str);
       if (macro == (const struct i370_macro *) NULL)
         as_bad ("Unrecognized opcode: `%s'", str);
@@ -2668,4 +2668,3 @@ const pseudo_typeS md_pseudo_table[] =
 
   { NULL,       NULL,          0 }
 };
-
index 64d83e3..c12569f 100644 (file)
@@ -468,9 +468,9 @@ i386_intel_operand (char *operand_string, int got_a_float)
   intel_state.index = NULL;
   intel_state.seg = NULL;
   operand_type_set (&intel_state.reloc_types, ~0);
-  assert (!intel_state.in_offset);
-  assert (!intel_state.in_bracket);
-  assert (!intel_state.in_scale);
+  gas_assert (!intel_state.in_offset);
+  gas_assert (!intel_state.in_bracket);
+  gas_assert (!intel_state.in_scale);
 
   saved_input_line_pointer = input_line_pointer;
   input_line_pointer = buf = xstrdup (operand_string);
@@ -501,9 +501,9 @@ i386_intel_operand (char *operand_string, int got_a_float)
   input_line_pointer = saved_input_line_pointer;
   free (buf);
 
-  assert (!intel_state.in_offset);
-  assert (!intel_state.in_bracket);
-  assert (!intel_state.in_scale);
+  gas_assert (!intel_state.in_offset);
+  gas_assert (!intel_state.in_bracket);
+  gas_assert (!intel_state.in_scale);
 
   if (!ret)
     return 0;
index b0293d8..3ddabfe 100644 (file)
@@ -1496,7 +1496,7 @@ operand_size_match (const template *t)
     return match;
 
   /* Check reverse.  */
-  assert (i.operands == 2);
+  gas_assert (i.operands == 2);
 
   match = 1;
   for (j = 0; j < 2; j++)
@@ -2564,7 +2564,7 @@ build_vex_prefix (const template *t)
       i.op[xchg] = i.op[0];
       i.op[0] = temp_op;
 
-      assert (i.rm.mode == 3);
+      gas_assert (i.rm.mode == 3);
 
       i.rex = REX_R;
       xchg = i.rm.regmem;
@@ -2681,7 +2681,7 @@ process_immext (void)
      AVX instructions also use this encoding, for some of
      3 argument instructions.  */
 
-  assert (i.imm_operands == 0
+  gas_assert (i.imm_operands == 0
          && (i.operands <= 2
              || (i.tm.opcode_modifier.vex
                  && i.operands <= 4)));
@@ -4502,7 +4502,7 @@ finalize_imm (void)
       return 0;
 
   i.types[2] = operand_type_and (i.types[2], i.tm.operand_types[2]);
-  assert (operand_type_check (i.types[2], imm) == 0);
+  gas_assert (operand_type_check (i.types[2], imm) == 0);
 
   return 1;
 }
@@ -4537,14 +4537,14 @@ process_operands (void)
       unsigned int j;
 
       /* The destination must be an xmm register.  */
-      assert (i.reg_operands
+      gas_assert (i.reg_operands
              && MAX_OPERANDS > dup
              && operand_type_equal (&i.types[dest], &regxmm));
 
       if (i.tm.opcode_modifier.firstxmm0)
        {
          /* The first operand is implicit and must be xmm0.  */
-         assert (operand_type_equal (&i.types[0], &regxmm));
+         gas_assert (operand_type_equal (&i.types[0], &regxmm));
          if (i.op[0].regs->reg_num != 0)
            return bad_implicit_operand (1);
 
@@ -4569,7 +4569,7 @@ process_operands (void)
        }
       else if (i.tm.opcode_modifier.implicit1stxmm0)
        { 
-         assert ((MAX_OPERANDS - 1) > dup
+         gas_assert ((MAX_OPERANDS - 1) > dup
                  && i.tm.opcode_modifier.vex3sources);
 
          /* Add the implicit xmm0 for instructions with VEX prefix
@@ -4615,7 +4615,7 @@ duplicate:
       unsigned int j;
 
       /* The first operand is implicit and must be xmm0/ymm0.  */
-      assert (i.reg_operands
+      gas_assert (i.reg_operands
              && (operand_type_equal (&i.types[0], &regxmm)
                  || operand_type_equal (&i.types[0], &regymm)));
       if (i.op[0].regs->reg_num != 0)
@@ -4648,7 +4648,7 @@ duplicate:
       else
        first_reg_op = 1;
       /* Pretend we saw the extra register operand.  */
-      assert (i.reg_operands == 1
+      gas_assert (i.reg_operands == 1
              && i.op[first_reg_op + 1].regs == 0);
       i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs;
       i.types[first_reg_op + 1] = i.types[first_reg_op];
@@ -4765,7 +4765,7 @@ build_modrm_byte (void)
       /* This instruction must have 4 operands: 4 register operands
         or 3 register operands plus 1 memory operand.  It must have
         VexNDS and VexImmExt.  */
-      assert (i.operands == 4
+      gas_assert (i.operands == 4
              && (i.reg_operands == 4
                  || (i.reg_operands == 3 && i.mem_operands == 1))
              && i.tm.opcode_modifier.vexnds
@@ -4822,7 +4822,7 @@ build_modrm_byte (void)
             which may be the first or the last operand.  Otherwise,
             the first operand must be shift count register (cl) or it
             is an instruction with VexNDS. */
-         assert (i.imm_operands == 1
+         gas_assert (i.imm_operands == 1
                  || (i.imm_operands == 0
                      && (i.tm.opcode_modifier.vexnds
                          || i.types[0].bitfield.shiftcount)));
@@ -4840,7 +4840,7 @@ build_modrm_byte (void)
             For instructions with VexNDS, if the first operand
             an imm8, the source operand is the 2nd one.  If the last
             operand is imm8, the source operand is the first one.  */
-         assert ((i.imm_operands == 2
+         gas_assert ((i.imm_operands == 2
                   && i.types[0].bitfield.imm8
                   && i.types[1].bitfield.imm8)
                  || (i.tm.opcode_modifier.vexnds
@@ -4931,7 +4931,7 @@ build_modrm_byte (void)
              for (op = 0; op < i.operands; op++)
                if (operand_type_check (i.types[op], anymem))
                  break;
-             assert (op < i.operands);
+             gas_assert (op < i.operands);
 
          default_seg = &ds;
 
@@ -5109,7 +5109,7 @@ build_modrm_byte (void)
                 holds the correct displacement size.  */
              expressionS *exp;
 
-             assert (i.op[op].disps == 0);
+             gas_assert (i.op[op].disps == 0);
              exp = &disp_expressions[i.disp_operands++];
              i.op[op].disps = exp;
              exp->X_op = O_constant;
@@ -5153,17 +5153,17 @@ build_modrm_byte (void)
                {
                  /* For instructions with VexNDS, the register-only
                     source operand is encoded in VEX prefix. */
-                 assert (mem != (unsigned int) ~0);
+                 gas_assert (mem != (unsigned int) ~0);
 
                  if (op > mem)
                    {
                      vex_reg = op++;
-                     assert (op < i.operands);
+                     gas_assert (op < i.operands);
                    }
                  else
                    {
                      vex_reg = op + 1;
-                     assert (vex_reg < i.operands);
+                     gas_assert (vex_reg < i.operands);
                    }
                }
              else if (i.tm.opcode_modifier.vexndd)
@@ -5171,16 +5171,16 @@ build_modrm_byte (void)
                  /* For instructions with VexNDD, there should be
                     no memory operand and the register destination
                     is encoded in VEX prefix.  */
-                 assert (i.mem_operands == 0
+                 gas_assert (i.mem_operands == 0
                          && (op + 2) == i.operands);
                  vex_reg = op + 1;
                }
              else
-               assert (op < i.operands);
+               gas_assert (op < i.operands);
 
              if (vex_reg != (unsigned int) ~0)
                {
-                 assert (i.reg_operands == 2);
+                 gas_assert (i.reg_operands == 2);
 
                  if (!operand_type_equal (&i.tm.operand_types[vex_reg],
                                           & regxmm)
@@ -5640,7 +5640,7 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
              int pcrel = (i.flags[n] & Operand_PCrel) != 0;
 
              /* We can't have 8 bit displacement here.  */
-             assert (!i.types[n].bitfield.disp8);
+             gas_assert (!i.types[n].bitfield.disp8);
 
              /* The PC relative address is computed relative
                 to the instruction boundary, so in case immediate
@@ -5655,12 +5655,12 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
                      {
                        /* Only one immediate is allowed for PC
                           relative address.  */
-                       assert (sz == 0);
+                       gas_assert (sz == 0);
                        sz = imm_size (n1);
                        i.op[n].disps->X_add_number -= sz;
                      }
                  /* We should find the immediate.  */
-                 assert (sz != 0);
+                 gas_assert (sz != 0);
                }
 
              p = frag_more (size);
@@ -6531,7 +6531,7 @@ i386_index_check (const char *operand_string)
                   : i386_regtab[j].reg_type.bitfield.reg16)
                && i386_regtab[j].reg_num == expected)
              break;
-         assert (j < i386_regtab_size);
+         gas_assert (j < i386_regtab_size);
          as_warn (_("`%s' is not valid here (expected `%c%s%s%c')"),
                   operand_string,
                   intel_syntax ? '[' : '(',
@@ -7546,7 +7546,7 @@ md_operand (expressionS *e)
       break;
 
     case '[':
-      assert (intel_syntax);
+      gas_assert (intel_syntax);
       end = input_line_pointer++;
       expression (e);
       if (*input_line_pointer == ']')
@@ -8276,7 +8276,7 @@ tc_gen_reloc (section, fixp)
                    bfd_get_reloc_code_name (code));
       /* Set howto to a garbage value so that we can keep going.  */
       rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
-      assert (rel->howto != NULL);
+      gas_assert (rel->howto != NULL);
     }
 
   return rel;
@@ -8326,7 +8326,7 @@ tc_x86_frame_initial_instructions (void)
 
       input_line_pointer = sp[flag_code >> 1];
       tc_x86_parse_to_dw2regnum (&exp);
-      assert (exp.X_op == O_constant);
+      gas_assert (exp.X_op == O_constant);
       sp_regno[flag_code >> 1] = exp.X_add_number;
       input_line_pointer = saved_input;
     }
index b6ff7bc..445f92f 100644 (file)
@@ -261,7 +261,7 @@ md_assemble (char *str)
   int i;
   struct i860_it pseudo[3];
 
-  assert (str);
+  gas_assert (str);
   fc = 0;
 
   /* Assemble the instruction.  */
@@ -1489,4 +1489,3 @@ i860_check_label (symbolS *labelsym)
       input_line_pointer++;
     }
 }
-
index 6fd611b..0024314 100644 (file)
@@ -2644,7 +2644,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
       return NULL;
     }
 
-  assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
   reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
   *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
index 2113fa4..84434a5 100644 (file)
@@ -2817,7 +2817,7 @@ ia64_estimate_size_before_relax (fragS *frag,
 
   /* fr_var carries the max_chars that we created the fragment with.
      We must, of course, have allocated enough memory earlier.  */
-  assert (frag->fr_var >= size);
+  gas_assert (frag->fr_var >= size);
 
   return frag->fr_fix + size;
 }
@@ -2848,7 +2848,7 @@ ia64_convert_frag (fragS *frag)
 
   /* fr_var carries the max_chars that we created the fragment with.
      We must, of course, have allocated enough memory earlier.  */
-  assert (frag->fr_var >= size);
+  gas_assert (frag->fr_var >= size);
 
   /* Initialize the header area. fr_offset is initialized with
      unwind.personality_routine.  */
@@ -5886,7 +5886,7 @@ parse_operands (struct ia64_opcode *idesc)
   char *first_arg = 0, *end, *saved_input_pointer;
   unsigned int sof;
 
-  assert (strlen (idesc->name) <= 128);
+  gas_assert (strlen (idesc->name) <= 128);
 
   strcpy (mnemonic, idesc->name);
   if (idesc->operands[2] == IA64_OPND_SOF
@@ -6210,7 +6210,7 @@ build_insn (struct slot *slot, bfd_vma *insnp)
       else if (slot->opnd[i].X_op == O_big)
        {
          /* This must be the value 0x10000000000000000.  */
-         assert (idesc->operands[i] == IA64_OPND_IMM8M1U8);
+         gas_assert (idesc->operands[i] == IA64_OPND_IMM8M1U8);
          val = 0;
        }
       else
index 4c70998..2550bac 100644 (file)
@@ -534,7 +534,7 @@ iq2000_record_hi16 (int    reloc_type,
 {
   struct iq2000_hi_fixup * hi_fixup;
 
-  assert (reloc_type == BFD_RELOC_HI16);
+  gas_assert (reloc_type == BFD_RELOC_HI16);
 
   hi_fixup = xmalloc (sizeof * hi_fixup);
   hi_fixup->fixp = fixP;
@@ -587,7 +587,7 @@ iq2000_frob_file (void)
       segment_info_type * seginfo;
       int                 pass;
 
-      assert (FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_HI16
+      gas_assert (FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_HI16
              || FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_LO16);
 
       /* Check quickly whether the next fixup happens to be a matching low.  */
@@ -627,7 +627,7 @@ iq2000_frob_file (void)
                  for (pf = &seginfo->fix_root;
                       * pf != l->fixp;
                       pf = & (* pf)->fx_next)
-                   assert (* pf != NULL);
+                   gas_assert (* pf != NULL);
 
                  * pf = l->fixp->fx_next;
 
@@ -837,7 +837,7 @@ s_iq2000_end (int x ATTRIBUTE_UNUSED)
 
   if (p != NULL)
     {
-      assert (S_GET_NAME (p));
+      gas_assert (S_GET_NAME (p));
       if (strcmp (S_GET_NAME (p), S_GET_NAME (cur_proc_ptr->isym)))
        as_warn (_(".end symbol does not match .ent symbol."));
     }
index ab04f23..840525f 100644 (file)
@@ -913,7 +913,7 @@ md_convert_frag (bfd *   abfd ATTRIBUTE_UNUSED,
                         && operand != M32C_OPERAND_LAB32_JMP_S)))
     {
       fixS *fixP;
-      assert (fragP->fr_cgen.insn != 0);
+      gas_assert (fragP->fr_cgen.insn != 0);
       fixP = gas_cgen_record_fixup (fragP,
                                    where,
                                    fragP->fr_cgen.insn,
index 5374b5c..2fa8647 100644 (file)
@@ -1809,8 +1809,8 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
     {
       fixS *fixP;
 
-      assert (fragP->fr_subtype != 1);
-      assert (fragP->fr_cgen.insn != 0);
+      gas_assert (fragP->fr_subtype != 1);
+      gas_assert (fragP->fr_cgen.insn != 0);
 
       fixP = gas_cgen_record_fixup (fragP,
                                    /* Offset of branch insn in frag.  */
@@ -1900,7 +1900,7 @@ m32r_record_hi16 (int reloc_type,
 {
   struct m32r_hi_fixup *hi_fixup;
 
-  assert (reloc_type == BFD_RELOC_M32R_HI16_SLO
+  gas_assert (reloc_type == BFD_RELOC_M32R_HI16_SLO
          || reloc_type == BFD_RELOC_M32R_HI16_ULO);
 
   hi_fixup = xmalloc (sizeof (* hi_fixup));
@@ -2008,7 +2008,7 @@ m32r_frob_file (void)
       segment_info_type *seginfo;
       int pass;
 
-      assert (FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_M32R_HI16_SLO
+      gas_assert (FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_M32R_HI16_SLO
              || FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_M32R_HI16_ULO);
 
       /* Check quickly whether the next fixup happens to be a matching low.  */
@@ -2049,7 +2049,7 @@ m32r_frob_file (void)
                  for (pf = &seginfo->fix_root;
                       *pf != l->fixp;
                       pf = & (*pf)->fx_next)
-                   assert (*pf != NULL);
+                   gas_assert (*pf != NULL);
 
                  *pf = l->fixp->fx_next;
 
index dde6a37..488a8e5 100644 (file)
@@ -1522,9 +1522,9 @@ build_jump_insn (struct m68hc11_opcode *opcode, operand operands[],
 
   /* The relative branch conversion is not supported for
      brclr and brset.  */
-  assert ((opcode->format & M6811_OP_BITMASK) == 0);
-  assert (nb_operands == 1);
-  assert (operands[0].reg1 == REG_NONE && operands[0].reg2 == REG_NONE);
+  gas_assert ((opcode->format & M6811_OP_BITMASK) == 0);
+  gas_assert (nb_operands == 1);
+  gas_assert (operands[0].reg1 == REG_NONE && operands[0].reg2 == REG_NONE);
 
   code = opcode->opcode;
 
@@ -1672,9 +1672,9 @@ build_dbranch_insn (struct m68hc11_opcode *opcode, operand operands[],
 
   /* The relative branch conversion is not supported for
      brclr and brset.  */
-  assert ((opcode->format & M6811_OP_BITMASK) == 0);
-  assert (nb_operands == 2);
-  assert (operands[0].reg1 != REG_NONE);
+  gas_assert ((opcode->format & M6811_OP_BITMASK) == 0);
+  gas_assert (nb_operands == 2);
+  gas_assert (operands[0].reg1 != REG_NONE);
 
   code = opcode->opcode & 0x0FF;
 
@@ -2618,7 +2618,7 @@ s_m68hc11_mark_symbol (int mark)
       bfdsym = symbol_get_bfdsym (symbolP);
       elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
 
-      assert (elfsym);
+      gas_assert (elfsym);
 
       /* Mark the symbol far (using rtc for function return).  */
       elfsym->internal_elf_sym.st_other |= mark;
@@ -2823,7 +2823,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, asection *sec ATTRIBUTE_UNUSED,
 
     case ENCODE_RELAX (STATE_PC_RELATIVE, STATE_WORD):
       /* This relax is only for bsr and bra.  */
-      assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR)
+      gas_assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR)
              || IS_OPCODE (fragP->fr_opcode[0], M6811_BRA)
              || IS_OPCODE (fragP->fr_opcode[0], M6812_BSR));
 
@@ -2964,7 +2964,7 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment)
            case STATE_PC_RELATIVE:
 
              /* This relax is only for bsr and bra.  */
-             assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR)
+             gas_assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR)
                      || IS_OPCODE (fragP->fr_opcode[0], M6811_BRA)
                      || IS_OPCODE (fragP->fr_opcode[0], M6812_BSR));
 
@@ -2984,7 +2984,7 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment)
              break;
 
            case STATE_CONDITIONAL_BRANCH:
-             assert (current_architecture & cpu6811);
+             gas_assert (current_architecture & cpu6811);
 
              fragP->fr_opcode[0] ^= 1; /* Reverse sense of branch.  */
              fragP->fr_opcode[1] = 3;  /* Skip next jmp insn (3 bytes).  */
@@ -3000,7 +3000,7 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment)
              break;
 
            case STATE_INDEXED_OFFSET:
-             assert (current_architecture & cpu6812);
+             gas_assert (current_architecture & cpu6812);
 
               if (fragP->fr_symbol
                   && S_GET_SEGMENT (fragP->fr_symbol) == absolute_section)
@@ -3022,7 +3022,7 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment)
              break;
 
            case STATE_INDEXED_PCREL:
-             assert (current_architecture & cpu6812);
+             gas_assert (current_architecture & cpu6812);
 
               if (fragP->fr_symbol
                   && S_GET_SEGMENT (fragP->fr_symbol) == absolute_section)
@@ -3045,7 +3045,7 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment)
              break;
 
            case STATE_XBCC_BRANCH:
-             assert (current_architecture & cpu6812);
+             gas_assert (current_architecture & cpu6812);
 
              fragP->fr_opcode[0] ^= 0x20;      /* Reverse sense of branch.  */
              fragP->fr_opcode[1] = 3;  /* Skip next jmp insn (3 bytes).  */
@@ -3061,7 +3061,7 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment)
              break;
 
            case STATE_CONDITIONAL_BRANCH_6812:
-             assert (current_architecture & cpu6812);
+             gas_assert (current_architecture & cpu6812);
 
              /* Translate into a lbcc branch.  */
              fragP->fr_opcode[1] = fragP->fr_opcode[0];
@@ -3086,7 +3086,7 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment)
        {
        case STATE_PC_RELATIVE:
          /* This relax is only for bsr and bra.  */
-         assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR)
+         gas_assert (IS_OPCODE (fragP->fr_opcode[0], M6811_BSR)
                  || IS_OPCODE (fragP->fr_opcode[0], M6811_BRA)
                  || IS_OPCODE (fragP->fr_opcode[0], M6812_BSR));
 
@@ -3094,34 +3094,34 @@ md_estimate_size_before_relax (fragS *fragP, asection *segment)
          break;
 
        case STATE_CONDITIONAL_BRANCH:
-         assert (current_architecture & cpu6811);
+         gas_assert (current_architecture & cpu6811);
 
          fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH,
                                            STATE_BYTE);
          break;
 
        case STATE_INDEXED_OFFSET:
-         assert (current_architecture & cpu6812);
+         gas_assert (current_architecture & cpu6812);
 
          fragP->fr_subtype = ENCODE_RELAX (STATE_INDEXED_OFFSET,
                                            STATE_BITS5);
          break;
 
        case STATE_INDEXED_PCREL:
-         assert (current_architecture & cpu6812);
+         gas_assert (current_architecture & cpu6812);
 
          fragP->fr_subtype = ENCODE_RELAX (STATE_INDEXED_PCREL,
                                            STATE_BITS5);
          break;
 
        case STATE_XBCC_BRANCH:
-         assert (current_architecture & cpu6812);
+         gas_assert (current_architecture & cpu6812);
 
          fragP->fr_subtype = ENCODE_RELAX (STATE_XBCC_BRANCH, STATE_BYTE);
          break;
 
        case STATE_CONDITIONAL_BRANCH_6812:
-         assert (current_architecture & cpu6812);
+         gas_assert (current_architecture & cpu6812);
 
          fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH_6812,
                                            STATE_BYTE);
index a6aa46d..f6a7adb 100644 (file)
@@ -1339,7 +1339,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
 #endif
 
   reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
-  assert (reloc->howto != 0);
+  gas_assert (reloc->howto != 0);
 
   return reloc;
 }
@@ -1492,7 +1492,7 @@ m68k_ip (char *instring)
 
          /* Make a copy of the operands of this insn so that
             we can modify them safely, should we want to.  */
-         assert (opsfound <= (int) ARRAY_SIZE (operands_backup));
+         gas_assert (opsfound <= (int) ARRAY_SIZE (operands_backup));
          for (i = 0; i < opsfound; i++)
            operands_backup[i] = the_ins.operands[i];
 
@@ -5164,14 +5164,14 @@ md_convert_frag_1 (fragS *fragP)
       fragP->fr_fix += 4;
       break;
     case TAB (PCINDEX, BYTE):
-      assert (fragP->fr_fix >= 2);
+      gas_assert (fragP->fr_fix >= 2);
       buffer_address[-2] &= ~1;
       fixP = fix_new (fragP, fragP->fr_fix - 1, 1, fragP->fr_symbol,
                      fragP->fr_offset, 1, RELAX_RELOC_PC8);
       fixP->fx_pcrel_adjust = 1;
       break;
     case TAB (PCINDEX, SHORT):
-      assert (fragP->fr_fix >= 2);
+      gas_assert (fragP->fr_fix >= 2);
       buffer_address[-2] |= 0x1;
       buffer_address[-1] = 0x20;
       fixP = fix_new (fragP, (int) (fragP->fr_fix), 2, fragP->fr_symbol,
@@ -5180,7 +5180,7 @@ md_convert_frag_1 (fragS *fragP)
       fragP->fr_fix += 2;
       break;
     case TAB (PCINDEX, LONG):
-      assert (fragP->fr_fix >= 2);
+      gas_assert (fragP->fr_fix >= 2);
       buffer_address[-2] |= 0x1;
       buffer_address[-1] = 0x30;
       fixP = fix_new (fragP, (int) (fragP->fr_fix), 4, fragP->fr_symbol,
index 96bfbc4..c79ee4e 100644 (file)
@@ -276,7 +276,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
 
       /* Set howto to a garbage value so that we can keep going.  */
       rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
-      assert (rel->howto != NULL);
+      gas_assert (rel->howto != NULL);
     }
 
   return rel;
index c7c024e..da42546 100644 (file)
@@ -2135,7 +2135,7 @@ md_pcrel_from_section (fixS * fixp, segT sec ATTRIBUTE_UNUSED)
          || (S_GET_SEGMENT (fixp->fx_addsy) != sec)))
 
   {
-    assert (fixp->fx_size == 2);       /* must be an insn */
+    gas_assert (fixp->fx_size == 2);   /* must be an insn */
     return fixp->fx_size;
   }
 #endif
@@ -2201,7 +2201,7 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp)
 
       /* Set howto to a garbage value so that we can keep going.  */
       rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
-      assert (rel->howto != NULL);
+      gas_assert (rel->howto != NULL);
     }
 
   return rel;
index 338fdbf..a47138b 100644 (file)
@@ -1698,7 +1698,7 @@ md_convert_frag (bfd *abfd  ATTRIBUTE_UNUSED,
   if (S_GET_SEGMENT (fragP->fr_symbol) != sec
       || operand == MEP_OPERAND_PCABS24A2)
     {
-      assert (fragP->fr_cgen.insn != 0);
+      gas_assert (fragP->fr_cgen.insn != 0);
       gas_cgen_record_fixup (fragP,
                             where,
                             fragP->fr_cgen.insn,
@@ -1870,7 +1870,7 @@ mep_frob_file ()
       segment_info_type * seginfo;
       int pass;
 
-      assert (FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_HI16
+      gas_assert (FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_HI16
              || FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_LO16);
 
       /* Check quickly whether the next fixup happens to be a matching low.  */
@@ -1910,7 +1910,7 @@ mep_frob_file ()
                  for (pf = &seginfo->fix_root;
                       * pf != l->fixp;
                       pf = & (* pf)->fx_next)
-                   assert (* pf != NULL);
+                   gas_assert (* pf != NULL);
 
                  * pf = l->fixp->fx_next;
 
index f129cb7..5c2c019 100644 (file)
@@ -2217,7 +2217,7 @@ insn_uses_reg (const struct mips_cl_insn *ip, unsigned int reg,
 {
   if (class == MIPS16_REG)
     {
-      assert (mips_opts.mips16);
+      gas_assert (mips_opts.mips16);
       reg = mips16_to_32_reg_map[reg];
       class = MIPS_GR_REG;
     }
@@ -2228,7 +2228,7 @@ insn_uses_reg (const struct mips_cl_insn *ip, unsigned int reg,
 
   if (class == MIPS_FP_REG)
     {
-      assert (! mips_opts.mips16);
+      gas_assert (! mips_opts.mips16);
       /* If we are called with either $f0 or $f1, we must check $f0.
         This is not optimal, because it will introduce an unnecessary
         NOP between "lwc1 $f0" and "swc1 $f1".  To fix this we would
@@ -2317,7 +2317,7 @@ mips_move_labels (void)
 
   for (l = si->label_list; l != NULL; l = l->next)
     {
-      assert (S_GET_SEGMENT (l->label) == now_seg);
+      gas_assert (S_GET_SEGMENT (l->label) == now_seg);
       symbol_set_frag (l->label, frag_now);
       val = (valueT) frag_now_fix ();
       /* mips16 text labels are stored as odd.  */
@@ -2407,7 +2407,7 @@ relax_close_frag (void)
 static void
 relax_start (symbolS *symbol)
 {
-  assert (mips_relax.sequence == 0);
+  gas_assert (mips_relax.sequence == 0);
   mips_relax.sequence = 1;
   mips_relax.symbol = symbol;
 }
@@ -2418,7 +2418,7 @@ relax_start (symbolS *symbol)
 static void
 relax_switch (void)
 {
-  assert (mips_relax.sequence == 1);
+  gas_assert (mips_relax.sequence == 1);
   mips_relax.sequence = 2;
 }
 
@@ -2427,7 +2427,7 @@ relax_switch (void)
 static void
 relax_end (void)
 {
-  assert (mips_relax.sequence == 2);
+  gas_assert (mips_relax.sequence == 2);
   relax_close_frag ();
   mips_relax.sequence = 0;
 }
@@ -2788,7 +2788,7 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
     {
       /* Work out how many nops in prev_nop_frag are needed by IP.  */
       int nops = nops_for_insn_or_target (history, ip);
-      assert (nops <= prev_nop_frag_holds);
+      gas_assert (nops <= prev_nop_frag_holds);
 
       /* Enforce NOPS as a minimum.  */
       if (nops > prev_nop_frag_required)
@@ -2855,7 +2855,7 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
   else if (*reloc_type > BFD_RELOC_UNUSED)
     {
       /* We need to set up a variant frag.  */
-      assert (mips_opts.mips16 && address_expr != NULL);
+      gas_assert (mips_opts.mips16 && address_expr != NULL);
       add_relaxed_insn (ip, 4, 0,
                        RELAX_MIPS16_ENCODE
                        (*reloc_type - BFD_RELOC_UNUSED,
@@ -3552,8 +3552,8 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
   r[1] = BFD_RELOC_UNUSED;
   r[2] = BFD_RELOC_UNUSED;
   mo = (struct mips_opcode *) hash_find (op_hash, name);
-  assert (mo);
-  assert (strcmp (name, mo->name) == 0);
+  gas_assert (mo);
+  gas_assert (strcmp (name, mo->name) == 0);
 
   while (1)
     {
@@ -3565,8 +3565,8 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
        break;
 
       ++mo;
-      assert (mo->name);
-      assert (strcmp (name, mo->name) == 0);
+      gas_assert (mo->name);
+      gas_assert (strcmp (name, mo->name) == 0);
     }
 
   create_insn (&insn, mo);
@@ -3691,7 +3691,7 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
        case 'j':
        case 'o':
          macro_read_relocs (&args, r);
-         assert (*r == BFD_RELOC_GPREL16
+         gas_assert (*r == BFD_RELOC_GPREL16
                  || *r == BFD_RELOC_MIPS_LITERAL
                  || *r == BFD_RELOC_MIPS_HIGHER
                  || *r == BFD_RELOC_HI16_S
@@ -3707,7 +3707,7 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
 
        case 'u':
          macro_read_relocs (&args, r);
-         assert (ep != NULL
+         gas_assert (ep != NULL
                  && (ep->X_op == O_constant
                      || (ep->X_op == O_symbol
                          && (*r == BFD_RELOC_MIPS_HIGHEST
@@ -3719,7 +3719,7 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
          continue;
 
        case 'p':
-         assert (ep != NULL);
+         gas_assert (ep != NULL);
 
          /*
           * This allows macro() to pass an immediate expression for
@@ -3744,7 +3744,7 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
          continue;
 
        case 'a':
-         assert (ep != NULL);
+         gas_assert (ep != NULL);
          *r = BFD_RELOC_MIPS_JMP;
          continue;
 
@@ -3762,7 +3762,7 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
       break;
     }
   va_end (args);
-  assert (*r == BFD_RELOC_UNUSED ? ep == NULL : ep != NULL);
+  gas_assert (*r == BFD_RELOC_UNUSED ? ep == NULL : ep != NULL);
 
   append_insn (&insn, ep, r);
 }
@@ -3777,14 +3777,14 @@ mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
     = {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
 
   mo = (struct mips_opcode *) hash_find (mips16_op_hash, name);
-  assert (mo);
-  assert (strcmp (name, mo->name) == 0);
+  gas_assert (mo);
+  gas_assert (strcmp (name, mo->name) == 0);
 
   while (strcmp (fmt, mo->args) != 0 || mo->pinfo == INSN_MACRO)
     {
       ++mo;
-      assert (mo->name);
-      assert (strcmp (name, mo->name) == 0);
+      gas_assert (mo->name);
+      gas_assert (strcmp (name, mo->name) == 0);
     }
 
   create_insn (&insn, mo);
@@ -3858,7 +3858,7 @@ mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
        case 'p':
        case 'q':
          {
-           assert (ep != NULL);
+           gas_assert (ep != NULL);
 
            if (ep->X_op != O_constant)
              *r = (int) BFD_RELOC_UNUSED + c;
@@ -3881,7 +3881,7 @@ mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
       break;
     }
 
-  assert (*r == BFD_RELOC_UNUSED ? ep == NULL : ep != NULL);
+  gas_assert (*r == BFD_RELOC_UNUSED ? ep == NULL : ep != NULL);
 
   append_insn (&insn, ep, r);
 }
@@ -3947,7 +3947,7 @@ macro_build_lui (expressionS *ep, int regnum)
   const char *name = "lui";
   const char *fmt = "t,u";
 
-  assert (! mips_opts.mips16);
+  gas_assert (! mips_opts.mips16);
 
   high_expr = *ep;
 
@@ -3960,10 +3960,10 @@ macro_build_lui (expressionS *ep, int regnum)
     }
   else
     {
-      assert (ep->X_op == O_symbol);
+      gas_assert (ep->X_op == O_symbol);
       /* _gp_disp is a special case, used from s_cpload.
         __gnu_local_gp is used if mips_no_shared.  */
-      assert (mips_pic == NO_PIC
+      gas_assert (mips_pic == NO_PIC
              || (! HAVE_NEWABI
                  && strcmp (S_GET_NAME (ep->X_add_symbol), "_gp_disp") == 0)
              || (! mips_in_shared
@@ -3973,8 +3973,8 @@ macro_build_lui (expressionS *ep, int regnum)
     }
 
   mo = hash_find (op_hash, name);
-  assert (strcmp (name, mo->name) == 0);
-  assert (strcmp (fmt, mo->args) == 0);
+  gas_assert (strcmp (name, mo->name) == 0);
+  gas_assert (strcmp (fmt, mo->args) == 0);
   create_insn (&insn, mo);
 
   insn.insn_opcode = insn.insn_mo->match;
@@ -3995,7 +3995,7 @@ static void
 macro_build_ldst_constoffset (expressionS *ep, const char *op,
                              int treg, int breg, int dbl)
 {
-  assert (ep->X_op == O_constant);
+  gas_assert (ep->X_op == O_constant);
 
   /* Sign-extending 32-bit constants makes their handling easier.  */
   if (!dbl)
@@ -4148,7 +4148,7 @@ load_register (int reg, expressionS *ep, int dbl)
 
   if (ep->X_op != O_big)
     {
-      assert (ep->X_op == O_constant);
+      gas_assert (ep->X_op == O_constant);
 
       /* Sign-extending 32-bit constants makes their handling easier.  */
       if (!dbl)
@@ -4202,7 +4202,7 @@ load_register (int reg, expressionS *ep, int dbl)
     }
   else
     {
-      assert (ep->X_add_number > 2);
+      gas_assert (ep->X_add_number > 2);
       if (ep->X_add_number == 3)
        generic_bignum[3] = 0;
       else if (ep->X_add_number > 4)
@@ -4749,7 +4749,7 @@ macro (struct mips_cl_insn *ip)
   bfd_reloc_code_real_type r;
   int hold_mips_optimize;
 
-  assert (! mips_opts.mips16);
+  gas_assert (! mips_opts.mips16);
 
   treg = (ip->insn_opcode >> 16) & 0x1f;
   dreg = (ip->insn_opcode >> 11) & 0x1f;
@@ -5755,7 +5755,7 @@ macro (struct mips_cl_insn *ip)
                    dreg = tempreg;
                  else
                    {
-                     assert (tempreg == AT);
+                     gas_assert (tempreg == AT);
                      macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
                                   treg, AT, breg);
                      dreg = treg;
@@ -5896,7 +5896,7 @@ macro (struct mips_cl_insn *ip)
                dreg = tempreg;
              else
                {
-                 assert (tempreg == AT);
+                 gas_assert (tempreg == AT);
                  load_delay_nop ();
                  macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
                               treg, AT, breg);
@@ -5939,7 +5939,7 @@ macro (struct mips_cl_insn *ip)
                {
                  /* We must add in the base register now, as in the
                     external symbol case.  */
-                 assert (tempreg == AT);
+                 gas_assert (tempreg == AT);
                  load_delay_nop ();
                  macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
                               treg, AT, breg);
@@ -6035,7 +6035,7 @@ macro (struct mips_cl_insn *ip)
                dreg = tempreg;
              else
                {
-                 assert (tempreg == AT);
+                 gas_assert (tempreg == AT);
                  macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
                               treg, AT, breg);
                  dreg = treg;
@@ -6685,7 +6685,7 @@ macro (struct mips_cl_insn *ip)
             16 bits, because we have no way to load the upper 16 bits
             (actually, we could handle them for the subset of cases
             in which we are not using $at).  */
-         assert (offset_expr.X_op == O_symbol);
+         gas_assert (offset_expr.X_op == O_symbol);
          if (HAVE_NEWABI)
            {
              macro_build (&offset_expr, ADDRESS_LOAD_INSN, "t,o(b)", tempreg,
@@ -6735,7 +6735,7 @@ macro (struct mips_cl_insn *ip)
             16 bits, because we have no way to load the upper 16 bits
             (actually, we could handle them for the subset of cases
             in which we are not using $at).  */
-         assert (offset_expr.X_op == O_symbol);
+         gas_assert (offset_expr.X_op == O_symbol);
          expr1.X_add_number = offset_expr.X_add_number;
          offset_expr.X_add_number = 0;
          if (expr1.X_add_number < -0x8000
@@ -6774,7 +6774,7 @@ macro (struct mips_cl_insn *ip)
             Otherwise, for local symbols, we want:
               lw       $tempreg,<sym>($gp)     (BFD_RELOC_MIPS_GOT_PAGE)
               <op>     $treg,<sym>($tempreg)   (BFD_RELOC_MIPS_GOT_OFST)  */
-         assert (offset_expr.X_op == O_symbol);
+         gas_assert (offset_expr.X_op == O_symbol);
          expr1.X_add_number = offset_expr.X_add_number;
          offset_expr.X_add_number = 0;
          if (expr1.X_add_number < -0x8000
@@ -6827,7 +6827,7 @@ macro (struct mips_cl_insn *ip)
        }
       else
        {
-         assert (offset_expr.X_op == O_symbol
+         gas_assert (offset_expr.X_op == O_symbol
                  && strcmp (segment_name (S_GET_SEGMENT
                                           (offset_expr.X_add_symbol)),
                             ".lit4") == 0
@@ -6869,7 +6869,7 @@ macro (struct mips_cl_insn *ip)
                    move_register (lreg, 0);
                  else
                    {
-                     assert (offset_expr.X_op == O_constant);
+                     gas_assert (offset_expr.X_op == O_constant);
                      load_register (lreg, &offset_expr, 0);
                    }
                }
@@ -6924,7 +6924,7 @@ macro (struct mips_cl_insn *ip)
          load_register (AT, &imm_expr, HAVE_64BIT_FPRS);
          if (HAVE_64BIT_FPRS)
            {
-             assert (HAVE_64BIT_GPRS);
+             gas_assert (HAVE_64BIT_GPRS);
              macro_build (NULL, "dmtc1", "t,S", AT, treg);
            }
          else
@@ -6934,7 +6934,7 @@ macro (struct mips_cl_insn *ip)
                macro_build (NULL, "mtc1", "t,G", 0, treg);
              else
                {
-                 assert (offset_expr.X_op == O_constant);
+                 gas_assert (offset_expr.X_op == O_constant);
                  load_register (AT, &offset_expr, 0);
                  macro_build (NULL, "mtc1", "t,G", AT, treg);
                }
@@ -6942,7 +6942,7 @@ macro (struct mips_cl_insn *ip)
          break;
        }
 
-      assert (offset_expr.X_op == O_symbol
+      gas_assert (offset_expr.X_op == O_symbol
              && offset_expr.X_add_number == 0);
       s = segment_name (S_GET_SEGMENT (offset_expr.X_add_symbol));
       if (strcmp (s, ".lit8") == 0)
@@ -6959,7 +6959,7 @@ macro (struct mips_cl_insn *ip)
        }
       else
        {
-         assert (strcmp (s, RDATA_SECTION_NAME) == 0);
+         gas_assert (strcmp (s, RDATA_SECTION_NAME) == 0);
          used_at = 1;
          if (mips_pic != NO_PIC)
            macro_build (&offset_expr, ADDRESS_LOAD_INSN, "t,o(b)", AT,
@@ -6986,7 +6986,7 @@ macro (struct mips_cl_insn *ip)
         to adjust when loading from memory.  */
       r = BFD_RELOC_LO16;
     dob:
-      assert (mips_opts.isa == ISA_MIPS1);
+      gas_assert (mips_opts.isa == ISA_MIPS1);
       macro_build (&offset_expr, "lwc1", "T,o(b)",
                   target_big_endian ? treg + 1 : treg, r, breg);
       /* FIXME: A possible overflow which I don't know how to deal
@@ -7297,7 +7297,7 @@ macro (struct mips_cl_insn *ip)
     case M_SD_OB:
       s = "sw";
     sd_ob:
-      assert (HAVE_32BIT_ADDRESSES);
+      gas_assert (HAVE_32BIT_ADDRESSES);
       macro_build (&offset_expr, s, "t,o(b)", treg, BFD_RELOC_LO16, breg);
       offset_expr.X_add_number += 4;
       macro_build (&offset_expr, s, "t,o(b)", treg + 1, BFD_RELOC_LO16, breg);
@@ -7673,7 +7673,7 @@ macro2 (struct mips_cl_insn *ip)
       break;
 
     case M_S_DOB:
-      assert (mips_opts.isa == ISA_MIPS1);
+      gas_assert (mips_opts.isa == ISA_MIPS1);
       /* Even on a big endian machine $fn comes before $fn+1.  We have
         to adjust when storing to memory.  */
       macro_build (&offset_expr, "swc1", "T,o(b)",
@@ -7967,7 +7967,7 @@ macro2 (struct mips_cl_insn *ip)
 
     case M_TRUNCWS:
     case M_TRUNCWD:
-      assert (mips_opts.isa == ISA_MIPS1);
+      gas_assert (mips_opts.isa == ISA_MIPS1);
       used_at = 1;
       sreg = (ip->insn_opcode >> 11) & 0x1f;   /* floating reg */
       dreg = (ip->insn_opcode >> 06) & 0x1f;   /* floating reg */
@@ -8701,7 +8701,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
     {
       bfd_boolean ok;
 
-      assert (strcmp (insn->name, str) == 0);
+      gas_assert (strcmp (insn->name, str) == 0);
 
       ok = is_opcode_valid (insn, FALSE);
       if (! ok)
@@ -8997,7 +8997,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
                 we must have a left paren.  */
              /* This is dependent on the next operand specifier
                 is a base register specification.  */
-             assert (args[1] == 'b' || args[1] == '5'
+             gas_assert (args[1] == 'b' || args[1] == '5'
                      || args[1] == '-' || args[1] == '4');
              if (*s == '\0')
                return;
@@ -9762,7 +9762,7 @@ do_msbd:
                    length = f64 ? 8 : 4;
                  }
 
-               assert (length == (unsigned) (f64 ? 8 : 4));
+               gas_assert (length == (unsigned) (f64 ? 8 : 4));
 
                if (*args == 'f'
                    || (*args == 'l'
@@ -9860,7 +9860,7 @@ do_msbd:
                        newname = RDATA_SECTION_NAME;
                        break;
                      case 'l':
-                       assert (g_switch_value >= 4);
+                       gas_assert (g_switch_value >= 4);
                        newname = ".lit4";
                        break;
                      }
@@ -10163,7 +10163,7 @@ mips16_ip (char *str, struct mips_cl_insn *ip)
     {
       bfd_boolean ok;
 
-      assert (strcmp (insn->name, str) == 0);
+      gas_assert (strcmp (insn->name, str) == 0);
 
       ok = is_opcode_valid_16 (insn);
       if (! ok)
@@ -10862,7 +10862,7 @@ mips16_immed (char *file, unsigned int line, int type, offsetT val,
   while (op->type != type)
     {
       ++op;
-      assert (op < mips16_immed_operands + MIPS16_NUM_IMMED);
+      gas_assert (op < mips16_immed_operands + MIPS16_NUM_IMMED);
     }
 
   if (op->unsp)
@@ -12109,7 +12109,7 @@ mips_frob_file (void)
       bfd_boolean matched_lo_p;
       fixS **hi_pos, **lo_pos, **pos;
 
-      assert (reloc_needs_lo_p (l->fixp->fx_r_type));
+      gas_assert (reloc_needs_lo_p (l->fixp->fx_r_type));
 
       /* If a GOT16 relocation turns out to be against a global symbol,
         there isn't supposed to be a matching LO.  */
@@ -12205,7 +12205,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
   if (! howto)
     return;
 
-  assert (fixP->fx_size == 4
+  gas_assert (fixP->fx_size == 4
          || fixP->fx_r_type == BFD_RELOC_16
          || fixP->fx_r_type == BFD_RELOC_64
          || fixP->fx_r_type == BFD_RELOC_CTOR
@@ -12216,7 +12216,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
 
   buf = (bfd_byte *) (fixP->fx_frag->fr_literal + fixP->fx_where);
 
-  assert (!fixP->fx_pcrel || fixP->fx_r_type == BFD_RELOC_16_PCREL_S2);
+  gas_assert (!fixP->fx_pcrel || fixP->fx_r_type == BFD_RELOC_16_PCREL_S2);
 
   /* Don't treat parts of a composite relocation as done.  There are two
      reasons for this:
@@ -12438,7 +12438,7 @@ mips_align (int to, int *fill, symbolS *label)
   record_alignment (now_seg, to);
   if (label != NULL)
     {
-      assert (S_GET_SEGMENT (label) == now_seg);
+      gas_assert (S_GET_SEGMENT (label) == now_seg);
       symbol_set_frag (label, frag_now);
       S_SET_VALUE (label, (valueT) frag_now_fix ());
     }
@@ -13698,7 +13698,7 @@ nopic_need_relax (symbolS *sym, int before_relaxing)
          const char *segname;
 
          segname = segment_name (S_GET_SEGMENT (sym));
-         assert (strcmp (segname, ".lit8") != 0
+         gas_assert (strcmp (segname, ".lit8") != 0
                  && strcmp (segname, ".lit4") != 0);
          change = (strcmp (segname, ".sdata") != 0
                    && strcmp (segname, ".sbss") != 0
@@ -13775,7 +13775,7 @@ mips16_extended_frag (fragS *fragp, asection *sec, long stretch)
   while (op->type != type)
     {
       ++op;
-      assert (op < mips16_immed_operands + MIPS16_NUM_IMMED);
+      gas_assert (op < mips16_immed_operands + MIPS16_NUM_IMMED);
     }
 
   if (op->unsp)
@@ -14158,7 +14158,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
 
   if (fixp->fx_pcrel)
     {
-      assert (fixp->fx_r_type == BFD_RELOC_16_PCREL_S2);
+      gas_assert (fixp->fx_r_type == BFD_RELOC_16_PCREL_S2);
 
       /* At this point, fx_addnumber is "symbol offset - pcrel address".
         Relocations want only the symbol offset.  */
@@ -14288,14 +14288,14 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
                  /* bc[0-3][tf]l? and bc1any[24][ft] instructions can
                     have the condition reversed by tweaking a single
                     bit, and their opcodes all have 0x4???????.  */
-                 assert ((insn & 0xf1000000) == 0x41000000);
+                 gas_assert ((insn & 0xf1000000) == 0x41000000);
                  insn ^= 0x00010000;
                  break;
 
                case 0:
                  /* bltz       0x04000000      bgez    0x04010000
                     bltzal     0x04100000      bgezal  0x04110000  */
-                 assert ((insn & 0xfc0e0000) == 0x04000000);
+                 gas_assert ((insn & 0xfc0e0000) == 0x04000000);
                  insn ^= 0x00010000;
                  break;
 
@@ -14313,7 +14313,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
          if (RELAX_BRANCH_LINK (fragp->fr_subtype))
            {
              /* Clear the and-link bit.  */
-             assert ((insn & 0xfc1c0000) == 0x04100000);
+             gas_assert ((insn & 0xfc1c0000) == 0x04100000);
 
              /* bltzal         0x04100000      bgezal  0x04110000
                 bltzall        0x04120000      bgezall 0x04130000  */
@@ -14437,7 +14437,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
            }
        }
 
-      assert (buf == (bfd_byte *)fragp->fr_literal
+      gas_assert (buf == (bfd_byte *)fragp->fr_literal
              + fragp->fr_fix + fragp->fr_var);
 
       fragp->fr_fix += fragp->fr_var;
@@ -14935,7 +14935,7 @@ s_mips_end (int x ATTRIBUTE_UNUSED)
 
   if (p != NULL)
     {
-      assert (S_GET_NAME (p));
+      gas_assert (S_GET_NAME (p));
       if (strcmp (S_GET_NAME (p), S_GET_NAME (cur_proc_ptr->func_sym)))
        as_warn (_(".end symbol does not match .ent symbol."));
 
@@ -14977,7 +14977,7 @@ s_mips_end (int x ATTRIBUTE_UNUSED)
       md_flush_pending_output ();
 #endif
 
-      assert (pdr_seg);
+      gas_assert (pdr_seg);
       subseg_set (pdr_seg, 0);
 
       /* Write the symbol.  */
index 320ed2b..53322a8 100644 (file)
@@ -2842,7 +2842,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
     }
 
   relP = (arelent *) xmalloc (sizeof (arelent));
-  assert (relP != 0);
+  gas_assert (relP != 0);
   relP->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
   *relP->sym_ptr_ptr = baddsy;
   relP->address = fixP->fx_frag->fr_address + fixP->fx_where;
index 5068904..33c63f5 100644 (file)
@@ -2322,7 +2322,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg)
   int size = 0;
   int value = (int) * valP;
 
-  assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
+  gas_assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
 
   /* This should never happen.  */
   if (seg->flags & SEC_ALLOC)
index 281b69a..2eaa827 100644 (file)
@@ -713,7 +713,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
     }
 
   relP = xmalloc (sizeof (arelent));
-  assert (relP != 0);
+  gas_assert (relP != 0);
   relP->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
   *relP->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
   relP->address = fixP->fx_frag->fr_address + fixP->fx_where;
index 509239b..37344eb 100644 (file)
@@ -712,7 +712,7 @@ get_addr_mode (char *ptr, addr_modeS *addr_modeP)
       addr_modeP->am_size += 1;
     }
 
-  assert (addr_modeP->mode >= 0); 
+  gas_assert (addr_modeP->mode >= 0); 
   if (disp_test[(unsigned int) addr_modeP->mode])
     {
       char c;
@@ -725,7 +725,7 @@ get_addr_mode (char *ptr, addr_modeS *addr_modeP)
       /* There was a displacement, probe for length  specifying suffix.  */
       addr_modeP->pcrel = 0;
 
-      assert(addr_modeP->mode >= 0);
+      gas_assert (addr_modeP->mode >= 0);
       if (disp_test[(unsigned int) addr_modeP->mode])
        {
          /* There is a displacement.  */
index 05e19d7..9c3566f 100644 (file)
@@ -490,7 +490,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
                    bfd_get_reloc_code_name (r_type));
       /* Set howto to a garbage value so that we can keep going.  */
       rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
-      assert (rel->howto != NULL);
+      gas_assert (rel->howto != NULL);
     }
 
   return rel;
index 0b0edbd..96c40ba 100644 (file)
@@ -2527,7 +2527,7 @@ md_assemble (char *str)
                 explain.  */
              if (ex.X_op == O_symbol)
                {
-                 assert (ex.X_add_symbol != NULL);
+                 gas_assert (ex.X_add_symbol != NULL);
                  if (symbol_get_bfdsym (ex.X_add_symbol)->section
                      != tocdata_section)
                    {
@@ -5819,7 +5819,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
        /* Nothing else to do here.  */
        return;
 
-      assert (fixP->fx_addsy != NULL);
+      gas_assert (fixP->fx_addsy != NULL);
 
       /* Determine a BFD reloc value based on the operand information.
         We are only prepared to turn a few of the operands into
index f5c2a2e..b9dfa00 100644 (file)
@@ -2237,7 +2237,7 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp)
                    bfd_get_reloc_code_name (code));
       /* Set howto to a garbage value so that we can keep going.  */
       reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
-      assert (reloc->howto != NULL);
+      gas_assert (reloc->howto != NULL);
     }
   reloc->addend = fixp->fx_offset;
 
index 3b04508..7456d38 100644 (file)
@@ -4286,7 +4286,7 @@ s3_do_macro_la_rdi32 (char *str)
                }
              else
                {
-                 assert (s3_inst.reloc.exp.X_add_symbol);
+                 gas_assert (s3_inst.reloc.exp.X_add_symbol);
                  s3_build_la_pic (reg_rd, s3_inst.reloc.exp);
                }
 
@@ -4555,7 +4555,7 @@ s3_do_macro_bcmp (char *str)
               }
             else
               {
-                assert (s3_inst.reloc.exp.X_add_symbol);
+                gas_assert (s3_inst.reloc.exp.X_add_symbol);
               }
             /* Set bwarn as -1, so macro instruction itself will not be generated frag.  */
             s3_inst.bwarn = -1;
@@ -4589,7 +4589,7 @@ s3_do_macro_bcmp (char *str)
         }
       else
         {
-          assert (s3_inst.reloc.exp.X_add_symbol);
+          gas_assert (s3_inst.reloc.exp.X_add_symbol);
         }
       inst_main.relax_size = inst_expand[0].size + inst_expand[1].size;
       inst_main.type = Insn_BCMP;
@@ -4704,7 +4704,7 @@ s3_do_macro_bcmpz (char *str)
             }
           else
             {
-              assert (s3_inst.reloc.exp.X_add_symbol);
+              gas_assert (s3_inst.reloc.exp.X_add_symbol);
             }
           /* Set bwarn as -1, so macro instruction itself will not be generated frag.  */
           s3_inst.bwarn = -1;
@@ -4737,7 +4737,7 @@ s3_do_macro_bcmpz (char *str)
         }
       else
         {
-          assert (s3_inst.reloc.exp.X_add_symbol);
+          gas_assert (s3_inst.reloc.exp.X_add_symbol);
         }
       inst_main.relax_size = inst_expand[0].size + inst_expand[1].size;
       inst_main.type = Insn_BCMP;
@@ -5825,7 +5825,7 @@ s3_s_score_end (int x ATTRIBUTE_UNUSED)
     }
   if (p != NULL)
     {
-      assert (S_GET_NAME (p));
+      gas_assert (S_GET_NAME (p));
       if (strcmp (S_GET_NAME (p), S_GET_NAME (s3_cur_proc_ptr->isym)))
         as_warn (_(".end symbol does not match .ent symbol."));
       if (debug_type == DEBUG_STABS)
@@ -5843,7 +5843,7 @@ s3_s_score_end (int x ATTRIBUTE_UNUSED)
   else
     {
       dot = frag_now_fix ();
-      assert (s3_pdr_seg);
+      gas_assert (s3_pdr_seg);
       subseg_set (s3_pdr_seg, 0);
       /* Write the symbol.  */
       exp.X_op = O_symbol;
@@ -7103,7 +7103,7 @@ s3_apply_fix (fixS *fixP, valueT *valP, segT seg)
 
   char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
 
-  assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
+  gas_assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
   if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
     {
       if (fixP->fx_r_type != BFD_RELOC_SCORE_DUMMY_HI16)
@@ -7446,7 +7446,7 @@ s3_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp)
 
       retval[1]->addend = 0;
       retval[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO16);
-      assert (retval[1]->howto != NULL);
+      gas_assert (retval[1]->howto != NULL);
 
       fixp->fx_r_type = BFD_RELOC_HI16_S;
     }
index b282b1d..30b1128 100644 (file)
@@ -4382,7 +4382,7 @@ s7_do_macro_la_rdi32 (char *str)
                }
              else
                {
-                 assert (s7_inst.reloc.exp.X_add_symbol);
+                 gas_assert (s7_inst.reloc.exp.X_add_symbol);
                  s7_build_la_pic (reg_rd, s7_inst.reloc.exp);
                }
 
@@ -5676,7 +5676,7 @@ s7_s_score_end (int x ATTRIBUTE_UNUSED)
     }
   if (p != NULL)
     {
-      assert (S_GET_NAME (p));
+      gas_assert (S_GET_NAME (p));
       if (strcmp (S_GET_NAME (p), S_GET_NAME (s7_cur_proc_ptr->isym)))
         as_warn (_(".end symbol does not match .ent symbol."));
       if (debug_type == DEBUG_STABS)
@@ -5694,7 +5694,7 @@ s7_s_score_end (int x ATTRIBUTE_UNUSED)
   else
     {
       dot = frag_now_fix ();
-      assert (s7_pdr_seg);
+      gas_assert (s7_pdr_seg);
       subseg_set (s7_pdr_seg, 0);
       /* Write the symbol.  */
       exp.X_op = O_symbol;
@@ -6658,7 +6658,7 @@ s7_apply_fix (fixS *fixP, valueT *valP, segT seg)
 
   char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
 
-  assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
+  gas_assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
   if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
     {
       if (fixP->fx_r_type != BFD_RELOC_SCORE_DUMMY_HI16)
@@ -6932,7 +6932,7 @@ s7_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp)
 
       retval[1]->addend = 0;
       retval[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO16);
-      assert (retval[1]->howto != NULL);
+      gas_assert (retval[1]->howto != NULL);
 
       fixp->fx_r_type = BFD_RELOC_HI16_S;
     }
index 2ed1b8e..a1e6d74 100644 (file)
@@ -4375,7 +4375,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
                    bfd_get_reloc_code_name (r_type));
       /* Set howto to a garbage value so that we can keep going.  */
       rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
-      assert (rel->howto != NULL);
+      gas_assert (rel->howto != NULL);
     }
 #ifdef OBJ_ELF
   else if (rel->howto->type == R_SH_IND12W)
index af34751..b52351d 100644 (file)
@@ -1356,7 +1356,7 @@ md_assemble (char *str)
           The workaround is to add an fmovs of the destination register to
           itself just after the instruction.  This was true on machines
           with Weitek 1165 float chips, such as the Sun-4/260 and /280.  */
-       assert (the_insn.reloc == BFD_RELOC_NONE);
+       gas_assert (the_insn.reloc == BFD_RELOC_NONE);
        the_insn.opcode = FMOVS_INSN | rd | RD (rd);
        output_insn (insn, &the_insn);
        return;
@@ -2745,7 +2745,7 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn)
                sparc_ffs (SPARC_OPCODE_SUPPORTED (max_architecture)
                           & needed_arch_mask);
 
-             assert (needed_architecture <= SPARC_OPCODE_ARCH_MAX);
+             gas_assert (needed_architecture <= SPARC_OPCODE_ARCH_MAX);
              if (warn_on_bump
                  && needed_architecture > warn_after_architecture)
                {
@@ -2959,7 +2959,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT segment ATTRIBUTE_UNUSED)
   offsetT val = * (offsetT *) valP;
   long insn;
 
-  assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
+  gas_assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
 
   fixP->fx_addnumber = val;    /* Remember value for emit_reloc.  */
 
@@ -4196,7 +4196,7 @@ sparc_cons_align (int nbytes)
   if (nalign == 0)
     return;
 
-  assert (nalign > 0);
+  gas_assert (nalign > 0);
 
   if (now_seg == absolute_section)
     {
index 0b40a56..bc61b27 100644 (file)
@@ -273,7 +273,7 @@ md_assemble (char *op)
   struct spu_insn insn;
   int i;
 
-  assert (op);
+  gas_assert (op);
 
   /* skip over instruction to find parameters */
 
index a4b88bd..4dd0daf 100644 (file)
@@ -1388,7 +1388,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
 #undef F
 
   rel = xmalloc (sizeof (* rel));
-  assert (rel != 0);
+  gas_assert (rel != 0);
   rel->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
   *rel->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
   rel->address = fixP->fx_frag->fr_address + fixP->fx_where;
@@ -2003,4 +2003,3 @@ md_assemble (char *line)
   debug ("Final opcode: %08X\n", insn.opcode);
   debug ("\n");
 }
-
index ec83657..e7a7c34 100644 (file)
@@ -2400,7 +2400,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
 #endif
 
   reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
-  assert (reloc->howto != 0);
+  gas_assert (reloc->howto != 0);
 
   return reloc;
 }
index 590ffdb..bacd54b 100644 (file)
@@ -1055,7 +1055,7 @@ use_transform (void)
 {
   /* After md_end, you should be checking frag by frag, rather
      than state directives.  */
-  assert (!past_xtensa_end);
+  gas_assert (!past_xtensa_end);
   return directive_state[directive_transform];
 }
 
@@ -1066,7 +1066,7 @@ do_align_targets (void)
   /* Do not use this function after md_end; just look at align_targets
      instead.  There is no target-align directive, so alignment is either
      enabled for all frags or not done at all.  */
-  assert (!past_xtensa_end);
+  gas_assert (!past_xtensa_end);
   return align_targets && use_transform ();
 }
 
@@ -1252,7 +1252,7 @@ xtensa_begin_directive (int ignore ATTRIBUTE_UNUSED)
       /* Allocate the literal state for this section and push
         onto the directive stack.  */
       ls = xmalloc (sizeof (lit_state));
-      assert (ls);
+      gas_assert (ls);
 
       *ls = default_lit_sections;
       directive_push (directive_literal_prefix, negated, ls);
@@ -1377,7 +1377,7 @@ xtensa_end_directive (int ignore ATTRIBUTE_UNUSED)
            case directive_literal_prefix:
              /* Restore the default collection sections from saved state.  */
              s = (lit_state *) state;
-             assert (s);
+             gas_assert (s);
              default_lit_sections = *s;
 
              /* Free the state storage.  */
@@ -1501,7 +1501,7 @@ xtensa_literal_prefix (void)
 
   /* Get a null-terminated copy of the name.  */
   name = xmalloc (len + 1);
-  assert (name);
+  gas_assert (name);
   strncpy (name, input_line_pointer, len);
   name[len] = 0;
 
@@ -1696,7 +1696,7 @@ map_suffix_reloc_to_operator (bfd_reloc_code_real_type reloc)
          break;
        }
     }
-  assert (operator != (unsigned char) -1);
+  gas_assert (operator != (unsigned char) -1);
   return operator;
 }
 
@@ -1826,7 +1826,7 @@ expression_maybe_register (xtensa_opcode opc, int opnd, expressionS *tok)
       if (t == absolute_section
          && xtensa_operand_is_PCrelative (isa, opc, opnd) == 1)
        {
-         assert (tok->X_op == O_constant);
+         gas_assert (tok->X_op == O_constant);
          tok->X_op = O_symbol;
          tok->X_add_symbol = &abs_symbol;
        }
@@ -2014,7 +2014,7 @@ parse_arguments (TInsn *insn, int num_args, char **arg_strings)
          input_line_pointer++;
          if (num_regs == 0)
            goto err;
-         assert (opnd_cnt > 0);
+         gas_assert (opnd_cnt > 0);
          num_regs--;
          opnd_rf = xtensa_operand_regfile (isa, opcode, last_opnd_cnt);
          if (next_reg
@@ -2029,7 +2029,7 @@ parse_arguments (TInsn *insn, int num_args, char **arg_strings)
              as_warn (_("too many arguments"));
              goto err;
            }
-         assert (opnd_cnt < MAX_INSN_ARGS);
+         gas_assert (opnd_cnt < MAX_INSN_ARGS);
 
          expression_maybe_register (opcode, opnd_cnt, tok);
          next_reg = tok->X_add_number + 1;
@@ -2356,7 +2356,7 @@ xtensa_translate_zero_immed (char *old_op,
   offsetT val;
 
   opname = *popname;
-  assert (opname[0] != '_');
+  gas_assert (opname[0] != '_');
 
   if (strcmp (opname, old_op) != 0)
     return 0;
@@ -2832,7 +2832,7 @@ xg_instruction_matches_rule (TInsn *insn, TransitionRule *rule)
        {
        case OP_CONSTANT:
          /* The expression must be the constant.  */
-         assert (cond->op_num < insn->ntok);
+         gas_assert (cond->op_num < insn->ntok);
          exp1 = &insn->tok[cond->op_num];
          if (expr_is_const (exp1))
            {
@@ -2871,8 +2871,8 @@ xg_instruction_matches_rule (TInsn *insn, TransitionRule *rule)
          break;
 
        case OP_OPERAND:
-         assert (cond->op_num < insn->ntok);
-         assert (cond->op_data < insn->ntok);
+         gas_assert (cond->op_num < insn->ntok);
+         gas_assert (cond->op_data < insn->ntok);
          exp1 = &insn->tok[cond->op_num];
          exp2 = &insn->tok[cond->op_data];
 
@@ -2974,7 +2974,7 @@ xg_instruction_match (TInsn *insn)
 {
   TransitionTable *table = xg_build_simplify_table (&transition_rule_cmp);
   TransitionList *l;
-  assert (insn->opcode < table->num_opcodes);
+  gas_assert (insn->opcode < table->num_opcodes);
 
   /* Walk through all of the possible transitions.  */
   for (l = table->table[insn->opcode]; l != NULL; l = l->next)
@@ -3017,8 +3017,8 @@ xg_is_single_relaxable_insn (TInsn *insn, TInsn *targ, bfd_boolean narrow_only)
   TransitionList *l;
   TransitionRule *match = 0;
 
-  assert (insn->insn_type == ITYPE_INSN);
-  assert (insn->opcode < table->num_opcodes);
+  gas_assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->opcode < table->num_opcodes);
 
   for (l = table->table[insn->opcode]; l != NULL; l = l->next)
     {
@@ -3052,7 +3052,7 @@ xg_get_max_insn_widen_size (xtensa_opcode opcode)
   TransitionList *l;
   int max_size = xg_get_single_size (opcode);
 
-  assert (opcode < table->num_opcodes);
+  gas_assert (opcode < table->num_opcodes);
 
   for (l = table->table[opcode]; l != NULL; l = l->next)
     {
@@ -3065,7 +3065,7 @@ xg_get_max_insn_widen_size (xtensa_opcode opcode)
       build_list = rule->to_instr;
       if (is_unique_insn_expansion (rule))
        {
-         assert (build_list->typ == INSTR_INSTR);
+         gas_assert (build_list->typ == INSTR_INSTR);
          this_size = xg_get_max_insn_widen_size (build_list->opcode);
        }
       else
@@ -3098,7 +3098,7 @@ xg_get_max_insn_widen_literal_size (xtensa_opcode opcode)
   TransitionList *l;
   int max_size = 0;
 
-  assert (opcode < table->num_opcodes);
+  gas_assert (opcode < table->num_opcodes);
 
   for (l = table->table[opcode]; l != NULL; l = l->next)
     {
@@ -3111,7 +3111,7 @@ xg_get_max_insn_widen_literal_size (xtensa_opcode opcode)
       build_list = rule->to_instr;
       if (is_unique_insn_expansion (rule))
        {
-         assert (build_list->typ == INSTR_INSTR);
+         gas_assert (build_list->typ == INSTR_INSTR);
          this_size = xg_get_max_insn_widen_literal_size (build_list->opcode);
        }
       else
@@ -3143,8 +3143,8 @@ xg_is_relaxable_insn (TInsn *insn, int lateral_steps)
   TransitionTable *table = xg_build_widen_table (&transition_rule_cmp);
   TransitionList *l;
 
-  assert (insn->insn_type == ITYPE_INSN);
-  assert (insn->opcode < table->num_opcodes);
+  gas_assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->opcode < table->num_opcodes);
 
   for (l = table->table[insn->opcode]; l != NULL; l = l->next)
     {
@@ -3229,7 +3229,7 @@ xg_immeds_fit (const TInsn *insn)
   int i;
 
   int n = insn->ntok;
-  assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->insn_type == ITYPE_INSN);
   for (i = 0; i < n; ++i)
     {
       const expressionS *expr = &insn->tok[i];
@@ -3246,7 +3246,7 @@ xg_immeds_fit (const TInsn *insn)
 
        default:
          /* The symbol should have a fixup associated with it.  */
-         assert (FALSE);
+         gas_assert (FALSE);
          break;
        }
     }
@@ -3272,7 +3272,7 @@ xg_symbolic_immeds_fit (const TInsn *insn,
   int i;
   int n = insn->ntok;
 
-  assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->insn_type == ITYPE_INSN);
 
   for (i = 0; i < n; ++i)
     {
@@ -3380,7 +3380,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
          int op_num = op->op_num;
          int op_data = op->op_data;
 
-         assert (op->op_num < MAX_INSN_ARGS);
+         gas_assert (op->op_num < MAX_INSN_ARGS);
 
          if (targ->ntok <= op_num)
            targ->ntok = op_num + 1;
@@ -3391,7 +3391,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
              set_expr_const (&targ->tok[op_num], op_data);
              break;
            case OP_OPERAND:
-             assert (op_data < insn->ntok);
+             gas_assert (op_data < insn->ntok);
              copy_expr (&targ->tok[op_num], &insn->tok[op_data]);
              break;
            case OP_FREEREG:
@@ -3412,7 +3412,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
              break;
            case OP_OPERAND_HI16U:
            case OP_OPERAND_LOW16U:
-             assert (op_data < insn->ntok);
+             gas_assert (op_data < insn->ntok);
              if (expr_is_const (&insn->tok[op_data]))
                {
                  long val;
@@ -3428,7 +3428,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
                  if (targ->opcode == XTENSA_UNDEFINED
                      || (targ->opcode != xtensa_const16_opcode))
                    return FALSE;
-                 assert (op_data < insn->ntok);
+                 gas_assert (op_data < insn->ntok);
                  /* Need to build a O_lo16 or O_hi16.  */
                  copy_expr (&targ->tok[op_num], &insn->tok[op_data]);
                  if (targ->tok[op_num].X_op == O_symbol)
@@ -3449,7 +3449,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
                 OP_OPERAND_F32MINUS */
              if (xg_has_userdef_op_fn (op->typ))
                {
-                 assert (op_data < insn->ntok);
+                 gas_assert (op_data < insn->ntok);
                  if (expr_is_const (&insn->tok[op_data]))
                    {
                      long val;
@@ -3463,7 +3463,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
                    return FALSE; /* We cannot use a relocation for this.  */
                  break;
                }
-             assert (0);
+             gas_assert (0);
              break;
            }
        }
@@ -3478,7 +3478,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
        {
          int op_num = op->op_num;
          int op_data = op->op_data;
-         assert (op->op_num < MAX_INSN_ARGS);
+         gas_assert (op->op_num < MAX_INSN_ARGS);
 
          if (targ->ntok <= op_num)
            targ->ntok = op_num + 1;
@@ -3486,7 +3486,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
          switch (op->typ)
            {
            case OP_OPERAND:
-             assert (op_data < insn->ntok);
+             gas_assert (op_data < insn->ntok);
              /* We can only pass resolvable literals through.  */
              if (!xg_valid_literal_expression (&insn->tok[op_data]))
                return FALSE;
@@ -3496,7 +3496,7 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
            case OP_CONSTANT:
            case OP_LABEL:
            default:
-             assert (0);
+             gas_assert (0);
              break;
            }
        }
@@ -3508,11 +3508,11 @@ xg_build_to_insn (TInsn *targ, TInsn *insn, BuildInstr *bi)
       targ->insn_type = ITYPE_LABEL;
       targ->is_specific_opcode = FALSE;
       /* Literal with no ops is a label?  */
-      assert (op == NULL);
+      gas_assert (op == NULL);
       break;
 
     default:
-      assert (0);
+      gas_assert (0);
     }
 
   return TRUE;
@@ -3545,8 +3545,8 @@ xg_expand_to_stack (IStack *istack, TInsn *insn, int lateral_steps)
   TransitionTable *table = xg_build_widen_table (&transition_rule_cmp);
   TransitionList *l;
 
-  assert (insn->insn_type == ITYPE_INSN);
-  assert (insn->opcode < table->num_opcodes);
+  gas_assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->opcode < table->num_opcodes);
 
   for (l = table->table[insn->opcode]; l != NULL; l = l->next)
     {
@@ -3713,7 +3713,7 @@ xg_finish_frag (char *last_insn,
   xtensa_set_frag_assembly_state (frag_now);
 
   /* Just to make sure that we did not split it up.  */
-  assert (old_frag->fr_next == frag_now);
+  gas_assert (old_frag->fr_next == frag_now);
 }
 
 
@@ -3863,14 +3863,14 @@ xg_build_token_insn (BuildInstr *instr_spec, TInsn *old_insn, TInsn *new_insn)
        {
        case OP_CONSTANT:
          /* The expression must be the constant.  */
-         assert (b_op->op_num < MAX_INSN_ARGS);
+         gas_assert (b_op->op_num < MAX_INSN_ARGS);
          exp = &new_insn->tok[b_op->op_num];
          set_expr_const (exp, b_op->op_data);
          break;
 
        case OP_OPERAND:
-         assert (b_op->op_num < MAX_INSN_ARGS);
-         assert (b_op->op_data < (unsigned) old_insn->ntok);
+         gas_assert (b_op->op_num < MAX_INSN_ARGS);
+         gas_assert (b_op->op_data < (unsigned) old_insn->ntok);
          src_exp = &old_insn->tok[b_op->op_data];
          exp = &new_insn->tok[b_op->op_num];
          copy_expr (exp, src_exp);
@@ -3879,11 +3879,11 @@ xg_build_token_insn (BuildInstr *instr_spec, TInsn *old_insn, TInsn *new_insn)
        case OP_LITERAL:
        case OP_LABEL:
          as_bad (_("can't handle generation of literal/labels yet"));
-         assert (0);
+         gas_assert (0);
 
        default:
          as_bad (_("can't handle undefined OP TYPE"));
-         assert (0);
+         gas_assert (0);
        }
     }
 
@@ -3909,8 +3909,8 @@ xg_simplify_insn (TInsn *old_insn, TInsn *new_insn)
 
   insn_spec = rule->to_instr;
   /* There should only be one.  */
-  assert (insn_spec != NULL);
-  assert (insn_spec->next == NULL);
+  gas_assert (insn_spec != NULL);
+  gas_assert (insn_spec->next == NULL);
   if (insn_spec->next != NULL)
     return FALSE;
 
@@ -4089,8 +4089,8 @@ xg_assemble_literal (/* const */ TInsn *insn)
 
   set_expr_symbol_offset (&saved_loc, frag_now->fr_symbol, frag_now_fix ());
 
-  assert (insn->insn_type == ITYPE_LITERAL);
-  assert (insn->ntok == 1);    /* must be only one token here */
+  gas_assert (insn->insn_type == ITYPE_LITERAL);
+  gas_assert (insn->ntok == 1);        /* must be only one token here */
 
   xtensa_switch_to_literal_fragment (&state);
 
@@ -4140,7 +4140,7 @@ xg_assemble_literal (/* const */ TInsn *insn)
       break;
     }
 
-  assert (frag_now->tc_frag_data.literal_frag == NULL);
+  gas_assert (frag_now->tc_frag_data.literal_frag == NULL);
   frag_now->tc_frag_data.literal_frag = get_literal_pool_location (now_seg);
   frag_now->fr_symbol = xtensa_create_literal_symbol (now_seg, frag_now);
   lit_sym = frag_now->fr_symbol;
@@ -4160,7 +4160,7 @@ xg_assemble_literal_space (/* const */ int size, int slot)
   offsetT litalign = 2;                /* 2^2 = 4 */
   fragS *lit_saved_frag;
 
-  assert (size % 4 == 0);
+  gas_assert (size % 4 == 0);
 
   xtensa_switch_to_literal_fragment (&state);
 
@@ -4307,7 +4307,7 @@ xg_resolve_literals (TInsn *insn, symbolS *lit_sym)
   int i;
   if (lit_sym == 0)
     return;
-  assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->insn_type == ITYPE_INSN);
   for (i = 0; i < insn->ntok; i++)
     if (insn->tok[i].X_add_symbol == sym)
       insn->tok[i].X_add_symbol = lit_sym;
@@ -4578,7 +4578,7 @@ update_next_frag_state (fragS *fragP)
                   || next_fragP->fr_subtype == RELAX_UNREACHABLE)))
        next_fragP = next_fragP->fr_next;
 
-      assert (next_fragP->fr_type == rs_machine_dependent
+      gas_assert (next_fragP->fr_type == rs_machine_dependent
              && (next_fragP->fr_subtype == RELAX_MAYBE_UNREACHABLE
                  || next_fragP->fr_subtype == RELAX_UNREACHABLE));
 
@@ -4589,7 +4589,7 @@ update_next_frag_state (fragS *fragP)
                   || new_target->fr_subtype == RELAX_DESIRE_ALIGN)))
        new_target = new_target->fr_next;
 
-      assert (new_target->fr_type == rs_machine_dependent
+      gas_assert (new_target->fr_type == rs_machine_dependent
              && (new_target->fr_subtype == RELAX_MAYBE_DESIRE_ALIGN
                  || new_target->fr_subtype == RELAX_DESIRE_ALIGN));
     }
@@ -4739,7 +4739,7 @@ build_nop (TInsn *tinsn, int size)
       else
        tinsn->opcode = xtensa_nop_opcode;
 
-      assert (tinsn->opcode != XTENSA_UNDEFINED);
+      gas_assert (tinsn->opcode != XTENSA_UNDEFINED);
     }
 }
 
@@ -4777,7 +4777,7 @@ get_expanded_loop_offset (xtensa_opcode opcode)
   /* This is the OFFSET of the loop instruction in the expanded loop.
      This MUST correspond directly to the specification of the loop
      expansion.  It will be validated on fragment conversion.  */
-  assert (opcode != XTENSA_UNDEFINED);
+  gas_assert (opcode != XTENSA_UNDEFINED);
   if (opcode == xtensa_loop_opcode)
     return 0;
   if (opcode == xtensa_loopnez_opcode)
@@ -5892,7 +5892,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
             by the linker, and it makes the object file disassembly
             readable when all branch targets are encoded in relocations.  */
 
-         assert (fixP->fx_addsy);
+         gas_assert (fixP->fx_addsy);
          if (S_GET_SEGMENT (fixP->fx_addsy) == seg
              && !S_FORCE_RELOC (fixP->fx_addsy, 1))
            {
@@ -5972,7 +5972,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
 
   /* Make sure none of our internal relocations make it this far.
      They'd better have been fully resolved by this point.  */
-  assert ((int) fixp->fx_r_type > 0);
+  gas_assert ((int) fixp->fx_r_type > 0);
 
   reloc->addend = fixp->fx_offset;
 
@@ -6111,7 +6111,7 @@ release_resources (resource_table *rt, xtensa_opcode opcode, int cycle)
     {
       xtensa_funcUnit unit = (rt->opcode_unit_use) (rt->data, opcode, i);
       int stage = (rt->opcode_unit_stage) (rt->data, opcode, i);
-      assert (rt->units[stage + cycle][unit] > 0);
+      gas_assert (rt->units[stage + cycle][unit] > 0);
       rt->units[stage + cycle][unit]--;
     }
 }
@@ -6293,12 +6293,12 @@ finish_vinsn (vliw_insn *vinsn)
              TInsn *insn = &slotstack.insn[j];
              if (insn->insn_type == ITYPE_LITERAL)
                {
-                 assert (lit_sym == NULL);
+                 gas_assert (lit_sym == NULL);
                  lit_sym = xg_assemble_literal (insn);
                }
              else
                {
-                 assert (insn->insn_type == ITYPE_INSN);
+                 gas_assert (insn->insn_type == ITYPE_INSN);
                  if (lit_sym)
                    xg_resolve_literals (insn, lit_sym);
                  if (j != slotstack.ninsn - 1)
@@ -6399,7 +6399,7 @@ find_vinsn_conflicts (vliw_insn *vinsn)
   int branches = 0;
   xtensa_isa isa = xtensa_default_isa;
 
-  assert (!past_xtensa_end);
+  gas_assert (!past_xtensa_end);
 
   for (i = 0 ; i < vinsn->num_slots; i++)
     {
@@ -6781,7 +6781,7 @@ bundle_tinsn (TInsn *tinsn, vliw_insn *vinsn)
   int slot, chosen_slot;
 
   vinsn->format = xg_get_single_format (tinsn->opcode);
-  assert (vinsn->format != XTENSA_UNDEFINED);
+  gas_assert (vinsn->format != XTENSA_UNDEFINED);
   vinsn->num_slots = xtensa_format_num_slots (isa, vinsn->format);
 
   chosen_slot = xg_get_single_slot (tinsn->opcode);
@@ -6835,7 +6835,7 @@ emit_single_op (TInsn *orig_insn)
       switch (insn->insn_type)
        {
        case ITYPE_LITERAL:
-         assert (lit_sym == NULL);
+         gas_assert (lit_sym == NULL);
          lit_sym = xg_assemble_literal (insn);
          break;
        case ITYPE_LABEL:
@@ -6844,9 +6844,9 @@ emit_single_op (TInsn *orig_insn)
            char *label = xmalloc (strlen (FAKE_LABEL_NAME) + 12);
            sprintf (label, "%s_rl_%x", FAKE_LABEL_NAME, relaxed_sym_idx++);
            colon (label);
-           assert (label_sym == NULL);
+           gas_assert (label_sym == NULL);
            label_sym = symbol_find_or_make (label);
-           assert (label_sym);
+           gas_assert (label_sym);
            free (label);
          }
          break;
@@ -6864,7 +6864,7 @@ emit_single_op (TInsn *orig_insn)
          }
          break;
        default:
-         assert (0);
+         gas_assert (0);
          break;
        }
     }
@@ -7059,7 +7059,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
       frag_now->tc_frag_data.free_reg[slot] = tinsn->extra_arg;
 
       if (tinsn->subtype == RELAX_NARROW)
-       assert (vinsn->num_slots == 1);
+       gas_assert (vinsn->num_slots == 1);
       if (xtensa_opcode_is_jump (isa, tinsn->opcode) == 1)
        is_jump = TRUE;
       if (xtensa_opcode_is_branch (isa, tinsn->opcode) == 1)
@@ -7119,7 +7119,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
     {
       if (is_jump)
        {
-         assert (finish_frag);
+         gas_assert (finish_frag);
          frag_var (rs_machine_dependent,
                    UNREACHABLE_MAX_WIDTH, UNREACHABLE_MAX_WIDTH,
                    RELAX_UNREACHABLE,
@@ -7128,7 +7128,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
        }
       else if (is_branch && do_align_targets ())
        {
-         assert (finish_frag);
+         gas_assert (finish_frag);
          frag_var (rs_machine_dependent,
                    UNREACHABLE_MAX_WIDTH, UNREACHABLE_MAX_WIDTH,
                    RELAX_MAYBE_UNREACHABLE,
@@ -7729,7 +7729,7 @@ xtensa_fix_close_loop_end_frags (void)
                  }
                frag_wane (fragP);
              }
-           assert (fragP->fr_type != rs_machine_dependent
+           gas_assert (fragP->fr_type != rs_machine_dependent
                    || fragP->fr_subtype != RELAX_ADD_NOP_IF_CLOSE_LOOP_END);
          }
       }
@@ -7805,7 +7805,7 @@ unrelaxed_frag_max_size (fragS *fragP)
       break;
     default:
       /* We had darn well better know how big it is.  */
-      assert (0);
+      gas_assert (0);
       break;
     }
 
@@ -7859,7 +7859,7 @@ xtensa_fix_short_loop_frags (void)
                tinsn_from_chars (&t_insn, loop_frag->fr_opcode, 0);
                current_target = symbol_get_frag (fragP->fr_symbol);
                current_opcode = t_insn.opcode;
-               assert (xtensa_opcode_is_loop (xtensa_default_isa,
+               gas_assert (xtensa_opcode_is_loop (xtensa_default_isa,
                                               current_opcode) == 1);
              }
 
@@ -8222,7 +8222,7 @@ get_text_align_power (unsigned target_size)
 {
   if (target_size <= 4)
     return 2;
-  assert (target_size == 8);
+  gas_assert (target_size == 8);
   return 3;
 }
 
@@ -8258,7 +8258,7 @@ get_text_align_fill_size (addressT address,
   bfd_boolean skip_one = FALSE;
 
   alignment = (1 << align_pow);
-  assert (target_size > 0 && alignment >= (addressT) target_size);
+  gas_assert (target_size > 0 && alignment >= (addressT) target_size);
 
   if (!use_nops)
     {
@@ -8288,7 +8288,7 @@ get_text_align_fill_size (addressT address,
          == (address + fill + target_size - 1) >> align_pow)
        return fill;
     }
-  assert (0);
+  gas_assert (0);
   return 0;
 }
 
@@ -8308,7 +8308,7 @@ branch_align_power (segT sec)
        return 3;
     }
   else
-    assert (xtensa_fetch_width == 4);
+    gas_assert (xtensa_fetch_width == 4);
 
   return 2;
 }
@@ -8323,11 +8323,11 @@ get_text_align_nop_count (offsetT fill_size, bfd_boolean use_no_density)
 
   if (use_no_density)
     {
-      assert (fill_size % 3 == 0);
+      gas_assert (fill_size % 3 == 0);
       return (fill_size / 3);
     }
 
-  assert (fill_size != 1);     /* Bad argument.  */
+  gas_assert (fill_size != 1); /* Bad argument.  */
 
   while (fill_size > 1)
     {
@@ -8337,7 +8337,7 @@ get_text_align_nop_count (offsetT fill_size, bfd_boolean use_no_density)
       fill_size -= insn_size;
       count++;
     }
-  assert (fill_size != 1);     /* Bad algorithm.  */
+  gas_assert (fill_size != 1); /* Bad algorithm.  */
   return count;
 }
 
@@ -8352,7 +8352,7 @@ get_text_align_nth_nop_size (offsetT fill_size,
   if (use_no_density)
     return 3;
 
-  assert (fill_size != 1);     /* Bad argument.  */
+  gas_assert (fill_size != 1); /* Bad argument.  */
 
   while (fill_size > 1)
     {
@@ -8364,7 +8364,7 @@ get_text_align_nth_nop_size (offsetT fill_size,
       if (n + 1 == count)
        return insn_size;
     }
-  assert (0);
+  gas_assert (0);
   return 0;
 }
 
@@ -8398,8 +8398,8 @@ get_noop_aligned_address (fragS *fragP, addressT address)
   xtensa_opcode opcode;
   bfd_boolean is_loop;
 
-  assert (fragP->fr_type == rs_machine_dependent);
-  assert (fragP->fr_subtype == RELAX_ALIGN_NEXT_OPCODE);
+  gas_assert (fragP->fr_type == rs_machine_dependent);
+  gas_assert (fragP->fr_subtype == RELAX_ALIGN_NEXT_OPCODE);
 
   /* Find the loop frag.  */
   first_insn = next_non_empty_frag (fragP);
@@ -8407,7 +8407,7 @@ get_noop_aligned_address (fragS *fragP, addressT address)
   first_insn = next_non_empty_frag (first_insn);
 
   is_loop = next_frag_opcode_is_loop (fragP, &opcode);
-  assert (is_loop);
+  gas_assert (is_loop);
   loop_insn_size = xg_get_single_size (opcode);
 
   pre_opcode_bytes = next_frag_pre_opcode_bytes (fragP);
@@ -8462,7 +8462,7 @@ get_aligned_diff (fragS *fragP, addressT address, offsetT *max_diff)
   offsetT branch_align;
   fragS *loop_frag;
 
-  assert (fragP->fr_type == rs_machine_dependent);
+  gas_assert (fragP->fr_type == rs_machine_dependent);
   switch (fragP->fr_subtype)
     {
     case RELAX_DESIRE_ALIGN:
@@ -8479,7 +8479,7 @@ get_aligned_diff (fragS *fragP, addressT address, offsetT *max_diff)
 
       *max_diff = (opt_diff + branch_align
                   - (target_size + ((address + opt_diff) % branch_align)));
-      assert (*max_diff >= opt_diff);
+      gas_assert (*max_diff >= opt_diff);
       return opt_diff;
 
     case RELAX_ALIGN_NEXT_OPCODE:
@@ -8491,7 +8491,7 @@ get_aligned_diff (fragS *fragP, addressT address, offsetT *max_diff)
       target_size = get_loop_align_size (next_frag_format_size (loop_frag));
       loop_insn_offset = 0;
       is_loop = next_frag_opcode_is_loop (fragP, &loop_opcode);
-      assert (is_loop);
+      gas_assert (is_loop);
 
       /* If the loop has been expanded then the LOOP instruction
         could be at an offset from this fragment.  */
@@ -8511,13 +8511,13 @@ get_aligned_diff (fragS *fragP, addressT address, offsetT *max_diff)
       *max_diff = xtensa_fetch_width
        - ((target_address + opt_diff) % xtensa_fetch_width)
        - target_size + opt_diff;
-      assert (*max_diff >= opt_diff);
+      gas_assert (*max_diff >= opt_diff);
       return opt_diff;
 
     default:
       break;
     }
-  assert (0);
+  gas_assert (0);
   return 0;
 }
 
@@ -8581,7 +8581,7 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p)
     case RELAX_LITERAL_NR:
       lit_size = 4;
       fragP->fr_subtype = RELAX_LITERAL_FINAL;
-      assert (unreported == lit_size);
+      gas_assert (unreported == lit_size);
       memset (&fragP->fr_literal[fragP->fr_fix], 0, 4);
       fragP->fr_var -= lit_size;
       fragP->fr_fix += lit_size;
@@ -8719,7 +8719,7 @@ relax_frag_for_align (fragS *fragP, long stretch)
   long stretch_me;
   long diff;
 
-  assert (fragP->fr_subtype == RELAX_FILL_NOP
+  gas_assert (fragP->fr_subtype == RELAX_FILL_NOP
          || fragP->fr_subtype == RELAX_UNREACHABLE
          || (fragP->fr_subtype == RELAX_SLOTS
              && fragP->tc_frag_data.slot_subtypes[0] == RELAX_NARROW));
@@ -8875,8 +8875,8 @@ future_alignment_required (fragS *fragP, long stretch ATTRIBUTE_UNUSED)
     {
       local_opt_diff = get_aligned_diff (fragP, address, &max_diff);
       opt_diff = local_opt_diff;
-      assert (opt_diff >= 0);
-      assert (max_diff >= opt_diff);
+      gas_assert (opt_diff >= 0);
+      gas_assert (max_diff >= opt_diff);
       if (max_diff == 0)
        return 0;
 
@@ -8934,7 +8934,7 @@ future_alignment_required (fragS *fragP, long stretch ATTRIBUTE_UNUSED)
        {
          if (this_frag->fr_subtype == RELAX_UNREACHABLE)
            {
-             assert (opt_diff <= UNREACHABLE_MAX_WIDTH);
+             gas_assert (opt_diff <= UNREACHABLE_MAX_WIDTH);
              return opt_diff;
            }
          return 0;
@@ -8956,13 +8956,13 @@ future_alignment_required (fragS *fragP, long stretch ATTRIBUTE_UNUSED)
 
       if (this_frag->fr_subtype == RELAX_SLOTS
          && this_frag->tc_frag_data.slot_subtypes[0] == RELAX_NARROW)
-       assert (stretch_amount <= 1);
+       gas_assert (stretch_amount <= 1);
       else if (this_frag->fr_subtype == RELAX_FILL_NOP)
        {
          if (this_frag->tc_frag_data.is_no_density)
-           assert (stretch_amount == 3 || stretch_amount == 0);
+           gas_assert (stretch_amount == 3 || stretch_amount == 0);
          else
-           assert (stretch_amount <= 3);
+           gas_assert (stretch_amount <= 3);
        }
     }
   return stretch_amount;
@@ -9016,11 +9016,11 @@ bytes_to_stretch (fragS *this_frag,
 {
   int bytes_short = desired_diff - num_widens;
 
-  assert (desired_diff >= 0 && desired_diff < 8);
+  gas_assert (desired_diff >= 0 && desired_diff < 8);
   if (desired_diff == 0)
     return 0;
 
-  assert (wide_nops > 0 || num_widens > 0);
+  gas_assert (wide_nops > 0 || num_widens > 0);
 
   /* Always prefer widening to NOP-filling.  */
   if (bytes_short < 0)
@@ -9094,7 +9094,7 @@ bytes_to_stretch (fragS *this_frag,
            return 3; /* case 7b */
          return 0;
        default:
-         assert (0);
+         gas_assert (0);
        }
     }
   else
@@ -9106,7 +9106,7 @@ bytes_to_stretch (fragS *this_frag,
       switch (desired_diff)
        {
        case 1:
-         assert (0);
+         gas_assert (0);
          return 0;
        case 2:
        case 3:
@@ -9132,11 +9132,11 @@ bytes_to_stretch (fragS *this_frag,
            return 1; /* case 7b */
          return 0;
        default:
-         assert (0);
+         gas_assert (0);
          return 0;
        }
     }
-  assert (0);
+  gas_assert (0);
   return 0;
 }
 
@@ -9163,7 +9163,7 @@ relax_frag_immed (segT segP,
   int num_text_bytes, num_literal_bytes;
   int literal_diff, total_text_diff, this_text_diff;
 
-  assert (fragP->fr_opcode != NULL);
+  gas_assert (fragP->fr_opcode != NULL);
 
   xg_clear_vinsn (&cur_vinsn);
   vinsn_from_chars (&cur_vinsn, fragP->fr_opcode);
@@ -9200,7 +9200,7 @@ relax_frag_immed (segT segP,
   istack_init (&istack);
   num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP, frag_offset,
                                 min_steps, stretch);
-  assert (num_steps >= min_steps && num_steps <= RELAX_IMMED_MAXSTEPS);
+  gas_assert (num_steps >= min_steps && num_steps <= RELAX_IMMED_MAXSTEPS);
 
   fragP->tc_frag_data.slot_subtypes[slot] = (int) RELAX_IMMED + num_steps;
 
@@ -9229,7 +9229,7 @@ relax_frag_immed (segT segP,
          num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP, 
                                         frag_offset + old_size,
                                         min_steps, stretch + old_size);
-         assert (num_steps >= min_steps && num_steps <= RELAX_IMMED_MAXSTEPS);
+         gas_assert (num_steps >= min_steps && num_steps <= RELAX_IMMED_MAXSTEPS);
 
          fragP->tc_frag_data.slot_subtypes[slot] 
            = (int) RELAX_IMMED + num_steps;
@@ -9246,14 +9246,14 @@ relax_frag_immed (segT segP,
   this_text_diff = total_text_diff - fragP->tc_frag_data.text_expansion[slot];
 
   /* It MUST get larger.  If not, we could get an infinite loop.  */
-  assert (num_text_bytes >= 0);
-  assert (literal_diff >= 0);
-  assert (total_text_diff >= 0);
+  gas_assert (num_text_bytes >= 0);
+  gas_assert (literal_diff >= 0);
+  gas_assert (total_text_diff >= 0);
 
   fragP->tc_frag_data.text_expansion[slot] = total_text_diff;
   fragP->tc_frag_data.literal_expansion[slot] = num_literal_bytes;
-  assert (fragP->tc_frag_data.text_expansion[slot] >= 0);
-  assert (fragP->tc_frag_data.literal_expansion[slot] >= 0);
+  gas_assert (fragP->tc_frag_data.text_expansion[slot] >= 0);
+  gas_assert (fragP->tc_frag_data.literal_expansion[slot] >= 0);
 
   /* Find the associated expandable literal for this.  */
   if (literal_diff != 0)
@@ -9261,12 +9261,12 @@ relax_frag_immed (segT segP,
       fragS *lit_fragP = fragP->tc_frag_data.literal_frags[slot];
       if (lit_fragP)
        {
-         assert (literal_diff == 4);
+         gas_assert (literal_diff == 4);
          lit_fragP->tc_frag_data.unreported_expansion += literal_diff;
 
          /* We expect that the literal section state has NOT been
             modified yet.  */
-         assert (lit_fragP->fr_type == rs_machine_dependent
+         gas_assert (lit_fragP->fr_type == rs_machine_dependent
                  && lit_fragP->fr_subtype == RELAX_LITERAL);
          lit_fragP->fr_subtype = RELAX_LITERAL_NR;
 
@@ -9389,7 +9389,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragp)
 
          fragS *f;
          fragp->fr_subtype = RELAX_LITERAL_FINAL;
-         assert (fragp->tc_frag_data.unreported_expansion == 4);
+         gas_assert (fragp->tc_frag_data.unreported_expansion == 4);
          memset (&fragp->fr_literal[fragp->fr_fix], 0, 4);
          fragp->fr_var -= 4;
          fragp->fr_fix += 4;
@@ -9442,12 +9442,12 @@ convert_frag_narrow (segT segP, fragS *fragP, xtensa_format fmt, int slot)
   int size, old_size, diff;
   offsetT frag_offset;
 
-  assert (slot == 0);
+  gas_assert (slot == 0);
   tinsn_from_chars (&tinsn, fragP->fr_opcode, 0);
 
   if (fragP->tc_frag_data.is_aligning_branch == 1)
     {
-      assert (fragP->tc_frag_data.text_expansion[0] == 1
+      gas_assert (fragP->tc_frag_data.text_expansion[0] == 1
              || fragP->tc_frag_data.text_expansion[0] == 0);
       convert_frag_immed (segP, fragP, fragP->tc_frag_data.text_expansion[0],
                          fmt, slot);
@@ -9461,7 +9461,7 @@ convert_frag_narrow (segT segP, fragS *fragP, xtensa_format fmt, int slot)
       return;
     }
 
-  assert (fragP->fr_opcode != NULL);
+  gas_assert (fragP->fr_opcode != NULL);
 
   /* Frags in this relaxation state should only contain
      single instruction bundles.  */
@@ -9485,8 +9485,8 @@ convert_frag_narrow (segT segP, fragS *fragP, xtensa_format fmt, int slot)
                       frag_offset, TRUE);
 
   diff = size - old_size;
-  assert (diff >= 0);
-  assert (diff <= fragP->fr_var);
+  gas_assert (diff >= 0);
+  gas_assert (diff <= fragP->fr_var);
   fragP->fr_var -= diff;
   fragP->fr_fix += diff;
 
@@ -9500,7 +9500,7 @@ convert_frag_fill_nop (fragS *fragP)
 {
   char *loc = &fragP->fr_literal[fragP->fr_fix];
   int size = fragP->tc_frag_data.text_expansion[0];
-  assert ((unsigned) size == (fragP->fr_next->fr_address
+  gas_assert ((unsigned) size == (fragP->fr_next->fr_address
                              - fragP->fr_address - fragP->fr_fix));
   if (size == 0)
     {
@@ -9538,7 +9538,7 @@ convert_frag_immed (segT segP,
   int bytes;
   bfd_boolean is_loop;
 
-  assert (fr_opcode != NULL);
+  gas_assert (fr_opcode != NULL);
 
   xg_clear_vinsn (&cur_vinsn);
 
@@ -9567,7 +9567,7 @@ convert_frag_immed (segT segP,
       else
        {
          bytes += fragP->tc_frag_data.text_expansion[0];
-         assert (bytes == 2 || bytes == 3);
+         gas_assert (bytes == 2 || bytes == 3);
          build_nop (&cur_vinsn.slots[0], bytes);
          fragP->fr_fix += fragP->tc_frag_data.text_expansion[0];
        }
@@ -9639,13 +9639,13 @@ convert_frag_immed (segT segP,
                      unreach = unreach->fr_next;
                    }
 
-                 assert (unreach->fr_type == rs_machine_dependent
+                 gas_assert (unreach->fr_type == rs_machine_dependent
                          && (unreach->fr_subtype == RELAX_MAYBE_UNREACHABLE
                              || unreach->fr_subtype == RELAX_UNREACHABLE));
 
                  target_offset += unreach->tc_frag_data.text_expansion[0];
                }
-             assert (gen_label == NULL);
+             gas_assert (gen_label == NULL);
              gen_label = symbol_new (FAKE_LABEL_NAME, now_seg,
                                      fr_opcode - fragP->fr_literal
                                      + target_offset, fragP);
@@ -9681,12 +9681,12 @@ convert_frag_immed (segT segP,
            case ITYPE_LITERAL:
              lit_frag = fragP->tc_frag_data.literal_frags[slot];
              /* Already checked.  */
-             assert (lit_frag != NULL);
-             assert (lit_sym != NULL);
-             assert (tinsn->ntok == 1);
+             gas_assert (lit_frag != NULL);
+             gas_assert (lit_sym != NULL);
+             gas_assert (tinsn->ntok == 1);
              /* Add a fixup.  */
              target_seg = S_GET_SEGMENT (lit_sym);
-             assert (target_seg);
+             gas_assert (target_seg);
              reloc_type = map_operator_to_reloc (tinsn->tok[0].X_op, TRUE);
              fix_new_exp_in_seg (target_seg, 0, lit_frag, 0, 4,
                                  &tinsn->tok[0], FALSE, reloc_type);
@@ -9737,10 +9737,10 @@ convert_frag_immed (segT segP,
        }
 
       diff = total_size - old_size;
-      assert (diff >= 0);
+      gas_assert (diff >= 0);
       if (diff != 0)
        expanded = TRUE;
-      assert (diff <= fragP->fr_var);
+      gas_assert (diff <= fragP->fr_var);
       fragP->fr_var -= diff;
       fragP->fr_fix += diff;
     }
@@ -9793,7 +9793,7 @@ fix_new_exp_in_seg (segT new_seg,
   segT seg = now_seg;
   subsegT subseg = now_subseg;
 
-  assert (new_seg != 0);
+  gas_assert (new_seg != 0);
   subseg_set (new_seg, new_subseg);
 
   new_fix = fix_new_exp (frag, where, size, exp, pcrel, r_type);
@@ -9847,18 +9847,18 @@ convert_frag_immed_finish_loop (segT segP, fragS *fragP, TInsn *tinsn)
   tinsn_from_chars (&loop_insn, fragP->fr_opcode + loop_offset, 0);
   tinsn_immed_from_frag (&loop_insn, fragP, 0);
 
-  assert (xtensa_opcode_is_loop (isa, loop_insn.opcode) == 1);
+  gas_assert (xtensa_opcode_is_loop (isa, loop_insn.opcode) == 1);
   addi_offset += loop_offset;
   addmi_offset += loop_offset;
 
-  assert (tinsn->ntok == 2);
+  gas_assert (tinsn->ntok == 2);
   if (tinsn->tok[1].X_op == O_constant)
     target = tinsn->tok[1].X_add_number;
   else if (tinsn->tok[1].X_op == O_symbol)
     {
       /* Find the fragment.  */
       symbolS *sym = tinsn->tok[1].X_add_symbol;
-      assert (S_GET_SEGMENT (sym) == segP
+      gas_assert (S_GET_SEGMENT (sym) == segP
              || S_GET_SEGMENT (sym) == absolute_section);
       target = (S_GET_VALUE (sym) + tinsn->tok[1].X_add_number);
     }
@@ -9884,10 +9884,10 @@ convert_frag_immed_finish_loop (segT segP, fragS *fragP, TInsn *tinsn)
                  _("loop too long for LOOP instruction"));
 
   tinsn_from_chars (&addi_insn, fragP->fr_opcode + addi_offset, 0);
-  assert (addi_insn.opcode == xtensa_addi_opcode);
+  gas_assert (addi_insn.opcode == xtensa_addi_opcode);
 
   tinsn_from_chars (&addmi_insn, fragP->fr_opcode + addmi_offset, 0);
-  assert (addmi_insn.opcode == xtensa_addmi_opcode);
+  gas_assert (addmi_insn.opcode == xtensa_addmi_opcode);
 
   set_expr_const (&addi_insn.tok[2], loop_length_lo);
   tinsn_to_insnbuf (&addi_insn, insnbuf);
@@ -10040,7 +10040,7 @@ xtensa_move_seg_list_to_beginning (seg_list *head)
       segT literal_section = head->seg;
 
       /* Move the literal section to the front of the section list.  */
-      assert (literal_section);
+      gas_assert (literal_section);
       if (literal_section != stdoutput->sections)
        {
          bfd_section_list_remove (stdoutput, literal_section);
@@ -10085,12 +10085,12 @@ xtensa_move_literals (void)
 
       while (!search_frag->tc_frag_data.literal_frag)
        {
-         assert (search_frag->fr_fix == 0
+         gas_assert (search_frag->fr_fix == 0
                  || search_frag->fr_type == rs_align);
          search_frag = search_frag->fr_next;
        }
 
-      assert (search_frag->tc_frag_data.literal_frag->fr_subtype
+      gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype
              == RELAX_LITERAL_POOL_BEGIN);
       xtensa_switch_section_emit_state (&state, segment->seg, 0);
 
@@ -10113,9 +10113,9 @@ xtensa_move_literals (void)
          if (search_frag->tc_frag_data.literal_frag)
            {
              literal_pool = search_frag->tc_frag_data.literal_frag;
-             assert (literal_pool->fr_subtype == RELAX_LITERAL_POOL_BEGIN);
+             gas_assert (literal_pool->fr_subtype == RELAX_LITERAL_POOL_BEGIN);
              frchain_to = literal_pool->tc_frag_data.lit_frchain;
-             assert (frchain_to);
+             gas_assert (frchain_to);
            }
          insert_after = literal_pool->tc_frag_data.literal_frag;
          dest_seg = insert_after->fr_next->tc_frag_data.lit_seg;
@@ -10153,7 +10153,7 @@ xtensa_move_literals (void)
          frchain_from = seg_info (segment->seg)->frchainP;
          as_warn (_("fixes not all moved from %s"), segment->seg->name);
 
-         assert (frchain_from->fix_root == NULL);
+         gas_assert (frchain_from->fix_root == NULL);
        }
       frchain_from->fix_tail = NULL;
       xtensa_restore_emit_state (&state);
@@ -10206,7 +10206,7 @@ xtensa_reorder_seg_list (seg_list *head, segT after)
       segT literal_section = head->seg;
 
       /* Move the literal section after "after".  */
-      assert (literal_section);
+      gas_assert (literal_section);
       if (literal_section != after)
        {
          bfd_section_list_remove (stdoutput, literal_section);
@@ -10241,7 +10241,7 @@ xtensa_reorder_segments (void)
   /* Now perform the final error check.  */
   for (sec = stdoutput->sections; sec != NULL; sec = sec->next)
     new_count++;
-  assert (new_count == old_count);
+  gas_assert (new_count == old_count);
 }
 
 
@@ -10521,7 +10521,7 @@ xtensa_post_relax_hook (void)
 static bfd_boolean
 get_frag_is_literal (const fragS *fragP)
 {
-  assert (fragP != NULL);
+  gas_assert (fragP != NULL);
   return fragP->tc_frag_data.is_literal;
 }
 
@@ -10603,7 +10603,7 @@ xtensa_create_property_segments (frag_predicate property_function,
                  fixS *fix;
 
                  /* Write the fixup.  */
-                 assert (cur_block);
+                 gas_assert (cur_block);
                  fix = fix_new (frag_now, i * 8, 4,
                                 section_symbol (cur_block->sec),
                                 cur_block->offset,
@@ -10701,7 +10701,7 @@ xtensa_create_xproperty_segments (frag_flags_fn flag_fn,
                  fixS *fix;
 
                  /* Write the fixup.  */
-                 assert (cur_block);
+                 gas_assert (cur_block);
                  fix = fix_new (frag_now, i * 12, 4,
                                 section_symbol (cur_block->sec),
                                 cur_block->offset,
@@ -11113,7 +11113,7 @@ init_op_placement_info_table (void)
 
   op_placement_table = (op_placement_info_table)
     xmalloc (sizeof (op_placement_info) * num_opcodes);
-  assert (xtensa_isa_num_formats (isa) < MAX_FORMATS);
+  gas_assert (xtensa_isa_num_formats (isa) < MAX_FORMATS);
 
   for (opcode = 0; opcode < num_opcodes; opcode++)
     {
@@ -11219,7 +11219,7 @@ TInsn *
 istack_top (IStack *stack)
 {
   int rec = stack->ninsn - 1;
-  assert (!istack_empty (stack));
+  gas_assert (!istack_empty (stack));
   return &stack->insn[rec];
 }
 
@@ -11231,7 +11231,7 @@ void
 istack_push (IStack *stack, TInsn *insn)
 {
   int rec = stack->ninsn;
-  assert (!istack_full (stack));
+  gas_assert (!istack_full (stack));
   stack->insn[rec] = *insn;
   stack->ninsn++;
 }
@@ -11245,7 +11245,7 @@ istack_push_space (IStack *stack)
 {
   int rec = stack->ninsn;
   TInsn *insn;
-  assert (!istack_full (stack));
+  gas_assert (!istack_full (stack));
   insn = &stack->insn[rec];
   tinsn_init (insn);
   stack->ninsn++;
@@ -11260,7 +11260,7 @@ void
 istack_pop (IStack *stack)
 {
   int rec = stack->ninsn - 1;
-  assert (!istack_empty (stack));
+  gas_assert (!istack_empty (stack));
   stack->ninsn--;
   tinsn_init (&stack->insn[rec]);
 }
@@ -11283,7 +11283,7 @@ tinsn_has_symbolic_operands (const TInsn *insn)
   int i;
   int n = insn->ntok;
 
-  assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->insn_type == ITYPE_INSN);
 
   for (i = 0; i < n; ++i)
     {
@@ -11307,7 +11307,7 @@ tinsn_has_invalid_symbolic_operands (const TInsn *insn)
   int i;
   int n = insn->ntok;
 
-  assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->insn_type == ITYPE_INSN);
 
   for (i = 0; i < n; ++i)
     {
@@ -11351,7 +11351,7 @@ tinsn_has_complex_operands (const TInsn *insn)
 {
   int i;
   int n = insn->ntok;
-  assert (insn->insn_type == ITYPE_INSN);
+  gas_assert (insn->insn_type == ITYPE_INSN);
   for (i = 0; i < n; ++i)
     {
       switch (insn->tok[i].X_op)
@@ -11390,7 +11390,7 @@ tinsn_to_slotbuf (xtensa_format fmt,
   int noperands = xtensa_opcode_num_operands (isa, opcode);
   int i;
 
-  assert (tinsn->insn_type == ITYPE_INSN);
+  gas_assert (tinsn->insn_type == ITYPE_INSN);
   if (noperands != tinsn->ntok)
     as_fatal (_("operand number mismatch"));
 
@@ -11615,7 +11615,7 @@ tinsn_immed_from_frag (TInsn *tinsn, fragS *fragP, int slot)
   if (fragP->tc_frag_data.slot_symbols[slot])
     {
       opnum = get_relaxable_immed (opcode);
-      assert (opnum >= 0);
+      gas_assert (opnum >= 0);
       set_expr_symbol_offset (&tinsn->tok[opnum],
                              fragP->tc_frag_data.slot_symbols[slot],
                              fragP->tc_frag_data.slot_offsets[slot]);
@@ -11869,7 +11869,7 @@ expr_is_const (const expressionS *s)
 offsetT
 get_expr_const (const expressionS *s)
 {
-  assert (expr_is_const (s));
+  gas_assert (expr_is_const (s));
   return s->X_add_number;
 }
 
@@ -11899,7 +11899,7 @@ expr_is_register (const expressionS *s)
 offsetT
 get_expr_register (const expressionS *s)
 {
-  assert (expr_is_register (s));
+  gas_assert (expr_is_register (s));
   return s->X_add_number;
 }
 
index f4e9bb1..f8ec7ad 100644 (file)
@@ -525,8 +525,8 @@ append_transition (TransitionTable *tt,
   TransitionList *tl = (TransitionList *) xmalloc (sizeof (TransitionList));
   TransitionList *prev;
   TransitionList **t_p;
-  assert (tt != NULL);
-  assert (opcode < tt->num_opcodes);
+  gas_assert (tt != NULL);
+  gas_assert (opcode < tt->num_opcodes);
 
   prev = tt->table[opcode];
   tl->rule = t;
@@ -899,7 +899,7 @@ op_is_constant (const opname_map_e *m1)
 static unsigned
 op_get_constant (const opname_map_e *m1)
 {
-  assert (m1->operand_name == NULL);
+  gas_assert (m1->operand_name == NULL);
   return m1->constant_value;
 }
 
index 639362f..0b4a64f 100644 (file)
@@ -285,7 +285,7 @@ cfi_add_CFA_offset (unsigned regno, offsetT offset)
 {
   unsigned int abs_data_align;
 
-  assert (DWARF2_CIE_DATA_ALIGNMENT != 0);
+  gas_assert (DWARF2_CIE_DATA_ALIGNMENT != 0);
   cfi_add_CFA_insn_reg_offset (DW_CFA_offset, regno, offset);
 
   abs_data_align = (DWARF2_CIE_DATA_ALIGNMENT < 0
index 48a1ae7..66d6b6e 100644 (file)
@@ -913,7 +913,7 @@ emit_inc_line_addr (int line_delta, addressT addr_delta, char *p, int len)
 
   /* Line number sequences cannot go backward in addresses.  This means
      we've incorrectly ordered the statements in the sequence.  */
-  assert ((offsetT) addr_delta >= 0);
+  gas_assert ((offsetT) addr_delta >= 0);
 
   /* Scale the address delta by the minimum instruction length.  */
   scale_addr_delta (&addr_delta);
@@ -994,7 +994,7 @@ emit_inc_line_addr (int line_delta, addressT addr_delta, char *p, int len)
     *p++ = tmp;
 
  done:
-  assert (p == end);
+  gas_assert (p == end);
 }
 
 /* Handy routine to combine calls to the above two routines.  */
@@ -1052,7 +1052,7 @@ emit_fixed_inc_line_addr (int line_delta, addressT addr_delta, fragS *frag,
 
   /* Line number sequences cannot go backward in addresses.  This means
      we've incorrectly ordered the statements in the sequence.  */
-  assert ((offsetT) addr_delta >= 0);
+  gas_assert ((offsetT) addr_delta >= 0);
 
   /* INT_MAX is a signal that this is actually a DW_LNE_end_sequence.  */
   if (line_delta != INT_MAX)
@@ -1074,7 +1074,7 @@ emit_fixed_inc_line_addr (int line_delta, addressT addr_delta, fragS *frag,
       symbolS *to_sym;
       expressionS expr;
 
-      assert (exp->X_op = O_subtract);
+      gas_assert (exp->X_op = O_subtract);
       to_sym = exp->X_add_symbol;
 
       *p++ = DW_LNS_extended_op;
@@ -1104,7 +1104,7 @@ emit_fixed_inc_line_addr (int line_delta, addressT addr_delta, fragS *frag,
   else
     *p++ = DW_LNS_copy;
 
-  assert (p == end);
+  gas_assert (p == end);
 }
 
 /* Generate a variant frag that we can use to relax address/line
@@ -1183,7 +1183,7 @@ dwarf2dbg_convert_frag (fragS *frag)
   /* fr_var carries the max_chars that we created the fragment with.
      fr_subtype carries the current expected length.  We must, of
      course, have allocated enough memory earlier.  */
-  assert (frag->fr_var >= (int) frag->fr_subtype);
+  gas_assert (frag->fr_var >= (int) frag->fr_subtype);
 
   if (DWARF2_USE_FIXED_ADVANCE_PC)
     emit_fixed_inc_line_addr (frag->fr_offset, addr_diff, frag,
@@ -1757,7 +1757,7 @@ dwarf2_finish (void)
       segT aranges_seg;
       segT ranges_seg;
 
-      assert (all_segs);
+      gas_assert (all_segs);
 
       info_seg = subseg_new (".debug_info", 0);
       abbrev_seg = subseg_new (".debug_abbrev", 0);
index 323e27e..b3789d8 100644 (file)
@@ -474,7 +474,7 @@ eh_frame_estimate_size_before_relax (fragS *frag)
 
   diff = resolve_symbol_value (frag->fr_symbol);
 
-  assert (ca > 0);
+  gas_assert (ca > 0);
   diff /= ca;
   if (diff < 0x40)
     ret = 0;
@@ -521,23 +521,23 @@ eh_frame_convert_frag (fragS *frag)
   diff = resolve_symbol_value (frag->fr_symbol);
 
   ca = frag->fr_subtype >> 3;
-  assert (ca > 0);
+  gas_assert (ca > 0);
   diff /= ca;
   switch (frag->fr_subtype & 7)
     {
     case 0:
-      assert (diff < 0x40);
+      gas_assert (diff < 0x40);
       loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | diff;
       break;
 
     case 1:
-      assert (diff < 0x100);
+      gas_assert (diff < 0x100);
       loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc1;
       frag->fr_literal[frag->fr_fix] = diff;
       break;
 
     case 2:
-      assert (diff < 0x10000);
+      gas_assert (diff < 0x10000);
       loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc2;
       md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 2);
       break;
index a75be2c..12f7191 100644 (file)
@@ -411,7 +411,7 @@ integer_constant (int radix, expressionS *expressionP)
       if (num_little_digits > SIZE_OF_LARGE_NUMBER - 1)
        num_little_digits = SIZE_OF_LARGE_NUMBER - 1;
 
-      assert (num_little_digits >= 4);
+      gas_assert (num_little_digits >= 4);
 
       if (num_little_digits != 8)
        as_bad (_("a bignum with underscores must have exactly 4 words"));
@@ -1564,7 +1564,7 @@ expr_set_precedence (void)
 void
 expr_set_rank (operatorT operator, operator_rankT rank)
 {
-  assert (operator >= O_md1 && operator < ARRAY_SIZE (op_rank));
+  gas_assert (operator >= O_md1 && operator < ARRAY_SIZE (op_rank));
   op_rank[operator] = rank;
 }
 
@@ -1579,7 +1579,7 @@ expr_begin (void)
   {
     expressionS e;
     e.X_op = O_max;
-    assert (e.X_op == O_max);
+    gas_assert (e.X_op == O_max);
   }
 }
 \f
index 1cad6a7..6e28d17 100644 (file)
@@ -137,12 +137,12 @@ frag_new (int old_frags_var_max_size
   fragS *former_last_fragP;
   frchainS *frchP;
 
-  assert (frchain_now->frch_last == frag_now);
+  gas_assert (frchain_now->frch_last == frag_now);
 
   /* Fix up old frag's fr_fix.  */
   frag_now->fr_fix = frag_now_fix_octets () - old_frags_var_max_size;
   /* Make sure its type is valid.  */
-  assert (frag_now->fr_type != 0);
+  gas_assert (frag_now->fr_type != 0);
 
   /* This will align the obstack so the next struct we allocate on it
      will begin at a correct boundary.  */
@@ -150,8 +150,8 @@ frag_new (int old_frags_var_max_size
   frchP = frchain_now;
   know (frchP);
   former_last_fragP = frchP->frch_last;
-  assert (former_last_fragP != 0);
-  assert (former_last_fragP == frag_now);
+  gas_assert (former_last_fragP != 0);
+  gas_assert (former_last_fragP == frag_now);
   frag_now = frag_alloc (&frchP->frch_obstack);
 
   as_where (&frag_now->fr_file, &frag_now->fr_line);
@@ -170,7 +170,7 @@ frag_new (int old_frags_var_max_size
   }
 #endif
 
-  assert (frchain_now->frch_last == frag_now);
+  gas_assert (frchain_now->frch_last == frag_now);
 
   frag_now->fr_next = NULL;
 }
index 2a36dbf..85fff44 100644 (file)
@@ -124,7 +124,7 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0.  */
 
   preprocess = pre;
 
-  assert (filename != 0);      /* Filename may not be NULL.  */
+  gas_assert (filename != 0);  /* Filename may not be NULL.  */
   if (filename[0])
     {
       f_in = fopen (filename, FOPEN_RT);
index e2f39d1..9d6e8ff 100644 (file)
@@ -97,7 +97,7 @@
 
 #ifdef DEBUG
 #include <assert.h>
-#define ASSERT(x) assert(x)
+#define ASSERT(x) gas_assert (x)
 #define DBG(x) printf x
 #else
 #define ASSERT(x)
index 184dba7..40bb11b 100644 (file)
@@ -3489,7 +3489,7 @@ s_weakref (int ignore ATTRIBUTE_UNUSED)
        {
          expressionS *expP = symbol_get_value_expression (symp);
 
-         assert (expP->X_op == O_symbol
+         gas_assert (expP->X_op == O_symbol
                  && expP->X_add_number == 0);
          symp = expP->X_add_symbol;
        }
index 5f59029..155afeb 100644 (file)
--- a/gas/sb.c
+++ b/gas/sb.c
@@ -59,7 +59,7 @@ sb_build (sb *ptr, int size)
   /* See if we can find one to allocate.  */
   sb_element *e;
 
-  assert (size < sb_max_power_two);
+  gas_assert (size < sb_max_power_two);
 
   e = free_list.size[size];
   if (!e)
index 9e43780..0a2cf56 100644 (file)
@@ -84,7 +84,7 @@ subseg_set_rest (segT seg, subsegT subseg)
   if (frag_now && frchain_now)
     frchain_now->frch_frag_now = frag_now;
 
-  assert (frchain_now == 0
+  gas_assert (frchain_now == 0
          || frchain_now->frch_last == frag_now);
 
   subseg_change (seg, (int) subseg);
@@ -125,7 +125,7 @@ subseg_set_rest (segT seg, subsegT subseg)
   frchain_now = frcP;
   frag_now = frcP->frch_frag_now;
 
-  assert (frchain_now->frch_last == frag_now);
+  gas_assert (frchain_now->frch_last == frag_now);
 }
 
 /*
index 3959ee2..761cebf 100644 (file)
@@ -217,7 +217,7 @@ local_symbol_convert (struct local_symbol *locsym)
 {
   symbolS *ret;
 
-  assert (locsym->lsy_marker == NULL);
+  gas_assert (locsym->lsy_marker == NULL);
   if (local_symbol_converted_p (locsym))
     return local_symbol_get_real_symbol (locsym);
 
@@ -879,11 +879,11 @@ verify_symbol_chain (symbolS *rootP, symbolS *lastP)
 
   for (; symbol_next (symbolP) != NULL; symbolP = symbol_next (symbolP))
     {
-      assert (symbolP->bsym != NULL);
-      assert (symbolP->sy_next->sy_previous == symbolP);
+      gas_assert (symbolP->bsym != NULL);
+      gas_assert (symbolP->sy_next->sy_previous == symbolP);
     }
 
-  assert (lastP == symbolP);
+  gas_assert (lastP == symbolP);
 }
 
 #ifdef OBJ_COMPLEX_RELC
@@ -1144,13 +1144,13 @@ resolve_symbol_value (symbolS *symp)
        do_symbol:
          if (S_IS_WEAKREFR (symp))
            {
-             assert (final_val == 0);
+             gas_assert (final_val == 0);
              if (S_IS_WEAKREFR (add_symbol))
                {
-                 assert (add_symbol->sy_value.X_op == O_symbol
+                 gas_assert (add_symbol->sy_value.X_op == O_symbol
                          && add_symbol->sy_value.X_add_number == 0);
                  add_symbol = add_symbol->sy_value.X_add_symbol;
-                 assert (! S_IS_WEAKREFR (add_symbol));
+                 gas_assert (! S_IS_WEAKREFR (add_symbol));
                  symp->sy_value.X_add_symbol = add_symbol;
                }
            }
@@ -2986,7 +2986,7 @@ symbol_relc_make_sym (symbolS * sym)
   char typetag;
   int sname_len;
 
-  assert (sym != NULL);
+  gas_assert (sym != NULL);
 
   /* Recurse to symbol_relc_make_expr if this symbol
      is defined as an expression or a plain value.  */
@@ -3051,7 +3051,7 @@ symbol_relc_make_expr (expressionS * exp)
 
   operands[0] = operands[1] = operands[2] = NULL;
 
-  assert (exp != NULL);
+  gas_assert (exp != NULL);
 
   /* Match known operators -> fill in opstr, arity, operands[] and fall
      through to construct subexpression fragments; may instead return 
@@ -3164,7 +3164,7 @@ symbol_relc_make_expr (expressionS * exp)
                               + (arity >= 2 ? (strlen (operands[1]) + 1 ) : 0)
                               + (arity >= 3 ? (strlen (operands[2]) + 0 ) : 0)
                               + 1);
-      assert (concat_string != NULL);
+      gas_assert (concat_string != NULL);
       
       /* Format the thing.  */
       sprintf (concat_string, 
index 9d681f2..4d64651 100644 (file)
@@ -386,7 +386,7 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
     {
       prev_frag->fr_next = frchp->frch_root;
       prev_frag = frchp->frch_last;
-      assert (prev_frag->fr_type != 0);
+      gas_assert (prev_frag->fr_type != 0);
       if (frchp->fix_root != (fixS *) NULL)
        {
          if (seg_info (section)->fix_root == (fixS *) NULL)
@@ -396,8 +396,8 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
          prev_fix = frchp->fix_tail;
        }
     }
-  assert (prev_frag->fr_type != 0);
-  assert (prev_frag != &dummy);
+  gas_assert (prev_frag->fr_type != 0);
+  gas_assert (prev_frag != &dummy);
   prev_frag->fr_next = 0;
   return prev_frag;
 }
@@ -478,7 +478,7 @@ cvt_frag_to_fill (segT sec ATTRIBUTE_UNUSED, fragS *fragP)
     case rs_machine_dependent:
       md_convert_frag (stdoutput, sec, fragP);
 
-      assert (fragP->fr_next == NULL
+      gas_assert (fragP->fr_next == NULL
              || ((offsetT) (fragP->fr_next->fr_address - fragP->fr_address)
                  == fragP->fr_fix));
 
@@ -566,15 +566,15 @@ size_seg (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
 
   flags &= ~SEC_RELOC;
   x = bfd_set_section_flags (abfd, sec, flags);
-  assert (x);
+  gas_assert (x);
 
   newsize = md_section_align (sec, size);
   x = bfd_set_section_size (abfd, sec, newsize);
-  assert (x);
+  gas_assert (x);
 
   /* If the size had to be rounded up, add some padding in the last
      non-empty frag.  */
-  assert (newsize >= size);
+  gas_assert (newsize >= size);
   if (size != newsize)
     {
       fragS *last = seginfo->frchainP->frch_last;
@@ -1299,7 +1299,7 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
       char *fill_literal;
       offsetT count;
 
-      assert (f->fr_type == rs_fill);
+      gas_assert (f->fr_type == rs_fill);
       if (f->fr_fix)
        {
          x = bfd_set_section_contents (stdoutput, sec,
@@ -1313,7 +1313,7 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
       fill_literal = f->fr_literal + f->fr_fix;
       fill_size = f->fr_var;
       count = f->fr_offset;
-      assert (count >= 0);
+      gas_assert (count >= 0);
       if (fill_size && count)
        {
          char buf[256];
@@ -1410,7 +1410,7 @@ set_symtab (void)
   else
     asympp = 0;
   result = bfd_set_symtab (stdoutput, asympp, nsyms);
-  assert (result);
+  gas_assert (result);
   symbol_table_frozen = 1;
 }