/* tc-m32r.c -- Assembler for the Renesas M32R.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
/* Non-zero if the programmer should not receive any messages about
parallel instruction with potential or real constraint violations.
The ability to suppress these messages is intended only for hardware
- vendors testing the chip. It superceedes
+ vendors testing the chip. It supersedes
warn_explicit_parallel_conflicts. */
static int ignore_parallel_conflicts = 0;
static struct m32r_hi_fixup *m32r_hi_fixup_list;
\f
-struct
+static const struct
{
enum bfd_architecture bfd_mach;
int mach_flags;
}
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
fprintf (stream, _("\
-warn-explicit-parallel-conflicts warn when parallel instructions\n"));
fprintf (stream, _("\
- might violate contraints\n"));
+ might violate constraints\n"));
fprintf (stream, _("\
-no-warn-explicit-parallel-conflicts do not warn when parallel\n"));
fprintf (stream, _("\
- instructions might violate contraints\n"));
+ instructions might violate constraints\n"));
fprintf (stream, _("\
-Wp synonym for -warn-explicit-parallel-conflicts\n"));
fprintf (stream, _("\
else
{
- lnk = (sym_linkS *) xmalloc (sizeof (sym_linkS));
+ lnk = XNEW (sym_linkS);
lnk->symbol = symbolP;
lnk->next = debug_sym_link;
debug_sym_link = lnk;
{
symbolS *symbolP = syms->symbol;
next_syms = syms->next;
- input_line_pointer = ".\n";
+ input_line_pointer = (char *) ".\n";
pseudo_set (symbolP);
free ((char *) syms);
}
/* This is copied from perform_an_assembly_pass. */
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, sbss_section, applicable & SEC_ALLOC);
+ bfd_set_section_flags (sbss_section,
+ applicable & (SEC_ALLOC | SEC_SMALL_DATA));
subseg_set (seg, subseg);
but with the name .scommon. */
scom_section = *bfd_com_section_ptr;
scom_section.name = ".scommon";
+ scom_section.flags = SEC_IS_COMMON | SEC_SMALL_DATA;
scom_section.output_section = & scom_section;
scom_section.symbol = & scom_symbol;
scom_section.symbol_ptr_ptr = & scom_section.symbol;
valueT
md_section_align (segT segment, valueT size)
{
- int align = bfd_get_section_alignment (stdoutput, segment);
+ int align = bfd_section_alignment (segment);
return ((size + (1 << align) - 1) & -(1 << align));
}
gas_assert (reloc_type == BFD_RELOC_M32R_HI16_SLO
|| reloc_type == BFD_RELOC_M32R_HI16_ULO);
- hi_fixup = xmalloc (sizeof (* hi_fixup));
+ hi_fixup = XNEW (struct m32r_hi_fixup);
hi_fixup->fixp = fixP;
hi_fixup->seg = now_seg;
hi_fixup->next = m32r_hi_fixup_list;
of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-/* Equal to MAX_PRECISION in atof-ieee.c. */
-#define MAX_LITTLENUMS 6
-
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
arelent * reloc;
bfd_reloc_code_real_type code;
- reloc = xmalloc (sizeof (* reloc));
+ reloc = XNEW (arelent);
- reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+ reloc->sym_ptr_ptr = XNEW (asymbol *);
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
&& S_IS_DEFINED (fixP->fx_addsy)
&& ! S_IS_EXTERNAL(fixP->fx_addsy)
&& ! S_IS_WEAK(fixP->fx_addsy))
- /* Already used fx_offset in the opcode field itseld. */
+ /* Already used fx_offset in the opcode field itself. */
reloc->addend = fixP->fx_offset;
else
reloc->addend = fixP->fx_addnumber;