Update year range in copyright notice of binutils files
[deliverable/binutils-gdb.git] / gas / config / tc-mmix.c
index b7bfe14f6016f1afdfe386bcdc00cae03a2d967e..f3d1d56529566181444c84f2937ad1b6532d46c7 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-mmix.c -- Assembler for Don Knuth's MMIX.
-   Copyright (C) 2001-2016 Free Software Foundation, Inc.
+   Copyright (C) 2001-2018 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -395,9 +395,9 @@ const char line_comment_chars[] = "*#";
 
 const char line_separator_chars[] = ";";
 
-const char mmix_exp_chars[] = "eE";
+const char EXP_CHARS[] = "eE";
 
-const char mmix_flt_chars[] = "rf";
+const char FLT_CHARS[] = "rf";
 
 
 /* Fill in the offset-related part of GETA or Bcc.  */
@@ -640,7 +640,7 @@ get_putget_operands (struct mmix_opcode *insn, char *operands,
 /* Handle MMIX-specific option.  */
 
 int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
 {
   switch (c)
     {
@@ -1943,7 +1943,7 @@ s_prefix (int unused ATTRIBUTE_UNUSED)
 
   c = get_symbol_name (&p);
   
-  /* Reseting prefix?  */
+  /* Resetting prefix?  */
   if (*p == ':' && p[1] == 0)
     mmix_current_prefix = NULL;
   else
@@ -2272,12 +2272,12 @@ md_estimate_size_before_relax (fragS *fragP, segT segment)
    emitted is stored in *sizeP .  An error message is returned, or NULL on
    OK.  */
 
-char *
+const char *
 md_atof (int type, char *litP, int *sizeP)
 {
   if (type == 'r')
     type = 'f';
-  /* FIXME: Having 'f' in mmix_flt_chars (and here) makes it
+  /* FIXME: Having 'f' in FLT_CHARS (and here) makes it
      problematic to also have a forward reference in an expression.
      The testsuite wants it, and it's customary.
      We'll deal with the real problems when they come; we share the
@@ -2874,9 +2874,9 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
       return NULL;
     }
 
-  relP = (arelent *) xmalloc (sizeof (arelent));
+  relP = XNEW (arelent);
   gas_assert (relP != 0);
-  relP->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+  relP->sym_ptr_ptr = XNEW (asymbol *);
   *relP->sym_ptr_ptr = baddsy;
   relP->address = fixP->fx_frag->fr_address + fixP->fx_where;
 
@@ -3775,7 +3775,7 @@ mmix_frob_file (void)
 
       if (gregs == NULL)
        {
-         gregs = xmalloc (sizeof (*gregs));
+         gregs = XNEW (struct mmix_symbol_gregs);
          gregs->n_gregs = 0;
          symbol_set_tc (sym, &gregs);
          all_greg_symbols[n_greg_symbols++] = gregs;
@@ -3813,7 +3813,7 @@ int
 mmix_parse_predefined_name (char *name, expressionS *expP)
 {
   char *canon_name;
-  char *handler_charp;
+  const char *handler_charp;
   const char handler_chars[] = "DVWIOUZX";
   symbolS *symp;
 
@@ -4089,8 +4089,7 @@ s_loc (int ignore ATTRIBUTE_UNUSED)
       if (section == undefined_section)
        {
          struct loc_assert_s *next = loc_asserts;
-         loc_asserts
-           = (struct loc_assert_s *) xmalloc (sizeof (*loc_asserts));
+         loc_asserts = XNEW (struct loc_assert_s);
          loc_asserts->next = next;
          loc_asserts->old_seg = now_seg;
          loc_asserts->loc_sym = esym;
This page took 0.032421 seconds and 4 git commands to generate.