Constify more
[deliverable/binutils-gdb.git] / gas / config / tc-tic6x.c
index 1dd2e9223c518146e7d23e073ec53809416fbaf5..2135dbf225b3e33de6d89e787bf5e35a77636b5d 100644 (file)
@@ -1,5 +1,5 @@
 /* TI C6X assembler.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2016 Free Software Foundation, Inc.
    Contributed by Joseph Myers <joseph@codesourcery.com>
                  Bernd Schmidt  <bernds@codesourcery.com>
 
@@ -265,7 +265,7 @@ tic6x_use_pid (const char *arg)
 /* Parse a target-specific option.  */
 
 int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
 {
   switch (c)
     {
@@ -471,17 +471,15 @@ s_tic6x_personalityindex (int ignored ATTRIBUTE_UNUSED)
 static void
 s_tic6x_personality (int ignored ATTRIBUTE_UNUSED)
 {
-  char *name, *p, c;
+  char *name, c;
   tic6x_unwind_info *unwind = tic6x_get_unwind ();
 
   if (unwind->personality_routine || unwind->personality_index != -1)
     as_bad (_("duplicate .personality directive"));
 
-  name = input_line_pointer;
-  c = get_symbol_end ();
-  p = input_line_pointer;
+  c = get_symbol_name (&name);
   unwind->personality_routine = symbol_find_or_make (name);
-  *p = c;
+  (void) restore_line_pointer (c);
   demand_empty_rest_of_line ();
 }
 
@@ -570,12 +568,11 @@ s_tic6x_scomm (int ignore ATTRIBUTE_UNUSED)
   offsetT align;
   int align2;
 
-  name = input_line_pointer;
-  c = get_symbol_end ();
+  c = get_symbol_name (&name);
 
   /* Just after name is now '\0'.  */
   p = input_line_pointer;
-  *p = c;
+  (void) restore_line_pointer (c);
   SKIP_WHITESPACE ();
   if (*input_line_pointer != ',')
     {
@@ -4081,7 +4078,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
 
 /* Convert a floating-point number to target (IEEE) format.  */
 
-char *
+const char *
 md_atof (int type, char *litP, int *sizeP)
 {
   return ieee_md_atof (type, litP, sizeP, target_big_endian);
@@ -4487,7 +4484,7 @@ md_section_align (segT segment ATTRIBUTE_UNUSED,
   /* Round up section sizes to ensure that text sections consist of
      whole fetch packets.  */
   int align = bfd_get_section_alignment (stdoutput, segment);
-  return ((size + (1 << align) - 1) & ((valueT) -1 << align));
+  return ((size + (1 << align) - 1) & (-((valueT) 1 << align)));
 }
 
 /* No special undefined symbol handling needed for now.  */
This page took 0.036299 seconds and 4 git commands to generate.