+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.
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;
PROGRESS (1);
output_file_create (out_file_name);
- assert (stdoutput != 0);
+ gas_assert (stdoutput != 0);
#ifdef tc_init_after_args
tc_init_after_args ();
#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__)
#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 */
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
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);
else
cgen_clear_signed_overflow_ok (gas_cgen_cpu_desc);
}
-
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)
x = bfd_set_section_contents (stdoutput, data_section, &b, (file_ptr) 0,
(bfd_size_type) 1);
- assert (x);
+ gas_assert (x);
}
static 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;
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, '.')))
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;
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))
{
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
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;
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);
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;
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);
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);
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);
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);
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 */
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 */
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;
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;
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
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++;
{
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);
break;
#endif
default:
- assert (size >= 1 && size <= 4);
+ gas_assert (size >= 1 && size <= 4);
}
pcrel = reloc_howto->pc_relative;
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;
if (reloc == BFD_RELOC_UNUSED)
reloc = operand->default_reloc;
- assert (reloc_operand == NULL);
+ gas_assert (reloc_operand == NULL);
reloc_operand = operand;
reloc_exp = t;
}
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++;
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++;
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++;
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++;
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++;
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++;
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++;
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++;
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++;
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],
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);
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;
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. */
#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);
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
/* 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)
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)
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. */
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;
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. */
/* 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);
/* 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]
/* 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;
}
break;
default:
- assert (0);
+ gas_assert (0);
}
if (inst.reloc.type == 0)
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;
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)
}
else if (inst.operands[i].postind)
{
- assert (inst.operands[i].writeback);
+ gas_assert (inst.operands[i].writeback);
if (is_t)
inst.instruction |= WRITE_BACK;
}
{
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");
}
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"));
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;
}
{
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);
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);
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)
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);
}
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;
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)
{
/* 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);
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))
{
}
else
{
- assert (a & 0xff000000);
+ gas_assert (a & 0xff000000);
* highpart = (a >> 24) | ((i + 8) << 7);
}
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. */
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;
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;
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;
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;
return 0;
}
#endif /* OBJ_ELF */
-
-
/* Special extra functions that help bfin-parse.y perform its job. */
-#include <assert.h>
-
struct obstack mempool;
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);
}
#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)
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;
}
}
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;
}
}
- 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)
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;
}
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);
{ "sect.s", s_d30v_section, 0 },
{ NULL, NULL, 0 }
};
-
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);
pop_insert (dlx_pseudo_table);
return ;
}
-
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));
switch (fixp->fx_r_type)
{
default:
- assert (n_relocs == 1);
+ gas_assert (n_relocs == 1);
code = *codes[0];
(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 */
/* 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
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
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);
}
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. */
{
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);
{ NULL, NULL, 0 }
};
-
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);
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;
return match;
/* Check reverse. */
- assert (i.operands == 2);
+ gas_assert (i.operands == 2);
match = 1;
for (j = 0; j < 2; j++)
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;
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)));
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;
}
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], ®xmm));
if (i.tm.opcode_modifier.firstxmm0)
{
/* The first operand is implicit and must be xmm0. */
- assert (operand_type_equal (&i.types[0], ®xmm));
+ gas_assert (operand_type_equal (&i.types[0], ®xmm));
if (i.op[0].regs->reg_num != 0)
return bad_implicit_operand (1);
}
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
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], ®xmm)
|| operand_type_equal (&i.types[0], ®ymm)));
if (i.op[0].regs->reg_num != 0)
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];
/* 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
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)));
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
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;
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;
{
/* 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)
/* 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)
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
{
/* 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);
: 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 ? '[' : '(',
break;
case '[':
- assert (intel_syntax);
+ gas_assert (intel_syntax);
end = input_line_pointer++;
expression (e);
if (*input_line_pointer == ']')
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;
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;
}
int i;
struct i860_it pseudo[3];
- assert (str);
+ gas_assert (str);
fc = 0;
/* Assemble the instruction. */
input_line_pointer++;
}
}
-
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);
/* 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;
}
/* 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. */
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
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
{
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;
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. */
for (pf = &seginfo->fix_root;
* pf != l->fixp;
pf = & (* pf)->fx_next)
- assert (* pf != NULL);
+ gas_assert (* pf != NULL);
* pf = l->fixp->fx_next;
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."));
}
&& 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,
{
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. */
{
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));
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. */
for (pf = &seginfo->fix_root;
*pf != l->fixp;
pf = & (*pf)->fx_next)
- assert (*pf != NULL);
+ gas_assert (*pf != NULL);
*pf = l->fixp->fx_next;
/* 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;
/* 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;
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;
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));
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));
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). */
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)
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)
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). */
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];
{
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));
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);
#endif
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
- assert (reloc->howto != 0);
+ gas_assert (reloc->howto != 0);
return reloc;
}
/* 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];
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,
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,
/* 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;
|| (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
/* 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;
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,
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. */
for (pf = &seginfo->fix_root;
* pf != l->fixp;
pf = & (* pf)->fx_next)
- assert (* pf != NULL);
+ gas_assert (* pf != NULL);
* pf = l->fixp->fx_next;
{
if (class == MIPS16_REG)
{
- assert (mips_opts.mips16);
+ gas_assert (mips_opts.mips16);
reg = mips16_to_32_reg_map[reg];
class = MIPS_GR_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
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. */
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;
}
static void
relax_switch (void)
{
- assert (mips_relax.sequence == 1);
+ gas_assert (mips_relax.sequence == 1);
mips_relax.sequence = 2;
}
static void
relax_end (void)
{
- assert (mips_relax.sequence == 2);
+ gas_assert (mips_relax.sequence == 2);
relax_close_frag ();
mips_relax.sequence = 0;
}
{
/* 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)
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,
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)
{
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);
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
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
continue;
case 'p':
- assert (ep != NULL);
+ gas_assert (ep != NULL);
/*
* This allows macro() to pass an immediate expression for
continue;
case 'a':
- assert (ep != NULL);
+ gas_assert (ep != NULL);
*r = BFD_RELOC_MIPS_JMP;
continue;
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);
}
= {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);
case 'p':
case 'q':
{
- assert (ep != NULL);
+ gas_assert (ep != NULL);
if (ep->X_op != O_constant)
*r = (int) BFD_RELOC_UNUSED + c;
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);
}
const char *name = "lui";
const char *fmt = "t,u";
- assert (! mips_opts.mips16);
+ gas_assert (! mips_opts.mips16);
high_expr = *ep;
}
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
}
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;
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)
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)
}
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)
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;
dreg = tempreg;
else
{
- assert (tempreg == AT);
+ gas_assert (tempreg == AT);
macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
treg, AT, breg);
dreg = treg;
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);
{
/* 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);
dreg = tempreg;
else
{
- assert (tempreg == AT);
+ gas_assert (tempreg == AT);
macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
treg, AT, breg);
dreg = treg;
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,
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
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
}
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
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);
}
}
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
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);
}
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)
}
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,
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
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);
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)",
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 */
{
bfd_boolean ok;
- assert (strcmp (insn->name, str) == 0);
+ gas_assert (strcmp (insn->name, str) == 0);
ok = is_opcode_valid (insn, FALSE);
if (! ok)
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;
length = f64 ? 8 : 4;
}
- assert (length == (unsigned) (f64 ? 8 : 4));
+ gas_assert (length == (unsigned) (f64 ? 8 : 4));
if (*args == 'f'
|| (*args == 'l'
newname = RDATA_SECTION_NAME;
break;
case 'l':
- assert (g_switch_value >= 4);
+ gas_assert (g_switch_value >= 4);
newname = ".lit4";
break;
}
{
bfd_boolean ok;
- assert (strcmp (insn->name, str) == 0);
+ gas_assert (strcmp (insn->name, str) == 0);
ok = is_opcode_valid_16 (insn);
if (! ok)
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)
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. */
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
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:
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 ());
}
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
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)
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. */
/* 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;
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 */
}
}
- 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;
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."));
md_flush_pending_output ();
#endif
- assert (pdr_seg);
+ gas_assert (pdr_seg);
subseg_set (pdr_seg, 0);
/* Write the symbol. */
}
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;
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)
}
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;
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;
/* 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. */
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;
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)
{
/* 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
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;
}
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);
}
}
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;
}
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;
}
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;
}
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;
}
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)
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;
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)
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;
}
}
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);
}
}
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)
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;
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)
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;
}
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)
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;
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)
{
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. */
if (nalign == 0)
return;
- assert (nalign > 0);
+ gas_assert (nalign > 0);
if (now_seg == absolute_section)
{
struct spu_insn insn;
int i;
- assert (op);
+ gas_assert (op);
/* skip over instruction to find parameters */
#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;
debug ("Final opcode: %08X\n", insn.opcode);
debug ("\n");
}
-
#endif
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
- assert (reloc->howto != 0);
+ gas_assert (reloc->howto != 0);
return reloc;
}
{
/* 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];
}
/* 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 ();
}
/* 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);
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. */
/* 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;
break;
}
}
- assert (operator != (unsigned char) -1);
+ gas_assert (operator != (unsigned char) -1);
return operator;
}
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;
}
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
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;
offsetT val;
opname = *popname;
- assert (opname[0] != '_');
+ gas_assert (opname[0] != '_');
if (strcmp (opname, old_op) != 0)
return 0;
{
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))
{
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];
{
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)
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)
{
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)
{
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
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)
{
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
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)
{
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];
default:
/* The symbol should have a fixup associated with it. */
- assert (FALSE);
+ gas_assert (FALSE);
break;
}
}
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)
{
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;
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:
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;
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)
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;
return FALSE; /* We cannot use a relocation for this. */
break;
}
- assert (0);
+ gas_assert (0);
break;
}
}
{
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;
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;
case OP_CONSTANT:
case OP_LABEL:
default:
- assert (0);
+ gas_assert (0);
break;
}
}
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;
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)
{
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);
}
{
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);
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);
}
}
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;
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);
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;
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);
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;
|| 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));
|| 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));
}
else
tinsn->opcode = xtensa_nop_opcode;
- assert (tinsn->opcode != XTENSA_UNDEFINED);
+ gas_assert (tinsn->opcode != XTENSA_UNDEFINED);
}
}
/* 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)
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))
{
/* 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;
{
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]--;
}
}
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)
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++)
{
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);
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:
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;
}
break;
default:
- assert (0);
+ gas_assert (0);
break;
}
}
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)
{
if (is_jump)
{
- assert (finish_frag);
+ gas_assert (finish_frag);
frag_var (rs_machine_dependent,
UNREACHABLE_MAX_WIDTH, UNREACHABLE_MAX_WIDTH,
RELAX_UNREACHABLE,
}
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,
}
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);
}
}
break;
default:
/* We had darn well better know how big it is. */
- assert (0);
+ gas_assert (0);
break;
}
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);
}
{
if (target_size <= 4)
return 2;
- assert (target_size == 8);
+ gas_assert (target_size == 8);
return 3;
}
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)
{
== (address + fill + target_size - 1) >> align_pow)
return fill;
}
- assert (0);
+ gas_assert (0);
return 0;
}
return 3;
}
else
- assert (xtensa_fetch_width == 4);
+ gas_assert (xtensa_fetch_width == 4);
return 2;
}
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)
{
fill_size -= insn_size;
count++;
}
- assert (fill_size != 1); /* Bad algorithm. */
+ gas_assert (fill_size != 1); /* Bad algorithm. */
return count;
}
if (use_no_density)
return 3;
- assert (fill_size != 1); /* Bad argument. */
+ gas_assert (fill_size != 1); /* Bad argument. */
while (fill_size > 1)
{
if (n + 1 == count)
return insn_size;
}
- assert (0);
+ gas_assert (0);
return 0;
}
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);
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);
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:
*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:
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. */
*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;
}
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;
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));
{
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;
{
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;
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;
{
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)
return 3; /* case 7b */
return 0;
default:
- assert (0);
+ gas_assert (0);
}
}
else
switch (desired_diff)
{
case 1:
- assert (0);
+ gas_assert (0);
return 0;
case 2:
case 3:
return 1; /* case 7b */
return 0;
default:
- assert (0);
+ gas_assert (0);
return 0;
}
}
- assert (0);
+ gas_assert (0);
return 0;
}
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);
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;
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;
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)
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;
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;
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);
return;
}
- assert (fragP->fr_opcode != NULL);
+ gas_assert (fragP->fr_opcode != NULL);
/* Frags in this relaxation state should only contain
single instruction bundles. */
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;
{
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)
{
int bytes;
bfd_boolean is_loop;
- assert (fr_opcode != NULL);
+ gas_assert (fr_opcode != NULL);
xg_clear_vinsn (&cur_vinsn);
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];
}
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);
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);
}
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;
}
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);
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);
}
_("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);
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);
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);
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;
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);
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);
/* 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);
}
static bfd_boolean
get_frag_is_literal (const fragS *fragP)
{
- assert (fragP != NULL);
+ gas_assert (fragP != NULL);
return fragP->tc_frag_data.is_literal;
}
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,
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,
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++)
{
istack_top (IStack *stack)
{
int rec = stack->ninsn - 1;
- assert (!istack_empty (stack));
+ gas_assert (!istack_empty (stack));
return &stack->insn[rec];
}
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++;
}
{
int rec = stack->ninsn;
TInsn *insn;
- assert (!istack_full (stack));
+ gas_assert (!istack_full (stack));
insn = &stack->insn[rec];
tinsn_init (insn);
stack->ninsn++;
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]);
}
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)
{
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)
{
{
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)
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"));
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]);
offsetT
get_expr_const (const expressionS *s)
{
- assert (expr_is_const (s));
+ gas_assert (expr_is_const (s));
return s->X_add_number;
}
offsetT
get_expr_register (const expressionS *s)
{
- assert (expr_is_register (s));
+ gas_assert (expr_is_register (s));
return s->X_add_number;
}
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;
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;
}
{
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
/* 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);
*p++ = tmp;
done:
- assert (p == end);
+ gas_assert (p == end);
}
/* Handy routine to combine calls to the above two routines. */
/* 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)
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;
else
*p++ = DW_LNS_copy;
- assert (p == end);
+ gas_assert (p == end);
}
/* Generate a variant frag that we can use to relax address/line
/* 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,
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);
diff = resolve_symbol_value (frag->fr_symbol);
- assert (ca > 0);
+ gas_assert (ca > 0);
diff /= ca;
if (diff < 0x40)
ret = 0;
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;
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"));
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;
}
{
expressionS e;
e.X_op = O_max;
- assert (e.X_op == O_max);
+ gas_assert (e.X_op == O_max);
}
}
\f
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. */
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);
}
#endif
- assert (frchain_now->frch_last == frag_now);
+ gas_assert (frchain_now->frch_last == frag_now);
frag_now->fr_next = NULL;
}
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);
#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)
{
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;
}
/* 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)
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);
frchain_now = frcP;
frag_now = frcP->frch_frag_now;
- assert (frchain_now->frch_last == frag_now);
+ gas_assert (frchain_now->frch_last == frag_now);
}
/*
{
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);
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
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;
}
}
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. */
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
+ (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,
{
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)
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;
}
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));
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;
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,
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];
else
asympp = 0;
result = bfd_set_symtab (stdoutput, asympp, nsyms);
- assert (result);
+ gas_assert (result);
symbol_table_frozen = 1;
}