/* tc-xstormy16.c -- Assembler for the Sanyo XSTORMY16.
- Copyright (C) 2000-2016 Free Software Foundation, Inc.
+ Copyright (C) 2000-2020 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
int
md_parse_option (int c ATTRIBUTE_UNUSED,
- char * arg ATTRIBUTE_UNUSED)
+ const char * arg ATTRIBUTE_UNUSED)
{
return 0;
}
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));
}
case XSTORMY16_OPERAND_REL8_4:
fixP->fx_addnumber -= 2;
+ /* Fall through. */
case XSTORMY16_OPERAND_REL8_2:
fixP->fx_addnumber -= 2;
fixP->fx_pcrel = 1;
case XSTORMY16_OPERAND_REL12:
fixP->fx_where += 2;
- /* Fall through... */
+ /* Fall through. */
case XSTORMY16_OPERAND_REL12A:
fixP->fx_addnumber -= 2;
fixP->fx_pcrel = 1;
const CGEN_OPERAND *operand = cgen_operand_lookup_by_num (cd, opindex);
const char *errmsg;
bfd_reloc_code_real_type reloc_type;
- CGEN_FIELDS *fields = alloca (CGEN_CPU_SIZEOF_FIELDS (cd));
const CGEN_INSN *insn = fixP->fx_cgen.insn;
/* If the reloc has been fully resolved finish the operand here. */
/* FIXME: This duplicates the capabilities of code in BFD. */
if (fixP->fx_done)
{
+ CGEN_FIELDS *fields = xmalloc (CGEN_CPU_SIZEOF_FIELDS (cd));
+
CGEN_CPU_SET_FIELDS_BITSIZE (cd) (fields, CGEN_INSN_BITSIZE (insn));
CGEN_CPU_SET_VMA_OPERAND (cd) (cd, opindex, fields, (bfd_vma) value);
#endif
if (errmsg)
as_bad_where (fixP->fx_file, fixP->fx_line, "%s", errmsg);
+
+ free (fields);
}
if (fixP->fx_done)
number_to_chars_littleendian (buf, val, n);
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);