This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] config/tc-tic54x.c: Fix formatting.


Hi,

Attached is a patch to fix formatting of config/tc-tic54.x.

Thanks,

Kazu Hirata

===File ~/gnu/binutils/ChangeLog-tic54x=====================
2000-07-07  Kazu Hirata  <kazu@hxi.com>

	* config/tc-tic54x.c: Fix formatting.

============================================================

===File ~/gnu/binutils/tc-tic54x.patch======================
Index: tc-tic54x.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-tic54x.c,v
retrieving revision 1.1
diff -u -r1.1 tc-tic54x.c
--- tc-tic54x.c	2000/06/20 13:52:29	1.1
+++ tc-tic54x.c	2000/07/08 06:18:14
@@ -59,38 +59,44 @@
 
 const char comment_chars[] = ";";
 const char line_comment_chars[] = ";*#"; /* at column zero only */
-const char line_separator_chars[] = "";/* not permitted */
+const char line_separator_chars[] = ""; /* not permitted */
 
-/* characters which indicate that this is a floating point constant */
-const char FLT_CHARS[] = "fF"; 
-/* Characters that can be used to separate mantissa from exp in FP nums */
+/* Characters which indicate that this is a floating point constant.  */
+const char FLT_CHARS[] = "fF";
+/* Characters that can be used to separate mantissa from exp in FP
+   nums.  */
 const char EXP_CHARS[] = "eE";
 
-/* only word (et al.), align, or conditionals are allowed within
-   .struct/.union */
+/* Only word (et al.), align, or conditionals are allowed within
+   .struct/.union.  */
 #define ILLEGAL_WITHIN_STRUCT() \
 do if (current_stag != NULL){ \
 as_bad (_("pseudo-op illegal within .struct/.union"));return; } while (0)
 
 void
 md_show_usage (stream)
-  FILE *stream;
+     FILE *stream;
 {
   fprintf (stream, _("C54x-specific command line  options:\n"));
   fprintf (stream, _("-mfar-mode | -mf          Use extended addressing\n"));
   fprintf (stream, _("-mcpu=<CPU version>       Specify the CPU version\n"));
-  /*  fprintf (stream, _("-mcoff-version={0|1|2}    Select COFF version\n"));*/
+#if 0
+  fprintf (stream, _("-mcoff-version={0|1|2}    Select COFF version\n"));
+#endif
   fprintf (stream, _("-merrors-to-file <filename>\n"));
   fprintf (stream, _("-me <filename>            Redirect errors to a file\n"));
 }
 
 const char *md_shortopts = "";
-enum cpu_version { 
+
+enum cpu_version
+{
   VNONE = 0, V541 = 1, V542 = 2, V543 = 3, V545 = 5, V548 = 8, V549 = 9,
   V545LP = 15, V546LP = 16
 };
 
-enum address_mode {
+enum address_mode
+{
   c_mode,   /* 16-bit addresses */                         
   far_mode  /* >16-bit addresses */
 };
@@ -113,7 +119,7 @@
 
 size_t md_longopts_size = sizeof (md_longopts);
 
-static int assembly_begun = 0; 
+static int assembly_begun = 0;
 /* Addressing mode is not entirely implemented; the latest rev of the Other
    assembler doesn't seem to make any distinction whatsoever; all relocations
    are stored as extended relocatiosn.  Older versions used REL16 vs RELEXT16,
@@ -121,37 +127,35 @@
 
    The cpu version is kind of a waste of time as well.  There is one
    instruction (RND) for LP devices only, and several for devices with
-   extended addressing only.  We include it for compatibility.
- */
+   extended addressing only.  We include it for compatibility.  */
 static enum address_mode amode = c_mode;
-static enum cpu_version cpu  = VNONE;
+static enum cpu_version cpu = VNONE;
 
-/* include string substitutions in listing? */
+/* Include string substitutions in listing?  */
 static int listing_sslist = 0;
-/* did we do subsym substitutions on the line? */
+/* Did we do subsym substitutions on the line?  */
 static int substitution_line = 0;
-/* last label seen */
+/* Last label seen.  */
 static symbolS *last_label_seen = NULL;
-/* this ensures that all new labels are unique */
+/* This ensures that all new labels are unique.  */
 static int local_label_id;
 
 static struct hash_control *subsym_recurse_hash; /* prevent infinite recurse */
 static struct hash_control *math_hash; /* built-in math functions */
-/* allow maximum levels of macro nesting; level 0 is the main substitution
-   symbol table.  The other assembler only does 32 levels, so there! */
+/* Allow maximum levels of macro nesting; level 0 is the main substitution
+   symbol table.  The other assembler only does 32 levels, so there!  */
 static struct hash_control *subsym_hash[100];
-/* keep track of local labels so we can substitute them before GAS sees them 
+/* Keep track of local labels so we can substitute them before GAS sees them 
    since macros use their own 'namespace' for local labels, use a separate hash
 
    We do our own local label handling 'cuz it's subtly different from the
    stock GAS handling.
 
    We use our own macro nesting counter, since GAS overloads it when expanding
-   other things (like conditionals and repeat loops).
- */
+   other things (like conditionals and repeat loops).  */
 static int macro_level = 0;
 static struct hash_control *local_label_hash[100];
-/* keep track of struct/union tags */
+/* Keep track of struct/union tags.  */
 static struct hash_control *stag_hash;
 static struct hash_control *op_hash;
 static struct hash_control *parop_hash;
@@ -215,8 +219,8 @@
 static segT stag_saved_seg;
 static subsegT stag_saved_subseg;
 
-/* output a single character (upper octect is zero) */
-static void 
+/* Output a single character (upper octect is zero).  */
+static void
 tic54x_emit_char (char c)
 {
   expressionS exp;
@@ -226,16 +230,16 @@
   emit_expr (&exp, 2);
 }
 
-/* walk backwards in the frag chain */
+/* Walk backwards in the frag chain.  */
 static fragS *
 frag_prev (frag, seg)
-  fragS *frag;
-  segT seg;
+     fragS *frag;
+     segT seg;
 {
   segment_info_type *seginfo = seg_info (seg);
   fragS *fragp;
 
-  for (fragp = seginfo->frchainP->frch_root;fragp;fragp = fragp->fr_next)
+  for (fragp = seginfo->frchainP->frch_root; fragp; fragp = fragp->fr_next)
     if (fragp->fr_next == frag)
       return fragp;
   return NULL;
@@ -243,27 +247,27 @@
 
 static fragS *
 bit_offset_frag (frag, seg)
-  fragS *frag;
-  segT seg;
+     fragS *frag;
+     segT seg;
 {
   while (frag != NULL)
     {
-      if (frag->fr_fix == 0 
-          && frag->fr_opcode == NULL 
-          && frag->tc_frag_data == 0)
-        frag = frag_prev (frag, seg);
+      if (frag->fr_fix == 0
+	  && frag->fr_opcode == NULL
+	  && frag->tc_frag_data == 0)
+	frag = frag_prev (frag, seg);
       else
-        return frag;
+	return frag;
     }
   return NULL;
 }
 
-/* return the number of bits allocated in the most recent word, or zero if
-   none. .field/.space/.bes may leave words partially allocated */
+/* Return the number of bits allocated in the most recent word, or zero if
+   none. .field/.space/.bes may leave words partially allocated.  */
 static int
 frag_bit_offset (frag, seg)
-  fragS *frag;
-  segT seg;
+     fragS *frag;
+     segT seg;
 {
   frag = bit_offset_frag (frag, seg);
   if (frag)
@@ -273,8 +277,8 @@
   return 0;
 }
 
-/* read an expression from a C string; returns a pointer past the end of the
-   expression  */
+/* Read an expression from a C string; returns a pointer past the end of the
+   expression.  */
 static char *
 parse_expression (char *str, expressionS * exp)
 {
@@ -293,11 +297,10 @@
    
    .eval is the only pseudo-op allowed to perform arithmetic on substitution
    symbols.  all other use of symbols defined with .asg are currently
-   unsupported. 
-*/
-static void 
+   unsupported.  */
+static void
 tic54x_asg (x)
-  int x ATTRIBUTE_UNUSED;
+     int x ATTRIBUTE_UNUSED;
 {
   int c;
   char *name;
@@ -317,11 +320,11 @@
     {
       str = input_line_pointer;
       while ((c = *input_line_pointer) != ',')
-        {
-          if (is_end_of_line[(int)*input_line_pointer])
-            break;
-          ++input_line_pointer;
-        }
+	{
+	  if (is_end_of_line[(int) *input_line_pointer])
+	    break;
+	  ++input_line_pointer;
+	}
       *input_line_pointer = 0;
     }
   if (c != ',')
@@ -355,11 +358,10 @@
    There's something screwy about this.  The other assembler sometimes does and
    sometimes doesn't substitute symbols defined with .eval.  
    We'll put the symbols into the subsym table as well as the normal symbol
-   table, since that's what works best.
-*/
-static void 
+   table, since that's what works best.  */
+static void
 tic54x_eval (x)
-  int x ATTRIBUTE_UNUSED;
+     int x ATTRIBUTE_UNUSED;
 {
   char c;
   int value;
@@ -379,11 +381,11 @@
   if (quoted)
     {
       if (*input_line_pointer != '"')
-        {
-          as_bad (_("Unterminated string after absolute expression"));
-          ignore_rest_of_line ();
-          return;
-        }
+	{
+	  as_bad (_("Unterminated string after absolute expression"));
+	  ignore_rest_of_line ();
+	  return;
+	}
       ++input_line_pointer;
     }
   if (*input_line_pointer++ != ',')
@@ -394,7 +396,7 @@
     }
   name = input_line_pointer;
   c = get_symbol_end ();	/* Get terminator.  */
-  tmp = xmalloc (strlen (name)+1);
+  tmp = xmalloc (strlen (name) + 1);
   name = strcpy (tmp, name);
   *input_line_pointer = c;
 
@@ -411,7 +413,7 @@
 
   /* The "other" assembler sometimes doesn't put .eval's in the subsym table
      But since there's not written rule as to when, don't even bother trying
-     to match their behavior */
+     to match their behavior.  */
   sprintf (valuestr, "%d", value);
   tmp = xmalloc (strlen (valuestr) + 1);
   strcpy (tmp, valuestr);
@@ -432,12 +434,10 @@
       allocated crosses the page boundary (128 words).
       if there's not enough space, create a hole and align with the next page
       boundary. 
-      (not yet implemented)
-
- */
-static void 
+      (not yet implemented)  */
+static void
 tic54x_bss (x)
-  int x ATTRIBUTE_UNUSED;
+     int x ATTRIBUTE_UNUSED;
 {
   char c;
   char *name;
@@ -451,8 +451,8 @@
 
   ILLEGAL_WITHIN_STRUCT ();
 
-  current_seg = now_seg;	/* save current seg.  */
-  current_subseg = now_subseg;	/* save current subseg.  */
+  current_seg = now_seg;	/* Save current seg.  */
+  current_subseg = now_subseg;	/* Save current subseg.  */
 
   name = input_line_pointer;
   c = get_symbol_end ();	/* Get terminator.  */
@@ -477,17 +477,17 @@
       /* the blocking flag may be missing */
       ++input_line_pointer;
       if (*input_line_pointer != ',')
-          block = get_absolute_expression ();
+	block = get_absolute_expression ();
       else
-          block = 0;
+	block = 0;
 
       if (*input_line_pointer == ',')
-        {
-          ++input_line_pointer;
-          align = get_absolute_expression ();
-        }
+	{
+	  ++input_line_pointer;
+	  align = get_absolute_expression ();
+	}
       else
-        align = 0;
+	align = 0;
     }
   else
     block = align = 0;
@@ -500,7 +500,7 @@
 
   symbol_set_frag (symbolP, frag_now);
   p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
-		(offsetT)(words << 1), (char *) 0);
+		(offsetT) (words << 1), (char *) 0);
   *p = 0;			/* fill char.  */
 
   S_SET_SEGMENT (symbolP, bss_section);
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]