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]
Other format: [Raw text]

[patch] tc-ia64.[ch]: Fix formatting.


Hi,

Attached is a patch to fix formatting.  OK to apply?

Kazu Hirata

2002-05-05  Kazu Hirata  <kazu@cs.umass.edu>

	* config/tc-ia64.c: Fix formatting.
	* config/tc-ia64.h: Likewise.

Index: tc-ia64.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.c,v
retrieving revision 1.67
diff -u -r1.67 tc-ia64.c
--- tc-ia64.c	2 Apr 2002 00:32:41 -0000	1.67
+++ tc-ia64.c	5 May 2002 19:47:51 -0000
@@ -880,7 +880,7 @@
 /* Build the unwind section name by appending the (possibly stripped)
    text section NAME to the unwind PREFIX.  The resulting string
    pointer is assigned to RESULT.  The string is allocated on the
-   stack, so this must be a macro... */
+   stack, so this must be a macro...  */
 #define make_unw_section_name(special, text_name, result)		   \
   {									   \
     const char *_prefix = special_section_name[special];		   \
@@ -961,11 +961,11 @@
 
 int
 ia64_elf_section_type (str, len)
-	const char *str;
-	size_t len;
+     const char *str;
+     size_t len;
 {
 #define STREQ(s) ((len == sizeof (s) - 1) && (strncmp (str, s, sizeof (s) - 1) == 0))
-  
+
   if (STREQ (ELF_STRING_ia64_unwind_info))
     return SHT_PROGBITS;
 
@@ -980,10 +980,10 @@
 
   if (STREQ ("init_array"))
     return SHT_INIT_ARRAY;
-  
+
   if (STREQ ("fini_array"))
     return SHT_FINI_ARRAY;
-  
+
   return -1;
 #undef STREQ
 }
@@ -2821,12 +2821,12 @@
   if (x != 0)
     extra = md.pointer_size - x;
 
-  /* Add 8 for the header + a pointer for the 
+  /* Add 8 for the header + a pointer for the
      personality offset.  */
   *mem = xmalloc (size + extra + 8 + md.pointer_size);
 
   /* Clear the padding area and personality.  */
-  memset (*mem + 8 + size, 0 , extra + md.pointer_size);
+  memset (*mem + 8 + size, 0, extra + md.pointer_size);
 
   /* Initialize the header area.  */
   if (unwind.personality_routine)
@@ -3288,7 +3288,7 @@
       /* Add the personality address to the image.  */
       if (unwind.personality_routine != 0)
 	{
-	  exp.X_op  = O_symbol;
+	  exp.X_op = O_symbol;
 	  exp.X_add_symbol = unwind.personality_routine;
 	  exp.X_add_number = 0;
 
@@ -3299,7 +3299,7 @@
 	      else
 		reloc = BFD_RELOC_IA64_LTOFF_FPTR32MSB;
 	    }
-          else
+	  else
 	    {
 	      if (md.flags & EF_IA_64_ABI64)
 		reloc = BFD_RELOC_IA64_LTOFF_FPTR64LSB;
@@ -3308,7 +3308,7 @@
 	    }
 
 	  fix_new_exp (frag_now, frag_now_fix () - md.pointer_size,
-		       md.pointer_size, & exp, 0, reloc);
+		       md.pointer_size, &exp, 0, reloc);
 	  unwind.personality_routine = 0;
 	}
     }
@@ -3771,7 +3771,7 @@
     lpc->prologue_count = count;
   else
     {
-      label_prologue_count * new_lpc = xmalloc (sizeof (* new_lpc));
+      label_prologue_count *new_lpc = xmalloc (sizeof (* new_lpc));
 
       new_lpc->next = unwind.saved_prologue_counts;
       new_lpc->label_number = lbl;
@@ -3783,8 +3783,8 @@
 static void
 free_saved_prologue_counts ()
 {
-  label_prologue_count * lpc = unwind.saved_prologue_counts;
-  label_prologue_count * next;
+  label_prologue_count *lpc = unwind.saved_prologue_counts;
+  label_prologue_count *next;
 
   while (lpc != NULL)
     {
@@ -4020,7 +4020,7 @@
 	    lets GNU ld support programs with multiple segments
 	    containing unwind info (as might be the case for certain
 	    embedded applications).
-	    
+
 	(c) An error is issued if there would be a name clash.
   */
   text_name = segment_name (saved_seg);
@@ -4060,7 +4060,7 @@
       where = frag_now_fix () - (3 * md.pointer_size);
       bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8;
 
-      /* Issue the values of  a) Proc Begin, b) Proc End, c) Unwind Record. */
+      /* Issue the values of  a) Proc Begin, b) Proc End, c) Unwind Record.  */
       e.X_op = O_pseudo_fixup;
       e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
       e.X_add_number = 0;
@@ -5137,7 +5137,7 @@
 
     case IA64_OPND_R3_2:
       if (e->X_op == O_register && e->X_add_number >= REG_GR)
-	{ 
+	{
 	  if (e->X_add_number < REG_GR + 4)
 	    return OPERAND_MATCH;
 	  else if (e->X_add_number < REG_GR + 128)
@@ -5807,7 +5807,7 @@
 		  && strncmp (idesc->name, "ptr", 3) != 0
 		  && strncmp (idesc->name, "ptc", 3) != 0
 		  && strncmp (idesc->name, "probe", 5) != 0)
-	      return 0;
+		return 0;
 	    }
 	  if (prev_group->g_reg_set_conditionally[regno])
 	    return 1;
@@ -6199,12 +6199,12 @@
 	  continue;		/* try next slot */
 	}
 
-	{
-	  bfd_vma addr;
+      {
+	bfd_vma addr;
 
-	  addr = frag_now->fr_address + frag_now_fix () - 16 + i;
-	  dwarf2_gen_line_info (addr, &md.slot[curr].debug_line);
-	}
+	addr = frag_now->fr_address + frag_now_fix () - 16 + i;
+	dwarf2_gen_line_info (addr, &md.slot[curr].debug_line);
+      }
 
       if (errata_nop_necessary_p (md.slot + curr, insn_unit))
 	as_warn (_("Additional NOP may be necessary to workaround Itanium processor A/B step errata"));
@@ -7459,7 +7459,7 @@
 	    }
 	  else
 	    {
-	      for (i = idesc->num_outputs;i < NELEMS (idesc->operands); i++)
+	      for (i = idesc->num_outputs; i < NELEMS (idesc->operands); i++)
 		if (idesc->operands[i] == IA64_OPND_B1
 		    || idesc->operands[i] == IA64_OPND_B2)
 		  {
@@ -7981,7 +7981,7 @@
 	      && idesc->operands[0] == IA64_OPND_PR)
 	    {
 	      mask = CURR_SLOT.opnd[2].X_add_number;
-	      if (mask & ((valueT) 1<<16))
+	      if (mask & ((valueT) 1 << 16))
 		for (i = 16; i < 63; i++)
 		  {
 		    specs[count] = tmpl;
@@ -8472,13 +8472,13 @@
 	  specs[count++] = tmpl;
 	}
       else if (note == 7)
-        {
-          valueT mask = 0;
-          if (idesc->operands[2] == IA64_OPND_IMM17)
-            mask = CURR_SLOT.opnd[2].X_add_number;
-          if (mask & ((valueT) 1 << 63))
+	{
+	  valueT mask = 0;
+	  if (idesc->operands[2] == IA64_OPND_IMM17)
+	    mask = CURR_SLOT.opnd[2].X_add_number;
+	  if (mask & ((valueT) 1 << 63))
 	    specs[count++] = tmpl;
-        }
+	}
       else if (note == 11)
 	{
 	  if ((idesc->operands[0] == IA64_OPND_P1
@@ -8500,8 +8500,8 @@
 	{
 	  if (rsrc_write)
 	    {
-              int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P;
-              int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
+	      int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P;
+	      int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
 	      int or_andcm = strstr (idesc->name, "or.andcm") != NULL;
 	      int and_orcm = strstr (idesc->name, "and.orcm") != NULL;
 
@@ -8509,7 +8509,7 @@
 		  && (idesc->operands[0] == IA64_OPND_P1
 		      || idesc->operands[0] == IA64_OPND_P2))
 		{
-                  specs[count] = tmpl;
+		  specs[count] = tmpl;
 		  specs[count++].cmp_type =
 		    (or_andcm ? CMP_OR : (and_orcm ? CMP_AND : CMP_NONE));
 		}
@@ -8517,7 +8517,7 @@
 		  && (idesc->operands[1] == IA64_OPND_P1
 		      || idesc->operands[1] == IA64_OPND_P2))
 		{
-                  specs[count] = tmpl;
+		  specs[count] = tmpl;
 		  specs[count++].cmp_type =
 		    (or_andcm ? CMP_AND : (and_orcm ? CMP_OR : CMP_NONE));
 		}
@@ -8756,8 +8756,8 @@
 
 static int
 has_suffix_p (name, suffix)
-      const char *name;
-      const char *suffix;
+     const char *name;
+     const char *suffix;
 {
   size_t namelen = strlen (name);
   size_t sufflen = strlen (suffix);
@@ -9986,26 +9986,27 @@
       break;
 
     case 8:
-      /* In 32-bit mode, data8 could mean function descriptors too. */
+      /* In 32-bit mode, data8 could mean function descriptors too.  */
       if (exp->X_op == O_pseudo_fixup
-          && exp->X_op_symbol
-          && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC
-          && !(md.flags & EF_IA_64_ABI64))
-        {
-          if (target_big_endian)
-            code = BFD_RELOC_IA64_IPLTMSB;
-          else
-            code = BFD_RELOC_IA64_IPLTLSB;
-          exp->X_op = O_symbol;
-          break;
-        }
-       else {
-         if (target_big_endian)
-	   code = BFD_RELOC_IA64_DIR64MSB;
-         else
-	   code = BFD_RELOC_IA64_DIR64LSB;
-         break;
-       }
+	  && exp->X_op_symbol
+	  && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC
+	  && !(md.flags & EF_IA_64_ABI64))
+	{
+	  if (target_big_endian)
+	    code = BFD_RELOC_IA64_IPLTMSB;
+	  else
+	    code = BFD_RELOC_IA64_IPLTLSB;
+	  exp->X_op = O_symbol;
+	  break;
+	}
+      else
+	{
+	  if (target_big_endian)
+	    code = BFD_RELOC_IA64_DIR64MSB;
+	  else
+	    code = BFD_RELOC_IA64_DIR64LSB;
+	  break;
+	}
 
     case 16:
       if (exp->X_op == O_pseudo_fixup
@@ -10162,8 +10163,8 @@
 	}
       break;
 
-    case  FUNC_IPLT_RELOC:
-        break;
+    case FUNC_IPLT_RELOC:
+      break;
 
     default:
       abort ();
@@ -10267,11 +10268,11 @@
 void
 md_apply_fix3 (fix, valP, seg)
      fixS *fix;
-     valueT * valP;
+     valueT *valP;
      segT seg ATTRIBUTE_UNUSED;
 {
   char *fixpos;
-  valueT value = * valP;
+  valueT value = *valP;
   int adjust = 0;
 
   fixpos = fix->fx_frag->fr_literal + fix->fx_where;
Index: tc-ia64.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.h,v
retrieving revision 1.18
diff -u -r1.18 tc-ia64.h
--- tc-ia64.h	4 Mar 2002 20:40:48 -0000	1.18
+++ tc-ia64.h	5 May 2002 19:47:51 -0000
@@ -249,7 +249,7 @@
   } record;
 } unwind_record;
 
-/* This expression evaluates to false if the relocation is for a local 
+/* This expression evaluates to false if the relocation is for a local
    object for which we still want to do the relocation at runtime.
    True if we are willing to perform this relocation while building
    the .o file.  This is only used for pcrel relocations.  */


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