/* tc-i370.c -- Assembler for the IBM 360/370/390 instruction set.
Loosely based on the ppc files by Linas Vepstas <linas@linas.org> 1998, 99
- Copyright (C) 1994-2015 Free Software Foundation, Inc.
+ Copyright (C) 1994-2016 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
/* Structure to hold information about predefined registers. */
struct pd_reg
{
- char *name;
+ const char *name;
int value;
};
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
{
struct map_bfd
{
- char *string;
+ const char *string;
int length;
bfd_reloc_code_real_type reloc;
};
}
/* Put the string together. */
- complete = s = alloca (len + 1);
+ complete = s = xmalloc (len + 1);
format = macro->format;
while (*format != '\0')
{
/* Assemble the constructed instruction. */
md_assemble (complete);
+ free (complete);
}
/* This routine is called for each instruction to be assembled. */
}
}
\f
-char *
+const char *
md_atof (int type, char *litp, int *sizep)
{
/* 360/370/390 have two float formats: an old, funky 360 single-precision
{
int align = bfd_get_section_alignment (stdoutput, seg);
- return (addr + (1 << align) - 1) & (-1 << align);
+ return (addr + (1 << align) - 1) & -(1 << align);
}
/* We don't have any form of relaxing. */
any operands that need relocation. Due to the 12-bit naturew of
i370 addressing, this would be unusual. */
{
- char *sfile;
+ const char *sfile;
unsigned int sline;
/* Use expr_symbol_where to see if this is an expression